:root {
  color-scheme: light;
  --bg: #f2f5f6;
  --surface: #ffffff;
  --surface-2: #f8fafb;
  --ink: #18221f;
  --muted: #66736f;
  --line: #dce2e4;
  --line-soft: #e9edef;
  --teal: #0f877f;
  --teal-dark: #0b6e68;
  --teal-soft: #e0f2ef;
  --blue: #3468b7;
  --blue-soft: #e6edfa;
  --amber: #9f6816;
  --amber-soft: #f8ecd7;
  --green: #2f7b4c;
  --green-soft: #e0f1e6;
  --red: #b0443d;
  --red-soft: #f8e3e1;
  --shadow: 0 10px 26px rgba(27, 43, 38, 0.06);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.55 "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

button,
input,
textarea { font: inherit; }

button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, transform .14s ease;
}

button:hover { border-color: #abb8b7; background: #f8fbfa; }
button:active { transform: translateY(1px); }
button:disabled { cursor: not-allowed; opacity: .48; transform: none; }

button.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
  font-weight: 800;
}

button.primary:hover { border-color: var(--teal-dark); background: var(--teal-dark); }

button.danger {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
  font-weight: 800;
}

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

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hidden { display: none !important; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
}

.brand,
.topbar-actions,
.header-worker-state,
.section-heading,
.inline-actions {
  display: flex;
  align-items: center;
}

.brand { gap: 10px; min-width: 0; }

.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #26322f;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.brand h1,
.brand p,
.stage-heading h2,
.stage-heading p,
.section-heading h3,
.section-heading span { margin: 0; }
.brand h1 { font-size: 18px; line-height: 1.25; }
.brand p { color: var(--muted); font-size: 12px; }

.topbar-actions { gap: 8px; }
.header-worker-state { gap: 7px; margin-right: 6px; color: #52605b; font-size: 13px; }
.status-orb { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #9da6a4; }
.status-orb.online { background: #25a45a; box-shadow: 0 0 0 3px #dff3e7; }
.status-orb.attention { background: #c78a18; box-shadow: 0 0 0 3px rgba(199, 138, 24, .14); }
.status-orb.critical { background: #c44747; box-shadow: 0 0 0 3px rgba(196, 71, 71, .14); }
.system-health-card { padding: 12px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--surface-2); }
.system-health-card > div { display: flex; align-items: center; gap: 9px; }
.system-health-card p { margin: 9px 0 4px; color: var(--text); font-size: 13px; }
.system-health-card small { color: var(--muted); line-height: 1.55; }
.system-health-card.critical { border-color: rgba(196, 71, 71, .35); background: rgba(196, 71, 71, .06); }
.system-health-card.attention { border-color: rgba(199, 138, 24, .32); background: rgba(199, 138, 24, .06); }
.system-health-issues { display: grid; gap: 7px; margin-top: 9px; }
.system-health-issue { padding: 9px 10px; border-left: 3px solid var(--line); border-radius: 5px; background: var(--surface-2); }
.system-health-issue.critical { border-left-color: #c44747; }
.system-health-issue.warning,
.system-health-issue.action { border-left-color: #c78a18; }
.system-health-issue strong,
.system-health-issue small { display: block; }
.system-health-issue small { margin-top: 3px; color: var(--muted); }

.icon-button {
  width: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
}

.text-button { background: transparent; }

.stage-nav {
  position: sticky;
  top: 64px;
  z-index: 35;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 4px 14px rgba(23, 37, 33, .04);
}

.stage-tab {
  position: relative;
  min-width: 0;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #4e5a57;
}

.stage-tab:hover { border: 0; background: #f8faf9; }
.stage-tab::after { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: transparent; content: ""; }
.stage-tab.active { color: var(--teal); background: #f7fcfb; }
.stage-tab.active::after { background: var(--teal); }
.stage-tab-icon { width: 34px; height: 34px; display: grid; place-items: center; }
.stage-tab-icon svg { width: 25px; height: 25px; }
.stage-tab > span:last-child { min-width: 0; display: grid; gap: 2px; text-align: left; }
.stage-tab strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.stage-tab small { color: var(--muted); font-size: 12px; }

main { width: 100%; padding: 20px; }
.stage-workspace { width: 100%; }

.boot-skeleton { display: none; width: 100%; }
.app-booting .boot-skeleton { display: block; }
.app-booting .stage-workspace { display: none; }

.boot-skeleton-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.boot-skeleton-header > div { min-width: 0; display: grid; gap: 2px; }
.boot-skeleton-header strong { font-size: 18px; }
.boot-skeleton-header span:last-child { color: var(--muted); font-size: 12px; }

.boot-spinner {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 3px solid #d8e3e1;
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: boot-spin .8s linear infinite;
}

.boot-action-placeholder {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.boot-record-placeholder {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.boot-record-placeholder > div {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(180px, 1.8fr) minmax(120px, .8fr) 96px;
  align-items: center;
  gap: 24px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.boot-record-placeholder > div:last-child { border-bottom: 0; }
.skeleton-line,
.skeleton-button,
.skeleton-pill {
  display: block;
  background: linear-gradient(90deg, #e7eceb 22%, #f4f7f6 42%, #e7eceb 62%);
  background-size: 260% 100%;
  animation: boot-shimmer 1.35s ease-in-out infinite;
}
.skeleton-line { width: 100%; height: 12px; border-radius: 5px; }
.skeleton-line-wide { width: min(420px, 70%); height: 15px; }
.skeleton-line-title { max-width: 360px; height: 15px; }
.skeleton-line-meta { max-width: 180px; height: 11px; }
.skeleton-line-short { width: 62%; }
.skeleton-line-medium { width: 78%; }
.skeleton-button { width: 108px; height: 38px; flex: 0 0 108px; border-radius: 7px; }
.skeleton-pill { width: 82px; height: 24px; border-radius: 7px; background: #e0f2ef; }

@keyframes boot-spin { to { transform: rotate(360deg); } }
@keyframes boot-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.stage-heading {
  min-height: 64px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.stage-heading h2 { font-size: 26px; line-height: 1.25; }
.stage-heading p { margin-top: 4px; color: var(--muted); }
.stage-meta { display: grid; justify-items: end; gap: 2px; padding-top: 3px; }
.stage-meta strong { font-size: 16px; }
.stage-meta span { color: var(--muted); font-size: 12px; }

.back-button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 8px;
  padding: 0 7px 0 3px;
  border: 0;
  background: transparent;
  color: var(--teal);
  font-weight: 800;
}
.back-button svg { width: 18px; height: 18px; }

.stage-action-bar {
  min-height: 70px;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stage-batch-form {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 152px auto;
  align-items: center;
  gap: 14px;
}
.source-actions { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .38fr); gap: 16px; align-items: center; }
.source-filter-bar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.source-filter-section { flex: 0 0 auto; display: grid; gap: 5px; }
.source-filter-section-title { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .06em; }
.source-filter-section-items { display: flex; align-items: center; gap: 7px; }
.source-filter-bar button {
  min-height: 36px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
}
.source-filter-bar button strong { min-width: 20px; color: inherit; text-align: center; }
.source-filter-bar button.active { border-color: var(--teal); background: var(--teal-soft); color: var(--teal); }
.batch-review-bar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid #c9ddd9;
  border-radius: 8px;
  background: #f5fbf9;
}
.batch-review-copy { min-width: 0; display: grid; gap: 1px; }
.batch-review-copy strong { color: var(--teal-dark); font-size: 14px; }
.batch-review-copy small { color: var(--muted); }
.batch-review-tools { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.batch-profile-form { width: 100%; display: grid; grid-template-columns: minmax(180px, .75fr) minmax(300px, 1.35fr) auto; align-items: center; gap: 14px; }
.batch-profile-input { min-width: 0; display: grid; gap: 4px; color: var(--ink); font-size: 12px; font-weight: 800; }
.batch-profile-input input,
.batch-profile-input textarea { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-weight: 500; resize: vertical; }
.batch-profile-input input:focus,
.batch-profile-input textarea:focus { outline: 2px solid rgba(17, 130, 117, .16); border-color: var(--teal); }
.batch-profile-input small { color: var(--muted); font-size: 11px; font-weight: 500; }
.batch-profile-input.profile-field-invalid > span,
.batch-profile-input .profile-field-error { color: #a33a32; }
.batch-profile-input.profile-field-invalid input,
.batch-profile-input.profile-field-invalid textarea { border-color: #c9655b; background: #fff9f8; }
.batch-mode-switch { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid #c9ddd9; border-radius: 8px; background: #fff; }
.batch-mode-switch button { min-height: 30px; padding: 0 9px; border: 0; background: transparent; color: var(--muted); }
.batch-mode-switch button.active { background: var(--teal-soft); color: var(--teal-dark); }
.number-stepper.compact { width: 126px; height: 36px; grid-template-columns: 34px 1fr 34px; }
.number-stepper.compact button { min-height: 34px; font-size: 17px; }
.detail-loading-shell { min-height: 52vh; }
.detail-loading-state { min-height: 220px; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; color: var(--muted); }
.detail-loading-state strong { color: var(--ink); font-size: 17px; }
.detail-loading-state i { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
.worker-incident { margin: 0 0 14px; padding: 13px 16px; display: flex; gap: 8px 14px; align-items: center; flex-wrap: wrap; border: 1px solid #f0b8ad; border-radius: 14px; background: #fff1ee; color: #8b2f22; }
.worker-incident strong { font-size: 14px; }
.worker-incident span { font-size: 13px; line-height: 1.5; }
.source-task-live.paused { border-color: #f0b8ad; background: #fff1ee; }
.source-task-live.paused i { background: #c84f3d; box-shadow: 0 0 0 5px rgba(200, 79, 61, .13); }
.source-collect-action { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-left: 16px; border-left: 1px solid var(--line); }
.source-collect-action > div { min-width: 0; display: grid; gap: 6px; }
.source-collect-action small { color: var(--muted); }
.source-collect-copy { min-width: 0; }
.source-collect-tools { min-width: 238px; }
.source-share-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.source-share-form input { min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.source-share-form input:focus { outline: 2px solid rgba(17, 130, 117, .18); border-color: var(--teal); }
.source-share-form button { min-height: 36px; padding: 0 11px; }
.source-task-status { min-width: 0; display: grid; grid-template-columns: 9px minmax(0, 1fr); align-items: center; gap: 7px; }
.source-task-status > i { width: 8px; height: 8px; border-radius: 50%; background: #8a9894; }
.source-task-status > span { min-width: 0; display: grid; gap: 1px; }
.source-task-status b { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.source-task-status.active > i { background: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); animation: source-pulse 1.4s ease-in-out infinite; }
.source-task-status.failed > i { background: var(--red); }
.source-task-status.failed b { color: var(--red); }
@keyframes source-pulse { 50% { opacity: .42; transform: scale(.82); } }

.batch-copy { display: flex; align-items: center; gap: 10px; min-width: 0; }
.batch-copy { display: grid; gap: 1px; }
.batch-copy strong { font-size: 15px; }
.batch-copy small { color: var(--muted); }

.number-stepper {
  height: 40px;
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}
.number-stepper button { min-height: 38px; padding: 0; border: 0; border-radius: 0; font-size: 20px; }
.number-stepper input { width: 100%; min-width: 0; border: 0; border-right: 1px solid var(--line); border-left: 1px solid var(--line); text-align: center; font-weight: 800; outline: none; }
.number-stepper input::-webkit-inner-spin-button { display: none; }

.record-surface {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.record-header,
.record-row {
  display: grid;
  grid-template-columns: minmax(320px, 2.2fr) minmax(120px, .7fr) minmax(90px, .45fr) minmax(130px, .7fr) minmax(130px, .7fr) 100px;
  gap: 16px;
  align-items: center;
}

.record-header {
  min-height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fa;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.record-header.batch-enabled {
  grid-template-columns: 38px minmax(320px, 2.2fr) minmax(120px, .7fr) minmax(90px, .45fr) minmax(130px, .7fr) minmax(130px, .7fr) 100px;
}

.record-row-shell { position: relative; border-bottom: 1px solid var(--line-soft); background: var(--surface); }
.record-row-shell:last-child { border-bottom: 0; }
.record-row-shell.batch-enabled { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: stretch; }
.record-row-shell.selected { background: #eef8f5; box-shadow: inset 3px 0 0 var(--teal); }
.record-row-shell .record-row { min-width: 0; border-bottom: 0; background: transparent; }
.record-select-control { display: grid; place-items: center; cursor: pointer; }
.record-select-control input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.record-select-control span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid #aebdb9;
  border-radius: 6px;
  background: #fff;
}
.record-select-control input:checked + span { border-color: var(--teal); background: var(--teal); }
.record-select-control input:checked + span::after { content: "✓"; color: #fff; font-size: 14px; font-weight: 900; }
.record-select-control.unavailable { cursor: default; opacity: .3; }
.record-select-control.unavailable span { width: 7px; height: 7px; border: 0; border-radius: 50%; background: #aebdb9; }

.record-row {
  width: 100%;
  min-height: 72px;
  padding: 10px 16px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: var(--surface);
  text-align: left;
}
.record-row:last-child { border-bottom: 0; }
.record-row:hover { border-color: var(--line-soft); background: #f8fbfa; }
.record-row.expired { color: #736563; background: #fcf9f9; }
.record-row.processing { box-shadow: inset 3px 0 0 var(--teal); background: #f7fbfa; }
.record-row > span { min-width: 0; display: grid; gap: 2px; }
.record-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-row small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.record-title strong { font-size: 15px; }
.score-value { width: max-content; padding: 2px 8px; border-radius: 5px; background: #e6f5eb; color: var(--green); font-size: 16px; }
.score-value.blocked { background: var(--red-soft); color: var(--red); font-size: 13px; }
.record-open { display: flex !important; grid-auto-flow: column; align-items: center; justify-content: end; color: var(--blue); font-weight: 800; }
.record-open svg { width: 16px; height: 16px; transform: rotate(45deg); }
.record-state { align-content: center; }
.record-reminder { color: #8a6315 !important; }
.record-progress { width: 100%; height: 4px; overflow: hidden; border-radius: 4px; background: #dce9e6; }
.record-progress i { height: 100%; display: block; border-radius: inherit; background: var(--teal); transition: width .25s ease; }

.status-label {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 5px;
  background: #ebeff0;
  color: #52615c;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.status-label.collected { background: #ebeff0; color: #53615c; }
.status-label.candidate { background: var(--blue-soft); color: var(--blue); }
.status-label.draft { background: #ece8f7; color: #6653a2; }
.status-label.attention { background: var(--amber-soft); color: var(--amber); }
.status-label.done { background: var(--green-soft); color: var(--green); }
.status-label.blocked { background: var(--red-soft); color: var(--red); }

.empty-state {
  min-height: 300px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  color: var(--muted);
  text-align: center;
}
.empty-state strong { color: var(--ink); font-size: 16px; }

.record-pagination {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.record-pagination > div { display: flex; align-items: center; gap: 5px; }
.record-pagination button { min-width: 34px; min-height: 34px; padding: 0 9px; }
.record-pagination button.active { border-color: var(--teal); background: var(--teal); color: #fff; }
.record-pagination i { min-width: 22px; color: var(--muted); text-align: center; font-style: normal; }

.record-detail { display: grid; gap: 14px; padding-bottom: 4px; }
.record-detail-hero {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f6fbfa 100%);
  box-shadow: 0 8px 24px rgba(27, 43, 38, .045);
}
.record-detail-title { display: grid; gap: 9px; }
.record-detail-hero h2 { max-width: 1080px; margin: 0; font-size: 24px; line-height: 1.4; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-meta > span {
  min-width: 128px;
  display: grid;
  gap: 1px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
}
.detail-meta small { color: var(--muted); font-size: 11px; }
.detail-meta strong { font-size: 13px; }
.locked-action,
.running-action,
.complete-action,
.muted-action { display: inline-flex; align-items: center; min-height: 38px; padding: 0 11px; border-radius: 7px; background: #f1f4f4; color: var(--muted); font-weight: 800; }
.locked-action { background: var(--red-soft); color: var(--red); }
.running-action { background: var(--amber-soft); color: var(--amber); }
.complete-action { background: var(--green-soft); color: var(--green); }

.execution-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .42fr);
  align-items: center;
  gap: 18px;
  padding: 13px 16px;
  border: 1px solid #c9ddd9;
  border-radius: 8px;
  background: #f7fbfa;
}
.execution-panel.failed { border-color: #e7c3bf; background: #fff8f7; }
.execution-copy { min-width: 0; display: flex; align-items: center; gap: 10px; }
.execution-copy > div { min-width: 0; display: grid; gap: 1px; }
.execution-copy strong { font-size: 14px; }
.execution-copy small { color: var(--muted); }
.execution-panel.failed .execution-copy strong,
.execution-panel.failed p { color: var(--red); }
.execution-panel p { margin: 0; overflow-wrap: anywhere; }
.execution-panel.resolution-panel { grid-template-columns: minmax(220px, .62fr) minmax(0, 1fr); border-color: #ead7aa; background: #fffbf2; }
.execution-panel.resolution-panel .execution-copy strong { color: #7a550f; }
.execution-panel.resolution-panel p { color: #5f4a20; line-height: 1.6; }
.execution-panel.resolution-panel .blocker-items { grid-column: 1 / -1; }
.resolution-next-step,
.eligibility-action { grid-column: 1 / -1; }
.resolution-next-step { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 10px; border-top: 1px solid rgba(122, 85, 15, .16); }
.resolution-next-step ol { display: flex; flex-wrap: wrap; gap: 7px 24px; margin: 0; padding-left: 21px; color: #5f4a20; line-height: 1.55; }
.resolution-next-step > p { margin: 0; }
.resolution-next-step button { flex: 0 0 auto; }
.resolution-next-step.profile-fill-step { align-items: stretch; flex-direction: column; }
.submission-route-choices { width: min(100%, 720px); display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.submission-route-choices button { min-width: 0; display: grid; justify-items: start; gap: 3px; padding: 10px 12px; text-align: left; }
.submission-route-choices button strong,
.submission-route-choices button span { max-width: 100%; overflow-wrap: anywhere; }
.submission-route-choices button span { font-size: 12px; font-weight: 600; opacity: .82; }
.submission-route-choices button.selected { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-dark); }
.submission-route-choices.compact { min-width: min(520px, 60vw); }
.resolution-actions,
.material-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.eligibility-action { display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: var(--muted); font-size: 12px; }
.blocker-items { margin: 10px 0 0; padding: 10px 12px 10px 30px; border: 1px solid #ead7aa; border-radius: 7px; background: #fffdf7; color: #5f4a20; line-height: 1.65; }
.blocker-items li + li { margin-top: 4px; }
.source-material-form { display: grid; gap: 12px; }
.source-material-form label { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfc; }
.source-material-form label > span { color: var(--teal); font-size: 12px; font-weight: 900; }
.source-material-form label > strong { color: var(--ink); font-size: 13px; line-height: 1.6; }
.source-material-form textarea { width: 100%; min-height: 88px; resize: vertical; padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); line-height: 1.6; }
.source-material-form textarea:focus { outline: 2px solid rgba(17, 130, 117, .17); border-color: var(--teal); }
.source-material-form .material-form-actions { justify-self: end; }
.article-profile-form { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; border: 1px solid rgba(17, 130, 117, .24); border-radius: 10px; background: #f8fcfb; }
.article-profile-form-heading { grid-column: 1 / -1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.article-profile-form-heading > div { display: grid; gap: 3px; }
.article-profile-form-heading strong { color: var(--ink); }
.article-profile-form-heading span { color: var(--muted); font-size: 12px; }
.single-record-badge { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; background: rgba(17, 130, 117, .1); color: var(--teal) !important; font-weight: 800; }
.article-profile-form label { min-width: 0; display: grid; gap: 6px; color: var(--ink); font-size: 13px; font-weight: 800; }
.article-profile-form .profile-field-wide { grid-column: 1 / -1; }
.article-profile-form input,
.article-profile-form textarea { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-weight: 500; }
.article-profile-form textarea { resize: vertical; line-height: 1.65; }
.article-profile-form input:focus,
.article-profile-form textarea:focus { outline: 2px solid rgba(17, 130, 117, .16); border-color: var(--teal); }
.article-profile-form label small { color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.5; }
.article-profile-form .profile-field-invalid > span { color: #a33a32; }
.article-profile-form .profile-field-invalid input,
.article-profile-form .profile-field-invalid textarea { border-color: #c9655b; background: #fff9f8; }
.article-profile-form .profile-field-invalid input:focus,
.article-profile-form .profile-field-invalid textarea:focus { outline-color: rgba(190, 74, 61, .16); border-color: #b7463b; }
.article-profile-form label .profile-field-error { display: block; color: #a33a32; font-weight: 700; }
.article-profile-form label .profile-field-hint { color: var(--muted); }
.article-profile-form .profile-reuse-option { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 10px; padding: 11px 12px; border: 1px solid #c9ddd9; border-radius: 8px; background: #fff; }
.article-profile-form .profile-reuse-option input { width: 18px; height: 18px; margin: 2px 0 0; padding: 0; accent-color: var(--teal); }
.article-profile-form .profile-reuse-option span { display: grid; gap: 3px; }
.article-profile-form .profile-reuse-option strong { color: var(--teal-dark); font-size: 13px; }
.article-profile-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.package-status-card { display: grid; gap: 5px; margin: 12px 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: #f7f9f9; }
.package-status-card > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.package-status-card strong { color: var(--ink); font-size: 13px; }
.package-status-card span { color: var(--muted); font-size: 11px; }
.package-status-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.package-status-card.valid,
.package-status-card.tested { border-color: #b8ddce; background: var(--green-soft); }
.package-status-card.valid strong,
.package-status-card.tested strong { color: var(--green); }
.package-status-card.checking { border-color: #ead7aa; background: var(--amber-soft); }
.package-status-card.checking strong { color: var(--amber); }
.package-status-card.failed { border-color: #e7c3bf; background: var(--red-soft); }
.package-status-card.failed strong,
.package-status-card.failed p { color: var(--red); }
.execution-meter { height: 6px; overflow: hidden; border-radius: 6px; background: #dce9e6; }
.execution-meter i { width: 38%; height: 100%; display: block; border-radius: inherit; background: var(--teal); animation: execution-scan 1.6s ease-in-out infinite alternate; }
.execution-dialogue { grid-column: 1 / -1; display: grid; gap: 7px; padding-top: 2px; }
.execution-dialogue div { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255, 255, 255, .72); }
.execution-dialogue strong { color: var(--teal-strong); font-size: 12px; }
.execution-dialogue span { min-width: 0; color: var(--ink); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
@keyframes execution-scan { from { transform: translateX(0); } to { transform: translateX(165%); } }

.submitted-reminder {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 13px 16px;
  border: 1px solid #ead7aa;
  border-radius: 8px;
  background: #fffaf0;
}
.submitted-reminder > div { display: grid; gap: 1px; }
.submitted-reminder strong { color: #765615; }
.submitted-reminder span { color: var(--muted); font-size: 12px; }
.submitted-reminder p { margin: 0; color: #65573a; overflow-wrap: anywhere; }

.detail-shell {
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.detail-nav {
  position: sticky;
  top: 158px;
  z-index: 20;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.detail-nav-heading { display: grid; gap: 1px; padding: 14px 15px 11px; border-bottom: 1px solid var(--line-soft); }
.detail-nav-heading strong { font-size: 15px; }
.detail-nav-heading span { color: var(--muted); font-size: 12px; }
.detail-nav-list { display: grid; padding: 6px; }
.detail-nav-item {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}
.detail-nav-item:hover { border: 0; background: #f5f9f8; }
.detail-nav-item.active { background: var(--teal-soft); color: var(--teal-dark); }
.detail-nav-item.unavailable { background: transparent; opacity: .45; }
.detail-nav-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-2);
  color: #67736f;
}
.detail-nav-item.active .detail-nav-icon { background: #fff; color: var(--teal); }
.detail-nav-icon svg { width: 18px; height: 18px; }
.detail-nav-item > span:last-child { min-width: 0; display: grid; gap: 1px; }
.detail-nav-item strong,
.detail-nav-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-nav-item strong { font-size: 14px; }
.detail-nav-item small { color: var(--muted); font-size: 11px; }

.detail-content { min-width: 0; display: grid; gap: 12px; }
.detail-content-heading {
  min-height: 64px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 4px 10px;
  border-bottom: 1px solid var(--line);
}
.detail-content-heading > div { display: grid; gap: 1px; }
.detail-content-heading span,
.detail-content-heading small { color: var(--muted); font-size: 12px; }
.detail-content-heading h3 { margin: 0; font-size: 21px; }
.detail-panel-stack { display: grid; gap: 12px; }

.detail-section {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.section-heading { justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-heading h3 { font-size: 16px; }
.section-heading span { color: var(--muted); font-size: 12px; }
.inline-actions { flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.small-link { min-height: 34px; display: inline-flex; align-items: center; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: #f8faf9; font-size: 12px; font-weight: 800; }

.info-list { display: grid; gap: 8px; margin: 0; }
.info-list > div { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 9px; }
.info-list dt { color: var(--muted); }
.info-list dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.info-list.compact > div { grid-template-columns: 86px minmax(0, 1fr); }
.summary-copy { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.summary-copy h4 { margin: 0 0 6px; }
.summary-copy p,
.long-text { margin: 0; color: #34413d; white-space: pre-wrap; }
.requirement-link-grid,
.requirement-fact-grid { display: grid; gap: 9px; }
.requirement-link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.requirement-fact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 9px; }
.requirement-link-grid article,
.requirement-fact-grid article { min-width: 0; display: grid; gap: 4px; padding: 11px 12px; border: 1px solid var(--line-soft); border-radius: 8px; background: #f8faf9; }
.requirement-link-grid span,
.requirement-fact-grid span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.requirement-link-grid strong,
.requirement-fact-grid strong { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.requirement-document { margin-top: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.requirement-document > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); background: #f6f9f8; }
.requirement-document h4 { margin: 0; font-size: 14px; }
.requirement-document header span { color: var(--muted); font-size: 11px; }
.requirement-document > div { max-width: 860px; padding: 15px 16px; color: #2f3d39; font-size: 14px; line-height: 1.82; }
.requirement-document p { margin: 0; }
.requirement-document p + p { margin-top: .85em; }
.requirement-document.parsed-document { border-color: #cfe0dc; }
.requirement-document.parsed-document > header { background: #f2f8f6; }
.muted-copy { color: var(--muted); }
.section-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 0 7px 7px 0;
  background: #f4f8f7;
  color: #42534e;
  line-height: 1.65;
}

.workflow-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.workflow-progress li {
  min-width: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: var(--surface-2);
}
.workflow-progress li > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e8edec;
  color: #64716d;
  font-weight: 900;
}
.workflow-progress li > div { min-width: 0; display: grid; gap: 1px; }
.workflow-progress li small { color: var(--muted); font-size: 11px; }
.workflow-progress li.current { border-color: #acd8d2; background: #f4fbf9; }
.workflow-progress li.current > span { background: var(--teal); color: #fff; }
.workflow-progress li.done > span { background: var(--green-soft); color: var(--green); }
.next-step-card {
  display: grid;
  gap: 3px;
  margin-top: 12px;
  padding: 13px 14px;
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: #f5faf9;
}
.next-step-card span { color: var(--teal-dark); font-size: 11px; font-weight: 900; letter-spacing: .04em; }
.next-step-card strong { font-size: 15px; }
.next-step-card p { margin: 0; color: var(--muted); }

.draft-body {
  max-height: min(68vh, 900px);
  overflow: auto;
  padding: 16px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #fcfdfd;
  font-size: 15px;
  line-height: 1.9;
}
.draft-body h3,
.draft-body h4,
.draft-body h5 { margin: 18px 0 8px; line-height: 1.35; }
.draft-body h3:first-child,
.draft-body h4:first-child { margin-top: 0; }
.draft-body p { margin: 0 0 12px; white-space: pre-wrap; }
.draft-body ul { margin: 0 0 12px 20px; padding: 0; }
.loading-inline,
.error-inline,
.empty-inline { padding: 14px; border: 1px solid var(--line-soft); border-radius: 7px; background: #fafcfc; color: var(--muted); }
.error-inline { border-color: #ecc9c5; background: #fff8f7; color: var(--red); }

.check-grid { display: grid; gap: 7px; margin-top: 12px; }
.check-grid span { padding: 8px 9px; border-radius: 6px; background: var(--surface-2); color: #50605b; }
.review-extension {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #bcdcd6;
  border-radius: 9px;
  background: #f4fbf9;
}
.review-extension > div { min-width: 0; display: grid; gap: 2px; }
.review-extension span { color: var(--muted); font-size: 12px; }
.review-feedback-list { display: grid; gap: 8px; margin-top: 12px; }
.review-feedback-list article {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid #d6dfe0;
  border-left: 3px solid var(--amber);
  border-radius: 7px;
  background: #fffdf7;
}
.review-feedback-list article.failed { border-color: #e5c4bf; border-left-color: var(--red); background: #fff8f7; }
.review-feedback-list article.done { border-left-color: var(--green); background: #f6fbf7; }
.review-feedback-list article > div { display: flex; justify-content: space-between; gap: 12px; }
.review-feedback-list article span,
.review-feedback-list article small { color: var(--muted); font-size: 12px; }
.review-feedback-list article p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.system-repair-history { margin-top: 12px; padding: 11px 12px; border: 1px dashed #cbd5d4; border-radius: 8px; background: #fafcfc; }
.system-repair-history > summary { cursor: pointer; color: #50605b; font-weight: 800; }
.system-repair-history > p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.review-round-list { display: grid; gap: 12px; margin-top: 14px; }
.review-round-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.review-round-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: #f7f9f9;
}
.review-round-header strong { color: var(--teal-dark); font-size: 15px; }
.review-round-header span { color: var(--muted); font-size: 11px; text-align: right; }
.review-round-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.review-round-block { min-width: 0; padding: 12px 14px; }
.review-round-block + .review-round-block { border-left: 1px solid var(--line-soft); }
.review-round-block > span { display: block; margin-bottom: 6px; color: var(--amber); font-size: 12px; font-weight: 900; }
.review-round-block.revise > span { color: var(--teal); }
.review-round-block p { margin: 0; color: #34413d; line-height: 1.72; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-round-block.empty p { color: var(--muted); font-style: italic; }
.review-summary-raw { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 7px; background: var(--surface-2); }
.review-summary-raw summary { cursor: pointer; color: var(--muted); font-weight: 800; }
.review-summary-raw p { margin: 9px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-body { min-height: 180px; margin: 12px 0 0; padding: 12px; border: 1px solid var(--line-soft); border-radius: 7px; background: #f9fbfb; white-space: pre-wrap; word-break: break-word; font: inherit; }
.mail-action-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }

.detail-action-dock {
  position: sticky;
  bottom: 12px;
  z-index: 28;
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 10px 12px 10px 16px;
  border: 1px solid #cbd9d6;
  border-radius: 12px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 14px 34px rgba(27, 43, 38, .16);
  backdrop-filter: blur(14px);
}
.detail-action-copy { display: grid; gap: 1px; }
.detail-action-copy small { color: var(--muted); }
.detail-action-controls { display: flex; justify-content: flex-end; }
.detail-action-controls > button,
.detail-action-controls > span { min-width: 150px; justify-content: center; text-align: center; }
.detail-action-controls .mail-action-row { min-width: 360px; margin: 0; }

.feedback-section form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.feedback-section textarea { width: 100%; min-height: 92px; resize: vertical; padding: 11px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); line-height: 1.65; }
.feedback-section textarea:focus { outline: 2px solid rgba(15, 135, 127, .14); border-color: var(--teal); }
.history-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.history-list > div { min-width: 0; display: grid; gap: 3px; padding: 10px; border: 1px solid var(--line-soft); border-radius: 7px; background: var(--surface-2); }
.history-list > div.review { border-left: 3px solid var(--amber); }
.history-list > div.attention { border-left: 3px solid var(--amber); background: #fffaf0; }
.history-list > div.revise { border-left: 3px solid var(--teal); }
.history-list > div.done { border-left: 3px solid var(--green); }
.history-list > div.failed { border-left: 3px solid var(--red); }
.history-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-list span { white-space: pre-wrap; overflow-wrap: anywhere; }
.history-list span { color: var(--muted); font-size: 12px; }

.operation-status {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 11px;
  border: 1px solid #c5d9d5;
  border-radius: 7px;
  background: #f4fbf9;
  color: #35534d;
}
.operation-status[hidden] { display: none; }
.operation-status[data-tone="working"]::before { width: 12px; height: 12px; border: 2px solid #bddbd6; border-top-color: var(--teal); border-radius: 50%; content: ""; animation: spin .7s linear infinite; }
.operation-status[data-tone="success"] { border-color: #bedac8; background: #f4faf6; color: var(--green); }
.operation-status[data-tone="error"] { border-color: #e7c2bd; background: #fff7f6; color: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  border: 0;
  border-radius: 0;
  background: rgba(23, 34, 31, .28);
}
.system-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 72;
  width: min(480px, 94vw);
  overflow: auto;
  padding: 18px;
  border-left: 1px solid var(--line);
  background: var(--bg);
  box-shadow: -24px 0 50px rgba(19, 32, 28, .16);
  transform: translateX(105%);
  transition: transform .2s ease;
}
body.drawer-open { overflow: hidden; }
body.drawer-open .drawer-backdrop { display: block; }
body.drawer-open .system-drawer { transform: translateX(0); }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.drawer-header h2 { margin: 0; font-size: 22px; }
.drawer-header p { margin: 2px 0 0; color: var(--muted); }
.drawer-section { margin-bottom: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.profile-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.profile-form label { min-width: 0; display: grid; gap: 4px; }
.profile-form label > span { color: var(--muted); font-size: 12px; }
.profile-form input,
.profile-form textarea { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); }
.profile-form textarea { resize: vertical; line-height: 1.55; }
.profile-wide { grid-column: 1 / -1; }
.profile-protected { display: flex; flex-wrap: wrap; gap: 5px 12px; padding: 9px 10px; border: 1px solid var(--line-soft); border-radius: 7px; background: var(--surface-2); color: var(--muted); }
.profile-protected small { width: 100%; }
.worker-row,
.compact-row { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.worker-row:last-child,
.compact-row:last-child { border-bottom: 0; }
.worker-row > div,
.compact-row > div { min-width: 0; display: grid; gap: 2px; }
.worker-row strong,
.worker-row small,
.compact-row strong,
.compact-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.worker-row small,
.compact-row small { color: var(--muted); }
.run-dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #9ca6a3; }
.run-dot.completed { background: var(--green); }
.run-dot.failed { background: var(--red); }

.login-panel { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: #e9eeef; }
.login-box { width: min(400px, 100%); display: grid; gap: 14px; padding: 26px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 24px 60px rgba(22, 36, 32, .16); }
.login-box h2,
.login-box p { margin: 0; }
.login-box p { color: var(--muted); }
.login-box label { display: grid; gap: 6px; }
.login-box input { width: 100%; height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; }
.login-error { min-height: 20px; color: var(--red); }

.toast { position: fixed; right: 20px; bottom: 20px; z-index: 110; max-width: 420px; padding: 11px 14px; border-radius: 7px; background: #26322f; color: #fff; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .16s ease, transform .16s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.fatal-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.fatal-screen section { width: min(440px, 100%); padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-align: center; }

@media (max-width: 1080px) {
  .stage-tab { gap: 6px; }
  .stage-tab-icon { width: 27px; height: 27px; }
  .stage-tab-icon svg { width: 21px; height: 21px; }
  .record-header,
  .record-row { grid-template-columns: minmax(280px, 2fr) 120px 80px 120px 120px 90px; gap: 10px; }
  .record-header.batch-enabled { grid-template-columns: 38px minmax(280px, 2fr) 120px 80px 120px 120px 90px; }
  .detail-shell { grid-template-columns: 204px minmax(0, 1fr); }
  .detail-nav-item { grid-template-columns: 30px minmax(0, 1fr); padding-right: 7px; padding-left: 7px; }
  .detail-nav-icon { width: 29px; height: 29px; }
}

@media (max-width: 760px) {
  .topbar { height: 58px; padding: 7px 12px; }
  .brand-mark { width: 36px; height: 36px; flex-basis: 36px; }
  .brand h1 { font-size: 16px; }
  .brand p { display: none; }
  .header-worker-state span:last-child { display: none; }
  .text-button { display: none; }
  .stage-nav { top: 58px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stage-nav::-webkit-scrollbar { display: none; }
  .stage-tab { min-height: 66px; gap: 5px; padding: 7px 5px; }
  .stage-tab strong { font-size: 13px; }
  main { padding: 12px; }
  .boot-skeleton-header { min-height: 48px; margin-bottom: 10px; }
  .boot-action-placeholder { min-height: 62px; padding: 12px; }
  .boot-record-placeholder { border-right: 0; border-left: 0; border-radius: 0; }
  .boot-record-placeholder > div { min-height: 94px; grid-template-columns: 1fr 72px; gap: 10px; padding: 14px 4px; }
  .boot-record-placeholder .skeleton-line-title { grid-column: 1 / -1; }
  .boot-record-placeholder .skeleton-line-meta { width: 72%; }
  .boot-record-placeholder .skeleton-pill { justify-self: end; }
  .stage-heading { min-height: 0; align-items: center; margin-bottom: 10px; }
  .stage-heading h2 { font-size: 22px; }
  .stage-heading p { font-size: 12px; }
  .stage-meta strong { font-size: 14px; }
  .stage-meta span { display: none; }
  .stage-action-bar { min-height: 0; padding: 10px; }
  .stage-batch-form { grid-template-columns: 1fr 128px; gap: 8px; }
  .stage-batch-form .batch-copy { grid-column: 1 / -1; }
  .stage-batch-form > button[type="submit"] { min-width: 0; padding: 0 8px; }
  .source-actions { grid-template-columns: 1fr; gap: 10px; }
  .source-filter-bar { margin-right: -12px; padding-right: 12px; }
  .source-filter-bar button { min-height: 38px; }
  .source-collect-action { padding: 10px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .batch-review-bar { align-items: stretch; flex-direction: column; }
  .batch-profile-form { grid-template-columns: 1fr; gap: 10px; }
  .batch-profile-form .batch-review-tools { grid-template-columns: 1fr 1fr; }
  .batch-profile-form [data-batch-profile-run],
  .batch-profile-form [data-batch-clear] { grid-column: 1 / -1; }
  .batch-review-tools { display: grid; grid-template-columns: minmax(0, 1fr) 126px; justify-content: stretch; }
  .batch-mode-switch { grid-column: 1 / -1; overflow-x: auto; }
  .batch-review-tools [data-batch-run] { grid-column: 1 / -1; }
  .batch-review-tools [data-batch-clear] { grid-column: 1 / -1; }
  .record-header { display: none; }
  .record-surface { border-right: 0; border-left: 0; border-radius: 0; box-shadow: none; }
  .record-row { min-height: 100px; grid-template-columns: minmax(100px, 1.2fr) 52px minmax(78px, .9fr) 24px; gap: 7px 9px; padding: 11px 4px; }
  .record-row-shell.batch-enabled { grid-template-columns: 42px minmax(0, 1fr); }
  .record-select-control span { width: 21px; height: 21px; }
  .record-row .record-title { grid-column: 1 / 4; }
  .record-title strong { font-size: 15px; }
  .record-title small { display: none; }
  .record-title small.work-mail-meta { display: block; white-space: normal; line-height: 1.4; }
  .record-row > span[data-label] { display: flex; align-items: center; gap: 4px; }
  .record-row > span[data-label]::before { display: none; }
  .record-row > span[data-label="字数要求"] { display: none; }
  .record-row > span[data-label="当前状态"] { grid-column: 1 / 4; display: grid; grid-template-columns: max-content minmax(60px, 1fr) max-content; align-items: center; gap: 7px; }
  .record-row > span[data-label="当前状态"] > small { display: block; }
  .record-row > span[data-label="截止时间"] strong { font-size: 12px; }
  .record-row small { display: none; }
  .record-row .record-title small.work-mail-meta { display: block; }
  .score-value { padding: 0; background: transparent; color: var(--amber); font-size: 14px; }
  .score-value.blocked { color: var(--red); font-size: 12px; }
  .record-pagination { min-height: 0; flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 4px; }
  .record-pagination > span { text-align: center; }
  .record-pagination > div { justify-content: center; flex-wrap: wrap; }
  .record-pagination button { min-width: 36px; padding: 0 7px; }
  .record-open { grid-column: 4; grid-row: 1 / 4; align-self: center; font-size: 0; }
  .record-open svg { width: 19px; height: 19px; color: #67736f; }
  .record-detail { gap: 10px; padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
  .record-detail-hero { padding: 14px; border-radius: 10px; }
  .record-detail-hero h2 { font-size: 19px; }
  .detail-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .detail-meta > span { min-width: 0; padding: 7px 8px; }
  .detail-meta strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  .execution-panel { grid-template-columns: 1fr; gap: 10px; padding: 12px 13px; }
  .resolution-next-step { align-items: stretch; flex-direction: column; }
  .resolution-next-step ol { display: grid; gap: 4px; }
  .resolution-next-step button { width: 100%; }
  .eligibility-action { align-items: stretch; flex-direction: column; }
  .eligibility-action button { width: 100%; }
  .article-profile-form { grid-template-columns: 1fr; padding: 12px; }
  .article-profile-form label,
  .article-profile-form .profile-field-wide { grid-column: 1; }
  .article-profile-form-heading { align-items: stretch; flex-direction: column; }
  .single-record-badge { align-self: flex-start; }
  .article-profile-form-actions { display: grid; grid-template-columns: 1fr; }
  .requirement-link-grid,
  .requirement-fact-grid { grid-template-columns: 1fr; }
  .requirement-document > header { align-items: flex-start; flex-direction: column; gap: 3px; }
  .requirement-document > div { padding: 13px; font-size: 14px; line-height: 1.78; }
  .submitted-reminder { grid-template-columns: 1fr; gap: 7px; padding: 12px 13px; }
  .execution-dialogue div { grid-template-columns: 1fr; gap: 3px; }
  .detail-shell { display: block; }
  .detail-nav {
    width: 100%;
    max-width: 100%;
    top: 124px;
    margin-bottom: 10px;
    overflow-x: auto;
    border-radius: 10px;
    scrollbar-width: none;
  }
  .detail-nav::-webkit-scrollbar { display: none; }
  .detail-nav-heading { display: none; }
  .detail-nav-list {
    width: max-content;
    min-width: 0;
    grid-auto-flow: column;
    grid-auto-columns: minmax(84px, 1fr);
    padding: 5px;
  }
  .detail-nav-item {
    min-height: 50px;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 5px;
    padding: 6px 7px;
  }
  .detail-nav-icon { width: 24px; height: 24px; border-radius: 6px; }
  .detail-nav-icon svg { width: 15px; height: 15px; }
  .detail-nav-item small { display: none; }
  .detail-nav-item strong { font-size: 13px; text-align: center; }
  .detail-content { gap: 10px; }
  .detail-content-heading { min-height: 50px; padding: 2px 3px 8px; }
  .detail-content-heading h3 { font-size: 19px; }
  .detail-content-heading > small { max-width: 46%; text-align: right; }
  .detail-section { padding: 13px; border-radius: 10px; box-shadow: none; }
  .workflow-progress { gap: 6px; }
  .workflow-progress li { grid-template-columns: 1fr; justify-items: center; gap: 4px; padding: 8px 4px; text-align: center; }
  .workflow-progress li > span { width: 27px; height: 27px; }
  .workflow-progress li small { display: none; }
  .draft-body { max-height: none; padding: 14px; }
  .review-extension { grid-template-columns: 1fr; }
  .review-extension button { width: 100%; }
  .review-round-pair { grid-template-columns: 1fr; }
  .review-round-block + .review-round-block { border-top: 1px solid var(--line-soft); border-left: 0; }
  .feedback-section form { grid-template-columns: 1fr; }
  .history-list { grid-template-columns: 1fr; }
  .mail-action-row { grid-template-columns: 1fr; }
  .detail-action-dock {
    bottom: calc(8px + env(safe-area-inset-bottom));
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 9px;
    border-radius: 11px;
  }
  .detail-action-copy { display: none; }
  .detail-action-controls,
  .detail-action-controls > button,
  .detail-action-controls > span,
  .detail-action-controls .mail-action-row { width: 100%; min-width: 0; }
  .submission-route-choices.compact { width: 100%; min-width: 0; grid-template-columns: 1fr; }
  .detail-action-controls .mail-action-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-action-controls .mail-action-row button { min-width: 0; padding-right: 7px; padding-left: 7px; }
  .toast { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); left: 12px; max-width: none; text-align: center; }
}

.automation-overview {
  width: min(1180px, calc(100% - 32px));
  margin: 14px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 24px;
  padding: 15px 18px;
  border: 1px solid #a8d8d3;
  border-radius: 14px;
  background: linear-gradient(135deg, #f2fbf9, #fbfdfc);
  box-shadow: 0 8px 24px rgba(29, 93, 83, .06);
}
.automation-overview.disabled { border-color: var(--line); background: var(--surface-2); }
.automation-overview-copy { display: grid; gap: 4px; }
.automation-overview-copy strong { font-size: 14px; line-height: 1.5; }
.automation-kicker { display: flex; align-items: center; gap: 7px; color: var(--teal-dark); font-size: 12px; font-weight: 900; }
.automation-kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(15, 135, 127, .12); }
.automation-overview.disabled .automation-kicker i { background: var(--muted); box-shadow: none; }
.automation-overview-metrics { display: grid; grid-template-columns: repeat(5, minmax(70px, auto)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.automation-overview-metrics > div { display: grid; justify-items: center; gap: 1px; padding: 8px 12px; background: #fff; }
.automation-overview-metrics b { color: var(--teal-dark); font-size: 19px; }
.automation-overview-metrics .confirm b { color: #a86419; }
.automation-overview-metrics .system b { color: #8a5a18; }
.automation-overview-metrics .attention b { color: var(--red); }
.automation-overview-metrics span, .automation-overview > small { color: var(--muted); font-size: 11px; }
.automation-overview > small { grid-column: 1 / -1; }
.automation-hint { color: var(--muted); font-size: 12px; line-height: 1.6; }
.automation-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.automation-controls button { min-height: 40px; padding: 8px 12px; font-size: 12px; }
.automation-switch { display: inline-flex; align-items: center; gap: 8px; color: #fff; background: var(--teal-dark); }
.automation-switch i { display: block; width: 28px; height: 16px; border-radius: 10px; background: #ffffff55; padding: 2px; }
.automation-switch i::after { content: ""; display: block; width: 12px; height: 12px; border-radius: 50%; background: #fff; transform: translateX(12px); }
.automation-switch[aria-checked="false"] { background: #52616b; border-color: #52616b; }
.automation-switch[aria-checked="false"] i::after { transform: none; }
.automation-settings { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; border-top: 1px solid var(--line); padding-top: 16px; }
.automation-settings label { display: grid; align-content: start; gap: 6px; min-width: 0; font-size: 13px; }
.automation-settings input { width: 100%; min-width: 0; min-height: 42px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; background: #fff; color: var(--ink); }
.automation-settings small, .automation-settings p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.automation-settings p { grid-column: 1 / -1; margin: 0; }
.automation-delivery-mode { grid-column: 1 / -1; }
.automation-delivery-mode select { width: 100%; min-width: 0; min-height: 42px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.automation-settings-actions { grid-column: 1 / -1; display: flex; gap: 8px; }

@media (max-width: 760px) {
  .automation-settings { grid-template-columns: 1fr; }
  .automation-overview { width: calc(100% - 20px); grid-template-columns: 1fr; gap: 11px; margin-top: 10px; padding: 13px; }
  .automation-overview-metrics { grid-template-columns: repeat(2, 1fr); }
  .automation-overview-metrics > div { padding: 7px 4px; }
  .automation-overview-metrics span { text-align: center; }
}

@media (max-width: 390px) {
  .stage-batch-form { grid-template-columns: 116px minmax(0, 1fr); }
  .stage-heading p { display: none; }
  .record-row { grid-template-columns: repeat(2, minmax(0, 1fr)) 24px; }
  .record-row .record-title { grid-column: 1 / 3; }
  .record-row > span[data-label="当前状态"] { grid-column: 1 / 3; }
  .record-open { grid-column: 3; grid-row: 1 / 4; }
}

body.is-mobile-app { background: #fff; }
body.is-mobile-app.has-native-shell .topbar,
body.is-mobile-app.has-native-shell .stage-nav { display: none; }
body.is-mobile-app.has-native-shell main { padding: 10px 12px 14px; }
body.is-mobile-app.has-native-shell .stage-heading h2 { display: none; }
body.is-mobile-app.has-native-shell .stage-heading p { margin: 0; }
body.is-mobile-app.has-native-shell .stage-heading { min-height: 28px; }
body.is-mobile-app.has-native-shell .stage-meta { display: none; }
body.is-mobile-app.has-native-shell .boot-skeleton-header { min-height: 46px; }
body.is-mobile-app.has-native-shell .detail-nav { top: 0; }
body.is-mobile-app.has-native-shell.record-detail-open .stage-heading p { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

.source-task-status {
  width: 100%;
  min-height: 34px;
  padding: 4px 8px;
  border-color: transparent;
  background: transparent;
  text-align: left;
  grid-template-columns: 9px minmax(0, 1fr) auto;
}
.source-task-status:hover { border-color: var(--line); background: var(--surface-2); }
.source-task-status em { color: var(--teal); font-size: 11px; font-style: normal; font-weight: 800; white-space: nowrap; }
.source-collect-buttons { display: flex !important; grid-auto-flow: column; align-items: center; gap: 8px !important; white-space: nowrap; }
.source-history-button { color: var(--teal-dark); font-weight: 800; }

.source-tasks-backdrop {
  position: fixed;
  inset: 0;
  z-index: 78;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(16, 26, 23, .42);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.source-tasks-backdrop:hover { background: rgba(16, 26, 23, .42); }
.source-tasks-drawer {
  position: fixed;
  z-index: 79;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: min(980px, calc(100vw - 32px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 24px 72px rgba(22, 36, 32, .24);
  opacity: 0;
  pointer-events: none;
  transform: translateX(28px);
  transition: opacity .2s ease, transform .2s ease;
}
.source-tasks-open { overflow: hidden; }
.source-tasks-open .source-tasks-backdrop { opacity: 1; pointer-events: auto; }
.source-tasks-open .source-tasks-drawer { opacity: 1; pointer-events: auto; transform: translateX(0); }
.source-tasks-header {
  min-height: 104px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #f7fbfa, #eef7f5);
}
.source-tasks-header > div { display: grid; gap: 2px; }
.source-tasks-header span { color: var(--teal-dark); font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.source-tasks-header h2 { margin: 0; font-size: 22px; }
.source-tasks-header p { margin: 2px 0 0; color: var(--muted); }
.source-tasks-layout { min-height: 0; display: grid; grid-template-columns: 292px minmax(0, 1fr); }
.source-task-history-pane { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); border-right: 1px solid var(--line); background: #f7f9f9; }
.source-task-pane-heading { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 15px; border-bottom: 1px solid var(--line); }
.source-task-pane-heading span { color: var(--muted); font-size: 12px; }
.source-task-history { min-height: 0; display: grid; align-content: start; gap: 7px; overflow-y: auto; padding: 10px; }
.source-task-history-row {
  min-height: 94px;
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border-color: transparent;
  background: transparent;
  text-align: left;
}
.source-task-history-row:hover { background: #fff; }
.source-task-history-row.selected { border-color: #96cbc6; background: #fff; box-shadow: 0 6px 16px rgba(33, 70, 63, .07); }
.source-task-history-row > span:not(.source-task-history-top) { color: var(--muted); font-size: 12px; }
.source-task-history-row > .source-task-kind { width: fit-content; padding: 3px 7px; border-radius: 999px; font-size: 10px; font-weight: 900; }
.source-task-history-row > .source-task-kind.collection { background: var(--teal-soft); color: var(--teal-dark); }
.source-task-history-row > .source-task-kind.verification { background: #fff2d7; color: #8b5a12; }
.source-task-history-row small { overflow: hidden; color: #465550; text-overflow: ellipsis; white-space: nowrap; }
.source-task-history-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.source-task-history-top strong { color: var(--teal-dark); }
.source-task-history-row.selected .source-task-history-top strong { color: var(--ink); }
.source-task-history-top time { color: var(--muted); font-size: 11px; }
.source-task-detail-pane { min-height: 0; overflow-y: auto; background: var(--surface); }
.source-task-detail-card { display: grid; gap: 18px; padding: 22px; }
.source-task-detail-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.source-task-detail-hero > div { display: grid; justify-items: start; gap: 7px; }
.source-task-detail-hero h3 { margin: 0; font-size: 21px; }
.source-task-detail-hero p { max-width: 620px; margin: 0; color: var(--muted); }
.source-task-refresh { color: var(--teal-dark); font-weight: 800; white-space: nowrap; }
.source-task-live { display: flex; align-items: center; gap: 13px; padding: 13px 15px; border: 1px solid #a8d8d3; border-radius: 10px; background: var(--teal-soft); }
.source-task-live > i { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 5px rgba(15, 135, 127, .12); animation: source-pulse 1.4s ease-in-out infinite; }
.source-task-live > div { display: grid; }
.source-task-live span { color: var(--muted); font-size: 12px; }
.source-task-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.source-task-facts > div { min-width: 0; display: grid; gap: 3px; padding: 12px; background: var(--surface-2); }
.source-task-facts dt,
.source-task-result-card dt { color: var(--muted); font-size: 11px; }
.source-task-facts dd,
.source-task-result-card dd { margin: 0; overflow-wrap: anywhere; font-weight: 800; }
.source-task-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.source-task-metrics.collection { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.source-task-metrics > div { display: grid; gap: 3px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfc; }
.source-task-metrics span { color: var(--muted); font-size: 12px; }
.source-task-metrics strong { color: var(--teal-dark); font-size: 23px; }
.source-task-metrics small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.source-task-channel-health { display: grid; gap: 9px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfc; }
.source-task-channel-health header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.source-task-channel-health header span { color: var(--muted); font-size: 12px; }
.source-task-channel-health > div { display: flex; flex-wrap: wrap; gap: 8px; }
.source-task-channel-health > div > span { padding: 7px 9px; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 12px; }
.source-task-channel-health b { color: var(--ink); }
.source-task-channel-health.deferred { border-color: #e9cf9d; background: #fffaf0; }
.source-task-channel-health.hard-exclusion { border-color: #e8c2bd; background: #fff8f7; }
.source-task-error { display: grid; gap: 7px; padding: 14px; border: 1px solid #e9aaa5; border-radius: 10px; background: var(--red-soft); }
.source-task-error > span { color: var(--red); font-size: 11px; font-weight: 900; }
.source-task-error details { color: var(--muted); }
.source-task-error pre { max-height: 180px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.source-task-results { display: grid; gap: 11px; }
.source-task-result-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; padding-top: 4px; }
.source-task-result-heading > div { display: grid; }
.source-task-result-heading span,
.source-task-result-heading small { color: var(--muted); font-size: 12px; }
.source-task-result-heading strong { font-size: 18px; }
.source-task-result-list { display: grid; gap: 10px; }
.source-task-result-card { display: grid; gap: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: #fcfdfd; }
.source-task-result-card.source-ready { border-color: #a8d8d3; background: var(--teal-soft); }
.source-task-result-card.source-deferred { border-color: #e9cf9d; background: #fffaf0; }
.source-task-result-card.verification-result.ready { border-color: #a8d8d3; background: var(--teal-soft); }
.source-task-result-card.verification-result.excluded { border-color: #e8c2bd; background: #fff8f7; }
.source-task-result-card.verification-result.retryable { border-color: #e9cf9d; background: #fffaf0; }
.source-task-result-card.verification-result.manual_required { border-color: #c9b7e8; background: #faf7ff; }
.source-task-result-card header { display: flex; align-items: flex-start; gap: 11px; }
.source-task-result-card header > span { min-width: 28px; color: #86a09a; font-size: 12px; font-weight: 900; }
.source-task-result-card header > div { min-width: 0; }
.source-task-disposition { margin-left: auto; padding: 3px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 11px; white-space: nowrap; }
.source-task-result-card h4 { margin: 0; font-size: 15px; }
.source-task-result-card header small { color: var(--muted); }
.source-task-result-card p { margin: 0; color: #4f5d59; }
.source-task-result-card .source-task-deferred-reasons { padding: 8px 10px; border-radius: 7px; background: rgba(255,255,255,.72); color: #725a2b; font-size: 12px; }
.source-task-result-card dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.source-task-result-card dl > div { min-width: 0; display: grid; gap: 2px; padding: 8px 10px; border-radius: 7px; background: var(--surface-2); }
.source-task-result-card footer { display: flex; gap: 14px; padding-top: 2px; }
.source-task-result-card footer a { font-weight: 800; }
.source-task-result-empty,
.source-task-detail-empty,
.source-task-loading { min-height: 180px; display: grid; place-content: center; justify-items: center; gap: 7px; padding: 24px; color: var(--muted); text-align: center; }
.source-task-detail-empty { min-height: 100%; }
.source-task-detail-empty strong,
.source-task-result-empty strong,
.source-task-loading strong { color: var(--ink); }
.source-task-detail-empty.error strong { color: var(--red); }

@media (max-width: 760px) {
  .source-collect-action { align-items: stretch; flex-direction: column; }
  .source-collect-tools { width: 100%; }
  .source-collect-buttons { width: 100%; grid-template-columns: 1fr 1fr; }
  .source-collect-buttons button { flex: 1; }
  .source-tasks-drawer { inset: 0; width: 100%; border: 0; border-radius: 0; }
  .source-tasks-header { min-height: 88px; padding: 14px 16px; }
  .source-tasks-header h2 { font-size: 19px; }
  .source-tasks-header p { display: none; }
  .source-tasks-layout { grid-template-columns: 1fr; grid-template-rows: 210px minmax(0, 1fr); }
  .source-task-history-pane { border-right: 0; border-bottom: 1px solid var(--line); }
  .source-task-pane-heading { min-height: 43px; }
  .source-task-history { grid-auto-flow: column; grid-auto-columns: minmax(220px, 74vw); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .source-task-history::-webkit-scrollbar { display: none; }
  .source-task-history-row { min-height: 140px; align-content: center; }
  .source-task-detail-card { gap: 14px; padding: 15px; }
  .source-task-detail-hero h3 { font-size: 18px; }
  .source-task-facts { grid-template-columns: 1fr 1fr; }
  .source-task-metrics { grid-template-columns: 1fr 1fr; gap: 7px; }
  .source-task-metrics.collection { grid-template-columns: 1fr 1fr; }
  .source-task-result-card dl { grid-template-columns: 1fr; }
}

.article-profile-editor-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  border: 0;
  background: rgba(16, 26, 23, .38);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.article-profile-editor-backdrop.visible { opacity: 1; pointer-events: auto; }
.article-profile-editor {
  position: fixed;
  z-index: 81;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 94vw);
  overflow-y: auto;
  padding: 22px;
  border-left: 1px solid var(--line);
  background: #f7faf8;
  box-shadow: -20px 0 60px rgba(22, 36, 32, .2);
  transform: translateX(105%);
  transition: transform .22s ease;
}
.article-profile-editor.open { transform: translateX(0); }
.article-profile-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.article-profile-editor-header > div { min-width: 0; display: grid; gap: 3px; }
.article-profile-editor-header span { color: var(--teal-dark); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.article-profile-editor-header h2 { margin: 0; font-size: 20px; overflow-wrap: anywhere; }
.article-profile-editor-header .icon-button { width: auto; min-width: 56px; padding: 0 12px; }
.article-profile-editor-body { display: grid; gap: 14px; }
.article-profile-editor-body .article-profile-form { background: var(--surface); }
body.article-profile-editor-open { overflow: hidden; }

@media (max-width: 640px) {
  .article-profile-editor {
    top: auto;
    left: 0;
    width: 100%;
    max-height: 88vh;
    padding: 18px 15px calc(18px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 54px rgba(22, 36, 32, .22);
    transform: translateY(105%);
  }
  .article-profile-editor.open { transform: translateY(0); }
  .article-profile-editor-header h2 { font-size: 18px; }
}
/* The registry is a lead inventory, separate from actionable manuscript rows. */
.source-filter-bar { flex-wrap:wrap; overflow:visible; margin-right:0; padding-right:0; }
.source-filter-section { min-width:0; max-width:100%; }
.source-filter-section-items { flex-wrap:wrap; }
.channel-registry, .channel-type-section { flex:0 0 100%; min-width:0; }
.channel-registry { width:100%; border:1px solid #dce4e0; border-radius:12px; background:#f7faf8; padding:14px 16px; }
.channel-registry-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.channel-registry-heading small { display:block; margin-top:5px; line-height:1.6; color:#64756d; }
.channel-registry-heading button { flex-shrink:0; }
.channel-registry-list { margin-top:12px; max-height:400px; overflow:auto; }
.channel-registry-row { display:grid; grid-template-columns:minmax(95px,1fr) minmax(130px,1fr) 70px; gap:10px; align-items:center; border-top:1px solid #e2e8e4; padding:10px 0; font-size:13px; }
.channel-registry-row small { display:block; font-size:11px; color:#64756d; }
.channel-registry-row a { color:#286451; white-space:nowrap; }
.channel-registry p { font-size:12px; color:#64756d; line-height:1.6; margin:12px 0 0; }
.channel-type-section { padding-bottom:10px; border-bottom:1px solid #e2e8e4; }
@media (max-width:600px) { .channel-registry { padding:12px; } .channel-registry-heading { align-items:flex-start; flex-direction:column; } .channel-registry-row { grid-template-columns:minmax(80px,1fr) minmax(106px,1fr) 60px; gap:6px; font-size:12px; } }
