/* Shell */
.shell {
  min-height: 100dvh; display: grid; grid-template-columns: 320px minmax(0, 1fr); overflow: hidden;
}
.sidebar {
  display: flex; flex-direction: column; min-width: 0; padding: 20px 14px 16px; color: var(--ink-soft); background: #eef3f4;
  border-right: 1px solid var(--line);
}
.sidebar-brand {
  padding: 4px 8px 28px;
}
.brand {
  display: flex; align-items: center; gap: 10px; min-width: 0;
}
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none; color: #fff; background: var(--brand);
  border-radius: var(--radius-sm); font: 700 14px/1 var(--font-ui); letter-spacing: -.06em;
}
.brand-copy {
  display: grid; min-width: 0;
}
.brand-copy strong {
  font-size: 14px; letter-spacing: -.02em; color: var(--ink);
}
.brand-copy small {
  margin-top: 3px; color: var(--muted); font-size: 10px;
}
.sidebar-nav {
  min-height: 0; display: flex; flex: 1; flex-direction: column; overflow: hidden;
}
.side-caption {
  padding: 0 10px 8px; color: var(--muted-light); font-size: 10px; font-weight: 600; letter-spacing: .09em;
  text-transform: uppercase;
}
.project-caption {
  margin-top: 28px;
}
.side-nav,
.side-utility,
.project-side-header {
  width: 100%; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 0;
  border-radius: var(--radius-sm); background: transparent; text-align: left; color: var(--ink-soft); font-size: 13px;
  cursor: pointer;
}
.side-nav,
.side-utility {
  min-height: 38px;
}
.project-section-title {
  width: 100%; min-height: 44px; display: flex; align-items: center; margin-top: 28px; padding: 8px 10px;
  border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-soft); font-size: 13px;
  text-align: left; cursor: pointer; transition: background-color .18s ease, color .18s ease;
}
.project-section-title:hover,
.project-section-title.active {
  color: var(--brand); background: rgba(228, 238, 245, .62); outline: none;
}
.project-section-title:focus-visible {
  color: var(--brand); background: rgba(228, 238, 245, .62); outline: 2px solid rgba(28, 91, 143, .34); outline-offset: -2px;
}
.side-nav:hover,
.side-nav.active,
.project-side-header:hover,
.project-side-header:focus-visible {
  color: var(--brand); background: #e4eef5;
}
.side-nav .icon,
.side-utility .icon,
.project-side-header > .icon {
  width: 17px; height: 17px;
}
.side-count {
  min-width: 20px; margin-left: auto; padding: 2px 5px; color: var(--brand); background: #dbeaf4; border-radius: 10px;
  font-size: 10px; text-align: center;
}
.project-side-header > span:not(.project-side-chevron) {
  min-width: 0; color: var(--ink); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.project-side-header {
  min-height: 44px;
}
.project-side-chevron {
  display: grid; place-items: center; margin-left: auto; flex: none; color: var(--muted); transition: transform .18s ease;
}
.project-side-chevron .icon {
  width: 15px; height: 15px;
}
.project-side-header[aria-expanded="true"] .project-side-chevron {
  transform: rotate(180deg);
}
.project-review-nav {
  display: grid; gap: 2px; margin: 6px 0 0 4px; padding-left: 0;
}
.project-review-heading {
  padding: 2px 8px 6px; color: var(--muted-light); font-size: 9px; letter-spacing: .04em;
}
.review-stage-item {
  width: 100%; min-height: 44px; display: flex; align-items: center; gap: 7px; padding: 6px 7px; border: 0;
  border-radius: var(--radius-xs); background: transparent; color: var(--muted); text-align: left; cursor: pointer;
}
.review-stage-item:hover {
  color: var(--ink); background: rgba(0, 0, 0, .035);
}
.review-stage-item:focus-visible {
  color: var(--ink); outline: 2px solid rgba(0, 0, 0, .38); outline-offset: -2px;
}
.review-stage-item.active {
  color: var(--ink); background: rgba(0, 0, 0, .06); outline: none;
}
.review-stage-item.active:focus-visible {
  outline: 2px solid rgba(0, 0, 0, .38); outline-offset: -2px;
}
.review-stage-mark {
  display: grid; place-items: center; width: 22px; height: 22px; flex: none; color: var(--muted-light); background: transparent; border-radius: 50%;
}
.review-stage-mark .icon {
  width: 12px; height: 12px;
}
.review-stage-mark.current {
  color: var(--ink); background: transparent;
}
.review-stage-copy {
  display: grid; min-width: 0; gap: 2px;
}
.review-stage-copy b,
.review-stage-copy small {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.review-stage-copy b {
  color: inherit; font-size: 10px; font-weight: 600;
}
.review-stage-copy small {
  color: var(--muted-light); font-size: 9px;
}
.review-stage-state {
  margin-left: auto; flex: none; color: var(--muted-light); font-size: 9px;
}
.review-stage-item.active .review-stage-state {
  color: var(--ink-soft); font-weight: 600;
}
.project-review-nav[hidden] {
  display: none;
}
.sidebar-project-list {
  min-height: 0; overflow: auto; padding-right: 2px; scrollbar-width: thin;
}
.sidebar-project {
  min-width: 0;
}
.sidebar-project-head {
  display: flex; align-items: center; gap: 3px; min-width: 0; border-radius: var(--radius-xs); background: transparent;
  transition: background-color .18s ease, color .18s ease;
}
.sidebar-project-main {
  min-width: 0; min-height: 44px; display: flex; flex: 1; align-items: center; gap: 8px; padding: 8px 8px; color: var(--ink-soft);
  border: 0; border-radius: var(--radius-xs); background: transparent; text-align: left; cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.sidebar-project-main > .icon {
  width: 16px; height: 16px; flex: none;
}
.sidebar-project-main > span {
  min-width: 0; overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; font-size: 11px;
}
.sidebar-project:hover > .sidebar-project-head,
.sidebar-project:focus-within > .sidebar-project-head {
  background: rgba(0, 0, 0, .035);
}
.sidebar-project.menu-open > .sidebar-project-head {
  background: transparent;
}
.sidebar-project-main:hover {
  color: var(--ink); background: transparent; outline: none;
}
.sidebar-project-main:focus-visible {
  color: var(--ink); background: transparent; outline: 2px solid rgba(0, 0, 0, .38); outline-offset: -2px;
}
.sidebar-project-actions {
  position: relative; width: 88px; min-height: 44px; display: flex; align-items: center; flex: none; gap: 0;
}
.sidebar-project-actions > button {
  opacity: 0; pointer-events: none;
}
.sidebar-project:hover .sidebar-project-actions > button,
.sidebar-project:focus-within .sidebar-project-actions > button,
.sidebar-project-actions.menu-open > button {
  opacity: 1; pointer-events: auto;
}
.sidebar-project-menu-button,
.sidebar-project-add {
  width: 44px; height: 44px; display: grid; place-items: center; flex: none; color: var(--muted); border: 0;
  border-radius: 50%; background: transparent; cursor: pointer;
}
.sidebar-project-menu-button:hover,
.sidebar-project-add:hover,
.sidebar-project-add:focus-visible,
.sidebar-project-menu-button:focus-visible {
  color: var(--brand); background: rgba(228, 238, 245, .62); outline: none;
}
.sidebar-project-menu-button:focus-visible,
.sidebar-project-add:focus-visible {
  outline: 2px solid rgba(28, 91, 143, .34); outline-offset: 2px;
}
.sidebar-project-menu-button .icon,
.sidebar-project-add .icon {
  width: 15px; height: 15px;
}
.sidebar-project-menu {
  position: absolute; z-index: 20; top: auto; bottom: calc(100% - 2px); right: 0; width: 142px; padding: 4px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--paper); box-shadow: var(--shadow-soft);
}
.sidebar-project-menu button {
  width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-radius: var(--radius-xs); background: transparent;
  color: var(--ink-soft); text-align: left; font-size: 11px; cursor: pointer;
}
.sidebar-project-menu button:hover,
.sidebar-project-menu button:focus-visible {
  background: var(--brand-soft); color: var(--brand); outline: none;
}
.sidebar-project-menu button.danger-item:hover,
.sidebar-project-menu button.danger-item:focus-visible {
  color: var(--danger); background: var(--danger-soft);
}
@media (pointer: coarse) {
  .sidebar-project-actions > button {
    opacity: 1; pointer-events: auto;
  }
}
.sidebar-project-stages {
  margin-top: 2px;
}
.side-soon {
  margin-left: auto; color: var(--muted-light); font-size: 9px; white-space: nowrap;
}
.stage-add-button {
  min-height: 44px; display: flex; align-items: center; gap: 7px; margin-top: 4px; padding: 7px 8px; border: 1px dashed var(--line-strong);
  border-radius: var(--radius-xs); color: var(--brand); background: transparent; font-size: 10px; cursor: pointer;
}
.stage-add-button:hover,
.stage-add-button:focus-visible {
  background: #e4eef5; border-color: #c4d9e5; outline: none;
}
.stage-add-button .icon {
  width: 14px; height: 14px;
}
.sidebar-bottom {
  margin-top: auto; padding-top: 24px;
}
.sidebar-utilities {
  display: grid; gap: 2px;
}
.side-utility {
  min-height: 32px; color: var(--muted); font-size: 12px;
}
.sidebar-account {
  width: 100%; min-height: 54px; display: flex; align-items: center; gap: 9px; margin-top: 12px; padding: 8px 9px; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255, 255, 255, .55); text-align: left; cursor: pointer;
}
.sidebar-account:hover,
.sidebar-account:focus-visible {
  color: var(--brand); border-color: #c4d9e5; background: var(--paper); outline: none;
}
.sidebar-user-avatar {
  width: 29px; height: 29px; display: grid; place-items: center; flex: none; color: #315469; border-radius: 50%; background: #dceaf3; font-size: 11px;
}
.sidebar-account-copy {
  display: grid; min-width: 0; flex: 1; gap: 2px;
}
.sidebar-account-copy b {
  overflow: hidden; color: var(--ink-soft); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600;
}
.sidebar-account-copy small {
  color: var(--muted); font-size: 9px;
}
.sidebar-account > .icon {
  width: 13px; height: 13px; color: var(--muted-light); transform: rotate(90deg);
}
.feature-placeholder {
  display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper-muted);
}
.feature-placeholder-icon {
  width: 34px; height: 34px; display: grid; place-items: center; flex: none; color: var(--brand); border-radius: var(--radius-sm); background: var(--brand-soft);
}
.feature-placeholder-icon .icon {
  width: 18px; height: 18px;
}
.feature-placeholder h3 {
  margin-bottom: 4px;
}
.feature-placeholder p {
  margin-bottom: 9px; color: var(--muted); font-size: 12px; line-height: 1.65;
}
.account-info {
  display: flex; align-items: center; gap: 11px; margin-bottom: 14px;
}
.account-info h3 {
  margin-bottom: 2px;
}
.account-info p {
  color: var(--muted); font-size: 11px;
}
.workspace {
  min-width: 0; min-height: 100dvh; display: flex; flex-direction: column;
}
.topbar {
  min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px clamp(20px, 2.8vw, 40px); background: rgba(255, 255, 255, .86); border-bottom: 1px solid var(--line);
}
.mobile-brand {
  display: none;
}
.breadcrumb,
.top-context,
.top-actions {
  display: flex; align-items: center; min-width: 0;
}
.breadcrumb {
  gap: 8px; color: var(--muted); font-size: 12px;
}
.breadcrumb .icon {
  width: 13px; height: 13px;
}
.breadcrumb strong,
.top-context strong {
  color: var(--ink); font-weight: 600;
}
.top-context {
  gap: 10px;
}
.top-context span {
  color: var(--muted); font-size: 12px;
}
.top-actions {
  justify-content: flex-end; gap: 10px;
}
.demo-chip,
.status,
.stage-tag,
.track-badge,
.track-code {
  display: inline-flex; align-items: center; white-space: nowrap;
}
.demo-chip {
  padding: 5px 8px; color: var(--muted); background: #f1f5f6; border: 1px solid var(--line); border-radius: var(--radius-xs);
  font-size: 10px;
}
.avatar {
  display: grid; place-items: center; width: 30px; height: 30px; color: #315469; background: #dceaf3; border-radius: 50%;
  font-size: 12px;
}
.density-toggle {
  display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 5px 7px; border: 1px solid transparent;
  border-radius: var(--radius-xs); background: transparent; color: var(--muted); font-size: 10px; cursor: pointer;
}
.density-toggle:hover {
  color: var(--brand); border-color: var(--line); background: var(--paper);
}
.density-toggle .icon {
  width: 14px; height: 14px;
}
.scroll {
  flex: 1; min-width: 0; overflow: auto; scrollbar-gutter: stable;
}
.page-content {
  width: min(100%, var(--content-max)); margin: 0 auto; padding: clamp(24px, 3vw, 40px) clamp(20px, 3.3vw, 48px) 40px;
}
.page-heading,
.project-header,
.section-heading,
.surface-heading {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
}
.page-heading {
  margin-bottom: 26px;
}
.eyebrow {
  margin: 0 0 6px; color: var(--brand); font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(24px, 2.5vw, 30px); line-height: 1.25; letter-spacing: -.035em;
}
h2 {
  font-size: 18px; line-height: 1.35; letter-spacing: -.02em;
}
h3 {
  font-size: 15px; line-height: 1.4;
}
.page-lead,
.project-subtitle,
.section-heading > div > p:not(.eyebrow),
.surface-heading p,
.project-main p,
.dialog-head p,
.dialog-intro,
.field small,
.field-help {
  color: var(--muted); font-size: 12px; line-height: 1.65;
}
.page-lead {
  margin-top: 8px;
}
.btn,
.link,
.filter-chip,
.tab-button,
.choice-card,
.project-name,
.row-name,
.timeline-link {
  border: 0; background: transparent; cursor: pointer;
}
.btn {
  min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 12px;
  color: var(--ink-soft); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--paper);
  font-size: 12px; font-weight: 600; white-space: nowrap;
  transition: border-color var(--ease), background var(--ease), color var(--ease), transform var(--ease);
}
.btn:hover {
  border-color: #99b7c7; color: var(--brand); background: #f6fafc;
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  color: #fff; border-color: var(--brand); background: var(--brand);
}
.btn.primary:hover {
  color: #fff; border-color: var(--brand-deep); background: var(--brand-deep);
}
.btn.quiet {
  min-height: 30px; padding: 5px 8px; color: var(--muted); border-color: transparent; background: transparent; font-weight: 500;
}
.btn.quiet:hover {
  color: var(--brand); background: var(--brand-soft);
}
.btn.danger-outline {
  color: var(--danger); border-color: #e4b5bb; background: #fff;
}
.btn.danger {
  color: #fff; border-color: var(--danger); background: var(--danger);
}
.btn.danger:hover {
  color: #fff; border-color: #9e3943; background: #9e3943;
}
.btn.icon-button {
  width: 32px; height: 32px; min-height: 32px; padding: 7px;
}
.btn .icon {
  width: 15px; height: 15px;
}
.link {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 0; color: var(--brand); font-size: 12px; font-weight: 600;
}
.link:hover {
  color: var(--brand-deep);
}
.link .icon {
  width: 13px; height: 13px;
}
/* Home */
.home-heading {
  align-items: center;
}
.home-heading-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
}
.home-heading-actions .btn,
.section-heading > .btn,
.dialog-actions .btn {
  min-height: 44px;
}
.home-toolbar,
.document-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px;
}
.result-count,
.document-result {
  color: var(--muted); font-size: 12px;
}
.result-count b {
  margin-left: 5px; color: var(--ink);
}
.search-box {
  min-width: min(320px, 100%); min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 11px;
  color: var(--muted-light); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--paper);
}
.search-box:focus-within {
  border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft);
}
.search-box .icon {
  width: 16px; height: 16px;
}
.search-box input {
  min-width: 0; width: 100%; padding: 8px 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px;
}
.surface {
  overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper);
  box-shadow: var(--shadow-soft);
}
.project-list {
  background: var(--paper);
}
.project-list-head,
.project-row {
  display: grid; grid-template-columns: minmax(280px, 2fr) minmax(150px, 1.1fr) 74px minmax(140px, 1.1fr) 104px;
  align-items: center; gap: 18px; padding: 0 18px;
}
.project-list-head {
  min-height: 38px; color: var(--muted); background: var(--paper-muted); font-size: 10px; font-weight: 600;
}
.project-row {
  min-height: var(--row-min); border-top: 1px solid var(--line); transition: background var(--ease);
}
.project-row:hover {
  background: #fbfcfd;
}
.project-main,
.project-main > div,
.row-primary,
.row-primary > div,
.title-line,
.timeline-row,
.choice-card,
.selection-file,
.track-config-head,
.track-toggle,
.finding-head,
.result-banner,
.review-confirm-card {
  display: flex; align-items: center;
}
.project-main {
  min-width: 0; gap: 11px;
}
.project-main > div,
.row-primary > div,
.selection-file > span,
.review-confirm-card > div {
  min-width: 0; display: grid;
}
.project-icon,
.project-emblem,
.row-icon,
.choice-icon,
.timeline-icon,
.result-symbol {
  display: grid; place-items: center; flex: none;
}
.project-icon {
  width: 32px; height: 32px; color: var(--brand); border-radius: var(--radius-sm); background: var(--brand-soft);
}
.project-icon .icon {
  width: 17px; height: 17px;
}
.project-name,
.row-name {
  width: fit-content; max-width: 100%; overflow: hidden; color: var(--ink); text-align: left; text-overflow: ellipsis;
  white-space: nowrap; font-size: 13px; font-weight: 650;
}
.project-name:hover,
.row-name:hover {
  color: var(--brand);
}
.project-main p {
  overflow: hidden; margin-top: 3px; text-overflow: ellipsis; white-space: nowrap; font-size: 11px;
}
.stage-tag {
  gap: 6px; width: fit-content; padding: 4px 7px; color: var(--warning); background: var(--warning-soft);
  border-radius: var(--radius-xs); font-size: 11px;
}
.setup-badge {
  display: inline-flex; align-items: center; width: fit-content; padding: 3px 6px; color: var(--warning);
  border: 1px solid #ebd5a7; border-radius: var(--radius-xs); background: var(--warning-soft); font-size: 10px; font-weight: 600;
}
.stage-tag b {
  font-weight: 500;
}
.stage-marker,
.status-dot {
  width: 6px; height: 6px; flex: none; border-radius: 50%; background: currentColor;
}
.stage-button {
  border: 1px solid #ebd5a7; cursor: pointer;
}
.stage-button:hover {
  background: #fff1d1;
}
.stage-button .icon {
  width: 12px; height: 12px; margin-left: 2px;
}
.mobile-stage-helper {
  display: none;
}
.stage-count-helper {
  display: block; margin-top: 3px; color: var(--muted); font-size: 10px;
}
.project-count,
.project-activity {
  display: grid; min-width: 0; gap: 3px;
}
.project-count b,
.project-activity b {
  color: var(--ink-soft); font-size: 12px; font-weight: 600;
}
.project-count small,
.project-activity small {
  overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 10px;
}
.project-open {
  text-align: right;
}
.project-empty,
.empty-wrapper {
  padding: 12px;
}
.home-footnote,
.boundary-note,
.audit-note {
  display: flex; align-items: flex-start; gap: 7px; margin-top: 14px; color: var(--muted); font-size: 11px; line-height: 1.7;
}
.home-footnote .icon,
.boundary-note .icon,
.audit-note .icon {
  width: 15px; height: 15px; margin-top: 2px; color: var(--brand);
}
/* Project header and tabs */
.project-header {
  align-items: center; margin-bottom: 22px;
}
.project-header-copy {
  min-width: 0;
}
.title-line {
  gap: 10px;
}
.project-emblem {
  width: 38px; height: 38px; color: var(--brand); border-radius: var(--radius-sm); background: var(--brand-soft);
}
.project-emblem .icon {
  width: 19px; height: 19px;
}
.title-line h1 {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.project-subtitle {
  overflow: hidden; margin: 8px 0 8px 48px; text-overflow: ellipsis; white-space: nowrap;
}
.project-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-left: 48px; color: var(--muted); font-size: 11px;
}
.meta-separator {
  width: 1px; height: 12px; background: var(--line-strong);
}
.project-meta .stage-tag {
  margin-left: 2px;
}
.tab-bar {
  display: flex; align-items: stretch; gap: 25px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar {
  display: none;
}
.tab-button {
  position: relative; min-height: 45px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 0; color: var(--muted);
  font-size: 12px; font-weight: 550; white-space: nowrap;
}
.tab-button::after {
  position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; content: ""; background: transparent;
}
.tab-button:hover,
.tab-button.active {
  color: var(--brand);
}
.tab-button.active::after {
  background: var(--brand);
}
.tab-count {
  min-width: 18px; padding: 2px 4px; color: var(--muted); background: #edf2f3; border-radius: 8px; font-size: 10px;
  text-align: center;
}
.tab-button.active .tab-count {
  color: var(--brand); background: var(--brand-soft);
}
.view-panel {
  padding-top: 24px;
}
.content-section {
  margin-top: var(--section-gap);
}
.content-section:first-child {
  margin-top: 0;
}
.section-heading {
  align-items: flex-end; margin-bottom: 11px;
}
.section-heading h2 {
  display: inline-flex; align-items: center; gap: 6px;
}
.inline-count {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; color: var(--brand); background: var(--brand-soft);
  border-radius: 8px; font-size: 10px; font-weight: 500;
}
.profile-sheet {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent;
}
.profile-group {
  display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; padding: 18px 0; border-top: 1px solid var(--line);
}
.profile-group:first-child {
  border-top: 0;
}
.profile-group-heading {
  display: grid; align-content: start; gap: 4px;
}
.profile-group-heading h3 {
  color: var(--ink); font-size: 13px;
}
.profile-group-heading p {
  color: var(--muted); font-size: 10px; line-height: 1.55;
}
.profile-fields {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 26px; min-width: 0; margin: 0;
}
.profile-field {
  min-width: 0;
}
.profile-field.wide {
  grid-column: 1 / -1;
}
.profile-field dt {
  color: var(--muted); font-size: 10px;
}
.profile-field dd {
  margin: 4px 0 0; color: var(--ink); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere;
}
.surface-heading {
  align-items: center; padding: 16px 18px 0;
}
.stage-context-banner {
  display: flex; align-items: flex-start; gap: 9px; margin: 13px 0; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--paper-muted); color: var(--ink-soft); font-size: 11px;
}
.stage-context-banner > div,
.stage-context-readonly {
  display: grid; gap: 3px; min-width: 0;
}
.stage-context-banner small,
.stage-context-readonly small {
  color: var(--muted); font-size: 10px; line-height: 1.5;
}
.stage-context-readonly {
  margin-top: 13px; padding: 10px 12px; border-left: 3px solid var(--brand); background: var(--brand-soft); color: var(--ink-soft); font-size: 11px;
}
.stage-copy-note {
  display: grid; gap: 8px; margin-top: 4px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper-muted);
}
.stage-copy-note > div {
  display: grid; gap: 3px;
}
.stage-copy-note b { color: var(--ink-soft); font-size: 11px; }
.stage-copy-note span { color: var(--muted); font-size: 10px; line-height: 1.5; }
/* List tables */
.list-table {
  overflow: hidden;
}
.list-head,
.list-row {
  display: grid; grid-template-columns: minmax(220px, 2fr) minmax(140px, 1.1fr) minmax(90px, .75fr) 100px 100px;
  align-items: center; gap: 14px; padding: 0 16px;
}
.list-head {
  min-height: 34px; color: var(--muted); background: var(--paper-muted); font-size: 10px; font-weight: 600;
}
.list-row {
  min-height: var(--row-min); border-top: 1px solid var(--line);
}
.list-row:hover {
  background: #fbfcfd;
}
.review-record-row {
  cursor: pointer;
}
.review-record-row.is-active {
  background: #f1f7fa; box-shadow: inset 3px 0 0 var(--brand);
}
.review-record-row.is-active:hover {
  background: #edf5f8;
}
.review-record-row:focus-visible {
  outline: 2px solid var(--brand); outline-offset: -2px;
}
.row-primary {
  min-width: 0; gap: 10px;
}
.row-primary > div {
  gap: 3px;
}
.row-primary small,
.row-secondary small {
  overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 10px;
}
.row-secondary {
  display: grid; min-width: 0; gap: 3px; overflow: hidden; color: var(--ink-soft); font-size: 11px;
}
.row-secondary b {
  overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap;
}
.document-table .list-head,
.document-table .list-row {
  grid-template-columns: minmax(220px, 2fr) minmax(140px, 1.1fr) 100px 100px;
}
.document-info {
  display: grid; min-width: 0; gap: 3px; overflow: hidden; color: var(--ink-soft); font-size: 11px;
}
.document-info b,
.document-info small {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.document-info b { font-weight: 500; }
.document-info small { color: var(--muted); font-size: 10px; }
.row-icon {
  width: 31px; height: 31px; color: var(--brand); background: var(--brand-soft); border-radius: var(--radius-sm);
}
.row-icon.review,
.choice-icon.review {
  color: #5c6b84; background: #edf0f6;
}
.row-icon.file-label {
  color: var(--brand); background: var(--paper-muted); border: 1px solid var(--line); font-size: 9px; font-weight: 700;
}
.row-icon .icon {
  width: 16px; height: 16px;
}
.row-date {
  color: var(--muted); font-size: 10px;
}
.row-action {
  text-align: right;
}
.row-action .btn {
  font-size: 11px;
}
.status {
  justify-content: flex-start; gap: 6px; width: fit-content; padding: 4px 7px; border-radius: var(--radius-xs); font-size: 10px;
}
.status.ready {
  color: var(--success); background: var(--success-soft);
}
.status.warning {
  color: var(--warning); background: var(--warning-soft);
}
.status.danger {
  color: var(--danger); background: var(--danger-soft);
}
.status.neutral {
  color: var(--muted); background: #f0f3f4;
}
.empty-state {
  display: grid; justify-items: center; gap: 9px; padding: 48px 20px; color: var(--muted); text-align: center;
}
.empty-state > .icon {
  width: 30px; height: 30px; color: var(--brand);
}
.empty-state h3 {
  color: var(--ink);
}
.empty-state p {
  max-width: 400px; font-size: 12px; line-height: 1.6;
}
.choice-icon {
  width: 30px; height: 30px; color: var(--brand); background: var(--brand-soft); border-radius: var(--radius-sm);
}
/* Documents */
.filter-row {
  display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px;
}
.filter-chip {
  min-height: 32px; padding: 5px 10px; color: var(--muted); border-radius: var(--radius-xs); font-size: 11px;
}
.filter-chip:hover,
.filter-chip.active {
  color: var(--brand); background: var(--brand-soft);
}
/* ICF and ethics */
.icf-list {
  display: grid; gap: 12px;
}
.icf-card {
  overflow: hidden;
}
.icf-card-head,
.icf-card-bottom,
.snapshot-strip,
.track-overview,
.track-summary,
.finding-head,
.result-snapshot,
.success-snapshot,
.outline-summary {
  display: flex; align-items: center;
}
.icf-card-head,
.icf-card-bottom {
  justify-content: space-between; gap: 16px; padding: 15px 18px;
}
.icf-card-head h3 {
  font-weight: 650;
}
.icf-card-head p {
  margin-top: 3px; color: var(--muted); font-size: 11px;
}
.snapshot-strip {
  flex-wrap: wrap; gap: 8px 18px; padding: 9px 18px; color: var(--muted); background: var(--paper-muted);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 10px;
}
.missing-label {
  color: var(--warning); font-size: 11px;
}
.track-overview {
  justify-content: space-between; gap: 24px; margin-bottom: 28px; padding: 16px 18px; border: 1px solid var(--line);
  border-radius: var(--radius-md); background: #f9fbfc;
}
.track-overview-copy {
  min-width: 0;
}
.track-overview-copy h3 {
  margin-bottom: 4px;
}
.track-overview-copy p {
  color: var(--muted); font-size: 11px; line-height: 1.6;
}
.track-summary {
  gap: 18px; flex: none;
}
.track-summary > div {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 7px;
}
.track-summary b,
.track-summary small {
  grid-column: 2;
}
.track-summary b {
  font-size: 11px; font-weight: 600;
}
.track-summary small {
  color: var(--muted); font-size: 10px;
}
.track-code,
.track-badge {
  justify-content: center; width: 27px; height: 23px; border-radius: var(--radius-xs); font-size: 9px; font-weight: 700;
}
.track-code.scientific,
.track-badge.scientific {
  color: #1f6b87; background: #e2f1f5;
}
.track-code.ethical,
.track-badge.ethical {
  color: #755d8f; background: #eee8f6;
}
.track-badges {
  display: flex; gap: 5px;
}
.review-confirm-card {
  gap: 10px; min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper-muted);
}
.review-confirm-card > div {
  gap: 3px;
}
.review-confirm-card b {
  font-size: 11px;
}
.review-confirm-card small {
  overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 10px;
}
.review-confirm-card small + small {
  color: var(--ink-soft);
}
/* Timeline */
.timeline-row {
  align-items: flex-start; gap: 12px; min-height: 72px; padding: 14px 18px; border-top: 1px solid var(--line);
}
.timeline-row:first-child {
  border-top: 0;
}
.timeline-icon {
  width: 28px; height: 28px; color: var(--brand); background: var(--brand-soft); border-radius: 50%;
}
.timeline-icon.review {
  color: var(--warning); background: var(--warning-soft);
}
.timeline-icon.file {
  color: var(--success); background: var(--success-soft);
}
.timeline-icon .icon {
  width: 15px; height: 15px;
}
.timeline-copy {
  min-width: 0; display: grid; gap: 3px; flex: 1;
}
.timeline-copy b {
  font-size: 12px; font-weight: 600;
}
.timeline-copy p {
  overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 11px;
}
.timeline-row time {
  flex: none; color: var(--muted); font-size: 10px;
}
.timeline-link {
  display: inline-flex; align-items: center; gap: 4px; width: fit-content; padding: 0; color: var(--brand); font-size: 10px;
}
.timeline-link .icon {
  width: 12px; height: 12px;
}
/* Intake queue */
.intake-form {
  display: grid; gap: 14px;
}
.intake-project-name input {
  min-height: 44px;
}
.intake-dropzone {
  position: relative; display: grid; place-items: center; gap: 5px; min-height: 94px; padding: 16px;
  color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius-md); background: var(--paper-muted);
  text-align: center; cursor: pointer;
}
.intake-dropzone:hover,
.intake-dropzone:focus-visible,
.intake-dropzone.is-dragging {
  color: var(--brand); border-color: var(--brand); background: var(--brand-soft); outline: none;
}
.intake-dropzone strong {
  color: var(--ink-soft); font-size: 12px;
}
.intake-dropzone small {
  max-width: 100%; color: var(--muted); font-size: 10px; overflow-wrap: anywhere;
}
.intake-dropzone-icon .icon {
  width: 21px; height: 21px; color: var(--brand);
}
.intake-file-input {
  position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none;
}
.intake-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  color: var(--muted); font-size: 11px;
}
.intake-toolbar > div {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.intake-toolbar .btn,
.intake-file-head > .btn {
  min-height: 44px;
}
.intake-queue {
  display: grid; gap: 8px; max-height: 300px; overflow: auto;
}
.intake-empty {
  padding: 22px 12px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius-sm);
  text-align: center; font-size: 11px;
}
.intake-file-row {
  display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper);
}
.intake-file-head {
  display: flex; align-items: center; gap: 9px; min-width: 0;
}
.intake-file-copy {
  display: grid; min-width: 0; gap: 3px;
}
.intake-file-copy strong,
.intake-file-copy small {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.intake-file-copy strong {
  color: var(--ink-soft); font-size: 11px;
}
.intake-file-copy small {
  color: var(--muted); font-size: 10px; overflow-wrap: anywhere;
}
.intake-file-head > .btn {
  margin-left: auto; flex: none;
}
.intake-category legend {
  margin-bottom: 5px; color: var(--muted); font-size: 10px;
}
.intake-segments {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.intake-segment {
  position: relative; flex: 1; min-width: 92px;
}
.intake-segment input {
  position: absolute; width: 1px; height: 1px; opacity: 0;
}
.intake-segment span {
  display: grid; place-items: center; min-height: 44px; padding: 7px 8px; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--paper-muted);
  font-size: 10px; text-align: center; cursor: pointer;
}
.intake-segment input:checked + span {
  color: var(--brand); border-color: var(--brand); background: var(--brand-soft); font-weight: 600;
}
.intake-segment input:focus-visible + span {
  outline: 2px solid var(--brand); outline-offset: 2px;
}
.intake-choice-grid {
  display: grid; gap: 10px;
}
.intake-choice-card,
.intake-project-card,
.intake-new-files-card {
  width: 100%; min-height: 64px; display: flex; align-items: center; gap: 11px; padding: 12px;
  color: var(--ink-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper);
  text-align: left; cursor: pointer;
}
.intake-choice-card:hover,
.intake-choice-card:focus-visible,
.intake-project-card:hover,
.intake-project-card:focus-visible,
.intake-new-files-card:hover,
.intake-new-files-card:focus-visible {
  color: var(--brand); border-color: #a8c4d2; background: #f6fafc; outline: none;
}
.intake-choice-card > span:nth-child(2),
.intake-project-card > span:nth-child(2),
.intake-new-files-card > span:nth-child(2) {
  display: grid; min-width: 0; gap: 3px;
}
.intake-choice-card b,
.intake-project-card b,
.intake-new-files-card b {
  color: var(--ink); font-size: 12px;
}
.intake-choice-card small,
.intake-project-card small,
.intake-new-files-card small {
  color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.intake-choice-icon,
.intake-project-card-icon {
  display: grid; place-items: center; width: 32px; height: 32px; flex: none; color: var(--brand); border-radius: var(--radius-sm); background: var(--brand-soft);
}
.intake-choice-icon.review {
  color: var(--warning); background: var(--warning-soft);
}
.intake-choice-icon .icon,
.intake-project-card-icon .icon {
  width: 17px; height: 17px;
}
.intake-choice-card > .icon,
.intake-project-card > .icon,
.intake-new-files-card > .icon {
  width: 15px; height: 15px; margin-left: auto; flex: none; color: var(--muted-light);
}
.intake-target-heading {
  display: grid; gap: 5px; margin-bottom: 18px;
}
.intake-target-heading h3 {
  font-size: 15px;
}
.intake-target-section {
  display: grid; gap: 9px; margin-top: 18px;
}
.intake-target-section h4 {
  color: var(--muted); font-size: 11px; font-weight: 600;
}
.intake-project-list {
  display: grid; gap: 7px;
}
.intake-boundary {
  margin-top: 16px; padding: 10px 12px; color: var(--muted); border-left: 2px solid var(--brand); background: var(--brand-soft); font-size: 11px; line-height: 1.6;
}
.intake-error {
  padding: 9px 11px; color: var(--danger); border: 1px solid #e5b9bf; border-radius: var(--radius-sm); background: #fff6f6; font-size: 11px;
}
/* Forms, dialog and workflows */
dialog {
  width: min(680px, calc(100% - 28px)); max-height: min(760px, calc(100dvh - 32px)); padding: 0; overflow: hidden;
  color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--paper);
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: rgba(27, 43, 48, .38);
}
dialog[open] {
  animation: dialog-in var(--ease);
}
.dialog-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  font-size: 17px;
}
.dialog-head p {
  margin-top: 3px;
}
.dialog-body {
  max-height: min(580px, calc(100dvh - 170px)); overflow: auto; padding: 20px 22px;
}
.dialog-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 22px;
  border-top: 1px solid var(--line);
}
.dialog-disclaimer {
  color: var(--muted-light); font-size: 10px;
}
.dialog-actions {
  display: flex; justify-content: flex-end; gap: 8px; margin-left: auto;
}
.dialog-intro {
  margin-bottom: 18px;
}
.danger-panel {
  padding: 12px 14px; border: 1px solid #e5b9bf; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--ink-soft);
}
.danger-panel strong {
  color: var(--danger); font-size: 13px;
}
.danger-panel p {
  margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.65;
}
.form-grid,
.workflow-grid,
.review-confirm-grid,
.result-snapshot {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px;
}
.form-stack,
.workflow-form {
  display: grid; gap: 15px;
}
.field {
  display: grid; gap: 6px; min-width: 0;
}
.field.wide,
.field.full {
  grid-column: 1 / -1;
}
.field > span,
fieldset legend {
  color: var(--ink-soft); font-size: 12px; font-weight: 600;
}
.field input,
.field select,
.field textarea {
  width: 100%; min-height: 40px; padding: 8px 10px; color: var(--ink); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); outline: 0; background: var(--paper-muted); font-size: 12px;
}
.field textarea {
  resize: vertical; line-height: 1.6;
}
.field small,
.field-help {
  font-size: 10px;
}
fieldset {
  min-width: 0; margin: 0; padding: 0; border: 0;
}
fieldset legend {
  display: flex; align-items: baseline; gap: 8px; width: 100%; margin-bottom: 8px;
}
fieldset legend small {
  color: var(--muted); font-size: 10px; font-weight: 400;
}
.selection-list,
.outline-check-list {
  overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.selection-item,
.outline-check {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 9px 12px; border-top: 1px solid var(--line);
  cursor: pointer;
}
.selection-item:first-child,
.outline-check:first-child {
  border-top: 0;
}
.selection-item:hover,
.outline-check:hover {
  background: #f7fbfd;
}
.selection-item input,
.outline-check input,
.simulate-error input,
.track-toggle input {
  width: 16px; height: 16px; flex: none; accent-color: var(--brand);
}
.selection-file {
  min-width: 0; gap: 8px;
}
.selection-file > b {
  display: grid; place-items: center; width: 26px; height: 26px; color: var(--brand); background: var(--brand-soft);
  border-radius: 4px; font-size: 8px;
}
.selection-file strong,
.selection-file small {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.selection-file strong {
  font-size: 11px; font-weight: 600;
}
.selection-file small {
  color: var(--muted); font-size: 10px;
}
.empty-inline {
  padding: 14px; color: var(--muted); font-size: 11px;
}
.workflow-stepper {
  display: flex; align-items: center; gap: 9px; margin-bottom: 18px; color: var(--muted-light); font-size: 10px;
}
.workflow-step {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.workflow-step b {
  display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--line-strong); border-radius: 50%;
  font-size: 10px; font-weight: 600;
}
.workflow-step.active {
  color: var(--brand); font-weight: 600;
}
.workflow-step.active b,
.workflow-step.done b {
  color: #fff; border-color: var(--brand); background: var(--brand);
}
.workflow-step.done {
  color: var(--success);
}
.workflow-step.done b {
  border-color: var(--success); background: var(--success);
}
.workflow-stepper > i {
  width: 22px; height: 1px; background: var(--line-strong);
}
.workflow-grid {
  margin-top: 15px;
}
.workflow-form > .field {
  margin-top: 1px;
}
.track-panel {
  padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper-muted);
}
.panel-heading h3 {
  font-size: 13px;
}
.panel-heading p {
  margin-top: 3px; color: var(--muted); font-size: 10px;
}
.track-config {
  margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line);
}
.track-config-head {
  justify-content: space-between; gap: 12px;
}
.track-toggle {
  gap: 8px; min-width: 0; cursor: pointer;
}
.track-toggle > span:last-child {
  display: grid; gap: 2px;
}
.track-toggle b {
  font-size: 11px;
}
.track-toggle small {
  color: var(--muted); font-size: 10px;
}
.track-state {
  color: var(--muted); font-size: 10px;
}
.track-fields {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 11px 0 0 34px;
}
.track-fields .field > span {
  font-size: 10px;
}
.track-fields .field select {
  min-height: 36px; font-size: 11px;
}
.outline-summary {
  justify-content: space-between; gap: 12px; padding: 10px 12px; color: var(--muted); background: var(--paper-muted);
  border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 11px;
}
.outline-summary b {
  color: var(--ink-soft); font-weight: 600; text-align: right;
}
.outline-check {
  min-height: 49px;
}
.outline-check input:disabled {
  opacity: .9;
}
.outline-index {
  width: 22px; color: var(--muted-light); font-size: 10px; font-variant-numeric: tabular-nums;
}
.outline-check .grow {
  display: grid; gap: 2px;
}
.outline-check b {
  font-size: 11px; font-weight: 600;
}
.outline-check small {
  color: var(--muted); font-size: 10px;
}
.outline-check em {
  margin-left: auto; color: var(--brand); font-size: 9px; font-style: normal;
}
.readonly-warning,
.failure-detail {
  display: flex; align-items: flex-start; gap: 7px; padding: 10px 12px; color: var(--warning); background: var(--warning-soft);
  border-radius: var(--radius-sm); font-size: 11px; line-height: 1.6;
}
.readonly-warning {
  margin-top: 13px;
}
.simulate-error {
  display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px;
}
.form-error {
  min-height: 0; color: var(--danger); font-size: 11px;
}
.form-error:not(:empty) {
  padding: 8px 10px; background: var(--danger-soft); border-radius: var(--radius-sm);
}
.run-state {
  display: grid; justify-items: center; gap: 10px; padding: 44px 20px; text-align: center;
}
.run-state h3 {
  font-size: 16px;
}
.run-state p {
  max-width: 420px; color: var(--muted); font-size: 12px; line-height: 1.7;
}
.run-caption {
  color: var(--muted-light); font-size: 10px;
}
.spinner {
  width: 34px; height: 34px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%;
  animation: spin 1s linear infinite;
}
.result-symbol {
  width: 44px; height: 44px; border-radius: 50%; color: var(--brand); background: var(--brand-soft); font-size: 20px;
  font-weight: 700;
}
.result-symbol .icon {
  width: 22px; height: 22px;
}
.result-symbol.success {
  color: var(--success); background: var(--success-soft);
}
.result-symbol.danger {
  color: var(--danger); background: var(--danger-soft);
}
.result-symbol.neutral {
  color: var(--muted); background: #f0f3f4;
}
.failure-detail {
  margin-top: 6px; color: var(--danger); background: var(--danger-soft);
}
.success-snapshot {
  justify-content: space-between; gap: 12px; width: min(100%, 370px); margin-top: 6px; padding: 10px 12px; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 11px;
}
.success-snapshot small {
  color: var(--muted); font-size: 10px;
}
.result-banner {
  gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper-muted);
}
.result-banner > div {
  min-width: 0; display: grid; gap: 3px;
}
.result-banner strong {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px;
}
.result-banner p {
  color: var(--muted); font-size: 10px;
}
.snapshot-section,
.findings {
  margin-top: 18px;
}
.snapshot-heading,
.finding-head {
  justify-content: space-between; gap: 12px; margin-bottom: 8px;
}
.snapshot-heading h3,
.findings > h3 {
  font-size: 13px;
}
.snapshot-heading span {
  color: var(--muted); font-size: 10px;
}
.outline-list {
  overflow: hidden; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.outline-item {
  display: flex; align-items: flex-start; gap: 9px; min-height: 48px; padding: 9px 11px; border-top: 1px solid var(--line);
}
.outline-item:first-child {
  border-top: 0;
}
.outline-item.excluded {
  opacity: .6;
}
.outline-number {
  width: 19px; color: var(--success); font-size: 11px; text-align: center;
}
.outline-item .grow {
  display: grid; gap: 2px;
}
.outline-item b {
  font-size: 11px;
}
.outline-item small,
.outline-item em {
  color: var(--muted); font-size: 10px; font-style: normal;
}
.outline-item em {
  max-width: 210px; margin-left: auto; color: var(--warning); text-align: right;
}
.result-snapshot {
  gap: 10px 20px; margin-top: 16px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper-muted);
}
.result-snapshot > div {
  min-width: 0; display: grid; gap: 4px;
}
.result-snapshot dt {
  color: var(--muted); font-size: 10px;
}
.result-snapshot dd {
  margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere;
}
.finding {
  padding: 12px 0; border-top: 1px solid var(--line);
}
.finding-head {
  margin-bottom: 6px;
}
.finding-head b {
  flex: 1; font-size: 11px;
}
.finding p {
  color: var(--muted); font-size: 11px; line-height: 1.7;
}
.metadata-list {
  margin: 0;
}
.metadata-list div {
  display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line);
}
.metadata-list div:last-child {
  border-bottom: 0;
}
.metadata-list dt {
  color: var(--muted); font-size: 11px;
}
.metadata-list dd {
  max-width: 70%; margin: 0; color: var(--ink-soft); font-size: 11px; text-align: right; overflow-wrap: anywhere;
}
.help-sections {
  display: grid; gap: 16px;
}
.help-sections section {
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.help-sections section:last-child {
  padding-bottom: 0; border-bottom: 0;
}
.help-sections h3 {
  margin-bottom: 5px;
}
.help-sections p,
.design-grid p {
  color: var(--muted); font-size: 11px; line-height: 1.7;
}
.design-grid {
  display: grid; gap: 24px;
}
.swatch-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px;
}
.swatch {
  display: grid; min-height: 60px; align-content: end; gap: 2px; padding: 8px; border-radius: var(--radius-sm); font-size: 10px;
}
.swatch small {
  font-size: 9px; opacity: .8;
}
.swatch.graphite { color: #fff; background: var(--ink); }
.swatch.blue { color: #fff; background: var(--brand); }
.swatch.teal { color: #fff; background: var(--success); }
.swatch.amber { color: #fff; background: var(--warning); }
.density-demo {
  display: grid; gap: 8px; margin: 10px 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.density-line {
  width: 85%; height: 8px; background: #dae6ea; border-radius: 3px;
}
.density-line.short {
  width: 55%; background: #b8d3df;
}
.project-footer {
  display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; color: var(--muted-light); font-size: 10px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
/* Density and responsive behavior */
@media (max-height: 800px) and (min-width: 861px) {
  .page-content { padding-top: 22px; padding-bottom: 28px; }
  .project-header { margin-bottom: 14px; }
  .view-panel { padding-top: 18px; }
  .content-section { margin-top: 18px; }
  .surface-heading { padding-top: 12px; }
  .project-footer { padding-top: 16px; }
}
@media (max-width: 1200px) {
  .shell { grid-template-columns: 304px minmax(0, 1fr); }
  .project-list-head,
  .project-row { grid-template-columns: minmax(250px, 2fr) minmax(140px, 1fr) 64px minmax(120px, 1fr) 94px; gap: 12px; }
  .list-head,
  .list-row { grid-template-columns: minmax(190px, 2fr) minmax(120px, 1fr) 90px 88px; }
  .list-head span:nth-child(4),
  .list-row .row-date { display: none; }
  .document-table .list-head,
  .document-table .list-row { grid-template-columns: minmax(200px, 2fr) 120px 80px 88px; }
  .document-table .list-head span:nth-child(4),
  .document-table .list-row .row-date { display: block; }
}
@media (max-width: 900px) {
  .shell { display: block; overflow: visible; }
  .sidebar { display: none; }
  .workspace { min-height: 100dvh; }
  .mobile-brand { display: block; }
  .topbar { min-height: 58px; padding-inline: 20px; }
  .breadcrumb,
  .top-context { display: none; }
  .project-list-head,
  .project-row { grid-template-columns: minmax(230px, 2fr) minmax(130px, 1fr) 64px 96px; }
  .project-list-head span:nth-child(4),
  .project-row .project-activity { display: none; }
  .list-head,
  .list-row { grid-template-columns: minmax(190px, 2fr) minmax(120px, 1fr) 92px; }
  .list-head span:nth-child(4),
  .list-head span:nth-child(5),
  .list-row .row-date,
  .list-row .row-action { display: none; }
  .profile-group { grid-template-columns: 1fr; gap: 8px; }
  .profile-fields { grid-template-columns: 1fr; gap: 12px; }
  .track-overview { align-items: flex-start; flex-direction: column; }
  .track-summary { width: 100%; justify-content: space-between; }
  .project-content .project-header { align-items: flex-start; }
}
@media (max-width: 600px) {
  html { font-size: 16px; }
  .topbar { padding: 10px 14px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-copy strong { font-size: 13px; }
  .brand-copy small { font-size: 9px; }
  .top-actions { gap: 4px; }
  .demo-chip,
  .density-toggle span { display: none; }
  .density-toggle { padding: 7px; }
  .page-content { padding: 22px 14px 30px; }
  .page-heading,
  .project-header { display: block; }
  .page-heading .btn,
  .header-actions { margin-top: 16px; }
  .home-heading-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 16px; }
  .home-heading-actions .btn { width: 100%; margin-top: 0; }
  .page-heading h1 { font-size: 25px; }
  .project-header h1 { font-size: 22px; }
  .project-subtitle,
  .project-meta { margin-left: 0; }
  .project-subtitle { margin-top: 9px; white-space: normal; }
  .project-meta { gap: 7px; font-size: 11px; }
  .project-meta .meta-separator { display: none; }
  .project-header .btn { width: 100%; }
  .tab-bar { gap: 18px; }
  .tab-button { min-height: 43px; font-size: 12px; }
  .view-panel { padding-top: 20px; }
  .section-heading { display: block; }
  .section-heading > .btn { width: 100%; margin-top: 12px; }
  .section-heading > .status { margin-top: 10px; }
  .section-heading .link { margin-top: 2px; }
  .home-toolbar,
  .document-toolbar { display: grid; grid-template-columns: 1fr; gap: 9px; }
  .search-box { min-width: 0; width: 100%; min-height: 43px; }
  .project-list-head { display: none; }
  .project-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; min-height: 78px; padding: 13px 12px; }
  .project-main { grid-column: 1 / -1; }
  .project-stage-cell { grid-column: 1; grid-row: 2; }
  .project-count { grid-column: 2; grid-row: 2; text-align: right; }
  .project-open { display: none; }
  .project-main p { font-size: 10px; }
  .project-name { font-size: 13px; }
  .mobile-stage-helper { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
  .project-stage-cell .stage-tag { font-size: 10px; }
  .project-count b { font-size: 11px; }
  .project-count small { font-size: 9px; }
  .list-head { display: none; }
  .list-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; min-height: 68px; padding: 10px 12px; }
  .row-primary { grid-column: 1 / -1; }
  .row-secondary { grid-column: 1; grid-row: 2; margin-left: 41px; }
  .list-row > .status { grid-column: 2; grid-row: 2; }
  .list-row .row-secondary small { display: none; }
  .document-table .list-row { grid-template-columns: minmax(0, 1fr) auto; }
  .document-table .list-row .document-info { display: flex; align-items: baseline; gap: 6px; grid-column: 1; grid-row: 2; margin-left: 41px; color: var(--muted); }
  .document-table .list-row .document-info b,
  .document-table .list-row .document-info small { font-size: 10px; font-weight: 400; }
  .document-table .list-row .row-date { display: none; }
  .document-table .list-row .row-action { display: block; grid-column: 2; grid-row: 2; }
  .document-table .list-row .row-action .btn { padding: 4px 5px; }
  .list-row .row-icon { width: 29px; height: 29px; }
  .track-overview { padding: 14px; }
  .track-summary { gap: 10px; }
  .track-summary > div { flex: 1; }
  .track-summary small { display: none; }
  .surface-heading { padding-inline: 14px; }
  .project-footer { display: grid; gap: 4px; }
  .form-grid,
  .workflow-grid,
  .review-confirm-grid,
  .result-snapshot { grid-template-columns: 1fr; }
  .field.wide,
  .field.full { grid-column: auto; }
  .track-fields { grid-template-columns: 1fr; margin-left: 34px; }
  dialog { width: calc(100% - 18px); max-height: calc(100dvh - 18px); border-radius: 10px; }
  .dialog-head { padding: 14px 16px; }
  .dialog-body { max-height: calc(100dvh - 145px); padding: 16px; }
  .dialog-foot { padding: 11px 16px; }
  .dialog-disclaimer { display: none; }
  .dialog-actions { width: 100%; }
  .dialog-actions .btn { flex: 1; }
  .workflow-stepper { gap: 5px; font-size: 9px; }
  .workflow-stepper > i { width: 12px; }
  .workflow-step b { width: 18px; height: 18px; }
  .outline-item em { max-width: 110px; }
  .snapshot-strip { gap: 4px 10px; padding-inline: 14px; }
  .icf-card-head,
  .icf-card-bottom { padding-inline: 14px; }
  .icf-card-head { align-items: flex-start; }
  .icf-card-head .status { font-size: 9px; }
  .swatch-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline-row { padding-inline: 12px; }
  .timeline-row time { font-size: 9px; }
  .intake-toolbar { display: grid; gap: 9px; }
  .intake-toolbar > div { display: grid; grid-template-columns: 1fr 1fr; }
  .intake-toolbar .btn { width: 100%; }
  .intake-segments { display: grid; grid-template-columns: 1fr; }
  .intake-segment { min-width: 0; }
  .intake-choice-card,
  .intake-project-card,
  .intake-new-files-card { min-height: 68px; }
}
@media (max-width: 380px) {
  .page-content { padding-inline: 10px; }
  .tab-bar { gap: 15px; }
  .tab-button { font-size: 11px; }
  .track-summary b { font-size: 10px; }
  .track-code { width: 24px; }
  .dialog-body { padding-inline: 13px; }
  .workflow-step { font-size: 8px; }
  .workflow-stepper { gap: 3px; }
  .workflow-stepper > i { width: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* ========================================================================= */
/* Visual Workbench Extensions (Auth, Wallet, Workflows, Intake, Home)       */
/* ========================================================================= */

.auth-portal-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #f0f7fb 0%, #e2ecf3 100%);
  padding: 24px 16px;
}

.auth-portal-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(18, 55, 84, 0.08), 0 2px 6px rgba(18, 55, 84, 0.04);
  border: 1px solid rgba(28, 91, 143, 0.12);
  padding: 32px 28px 24px;
}

.auth-brand-head {
  text-align: center;
  margin-bottom: 24px;
}

.brand-badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.auth-logo-symbol {
  background: var(--brand);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.auth-tag {
  background: #e8f4fa;
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.auth-main-title {
  font-size: 22px;
  color: var(--ink);
  font-weight: 700;
  margin: 0 0 6px;
}

.auth-subtitle {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
}

.auth-tab-nav {
  display: flex;
  background: #f1f5f8;
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 22px;
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-tab-btn.active {
  background: #ffffff;
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.qr-box-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
}

.qr-image-container {
  width: 200px;
  height: 200px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.qr-image {
  width: 180px;
  height: 180px;
  object-fit: contain;
}

.qr-loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 16px;
}

.spinner-dot {
  width: 24px;
  height: 24px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.qr-expired-cover {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink);
}

.qr-hint-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin: 14px 0 6px;
}

.qr-timer-badge {
  font-size: 11.5px;
  color: var(--muted);
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 12px;
}

.auth-fields-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap input {
  width: 100%;
  padding-right: 36px;
}

.btn-toggle-pwd {
  position: absolute;
  right: 8px;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
}

.auth-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
}

.auth-footer-help {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
}

.auth-compliance-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #edf2f7;
  font-size: 11.5px;
  color: var(--muted-light);
}

/* Toast */
.toast-message {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  z-index: 9999;
}
.toast-success { background: #065f46; }
.toast-error { background: #991b1b; }
.toast-warning { background: #92400e; }

/* Stepper */
.workflow-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eef2f6;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.step-item b {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e2e8f0;
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  font-size: 11px;
}
.step-item.active { color: var(--brand); font-weight: 600; }
.step-item.active b { background: var(--brand); color: #fff; }
.step-item.done b { background: #10b981; color: #fff; }
.step-divider { width: 32px; height: 1px; background: #e2e8f0; }

/* Chapters Grid */
.chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
}

.chapter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12.5px;
  cursor: pointer;
}
.chapter-item.required { background: #f0f7fb; border-color: #cbd5e1; }
.chapter-num { color: var(--muted); font-size: 11px; font-weight: 600; }
.chapter-title { flex: 1; color: var(--ink); }
.chapter-badge { font-size: 10px; color: var(--muted); background: #e2e8f0; padding: 1px 5px; border-radius: 4px; }
.chapter-item.required .chapter-badge { background: #bae6fd; color: #0369a1; }

/* Wallet & Products */
.wallet-header { margin-bottom: 20px; }
.wallet-stat-card {
  background: linear-gradient(135deg, #1c5b8f 0%, #15456c 100%);
  color: #fff;
  border-radius: 10px;
  padding: 20px 24px;
}
.wallet-stat-label { font-size: 12px; opacity: 0.85; }
.wallet-stat-value { font-size: 32px; font-weight: 700; margin: 4px 0; }
.wallet-stat-value small { font-size: 14px; font-weight: 400; margin-left: 4px; }
.wallet-stat-desc { font-size: 12px; opacity: 0.8; margin: 0; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin: 14px 0 20px;
}

.product-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px 12px;
  text-align: center;
  position: relative;
  background: #fff;
}
.product-card.featured {
  border-color: var(--brand);
  background: #f7fafc;
}
.product-badge {
  position: absolute;
  top: -8px;
  right: 8px;
  background: #f59e0b;
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 600;
}
.product-name { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.product-points { font-size: 18px; font-weight: 700; color: var(--brand); margin-bottom: 6px; }
.product-points span { font-size: 11px; }
.product-price { font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; }

.payment-qr-area {
  margin: 16px 0;
  padding: 18px;
  background: #f8fafc;
  border: 1px dashed var(--brand);
  border-radius: 8px;
  text-align: center;
}
.payment-qr-card { display: flex; flex-direction: column; align-items: center; }
.payment-amount { font-size: 20px; font-weight: 700; color: #e11d48; }
.payment-qr-img { width: 160px; height: 160px; margin: 10px 0; border: 1px solid #cbd5e1; border-radius: 6px; }
.payment-qr-tip { font-size: 12.5px; color: var(--ink-soft); }
.payment-order-meta { font-size: 11px; color: var(--muted); margin-bottom: 10px; }

.ledger-table-wrap { max-height: 200px; overflow-y: auto; }
.ledger-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ledger-table th, .ledger-table td { padding: 8px 10px; border-bottom: 1px solid #edf2f7; text-align: left; }
.ledger-table th { color: var(--muted); font-weight: 500; }
.text-success { color: #059669; font-weight: 600; }
.text-danger { color: #dc2626; font-weight: 600; }

/* Intake Dropzone */
.intake-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  transition: all 0.15s ease;
  margin-bottom: 16px;
}
.intake-dropzone:hover, .intake-dropzone.drag-over {
  border-color: var(--brand);
  background: #f0f7fb;
}
.dropzone-icon { font-size: 28px; margin-bottom: 6px; }
.intake-dropzone strong { display: block; font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.intake-dropzone small { font-size: 12px; color: var(--muted); }

.intake-file-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.intake-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}
.file-badge {
  background: #e2e8f0;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
}
.file-details { flex: 1; min-width: 0; }
.file-details strong { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-details small { font-size: 11px; color: var(--muted); }
.field-select-mini {
  padding: 3px 6px;
  font-size: 11px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
}

/* Home view */
.home-view-container { padding: 28px 32px; max-width: 1200px; margin: 0 auto; }
.home-header-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.home-header-banner h2 { font-size: 22px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.home-header-banner p { font-size: 13px; color: var(--muted); margin: 0; }
.banner-actions { display: flex; gap: 10px; }

.home-filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}
.search-input-wrap { flex: 1; max-width: 480px; }
.search-input-wrap input {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
}
.projects-count { font-size: 13px; color: var(--muted); }

.projects-grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.project-summary-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 18px 20px;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
}
.project-summary-card:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.card-head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.card-protocol { font-size: 11px; font-weight: 600; color: var(--brand); }
.card-phase { font-size: 11px; background: #eef2f6; padding: 1px 6px; border-radius: 4px; color: var(--ink-soft); }
.card-title { font-size: 15px; font-weight: 600; color: var(--ink); margin: 0 0 10px; line-height: 1.4; }
.card-meta { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; margin-bottom: 16px; flex: 1; }
.card-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #f1f5f9; padding-top: 12px; font-size: 12px; color: var(--muted); }

/* Documents toolbar */
.documents-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
}
.category-tabs { display: flex; gap: 6px; }
.cat-pill {
  border: 0;
  background: #f1f5f9;
  color: var(--ink-soft);
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 12px;
  cursor: pointer;
}
.cat-pill.active {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}
.file-search-wrap input {
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th, .data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
}
.data-table th {
  color: var(--muted);
  font-weight: 500;
  background: #f8fafc;
}
.file-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.file-tag {
  background: #e2e8f0;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.file-cat-badge {
  font-size: 11px;
  background: #f1f5f9;
  color: var(--ink-soft);
  padding: 2px 8px;
  border-radius: 10px;
}
.danger-text { color: #dc2626 !important; }

