
/* v5.7.0 Apple-inspired workspace redesign and scale-ready shell */
:root {
  --apple-page: #f5f5f7;
  --apple-panel: #ffffff;
  --apple-panel-soft: #fbfbfd;
  --apple-ink: #1d1d1f;
  --apple-muted: #6e6e73;
  --apple-line: rgba(0, 0, 0, .10);
  --apple-blue: #0071e3;
  --apple-blue-soft: #eaf3ff;
  --apple-green: #2f7d50;
  --apple-red: #b42318;
  --apple-shadow: 0 18px 50px rgba(0, 0, 0, .08);
  --apple-focus: 0 0 0 4px rgba(0, 113, 227, .14);
}
.dashboard-shell-v22 {
  background: var(--apple-page);
  color: var(--apple-ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}
.app-shell-v22 {
  grid-template-columns: 232px minmax(0, 1fr);
}
.sidebar-v22 {
  border-right: 1px solid var(--apple-line);
  background: rgba(245, 245, 247, .86);
  color: var(--apple-ink);
  backdrop-filter: saturate(180%) blur(18px);
}
.side-brand-v22 {
  color: var(--apple-ink);
}
.side-brand-v22 span {
  background: linear-gradient(145deg, #1d1d1f, #6e6e73);
  color: #fff;
}
.sidebar-v22 nav a,
.side-foot-v22 a {
  color: rgba(29, 29, 31, .72);
  background: transparent;
  border-radius: 8px;
}
.sidebar-v22 nav a:hover,
.sidebar-v22 nav a:focus-visible,
.sidebar-v22 nav a[aria-current="page"] {
  border-color: transparent;
  background: rgba(255, 255, 255, .78);
  color: var(--apple-blue);
  box-shadow: none;
}
.sidebar-v22 nav a[aria-current="page"]::after {
  display: none;
}
.topbar-v22 {
  min-height: 76px;
  border-bottom: 1px solid var(--apple-line);
  background: rgba(245, 245, 247, .82);
  backdrop-filter: saturate(180%) blur(18px);
}
.topbar-v22 h1 {
  color: var(--apple-ink);
  font-size: 22px;
  font-weight: 850;
  letter-spacing: 0;
}
.eyebrow,
.section-kicker {
  color: var(--apple-muted);
  letter-spacing: 0;
}
.work-main-v22 {
  padding: 24px;
}
.dashboard-section-v22 {
  scroll-margin-top: 96px;
}
.section-title-v22,
.section-head-v22 {
  align-items: end;
}
.section-title-v22 h2,
.section-head-v22 h2 {
  color: var(--apple-ink);
  font-size: 32px;
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: 0;
}
.section-title-v22 p,
.section-head-v22 p,
.hint,
.empty-v22,
.small,
.block-meta,
.drawer-title-v556 small {
  color: var(--apple-muted);
}
.dashboard-card-v22,
.gangue-folder,
.block-card,
.research-block-v22,
.record-section,
.metric-result-card-v22,
.folder-section,
.calendar-collapse-v22,
.create-panel-v22 {
  border: 1px solid var(--apple-line);
  border-radius: 8px;
  background: var(--apple-panel);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9);
}
.dashboard-card-v22:hover,
.gangue-folder:hover,
.block-card:hover,
.research-block-v22:hover {
  border-color: rgba(0, 113, 227, .22);
  box-shadow: var(--apple-shadow);
  transform: none;
}
.metric-grid-v22,
.overview-grid-v22,
.recent-block-grid-v22,
.gangue-overview-grid-v22 {
  gap: 12px;
}
.global-search-v22,
.search-field-v22 {
  min-width: 0;
}
.search-field-v22 input,
.block-toolbar input,
input,
textarea,
select {
  border-color: var(--apple-line);
  border-radius: 8px;
  background: #fff;
  color: var(--apple-ink);
}
.search-field-v22 input:focus,
.block-toolbar input:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--apple-blue);
  box-shadow: var(--apple-focus);
}
button,
.chip-button,
.top-actions-v22 a,
.top-actions-v22 button,
.card-actions-v22 a,
.record-tabbar button {
  min-height: 36px;
  border: 1px solid var(--apple-line);
  border-radius: 8px;
  background: #fff;
  color: var(--apple-blue);
  box-shadow: none;
  font-weight: 750;
}
button:hover,
.chip-button:hover,
.top-actions-v22 a:hover,
.top-actions-v22 button:hover,
.card-actions-v22 a:hover,
.record-tabbar button:hover {
  border-color: rgba(0, 113, 227, .34);
  background: var(--apple-blue-soft);
  box-shadow: none;
}
button[type="submit"],
.record-savebar-v543 button.primary {
  border-color: var(--apple-blue);
  background: var(--apple-blue);
  color: #fff;
}
button.danger,
.danger-soft,
.delete-block,
.delete-lab-image {
  border-color: rgba(180, 35, 24, .20);
  background: #fff5f4;
  color: var(--apple-red);
}
.block-toolbar {
  position: sticky;
  top: 76px;
  z-index: 9;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--apple-line);
  border-radius: 8px;
  background: rgba(251, 251, 253, .90);
  backdrop-filter: saturate(180%) blur(16px);
}
.block-filter-panel-v31,
.lab-image-filter-panel {
  position: sticky;
  top: 154px;
  z-index: 8;
  padding: 12px;
  border: 1px solid var(--apple-line);
  border-radius: 8px;
  background: rgba(251, 251, 253, .90);
  backdrop-filter: saturate(180%) blur(16px);
}
.research-block-v22,
.block-card {
  overflow: hidden;
}
.block-head {
  border-bottom-color: var(--apple-line);
  background: linear-gradient(180deg, #fff, #fbfbfd);
}
.block-title strong,
.research-block-v22 h3,
.gangue-folder-title strong {
  color: var(--apple-ink);
  font-weight: 850;
  letter-spacing: 0;
}
.badge,
.block-meta span,
.config-chips-v22 span,
.age-progress-v22 span,
.folder-badges span,
.export-check,
.export-count-v311 {
  border-color: var(--apple-line);
  border-radius: 999px;
  background: #f5f5f7;
  color: var(--apple-muted);
}
.age-progress-v22 .done,
.strength-bar-v22.filled b {
  color: var(--apple-green);
}
.age-progress-v22 .due,
.strength-bar-v22.due b {
  color: var(--apple-red);
}
.gangue-folder-head {
  background: linear-gradient(180deg, #fff, #fbfbfd);
}
.record-details[open]::before,
.record-details[open]:before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, .28);
  backdrop-filter: blur(8px);
}
.record-details[open] .record-drawer-body {
  position: fixed;
  z-index: 90;
  inset: 0 0 0 auto;
  width: min(980px, calc(100vw - 28px));
  border-left: 1px solid var(--apple-line);
  background: var(--apple-page);
  box-shadow: -26px 0 70px rgba(0, 0, 0, .22);
}
.drawer-top-v22 {
  min-height: 58px;
  border-bottom: 1px solid var(--apple-line);
  background: rgba(245, 245, 247, .86);
  backdrop-filter: saturate(180%) blur(18px);
}
.drawer-title-v556 strong {
  color: var(--apple-ink);
  letter-spacing: 0;
}
.record-drawer-body .record-tabbar {
  top: 58px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 12px;
  border-bottom: 1px solid var(--apple-line);
  background: rgba(245, 245, 247, .90);
  backdrop-filter: saturate(180%) blur(18px);
}
.record-drawer-body .record-tabbar button {
  flex: 0 0 auto;
  border-radius: 999px;
  color: var(--apple-muted);
}
.record-drawer-body .record-tabbar button.active {
  border-color: var(--apple-blue);
  background: var(--apple-blue);
  color: #fff;
  box-shadow: none;
}
.record-form,
.record-panel {
  background: transparent;
}
.record-section {
  margin: 12px;
  padding: 16px;
}
.record-section h4 {
  border-bottom-color: var(--apple-line);
  color: var(--apple-ink);
}
.record-savebar-v543 {
  right: 0;
  bottom: 0;
  left: 0;
  margin: 12px;
  border: 1px solid var(--apple-line);
  border-radius: 8px;
  background: rgba(251, 251, 253, .92);
  backdrop-filter: saturate(180%) blur(18px);
}
.record-details.is-dirty-v552 .record-savebar-v543,
.record-details.is-dirty-v552 .drawer-top-v22 {
  border-color: rgba(255, 159, 10, .42);
  background: rgba(255, 251, 235, .94);
}
.metric-result-card-v22,
.specimen-row-v22:not(.head) {
  background: #fff;
}
.metric-result-help-v33,
.specimen-summary-v22,
.specimen-actions-v52 {
  border-color: var(--apple-line);
  border-radius: 8px;
  background: #f5f5f7;
}
.specimen-primary-v559 input {
  border-color: rgba(0, 113, 227, .24);
  color: var(--apple-ink);
}
.converted-strength-pill-v33,
.specimen-converted-v559 .converted-strength-pill-v33 {
  border-color: rgba(47, 125, 80, .18);
  background: #f1faf4;
  color: var(--apple-green);
}
.result-primary-pill-v73 {
  border-color: rgba(47, 125, 80, .28);
  background: #eaf7ef;
  color: var(--apple-green);
}
.specimen-raw-v73 input {
  border-color: var(--apple-line);
  background: #f5f5f7;
  color: var(--apple-muted);
}
.record-loading-v57,
.record-load-error-v57 {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .24);
  backdrop-filter: blur(8px);
}
.record-loading-v57[hidden],
.record-load-error-v57[hidden] {
  display: none;
}
.record-loading-v57 > div,
.record-load-error-v57 > div {
  width: min(420px, 100%);
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--apple-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--apple-shadow);
}
.record-loading-v57 strong,
.record-load-error-v57 strong {
  font-size: 20px;
  color: var(--apple-ink);
}
.record-loading-v57 span,
.record-load-error-v57 span {
  color: var(--apple-muted);
}
.record-load-error-v57 a {
  color: var(--apple-blue);
  font-weight: 750;
}
@media (max-width: 980px) {
  .app-shell-v22 {
    display: block;
  }
  .sidebar-v22 {
    position: sticky;
    top: 0;
    z-index: 30;
    height: auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 10px 12px;
  }
  .sidebar-v22 nav {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .topbar-v22,
  .block-toolbar,
  .block-filter-panel-v31,
  .lab-image-filter-panel {
    position: static;
  }
  .work-main-v22 {
    padding: 14px;
  }
}
@media (max-width: 640px) {
  .sidebar-v22 {
    grid-template-columns: 1fr;
  }
  .side-foot-v22 {
    display: none;
  }
  .topbar-v22 {
    padding: 12px;
  }
  .section-title-v22 h2,
  .section-head-v22 h2 {
    font-size: 25px;
  }
  .record-details[open] .record-drawer-body {
    width: 100vw;
  }
  .drawer-top-v22,
  .record-section,
  .record-savebar-v543 {
    margin: 0;
    border-radius: 0;
  }
}

/* v5.8.0 scale-ready block index */
.block-toolbar {
  grid-template-columns: minmax(240px, 1fr) auto auto auto minmax(260px, max-content);
}
.block-view-toggle-v58 {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--apple-line);
  border-radius: 999px;
  background: #f5f5f7;
}
.block-view-toggle-v58 button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  background: transparent;
  color: var(--apple-muted);
  font-size: 12px;
}
.block-view-toggle-v58 button.active,
.block-view-toggle-v58 button[aria-pressed="true"] {
  background: #fff;
  color: var(--apple-blue);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}
.block-list-shell-v58 {
  overflow: auto;
  border: 1px solid var(--apple-line);
  border-radius: 8px;
  background: #fff;
}
.block-pagination-v60 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  color: var(--apple-muted);
  font-size: 12px;
}
.block-pagination-v60 label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.block-pagination-v60 select {
  min-height: 30px;
  border: 1px solid var(--apple-line);
  border-radius: 999px;
  padding: 0 28px 0 10px;
  background: #fff;
}
[data-block-list-fragment].is-loading-v60 {
  opacity: .62;
  pointer-events: none;
}
.lazy-panel-v60 {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--apple-line);
  border-radius: 8px;
  background: #fbfbfd;
}
.lazy-panel-v60 p {
  margin: 0;
  color: var(--apple-muted);
}
.record-history-v61 {
  display: grid;
  gap: 10px;
}
.history-entry-v61 {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--apple-line);
  border-radius: 8px;
  background: #fff;
}
.history-entry-v61 > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.history-entry-v61 p {
  margin: 0;
  color: var(--apple-muted);
  font-size: 13px;
}
.history-diff-v61 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.history-diff-v61 pre {
  max-height: 280px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  background: #f5f5f7;
  color: var(--apple-ink);
  font-size: 11px;
  white-space: pre-wrap;
}
.block-list-head-v58,
.block-row-v58 {
  min-width: 1040px;
  display: grid;
  grid-template-columns: 78px minmax(260px, 1.8fr) minmax(130px, .8fr) minmax(120px, .75fr) minmax(130px, .85fr) minmax(120px, .8fr) minmax(148px, .8fr);
  gap: 10px;
  align-items: center;
}
.block-list-head-v58 {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 12px;
  border-bottom: 1px solid var(--apple-line);
  background: #f5f5f7;
  color: var(--apple-muted);
  font-size: 12px;
  font-weight: 850;
}
.block-index-v58[data-view="table"] {
  display: grid;
}
.block-index-v58[data-view="table"] .block-index-item-v58 {
  min-width: 1040px;
  border-bottom: 1px solid var(--apple-line);
  background: #fff;
}
.block-index-v58[data-view="table"] .block-index-item-v58:last-child {
  border-bottom: 0;
}
.block-index-v58[data-view="table"] .block-index-item-v58:hover {
  background: #fbfbfd;
}
.block-row-v58 {
  padding: 12px;
}
.block-row-main-v58 {
  min-width: 0;
  display: grid;
  gap: 3px;
  color: var(--apple-ink);
}
.block-row-main-v58 strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 850;
}
.block-row-main-v58 small,
.block-row-cell-v58 small {
  overflow: hidden;
  color: var(--apple-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.block-row-cell-v58 {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.block-row-cell-v58 b {
  overflow: hidden;
  color: var(--apple-ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.block-row-cell-v58.ok b {
  color: var(--apple-green);
}
.block-row-cell-v58.warn b {
  color: var(--apple-red);
}
.block-row-actions-v58 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.block-row-actions-v58 a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--apple-line);
  border-radius: 999px;
  background: #fff;
  color: var(--apple-blue);
  font-size: 12px;
  font-weight: 800;
}
.block-row-actions-v58 a:hover {
  border-color: rgba(0, 113, 227, .34);
  background: var(--apple-blue-soft);
}
.block-list-shell-v58[data-view="cards"] {
  overflow: visible;
  border: 0;
  background: transparent;
}
.block-list-shell-v58[data-view="cards"] .block-list-head-v58 {
  display: none;
}
.block-index-v58[data-view="cards"] {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.block-index-v58[data-view="cards"] .block-index-item-v58 {
  min-width: 0;
  display: grid;
  gap: 8px;
}
.block-index-v58[data-view="cards"] .block-row-v58 {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
}
.block-index-v58[data-view="cards"] .block-row-main-v58,
.block-index-v58[data-view="cards"] .block-row-cell-v58,
.block-index-v58[data-view="cards"] .block-row-actions-v58 {
  display: none;
}
@media (max-width: 1180px) {
  .block-toolbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .block-view-toggle-v58,
  .block-toolbar .archive-actions {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  .block-toolbar {
    grid-template-columns: 1fr;
  }
  .block-list-shell-v58 {
    margin: 0 -2px;
  }
  .block-list-head-v58,
  .block-row-v58,
  .block-index-v58[data-view="table"] .block-index-item-v58 {
    min-width: 900px;
  }
}

/* v5.9.0 operational command cards */
.block-ops-summary-v59 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 12px;
}
.ops-card-v59 {
  min-height: 118px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--apple-line);
  border-radius: 8px;
  background: #fff;
  color: var(--apple-ink);
  text-align: left;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9);
  cursor: pointer;
}
a.ops-card-v59 {
  color: var(--apple-ink);
}
.ops-card-v59:hover,
.ops-card-v59:focus-visible,
.ops-card-v59.active {
  border-color: rgba(0, 113, 227, .36);
  background: #fbfdff;
  box-shadow: var(--apple-shadow);
  outline: none;
}
.ops-card-v59 span {
  color: var(--apple-muted);
  font-size: 13px;
  font-weight: 850;
}
.ops-card-v59 strong {
  color: var(--apple-ink);
  font-size: 32px;
  line-height: 1;
  font-weight: 850;
}
.ops-card-v59 small {
  color: var(--apple-muted);
  font-size: 12px;
  font-weight: 750;
}
.ops-card-v59.danger strong {
  color: var(--apple-red);
}
.ops-card-v59.warn strong {
  color: #b76e00;
}
.ops-card-v59.ok strong {
  color: var(--apple-green);
}
.ops-card-v59.neutral {
  cursor: pointer;
}
@media (max-width: 1180px) {
  .block-ops-summary-v59 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .block-ops-summary-v59 {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }
  .ops-card-v59 {
    min-width: min(156px, 44vw);
    min-height: 86px;
    flex: 0 0 min(156px, 44vw);
    padding: 12px;
    scroll-snap-align: start;
  }
  .ops-card-v59 strong {
    font-size: 26px;
  }
}

/* v5.11.0 card-first system workspace */
.workspace-command-v511 {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: 14px;
  margin-bottom: 18px;
}
.command-hero-v511,
.command-card-v511,
.gangue-archive-card-v511 {
  border: 1px solid var(--apple-line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbfbfd);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9);
}
.command-hero-v511 {
  min-height: 248px;
  display: grid;
  align-content: end;
  gap: 12px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(0, 113, 227, .08), transparent 42%),
    linear-gradient(180deg, #fff, #f5f5f7);
}
.command-hero-v511 h2 {
  max-width: 760px;
  margin: 0;
  color: var(--apple-ink);
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  font-weight: 850;
  letter-spacing: 0;
}
.command-hero-v511 p:not(.eyebrow) {
  max-width: 720px;
  color: var(--apple-muted);
  font-size: 16px;
  line-height: 1.65;
}
.command-actions-v511,
.command-card-grid-v511,
.gangue-card-metrics-v511,
.gangue-card-recent-v511 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.command-actions-v511 a,
.command-link-v511,
.gangue-card-open-v511 {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(0, 113, 227, .24);
  border-radius: 999px;
  background: #fff;
  color: var(--apple-blue);
  font-weight: 800;
}
.command-card-grid-v511 {
  display: grid;
  grid-template-columns: 1fr;
}
.command-card-v511 {
  display: grid;
  gap: 10px;
  padding: 18px;
}
.command-card-v511 > span,
.gangue-archive-card-v511 > div:first-child span {
  color: var(--apple-muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.command-card-v511 strong {
  color: var(--apple-ink);
  font-size: 34px;
  line-height: 1;
  font-weight: 850;
}
.command-card-v511.urgent strong {
  color: var(--apple-red);
}
.command-card-v511.calm strong {
  color: var(--apple-blue);
}
.command-card-v511 p,
.gangue-archive-card-v511 p {
  color: var(--apple-muted);
  line-height: 1.55;
}
.command-list-v511 {
  display: grid;
  gap: 7px;
}
.command-list-v511 a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--apple-line);
  border-radius: 8px;
  background: #fff;
  color: var(--apple-ink);
}
.command-list-v511 b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.command-list-v511 small {
  color: var(--apple-muted);
}
.mini-meter-v511 {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: #e8e8ed;
}
.mini-meter-v511 i {
  display: block;
  width: var(--p, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--apple-blue);
}
.gangue-card-index-v511 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.gangue-archive-card-v511 {
  display: grid;
  gap: 14px;
  padding: 18px;
}
.gangue-archive-card-v511.needs-action {
  border-color: rgba(180, 35, 24, .18);
  background: linear-gradient(180deg, #fff, #fff8f7);
}
.gangue-archive-card-v511 h3 {
  margin: 4px 0;
  color: var(--apple-ink);
  font-size: 22px;
  line-height: 1.15;
  font-weight: 850;
}
.gangue-card-metrics-v511 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.gangue-card-metrics-v511 span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--apple-line);
  border-radius: 8px;
  background: #fff;
}
.gangue-card-metrics-v511 b {
  color: var(--apple-ink);
  font-size: 24px;
  line-height: 1;
}
.gangue-card-metrics-v511 small {
  color: var(--apple-muted);
  font-weight: 800;
}
.gangue-card-metrics-v511 .warn b {
  color: var(--apple-red);
}
.gangue-card-metrics-v511 .ok b {
  color: var(--apple-green);
}
.gangue-card-recent-v511 a,
.gangue-card-recent-v511 small {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0 10px;
  border: 1px solid var(--apple-line);
  border-radius: 999px;
  background: #f5f5f7;
  color: var(--apple-muted);
  font-size: 12px;
  font-weight: 800;
}
.block-view-toggle-v511 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--apple-line);
  border-radius: 999px;
  background: #f5f5f7;
}
.block-view-toggle-v511 .chip-button {
  min-height: 30px;
  border-radius: 999px;
  border-color: transparent;
  background: transparent;
}
.block-view-toggle-v511 .chip-button.active {
  border-color: #fff;
  background: #fff;
  color: var(--apple-ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}
.block-list-shell-v58[data-view="cards"] .block-index-v58 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.block-index-v58[data-view="cards"] .block-index-item-v58 {
  min-width: 0;
}
.block-index-v58[data-view="cards"] .block-row-v58 {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--apple-line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f8f8fb);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}
.block-index-v58[data-view="cards"] .block-row-v58 > .export-check {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
}
.block-index-v58[data-view="cards"] .block-row-main-v58 {
  grid-column: 1 / -1;
  padding-right: 82px;
}
.block-index-v58[data-view="cards"] .block-row-main-v58,
.block-index-v58[data-view="cards"] .block-row-cell-v58 {
  display: grid;
}
.block-index-v58[data-view="cards"] .block-row-actions-v58 {
  grid-column: 1 / -1;
  display: flex;
}
.block-index-v58[data-view="cards"] .block-row-main-v58 strong {
  white-space: normal;
}
.block-index-v58[data-view="cards"] .block-row-cell-v58 {
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
}
.block-index-v58[data-view="cards"] .block-row-cell-v58:last-of-type {
  grid-column: 1 / -1;
}
.block-index-v58[data-view="cards"] .block-row-actions-v58 a {
  background: var(--apple-blue-soft);
  color: var(--apple-blue);
}
.table-wrap-v56 {
  overflow-x: auto;
  margin-top: 14px;
}
.review-package-table-v56 {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 13px;
}
.review-package-table-v56 th,
.review-package-table-v56 td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.review-package-table-v56 code {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}
.workspace-review-gate-v57 {
  display: grid;
  gap: 4px;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .76);
}
.workspace-review-gate-v57.ok {
  border-color: rgba(47, 128, 103, .28);
  background: #eef8f3;
  color: #285947;
}
.workspace-review-gate-v57.development {
  border-color: rgba(176, 126, 24, .3);
  background: #fff8e8;
  color: #815d18;
}
.workspace-review-gate-v57.blocked {
  border-color: rgba(180, 35, 24, .24);
  background: #fff5f4;
  color: #8a231c;
}
.workspace-review-gate-v57 small {
  color: inherit;
  opacity: .8;
}
.workspace-review-cards-v57 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.workspace-review-card-v57 {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .74);
}
.workspace-review-card-v57 span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.workspace-review-card-v57 strong,
.review-file-name {
  overflow-wrap: anywhere;
}
.workspace-review-card-v57 code {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chip-button:disabled,
.chip-button[aria-disabled="true"] {
  opacity: .5;
  filter: saturate(.45);
  cursor: not-allowed;
  box-shadow: none;
}
.chip-button.danger {
  border-color: rgba(180, 35, 24, .3);
  background: rgba(180, 35, 24, .1);
  color: #b42318;
}
@media (max-width: 1120px) {
  .workspace-command-v511 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 680px) {
  .command-hero-v511,
  .command-card-v511,
  .gangue-archive-card-v511 {
    padding: 14px;
  }
  .gangue-card-metrics-v511 {
    grid-template-columns: 1fr;
  }
  .block-view-toggle-v511,
  .archive-actions {
    width: 100%;
  }
  .block-view-toggle-v511 .chip-button {
    flex: 1;
  }
}

/* v5.14.8 workspace cleanup */
.workspace-module-v5148 {
  display: none;
}

.workspace-module-v5148.active {
  display: block;
}

.workspace-module-v5148[hidden] {
  display: none !important;
}

.sidebar-v22 nav a,
.top-actions-v22 a,
.top-actions-v22 button,
.search-field-v22 button,
.archive-actions .chip-button,
.block-actions button,
.block-actions a,
.actions button,
.actions .btn,
.floating-quicknav-v549 a {
  min-height: 44px;
}

.sidebar-v22 nav a:focus-visible,
.top-actions-v22 a:focus-visible,
.top-actions-v22 button:focus-visible,
.search-field-v22 button:focus-visible,
.archive-actions .chip-button:focus-visible,
.block-actions button:focus-visible,
.block-actions a:focus-visible,
.actions button:focus-visible,
.actions .btn:focus-visible,
.floating-quicknav-v549 a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(47, 125, 103, .32);
  outline-offset: 2px;
}

.sidebar-v22 nav a[aria-current="page"] {
  position: relative;
  border-color: rgba(47, 125, 103, .22);
  background: #e6f4ee;
  color: #17624e;
  box-shadow: inset 3px 0 0 #2f7d67;
}

.sidebar-v22 nav a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: #2f7d67;
}

.search-field-v22 button[data-search-submit] {
  width: auto;
  min-width: 54px;
  padding: 0 10px;
}

.dashboard-section-v22 {
  scroll-margin-top: 110px;
}

.block-row-main-v58 strong,
.bar-group-v23 > strong span {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.chart-values-v251 span,
.column-v23 b,
.strength-bar-v22 b,
.strength-bar-v22 em {
  font-size: max(12px, 1em);
}

.chart-toolbar-v251 button,
.chart-toolbar-v251 select,
.chart-toolbar-v251 input,
.chart-modal-panel-v251 > button,
.chart-selector-v49 summary,
.chart-selector-tools-v49 input,
.chart-selector-tools-v49 button,
.chart-current-v22 select,
.search-field-v22 input,
.search-field-v22 button {
  min-height: 44px;
}

.record-table-wrap,
.specimen-table-v22,
.review-package-table-v56,
.task-table-v22 {
  max-width: 100%;
  overflow-x: auto;
}

.floating-quicknav-v549 {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 45;
  display: none;
  grid-template-columns: repeat(2, minmax(46px, auto));
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--apple-line, #c9ded6);
  border-radius: 8px;
  background: rgba(251, 251, 253, .88);
  box-shadow: var(--apple-shadow, 0 18px 44px rgba(20, 60, 50, .18));
  backdrop-filter: saturate(180%) blur(18px);
}

.floating-quicknav-v549 a,
.floating-quicknav-v549 a[href="#new-block"] {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--apple-blue, #2f8067);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: none;
}

.floating-quicknav-v549 a:hover,
.floating-quicknav-v549 a:focus-visible {
  border-color: rgba(47, 125, 103, .28);
  background: rgba(47, 125, 103, .08);
}

@media (max-width: 760px) {
  .work-main-v22 {
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }

  .floating-quicknav-v549 {
    right: 10px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(420px, calc(100vw - 20px));
    bottom: calc(12px + env(safe-area-inset-bottom));
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }

  body.record-drawer-open .floating-quicknav-v549 {
    display: none;
  }

  .block-filter-panel-v31,
  .lab-image-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .block-filter-panel-v31,
  .lab-image-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body:has(.workspace-preview-banner-v1) button[disabled],
body:has(.workspace-preview-banner-v1) input[disabled][aria-disabled="true"],
body:has(.workspace-preview-banner-v1) input[type="file"][disabled],
body:has(.workspace-preview-banner-v1) a[data-preview-disabled-action="1"] {
  opacity: .45;
  filter: saturate(.35);
  cursor: not-allowed;
  pointer-events: none;
}

body:has(.workspace-preview-banner-v1) button[disabled] {
  background: #eef2f0 !important;
  border-color: #cbd8d3 !important;
  color: #6e7c77 !important;
  box-shadow: none !important;
}

/* v5.19 image workspace */
.lab-image-toolbar-v519 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.lab-image-search-v519 {
  grid-column: span 2;
}

.lab-image-toolbar-v519 input[type="search"] {
  width: 100%;
  min-height: 40px;
}

.lab-image-density-v519 {
  display: grid;
  gap: 5px;
  color: var(--lab-muted, var(--muted));
  font-size: 12px;
  font-weight: 900;
}

.lab-image-density-v519 > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.lab-image-density-v519 button,
.lab-image-reset-v519 {
  min-height: 40px;
  padding: 0 10px;
}

.lab-image-density-v519 button.active {
  border-color: var(--lab-green, #2f8067);
  background: var(--lab-green-soft, #eaf6f0);
  color: var(--lab-green-strong, #1f684f);
}

.lab-image-count-v519 {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 10px;
  background: #eef6f2;
  color: var(--lab-green-strong, #1f684f);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.lab-gallery[data-density="comfortable"] {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.lab-gallery[data-density="compact"] {
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
}

.lab-gallery[data-density="compact"] .lab-photo-description-v519,
.lab-gallery[data-density="compact"] .lab-photo-filename-v519,
.lab-gallery[data-density="compact"] .lab-photo-links-v519,
.lab-gallery[data-density="compact"] .image-edit-v32,
.lab-gallery[data-density="compact"] .delete-lab-image {
  display: none;
}

.lab-gallery[data-density="compact"] .lab-photo form {
  padding: 0;
}

.lab-photo-preview {
  isolation: isolate;
}

.lab-photo-kind-v519 {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 35, 30, .76);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.lab-photo-title-v519,
.lab-photo-filename-v519,
.lab-photo-meta-v519,
.lab-photo-description-v519 {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.lab-photo-title-v519 {
  font-size: 14px;
  line-height: 1.45;
}

.lab-photo-filename-v519 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.lab-photo-links-v519 {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 3px;
}

.lab-photo-links-v519 a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--lab-line, #dbe9e3);
  border-radius: 8px;
  background: #f8fbfa;
  color: var(--lab-green, #2f8067);
  font-weight: 900;
}

.lab-file-picker-v519 {
  min-height: 84px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .8fr);
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px dashed #b7d3c8;
  border-radius: 12px;
  background: #f7fbf9;
}

.lab-file-picker-v519 > span {
  display: grid;
  gap: 3px;
}

.lab-file-picker-v519 small {
  color: var(--lab-muted, var(--muted));
  font-weight: 750;
}

.lab-upload-selection-v519 {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--lab-line, #dbe9e3);
  border-radius: 12px;
  background: #fbfdfc;
}

.lab-upload-selection-v519[hidden] {
  display: none;
}

.lab-upload-selection-head-v519 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lab-upload-selection-head-v519 button {
  min-height: 36px;
}

.lab-upload-selection-grid-v519 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.lab-upload-selection-item-v519 {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 7px;
  border: 1px solid var(--lab-line, #dbe9e3);
  border-radius: 9px;
  background: #fff;
}

.lab-upload-selection-preview-v519 {
  width: 58px;
  aspect-ratio: 1;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #eaf1ee;
}

.lab-upload-selection-preview-v519 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lab-upload-selection-item-v519.preview-unavailable .lab-upload-selection-preview-v519::before {
  content: "原图";
  color: var(--lab-muted, var(--muted));
  font-size: 12px;
  font-weight: 900;
}

.lab-upload-selection-item-v519 > div:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.lab-upload-selection-item-v519 strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.lab-upload-selection-item-v519 small,
.lab-upload-selection-more-v519 {
  color: var(--lab-muted, var(--muted));
  font-size: 11px;
  font-weight: 750;
}

.lab-lightbox-frame-v519 {
  width: min(1180px, 96vw);
  max-height: calc(100dvh - 118px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 0;
}

.lab-lightbox-media-v519 {
  min-height: 0;
  display: grid;
  place-items: center;
}

.lab-lightbox-v22 .lab-lightbox-frame-v519 img {
  max-width: 100%;
  max-height: calc(100dvh - 210px);
}

.lab-lightbox-caption-v519 {
  min-width: 0;
  display: grid;
  gap: 3px;
  justify-self: center;
  width: min(720px, 100%);
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(8, 20, 17, .74);
  color: #fff;
  text-align: center;
  backdrop-filter: blur(10px);
}

.lab-lightbox-caption-v519 strong,
.lab-lightbox-caption-v519 span,
.lab-lightbox-caption-v519 small {
  overflow-wrap: anywhere;
}

.lab-lightbox-caption-v519 span,
.lab-lightbox-caption-v519 small {
  color: rgba(255, 255, 255, .78);
}

.lab-lightbox-error-v519 {
  max-width: 380px;
  padding: 18px;
  border-radius: 12px;
  background: #fff;
  color: #8a5800;
  font-weight: 900;
  text-align: center;
}

@media (max-width: 700px) {
  .lab-image-toolbar-v519 {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lab-image-search-v519,
  .lab-image-count-v519 {
    grid-column: 1 / -1;
  }

  .lab-gallery[data-density="comfortable"] {
    grid-template-columns: 1fr;
  }

  .lab-gallery[data-density="comfortable"] .lab-photo img {
    aspect-ratio: 16 / 11;
  }

  .lab-gallery[data-density="compact"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lab-file-picker-v519 {
    grid-template-columns: 1fr;
  }

  .lab-upload-selection-grid-v519 {
    grid-template-columns: 1fr;
  }

  .lab-upload-selection-item-v519 strong,
  .lab-gallery[data-density="comfortable"] .lab-photo-filename-v519 {
    display: block;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
    -webkit-line-clamp: unset;
  }

  .image-edit-v32[open] {
    position: fixed;
    z-index: 110;
    inset: auto 8px calc(8px + env(safe-area-inset-bottom)) 8px;
    max-height: min(82dvh, 720px);
    overflow: auto;
    margin: 0;
    padding: 4px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 26px 90px rgba(8, 28, 22, .34);
  }

  .image-edit-v32[open] form {
    grid-template-columns: 1fr;
  }

  .lab-lightbox-v22 {
    padding: 68px 10px 60px;
  }

  .lab-lightbox-actions-v22 {
    top: calc(8px + env(safe-area-inset-top));
    left: 8px;
    right: 8px;
    justify-content: center;
  }

  .lab-lightbox-actions-v22 a,
  .lab-lightbox-actions-v22 button {
    min-height: 44px;
    flex: 1;
    justify-content: center;
    padding: 0 8px;
    font-size: 12px;
  }

  .lab-lightbox-nav-v22 {
    top: auto;
    bottom: calc(8px + env(safe-area-inset-bottom));
    min-height: 44px;
    width: 52px;
    transform: none;
  }

  .lab-lightbox-counter-v22 {
    bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .lab-lightbox-v22 .lab-lightbox-frame-v519 img {
    max-height: calc(100dvh - 270px);
  }

  .lab-lightbox-caption-v519 {
    text-align: left;
  }
}

.task-checkbox-label-v521 {
  min-width: 0;
  min-height: 44px;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 9px;
  padding-block: 5px;
  cursor: pointer;
}

.task-checkbox-label-v521 > input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 0;
}

.task-form .reminder-delete-v22 {
  min-height: 44px;
}

.material-category-label-v521 {
  min-width: 0;
  display: block;
}

@media (max-width: 640px) {
  .workspace-review-cards-v57 {
    grid-template-columns: 1fr;
  }
  .review-package-table-v56 {
    min-width: 0;
  }
  .review-package-table-v56 thead {
    display: none;
  }
  .review-package-table-v56,
  .review-package-table-v56 tbody,
  .review-package-table-v56 tr,
  .review-package-table-v56 td {
    display: block;
    width: 100%;
  }
  .review-package-table-v56 tr {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .78);
  }
  .review-package-table-v56 td {
    border: 0;
    padding: 4px 0;
  }
  .review-package-table-v56 td:nth-child(1)::before {
    content: "文件";
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
  }
  .review-package-table-v56 td:nth-child(2)::before {
    content: "类型";
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    margin-right: 8px;
  }
  .review-package-table-v56 td:nth-child(3)::before {
    content: "大小";
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    margin-right: 8px;
  }
  .review-package-table-v56 td:nth-child(4)::before {
    content: "生成时间";
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    margin-right: 8px;
  }
  .review-package-table-v56 td:nth-child(5) {
    display: none;
  }
  .review-package-table-v56 td:nth-child(6) .archive-actions {
    justify-content: stretch;
  }
  .review-package-table-v56 td:nth-child(6) .chip-button {
    flex: 1 1 120px;
    justify-content: center;
  }
}

@media print {
  .floating-quicknav-v549 {
    display: none;
  }
}

/* v6.2 cohesive laboratory workspace */
:root {
  --lab-page: #edf3ef;
  --lab-page-warm: #f6f3ec;
  --lab-surface: #ffffff;
  --lab-surface-soft: #f7faf8;
  --lab-ink: #17312a;
  --lab-ink-strong: #0b211b;
  --lab-muted: #60736c;
  --lab-line: rgba(32, 77, 64, .14);
  --lab-line-strong: rgba(32, 77, 64, .24);
  --lab-green: #176b52;
  --lab-green-strong: #0f5541;
  --lab-green-soft: #e3f2eb;
  --lab-mint: #8fd2b8;
  --lab-amber: #c98327;
  --lab-amber-soft: #fff2dc;
  --lab-red: #b33b2e;
  --lab-red-soft: #fff0ed;
  --lab-blue: #356f94;
  --lab-blue-soft: #eaf3f8;
  --lab-sidebar: #102f27;
  --lab-sidebar-deep: #09231d;
  --lab-radius-sm: 10px;
  --lab-radius: 16px;
  --lab-radius-lg: 22px;
  --lab-shadow-sm: 0 1px 2px rgba(15, 58, 46, .05), 0 8px 22px rgba(15, 58, 46, .06);
  --lab-shadow: 0 20px 55px rgba(15, 58, 46, .12);
  --lab-focus: 0 0 0 4px rgba(23, 107, 82, .18);
}

html {
  scroll-padding-top: 112px;
}

body.dashboard-shell-v22 {
  min-width: 320px;
  background:
    radial-gradient(circle at 76% -10%, rgba(143, 210, 184, .28), transparent 31rem),
    radial-gradient(circle at 10% 105%, rgba(201, 131, 39, .11), transparent 34rem),
    linear-gradient(135deg, var(--lab-page), var(--lab-page-warm));
  color: var(--lab-ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  text-rendering: optimizeLegibility;
}

body.dashboard-shell-v22::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .24;
  background-image: linear-gradient(rgba(23, 107, 82, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(23, 107, 82, .04) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
}

::selection {
  background: rgba(23, 107, 82, .2);
  color: var(--lab-ink-strong);
}

.sr-only-v62 {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link-v62 {
  position: fixed;
  z-index: 200;
  top: 10px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--lab-green-strong);
  font-weight: 850;
  text-decoration: none;
  box-shadow: var(--lab-shadow);
  transform: translateY(-160%);
  transition: transform .18s ease;
}

.skip-link-v62:focus {
  transform: translateY(0);
}

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

.workspace-v22 {
  min-width: 0;
}

.sidebar-v22 {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 16px 18px;
  border-right: 0;
  background:
    radial-gradient(circle at 20% 0, rgba(143, 210, 184, .18), transparent 18rem),
    linear-gradient(165deg, var(--lab-sidebar), var(--lab-sidebar-deep));
  color: #f2faf6;
  box-shadow: 14px 0 40px rgba(6, 35, 28, .12);
  backdrop-filter: none;
}

.side-brand-v22 {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  color: #fff;
  text-decoration: none;
}

.side-brand-v22:hover {
  background: rgba(255, 255, 255, .06);
}

.side-brand-v22 .side-brand-mark-v62 {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 13px;
  background: linear-gradient(145deg, #b4ebd4, #6bb99c);
  color: #0b3529;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: -.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 8px 24px rgba(0, 0, 0, .14);
}

.side-brand-v22 .side-brand-copy-v62 {
  min-width: 0;
  display: grid;
  gap: 2px;
  background: transparent;
  color: inherit;
}

.side-brand-copy-v62 strong {
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-brand-copy-v62 small {
  color: rgba(224, 242, 234, .62);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar-v22 nav {
  display: grid;
  gap: 7px;
}

.sidebar-v22 nav a {
  min-height: 48px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: rgba(226, 242, 235, .72);
  font-size: 14px;
  font-weight: 780;
  box-shadow: none;
}

.side-nav-index-v62 {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .07);
  color: rgba(226, 242, 235, .56);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.sidebar-v22 nav a:hover,
.sidebar-v22 nav a:focus-visible {
  border-color: rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.sidebar-v22 nav a[aria-current="page"] {
  border-color: rgba(173, 229, 207, .24);
  background: linear-gradient(135deg, rgba(153, 221, 195, .2), rgba(255, 255, 255, .08));
  color: #fff;
  box-shadow: inset 3px 0 0 #9cd9c1, 0 10px 22px rgba(0, 0, 0, .12);
}

.sidebar-v22 nav a[aria-current="page"]::before,
.sidebar-v22 nav a[aria-current="page"]::after {
  display: none;
}

.sidebar-v22 nav a[aria-current="page"] .side-nav-index-v62 {
  background: #a8e1ca;
  color: #0a3a2c;
}

.side-foot-v22 {
  gap: 6px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.side-foot-v22 a {
  min-height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  color: rgba(226, 242, 235, .68);
}

.side-foot-v22 a:hover,
.side-foot-v22 a:focus-visible {
  background: rgba(255, 255, 255, .07);
  color: #fff;
}

.topbar-v22 {
  position: sticky;
  top: 0;
  z-index: 32;
  min-height: 94px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(320px, 480px) auto;
  gap: 18px;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--lab-line);
  background: rgba(247, 250, 248, .86);
  box-shadow: 0 10px 28px rgba(15, 58, 46, .06);
  backdrop-filter: saturate(150%) blur(20px);
}

.topbar-heading-v62 {
  min-width: 0;
}

.topbar-v22 .eyebrow {
  margin: 0 0 2px;
  color: var(--lab-green);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
}

.topbar-v22 h1 {
  overflow: hidden;
  margin: 0;
  color: var(--lab-ink-strong);
  font-size: clamp(18px, 1.7vw, 24px);
  font-weight: 900;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-summary-v62 {
  overflow: hidden;
  margin: 3px 0 0;
  color: var(--lab-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-context-v62 {
  display: grid;
  gap: 2px;
  min-width: 96px;
  padding: 8px 12px;
  border-left: 1px solid var(--lab-line);
}

.topbar-context-v62 span {
  color: var(--lab-muted);
  font-size: 10px;
  font-weight: 800;
}

.topbar-context-v62 [data-current-module-label] {
  color: var(--lab-green-strong);
  font-size: 13px;
  font-weight: 900;
}

.global-search-v22 {
  display: grid;
  gap: 4px;
}

.search-field-v22 {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--lab-line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, .9);
  box-shadow: inset 0 1px 2px rgba(15, 58, 46, .04), 0 6px 16px rgba(15, 58, 46, .04);
}

.search-field-v22:focus-within {
  border-color: var(--lab-green);
  box-shadow: var(--lab-focus);
}

.search-field-v22 input,
.search-field-v22 input:focus {
  min-width: 0;
  height: 38px;
  padding: 0 6px 0 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.search-field-v22 kbd {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--lab-line);
  border-bottom-width: 2px;
  border-radius: 7px;
  background: var(--lab-surface-soft);
  color: var(--lab-muted);
  font: 800 11px/1 ui-monospace, monospace;
}

.search-field-v22 button {
  min-width: 54px;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: var(--lab-green-soft);
  color: var(--lab-green-strong);
}

.search-field-v22 button[data-search-clear][hidden] {
  display: none;
}

.search-status-v550 {
  min-height: 16px;
  padding-left: 6px;
  color: var(--lab-muted);
  font-size: 10px;
}

.top-actions-v22 {
  gap: 8px;
}

.top-actions-v22 a {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
}

.top-actions-v22 .top-action-quiet-v62 {
  border-color: var(--lab-line-strong);
  background: #fff;
  color: var(--lab-green-strong);
}

.top-actions-v22 .top-action-primary-v62 {
  border-color: var(--lab-green);
  background: linear-gradient(145deg, var(--lab-green), var(--lab-green-strong));
  color: #fff;
  box-shadow: 0 10px 22px rgba(23, 107, 82, .2);
}

.work-main-v22 {
  width: min(100%, 1580px);
  margin: 0 auto;
  padding: 26px clamp(18px, 2.4vw, 38px) 90px;
}

.workspace-module-v5148.active {
  animation: lab-module-enter .24s ease both;
}

@keyframes lab-module-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dashboard-section-v22 {
  scroll-margin-top: 118px;
}

.dashboard-section-v22 > * + * {
  margin-top: 16px;
}

.dashboard-card-v22,
.gangue-folder,
.block-card,
.research-block-v22,
.record-section,
.metric-result-card-v22,
.folder-section,
.calendar-collapse-v22,
.create-panel-v22,
.gangue-archive-card-v511 {
  border: 1px solid var(--lab-line);
  border-radius: var(--lab-radius);
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--lab-shadow-sm);
}

.dashboard-card-v22:hover,
.gangue-folder:hover,
.block-card:hover,
.research-block-v22:hover,
.gangue-archive-card-v511:hover {
  border-color: var(--lab-line-strong);
  box-shadow: var(--lab-shadow);
}

.section-title-v22,
.section-head-v22 {
  gap: 18px;
  align-items: end;
}

.section-title-v22 h2,
.section-head-v22 h2 {
  color: var(--lab-ink-strong);
  font-size: clamp(24px, 2.2vw, 34px);
  font-weight: 920;
  letter-spacing: -.035em;
}

.section-title-v22 p,
.section-head-v22 p,
.hint,
.empty-v22,
.small,
.block-meta,
.drawer-title-v556 small {
  color: var(--lab-muted);
}

.metric-grid-v22 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.metric-card-v22 {
  position: relative;
  min-height: 142px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--lab-line);
  border-radius: var(--lab-radius);
  background: rgba(255, 255, 255, .92);
  color: var(--lab-ink);
  box-shadow: var(--lab-shadow-sm);
  text-decoration: none;
}

.metric-card-v22::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--lab-green);
}

.metric-card-v22.info::before { background: var(--lab-blue); }
.metric-card-v22.warn::before,
.metric-card-v22.warning::before { background: var(--lab-amber); }
.metric-card-v22.danger::before { background: var(--lab-red); }

.metric-card-v22:hover {
  border-color: var(--lab-line-strong);
  box-shadow: var(--lab-shadow);
  transform: translateY(-2px);
}

.metric-card-v22 span {
  color: var(--lab-muted);
  font-size: 12px;
  font-weight: 800;
}

.metric-card-v22 strong {
  color: var(--lab-ink-strong);
  font-size: clamp(28px, 3vw, 42px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
}

.metric-card-v22 small {
  color: var(--lab-muted);
  line-height: 1.45;
}

.overview-grid-v22 {
  gap: 16px;
}

.age-coverage-card-v251,
#today-tasks,
#gangue-overview,
#recent-blocks,
.calendar-collapse-v22 {
  padding: clamp(16px, 2vw, 24px);
}

.heatmap-tools-v49,
.block-toolbar,
.block-filter-panel-v31,
.lab-image-filter-panel {
  border-color: var(--lab-line);
  border-radius: 14px;
  background: rgba(247, 250, 248, .94);
  box-shadow: 0 10px 28px rgba(15, 58, 46, .07);
}

.heatmap-row-v23 {
  border-radius: 12px;
}

@media (max-width: 760px) {
  .age-heatmap-v23 {
    --heatmap-name-width: 200px;
  }

  .heatmap-tools-v49 {
    position: sticky;
    left: 0;
    z-index: 4;
    width: 100%;
    min-width: 0;
  }

  .heatmap-head-v23 > span,
  .heatmap-block-link-v65 {
    position: sticky;
    left: 0;
    z-index: 2;
  }

  .heatmap-head-v23 > span {
    z-index: 3;
    background: var(--lab-surface);
  }

  .heatmap-block-link-v65 strong {
    min-height: 100%;
    background: var(--lab-surface);
  }
}

.heat-cell-v23 {
  border-radius: 10px;
}

.heat-cell-v23.done {
  background: var(--lab-green-soft);
  color: var(--lab-green-strong);
}

.heat-cell-v23.due {
  background: var(--lab-red-soft);
  color: var(--lab-red);
}

.heat-cell-v23.future {
  background: var(--lab-blue-soft);
  color: var(--lab-blue);
}

.task-row-v22,
.gangue-summary-v22,
.research-block-v22 {
  border-color: var(--lab-line);
  border-radius: 14px;
  background: var(--lab-surface);
}

.task-row-v22 .task-block-name-v63 {
  min-width: 0;
  display: grid;
  gap: 2px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.task-block-label-v63,
.task-block-code-v63 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-block-label-v63 {
  color: var(--lab-ink-strong);
  line-height: 1.4;
}

.task-block-code-v63 {
  color: var(--lab-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.research-block-v22 {
  padding: 18px;
}

.research-block-v22 h3,
.block-title strong,
.gangue-folder-title strong {
  color: var(--lab-ink-strong);
}

.config-chips-v22 span,
.age-progress-v22 span,
.folder-badges span,
.badge,
.block-meta span,
.export-check,
.export-count-v311 {
  border-color: var(--lab-line);
  background: var(--lab-surface-soft);
  color: var(--lab-muted);
}

.card-actions-v22 a,
.chip-button,
button,
.actions .btn,
.record-tabbar button {
  border-color: var(--lab-line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--lab-green-strong);
  font-weight: 800;
}

.card-actions-v22 a:hover,
.chip-button:hover,
button:hover,
.actions .btn:hover,
.record-tabbar button:hover {
  border-color: rgba(23, 107, 82, .36);
  background: var(--lab-green-soft);
}

button[type="submit"],
.record-savebar-v543 button.primary {
  border-color: var(--lab-green);
  background: linear-gradient(145deg, var(--lab-green), var(--lab-green-strong));
  color: #fff;
}

button.danger,
.danger-soft,
.delete-block,
.delete-lab-image {
  border-color: rgba(179, 59, 46, .22);
  background: var(--lab-red-soft);
  color: var(--lab-red);
}

input,
textarea,
select {
  border-color: var(--lab-line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--lab-ink);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--lab-green);
  box-shadow: var(--lab-focus);
}

.gangue-folder-head,
.block-head {
  border-bottom-color: var(--lab-line);
  background: linear-gradient(180deg, #fff, var(--lab-surface-soft));
}

.record-details[open]::before,
.record-details[open]:before {
  background: rgba(4, 25, 20, .48);
  backdrop-filter: blur(10px);
}

.record-details[open] .record-drawer-body {
  width: min(1040px, calc(100vw - 32px));
  border-left-color: var(--lab-line-strong);
  background: var(--lab-page);
  box-shadow: -34px 0 90px rgba(5, 34, 27, .28);
}

.drawer-top-v22,
.record-drawer-body .record-tabbar,
.record-savebar-v543 {
  border-color: var(--lab-line);
  background: rgba(247, 250, 248, .92);
}

.record-drawer-body .record-tabbar button.active {
  border-color: var(--lab-green);
  background: var(--lab-green);
  color: #fff;
}

.floating-quicknav-v549 {
  border-color: var(--lab-line-strong);
  border-radius: 16px;
  background: rgba(248, 251, 249, .94);
  box-shadow: 0 18px 48px rgba(10, 55, 43, .22);
}

.floating-quicknav-v549 a,
.floating-quicknav-v549 a[href="#new-block"] {
  gap: 4px;
  border-radius: 11px;
  color: var(--lab-muted);
}

.floating-quicknav-v549 a span {
  color: rgba(96, 115, 108, .65);
  font-size: 9px;
}

.floating-quicknav-v549 a[aria-current="page"] {
  background: var(--lab-green);
  color: #fff;
}

.floating-quicknav-v549 a[aria-current="page"] span {
  color: rgba(255, 255, 255, .7);
}

.floating-quicknav-v549 .mobile-session-v62 {
  color: var(--lab-red);
}

.block-view-toggle-v58 button.active,
.block-view-toggle-v58 button[aria-pressed="true"] {
  background: var(--lab-green-soft);
  color: var(--lab-green-strong);
  box-shadow: inset 0 0 0 1px rgba(28, 112, 86, .14);
}

.block-row-actions-v58 a {
  border-color: var(--lab-line-strong);
  background: var(--lab-surface-soft);
  color: var(--lab-green-strong);
}

.block-row-actions-v58 a:hover,
.block-row-actions-v58 a:focus-visible {
  border-color: rgba(28, 112, 86, .28);
  background: var(--lab-green-soft);
  color: var(--lab-green-strong);
}

@media (max-width: 1260px) {
  .app-shell-v22 {
    grid-template-columns: 226px minmax(0, 1fr);
  }

  .topbar-v22 {
    grid-template-columns: minmax(220px, 1fr) minmax(300px, 460px) auto;
  }

  .topbar-context-v62 {
    display: none;
  }

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

@media (max-width: 1080px) {
  .topbar-v22 {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .global-search-v22 {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .top-actions-v22 {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 920px) {
  html {
    scroll-padding-top: 154px;
  }

  .app-shell-v22 {
    display: block;
  }

  .sidebar-v22 {
    position: sticky;
    top: 0;
    z-index: 50;
    height: auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 12px 32px rgba(5, 34, 27, .2);
  }

  .side-brand-v22 {
    grid-template-columns: 36px;
    padding: 2px;
  }

  .side-brand-v22 .side-brand-mark-v62 {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 12px;
  }

  .side-brand-copy-v62 {
    display: none !important;
  }

  .sidebar-v22 nav {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .sidebar-v22 nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar-v22 nav a {
    min-height: 38px;
    flex: 0 0 auto;
    grid-template-columns: 1fr;
    padding: 0 12px;
    border-radius: 10px;
    white-space: nowrap;
  }

  .side-nav-index-v62 {
    display: none;
  }

  .side-foot-v22 {
    margin: 0;
    padding: 0;
    border: 0;
  }

  .side-foot-v22 a:first-child {
    display: none;
  }

  .side-foot-v22 a {
    min-height: 36px;
    padding: 0 8px;
  }

  .topbar-v22 {
    position: static;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px 16px;
  }

  .global-search-v22 {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .top-actions-v22 {
    grid-column: 2;
    grid-row: 1;
  }

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

  .block-toolbar,
  .block-filter-panel-v31,
  .lab-image-filter-panel {
    position: static;
  }

  .task-row-v22:not(.head) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    padding: 12px;
  }

  .task-row-v22:not(.head) .task-block-name-v63 {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .task-row-v22:not(.head) .task-block-label-v63,
  .task-row-v22:not(.head) .task-block-code-v63 {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .task-row-v22:not(.head) .task-date-v63 {
    grid-column: 1;
    grid-row: 2;
  }

  .task-row-v22:not(.head) .task-project-v63 {
    grid-column: 2;
    grid-row: 2;
  }

  .task-row-v22:not(.head) .task-gangue-v63 {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .task-row-v22:not(.head) .status-pill-v22 {
    grid-column: 1;
    grid-row: 4;
    align-self: center;
  }

  .task-row-v22:not(.head) .task-action-form-v22,
  .task-row-v22:not(.head) .task-record-link-v63 {
    grid-column: 2;
    grid-row: 4;
    width: 100%;
  }

  .task-row-v22:not(.head) .task-action-form-v22 button,
  .task-row-v22:not(.head) .task-record-link-v63 {
    width: 100%;
    min-height: 44px;
  }
}

@media (max-width: 760px) {
  .side-foot-v22 {
    display: none;
  }

  .floating-quicknav-v549 {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  body.dashboard-shell-v22::before {
    display: none;
  }

  .sidebar-v22 {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .side-foot-v22 {
    display: none;
  }

  .topbar-v22 {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .topbar-heading-v62,
  .global-search-v22,
  .top-actions-v22 {
    grid-column: 1;
    grid-row: auto;
  }

  .topbar-summary-v62 {
    display: none;
  }

  .top-actions-v22 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-actions-v22 a {
    justify-content: center;
  }

  .block-toolbar .archive-actions {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }

  .block-toolbar .archive-actions .chip-button,
  .block-toolbar .archive-actions .export-count-v311 {
    width: auto;
    flex: 0 0 auto;
  }

  .work-main-v22 {
    padding: 16px 12px calc(112px + env(safe-area-inset-bottom));
  }

  .metric-grid-v22 {
    gap: 9px;
  }

  .metric-card-v22 {
    min-height: 124px;
    padding: 14px;
  }

  .metric-card-v22 strong {
    font-size: 30px;
  }

  .section-title-v22,
  .section-head-v22 {
    align-items: start;
  }

  .section-title-v22 h2,
  .section-head-v22 h2 {
    font-size: 25px;
  }

  .research-block-v22,
  .age-coverage-card-v251,
  #today-tasks,
  #gangue-overview,
  #recent-blocks,
  .calendar-collapse-v22 {
    padding: 14px;
  }

  .record-details[open] .record-drawer-body {
    width: 100vw;
  }

  .floating-quicknav-v549 {
    width: calc(100vw - 20px);
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 6px;
  }

  .floating-quicknav-v549 a {
    min-width: 0;
    display: grid;
    gap: 2px;
    padding: 5px 3px;
    line-height: 1.05;
  }
}

@media (max-width: 430px) {
  .search-field-v22 {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .search-field-v22 kbd {
    display: none;
  }

  .search-field-v22 button {
    min-width: 48px;
    padding: 0 8px;
  }

  .metric-grid-v22 {
    grid-template-columns: 1fr;
  }

  .metric-card-v22 {
    min-height: 104px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .metric-card-v22 small {
    grid-column: 1 / -1;
  }
}

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

@media (forced-colors: active) {
  .sidebar-v22,
  .topbar-v22,
  .metric-card-v22,
  .dashboard-card-v22 {
    forced-color-adjust: auto;
  }
}

/* v5.21 keyboard, touch and nested-overlay hardening */
.research-point-detail-v521 {
  min-height: 34px;
  margin: 4px 4px 0;
  padding: 8px 10px;
  border-left: 3px solid var(--research-root);
  background: #f6f9f7;
  color: var(--research-muted);
  font-size: 11px;
  line-height: 1.55;
}

.dashboard-shell-v22 :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #176f9f !important;
  outline-offset: 2px !important;
}

.research-plot-v521 [tabindex="0"]:focus-visible {
  filter: drop-shadow(0 0 5px rgba(23, 111, 159, .56));
}

.block-pagination-v60 :is(button, select),
.calendar-filter-status button,
.lab-photo-links-v519 a,
.delete-lab-image {
  min-height: 44px;
}

@media (max-width: 1260px) {
  .topbar-context-v62 {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    display: block !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: -1px !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
}

@media (max-width: 700px) {
  .image-edit-v32[open] {
    position: relative;
    z-index: auto;
    inset: auto;
    max-height: none;
    overflow: visible;
    margin-top: 8px;
    box-shadow: none;
  }
}

/* v5.16 specimen identity and phone-first block index */
.drawer-title-v556 .block-display-name-v5150 {
  display: flex;
  align-items: baseline;
  min-width: 0;
}

.drawer-title-v556 .block-readable-name-v5150 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-block-category-v5150 {
  flex: 0 0 auto;
}

.block-machine-code-v5150 {
  min-width: 0;
  overflow: hidden;
  color: var(--lab-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.block-title .block-display-name-v5150 {
  min-width: min(100%, 280px);
  flex: 1 1 320px;
  display: grid;
  gap: 3px;
}

.block-title .block-readable-name-v5150 {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.block-title .block-machine-code-v5150 {
  display: block;
}

.block-row-main-v58 .block-readable-name-v5150 {
  min-width: 0;
  display: block;
  overflow: visible;
  overflow-wrap: anywhere;
  color: var(--apple-ink);
  line-height: 1.4;
  text-overflow: clip;
  white-space: normal;
  -webkit-box-orient: initial;
  -webkit-line-clamp: unset;
}

.block-row-main-v58 .block-machine-code-v5150,
.block-row-main-v58 .block-row-context-v58 {
  min-width: 0;
  display: block;
  overflow: hidden;
  color: var(--apple-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .block-view-toggle-v58 {
    display: none;
  }

  .block-list-shell-v58,
  .block-index-v58,
  .block-index-item-v58,
  .block-row-v58 {
    max-width: 100%;
  }

  .block-index-v58[data-view="cards"] .block-row-v58 > .export-check {
    position: static;
    grid-column: 1 / -1;
    justify-self: end;
  }

  .block-index-v58[data-view="cards"] .block-row-main-v58 {
    padding-right: 0;
  }

  .block-row-main-v58 .block-machine-code-v5150,
  .block-row-main-v58 .block-row-context-v58 {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .drawer-title-v556 .block-display-name-v5150 {
    display: grid;
    gap: 2px;
    overflow: visible;
    white-space: normal;
  }

  .drawer-title-v556 .block-readable-name-v5150,
  .drawer-block-category-v5150,
  .drawer-title-v556 .block-machine-code-v5150 {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }
}

@media print {
  .skip-link-v62,
  .sidebar-v22,
  .topbar-v22,
  .floating-quicknav-v549 {
    display: none !important;
  }

  .app-shell-v22 {
    display: block;
  }

  .work-main-v22 {
    width: 100%;
    padding: 0;
  }
}

/* record drawer interaction safety and touch accessibility */
html {
  scrollbar-gutter: stable;
}

body.record-drawer-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.record-details[hidden] {
  display: none !important;
}

.record-details[open] .record-drawer-body {
  transform: translateX(var(--record-drawer-drag, 0));
  transition: transform .18s ease-out;
  overscroll-behavior: contain;
}

.record-details[open] .record-drawer-body.is-swiping-v520 {
  transition: none;
  user-select: none;
}

.record-details[open] .drawer-top-v22 {
  align-items: flex-start;
  touch-action: pan-y;
}

.drawer-title-v556 .block-display-name-v5150 {
  align-items: flex-start;
  flex-wrap: wrap;
}

.drawer-title-v556 .block-readable-name-v5150,
.drawer-title-v556 .block-machine-code-v5150,
.drawer-title-v556 small {
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.record-drawer-body .record-tabbar {
  top: var(--record-drawer-header-height, 64px);
}

.record-tabbar [role="tab"]:focus-visible {
  outline: 3px solid rgba(23, 107, 82, .24);
  outline-offset: 2px;
}

.record-form :is(input, textarea, select)[aria-invalid="true"] {
  border-color: var(--lab-red) !important;
  background: var(--lab-red-soft);
  box-shadow: 0 0 0 3px rgba(179, 59, 46, .13) !important;
}

[data-block-list-fragment][aria-busy="true"] {
  min-height: 180px;
  cursor: progress;
  opacity: .68;
}

.record-loading-v57,
.record-load-error-v57 {
  overscroll-behavior: contain;
}

.record-loading-v57 > div,
.record-load-error-v57 > div {
  max-height: calc(100dvh - 36px);
  overflow: auto;
}

@media (max-width: 920px) {
  .sidebar-v22 nav {
    scroll-snap-type: inline proximity;
  }

  .sidebar-v22 nav a {
    min-height: 44px;
    scroll-snap-align: center;
  }
}

@media (max-width: 680px) {
  .search-field-v22 input,
  .search-field-v22 button,
  .top-actions-v22 a,
  .record-drawer-body .record-tabbar button,
  .drawer-top-v22 > button,
  .record-savebar-v543 button,
  .record-load-error-v57 button,
  .record-load-error-v57 a {
    min-height: 44px;
  }

  .record-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
  .record-form select {
    min-height: 44px;
    font-size: 16px;
  }

  .record-form textarea {
    min-height: 96px;
    font-size: 16px;
    line-height: 1.5;
  }

  .record-drawer-body .record-tabbar {
    scroll-snap-type: inline proximity;
    overscroll-behavior-inline: contain;
  }

  .record-drawer-body .record-tabbar button {
    scroll-snap-align: center;
    padding-inline: 16px;
  }

  .record-savebar-v543 {
    margin-right: 8px;
    margin-bottom: 0;
    margin-left: 8px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .record-savebar-v543 span {
    line-height: 1.45;
  }
}

/* v5.21 research figures and evidence-first UI */
:root {
  --research-paper: #ffffff;
  --research-ink: #152b2a;
  --research-muted: #5d6e6c;
  --research-line: #dce5e2;
  --research-line-strong: #aebfba;
  --research-root: #176b5a;
  --research-root-open: #edf6f2;
  --research-blue: #356f94;
  --research-gold: #aa6c21;
  --research-alert: #a43b31;
}

body.dashboard-shell-v22 {
  background: #f2f5f2;
}

body.dashboard-shell-v22::before {
  opacity: .10;
  background-size: 48px 48px;
}

.dashboard-shell-v22 :is(h1, h2, h3) {
  font-weight: 700;
}

.dashboard-shell-v22 :is(button, .chip-button, .btn, label) {
  font-weight: 600;
}

.dashboard-card-v22,
.metric-card-v22,
.gangue-folder,
.block-card,
.research-block-v22,
.record-section,
.metric-result-card-v22,
.folder-section,
.calendar-collapse-v22,
.create-panel-v22,
.gangue-archive-card-v511 {
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 58, 46, .05);
}

.dashboard-card-v22:hover,
.metric-card-v22:hover,
.gangue-folder:hover,
.block-card:hover,
.research-block-v22:hover,
.gangue-archive-card-v511:hover {
  box-shadow: 0 7px 20px rgba(15, 58, 46, .08);
  transform: none;
}

.recipe-stack-title-v23 small {
  color: var(--lab-muted);
}

.visual-panel .viz-fill {
  background: var(--research-root);
}

.visual-panel .viz-fill.highlight {
  background: var(--research-blue);
}

.viz-method-note-v521 {
  margin: -4px 0 10px;
  font-size: 11px;
}

.metric-card-v22 > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.metric-card-v22 > span > i {
  min-width: 24px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--research-line);
  border-radius: 6px;
  background: #f7f9f8;
  color: var(--research-muted);
  font: 700 10px/1 ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-style: normal;
}

.age-coverage-card-v251,
#analysis-chart {
  background: var(--research-paper);
}

.age-coverage-card-v251 .section-head-v22,
#analysis-chart .section-head-v22 {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--research-line);
}

.age-coverage-card-v251 .eyebrow,
#analysis-chart .eyebrow,
.research-figure-index-v521 {
  color: var(--research-root);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.heatmap-head-v23 > b {
  justify-content: center;
  color: var(--research-ink);
  font-variant-numeric: tabular-nums;
}

.heatmap-row-v23 {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(220, 229, 226, .72);
}

.heat-cell-v23 {
  min-height: 64px;
  border-radius: 8px;
  box-shadow: none;
}

.heat-cell-v23 span,
.heat-cell-v23 small {
  line-height: 1.35;
}

.heat-cell-v23 small {
  font-variant-numeric: tabular-nums;
}

.heat-cell-v23.abnormal {
  border-color: rgba(164, 59, 49, .48);
  background: #fff4f2;
  color: var(--research-alert);
  box-shadow: inset 3px 0 0 var(--research-alert);
}

.heat-cell-v23.unset {
  border-style: dashed;
  background: #f5f7f6;
  color: #7b8987;
}

.heatmap-legend-v23 {
  padding-top: 8px;
  border-top: 1px solid var(--research-line);
}

.heatmap-legend-v23 span {
  min-height: 30px;
  border: 1px solid var(--research-line);
  background: #fff;
}

.heatmap-legend-v23 span b {
  color: var(--research-ink);
  font-variant-numeric: tabular-nums;
}

.heatmap-legend-v23 .abnormal::before {
  background: var(--research-alert);
}

.heatmap-legend-v23 .unset::before {
  border: 1px solid var(--research-line-strong);
  background: transparent;
}

.chart-current-v22,
.chart-toolbar-v251,
.chart-selector-v49 {
  border-color: var(--research-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.chart-toolbar-v251 {
  align-items: center;
}

.chart-publication-actions-v521 {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.chart-picker-search-v521 {
  min-width: 0;
  flex: 1 1 auto;
}

.chart-picker-search-v521 input {
  width: 100%;
}

.research-figure-v521 {
  margin: 2px 0 0;
  padding: 20px 0 16px;
  border-top: 1px solid var(--research-line-strong);
  border-bottom: 1px solid var(--research-line);
  background: var(--research-paper);
}

.research-figure-head-v521 {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, .72fr);
  gap: 24px;
  align-items: end;
  padding: 0 4px 14px;
}

.research-figure-head-v521 h3 {
  margin: 4px 0 5px;
  color: var(--research-ink);
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 700;
  letter-spacing: -.025em;
}

.research-figure-head-v521 p:not(.research-figure-index-v521) {
  margin: 0;
  color: var(--research-muted);
  font-size: 12px;
  line-height: 1.55;
}

.research-figure-stats-v521 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--research-line);
  border-bottom: 1px solid var(--research-line);
}

.research-figure-stats-v521 div {
  min-width: 0;
  padding: 9px 10px;
  border-left: 1px solid var(--research-line);
}

.research-figure-stats-v521 div:first-child {
  border-left: 0;
}

.research-figure-stats-v521 dt,
.research-figure-stats-v521 dd {
  margin: 0;
}

.research-figure-stats-v521 dt {
  color: var(--research-muted);
  font-size: 10px;
  font-weight: 600;
}

.research-figure-stats-v521 dd {
  overflow: hidden;
  margin-top: 3px;
  color: var(--research-ink);
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.research-plot-scroll-v521 {
  max-width: 100%;
  overflow-x: auto;
  border-top: 1px solid var(--research-line);
  border-bottom: 1px solid var(--research-line);
  background: #fff;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.research-plot-v521 {
  width: 100%;
  min-width: 720px;
  height: auto;
  display: block;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.research-plot-v521 [tabindex="0"]:focus {
  outline: none;
  filter: drop-shadow(0 0 4px rgba(23, 107, 90, .45));
}

.research-figure-loading-v521,
.research-figure-sparse-v521 {
  margin: 12px 4px 0;
  padding: 12px;
  border: 1px dashed var(--research-line-strong);
  background: #f8faf9;
  color: var(--research-muted);
  font-size: 12px;
}

.research-figure-legend-v521 {
  min-height: 30px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 4px 2px;
  color: var(--research-muted);
  font-size: 11px;
}

.research-figure-legend-v521 span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.research-figure-legend-v521 i {
  width: 12px;
  height: 12px;
  display: inline-block;
  border: 2px solid var(--research-root);
  border-radius: 50%;
  background: #fff;
}

.research-figure-legend-v521 i.median {
  width: 16px;
  height: 0;
  border: 0;
  border-top: 3px solid var(--research-ink);
  border-radius: 0;
}

.research-figure-legend-v521 i.abnormal {
  border-color: var(--research-alert);
  border-radius: 2px;
}

.research-figure-v521 figcaption {
  margin: 5px 4px 0;
  color: var(--research-muted);
  font-size: 11px;
  line-height: 1.65;
}

.chart-exact-values-v521 {
  overflow: hidden;
  border-bottom: 1px solid var(--research-line);
}

.chart-exact-values-v521 > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
  color: var(--research-root);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
}

.chart-exact-values-v521 > summary::-webkit-details-marker {
  display: none;
}

.chart-exact-values-v521 > summary small {
  color: var(--research-muted);
  font-size: 11px;
  font-weight: 500;
}

.chart-exact-values-v521 > .chart-canvas-v251 {
  padding: 8px 0 16px;
}

.chart-bars-v251 {
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 44px, rgba(93, 110, 108, .13) 45px);
}

.column-v23 i,
.column-v23.age-1 i,
.column-v23.age-7 i,
.column-v23.age-28 i {
  position: relative;
  width: 2px;
  min-height: 0;
  overflow: visible;
  border-radius: 0;
  background: currentColor;
  box-shadow: none;
}

.column-v23 i::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: #fff;
  transform: translateX(-50%);
}

.column-v23 { color: var(--research-root); }
.column-v23.age-1 { color: #6f5aaa; }
.column-v23.age-7 { color: var(--research-blue); }
.column-v23.age-28 { color: var(--research-gold); }
.column-v23.abnormal { color: var(--research-alert); }
.column-v23.abnormal i::after { border-radius: 2px; }

.chart-values-v251 span.abnormal {
  outline: 1px solid rgba(164, 59, 49, .42);
  color: var(--research-alert);
}

.lab-evidence-summary-v521 {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border-top: 1px solid var(--research-line-strong);
  border-bottom: 1px solid var(--research-line);
  background: #fff;
}

.lab-evidence-kpis-v521 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lab-evidence-kpis-v521 span {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 5px 10px;
  border-left: 1px solid var(--research-line);
}

.lab-evidence-kpis-v521 span:first-child { border-left: 0; }

.lab-evidence-kpis-v521 b {
  color: var(--research-ink);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.lab-evidence-kpis-v521 small {
  color: var(--research-muted);
  font-size: 10px;
  font-weight: 600;
}

.lab-evidence-types-v521 {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.lab-evidence-types-v521 span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid var(--research-line);
  border-radius: 999px;
  color: var(--research-muted);
  font-size: 11px;
  font-weight: 600;
}

.lab-evidence-types-v521 i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--research-root);
}

.lab-evidence-types-v521 b {
  color: var(--research-ink);
  font-variant-numeric: tabular-nums;
}

.lab-photo-index-v521 {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 5px;
  background: rgba(12, 35, 31, .74);
  color: #fff;
  font: 700 9px/1 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: .06em;
  backdrop-filter: blur(8px);
}

.floating-quicknav-v549 .mobile-more-v521 {
  position: relative;
  min-width: 0;
}

.mobile-more-v521 > summary {
  min-height: 44px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 5px 3px;
  border-radius: 11px;
  color: var(--lab-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.05;
  list-style: none;
}

.mobile-more-v521 > summary::-webkit-details-marker { display: none; }

.mobile-more-v521 > summary span {
  color: rgba(96, 115, 108, .72);
  font-size: 9px;
}

.mobile-more-v521[open] > summary,
.mobile-more-v521:has(a[aria-current="page"]) > summary {
  background: var(--lab-green);
  color: #fff;
}

.mobile-more-v521 > div {
  position: absolute;
  right: -2px;
  bottom: calc(100% + 10px);
  width: min(270px, calc(100vw - 28px));
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--research-line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 46px rgba(10, 55, 43, .22);
}

.floating-quicknav-v549 .mobile-more-v521 > div a {
  min-height: 44px;
  display: flex;
  justify-content: flex-start;
  padding: 0 12px;
}

@media (max-width: 920px) {
  .research-figure-head-v521 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .floating-quicknav-v549 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .research-figure-v521 {
    padding-top: 16px;
  }

  .research-figure-head-v521 {
    gap: 14px;
    padding-inline: 0;
  }

  .research-figure-stats-v521 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .research-figure-stats-v521 div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--research-line);
  }

  .research-figure-stats-v521 div:nth-child(4) {
    border-top: 1px solid var(--research-line);
  }

  .chart-toolbar-v251,
  .chart-publication-actions-v521 {
    align-items: stretch;
    justify-content: flex-start;
  }

  .chart-publication-actions-v521 {
    width: 100%;
  }

  .chart-publication-actions-v521 button {
    flex: 1 1 104px;
    min-height: 44px;
  }

  .lab-evidence-kpis-v521 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lab-evidence-kpis-v521 span:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--research-line);
  }

  .lab-evidence-kpis-v521 span:nth-child(4) {
    border-top: 1px solid var(--research-line);
  }
}

@media (max-width: 430px) {
  .heatmap-tools-v49 small {
    white-space: normal;
  }

  .research-figure-head-v521 h3 {
    font-size: 21px;
  }
}

@media print {
  .chart-toolbar-v251,
  .chart-selector-v49,
  .chart-publication-actions-v521,
  .research-figure-loading-v521,
  .research-figure-sparse-v521 {
    display: none !important;
  }

  .research-plot-scroll-v521 {
    overflow: visible;
  }

  .research-plot-v521 {
    min-width: 0;
  }

  .chart-exact-values-v521 > summary {
    display: none;
  }

  .chart-exact-values-v521 > .chart-canvas-v251 {
    display: grid !important;
  }
}

@media (forced-colors: active) {
  .research-plot-v521 circle,
  .research-plot-v521 line,
  .research-plot-v521 path {
    forced-color-adjust: auto;
  }
}

/* Editorial research palette: navy structure, restrained blue interaction. */
:root {
  --bg: #f3f5f7; --surface: #ffffff; --soft: #eef2f6;
  --ink: #1c2733; --muted: #667381; --line: #d9e0e7;
  --green: #3d668b; --blue: #3d668b;
  --warn: #ad6b2c; --danger: #b1483b;
  --apple-page: #f3f5f7; --apple-ink: #1c2733; --apple-muted: #687482;
  --apple-blue: #365f86; --apple-blue-soft: #eaf0f6; --apple-green: #3d668b;
  --lab-page: #f2f4f6; --lab-page-warm: #f7f7f5; --lab-surface-soft: #f6f8fa;
  --lab-ink: #263441; --lab-ink-strong: #172431; --lab-muted: #687582;
  --lab-line: rgba(41, 63, 84, .14); --lab-line-strong: rgba(41, 63, 84, .25);
  --lab-green: #3d668b; --lab-green-strong: #294e70; --lab-green-soft: #e9eff5;
  --lab-mint: #aab9c7; --lab-blue: #557a9d; --lab-blue-soft: #edf3f8;
  --lab-amber: #b77430; --lab-amber-soft: #fff3e6;
  --lab-red: #b1483b; --lab-red-soft: #fff0ed;
  --lab-sidebar: #182a3c; --lab-sidebar-deep: #101d2b;
  --lab-shadow-sm: 0 1px 2px rgba(20, 34, 48, .05), 0 8px 22px rgba(20, 34, 48, .06);
  --lab-shadow: 0 18px 48px rgba(20, 34, 48, .12);
  --lab-focus: 0 0 0 4px rgba(61, 102, 139, .18);
  --research-ink: #202c38; --research-muted: #66727e;
  --research-line: #dce2e8; --research-line-strong: #aeb9c4;
  --research-root: #3d668b; --research-root-open: #edf2f7; --research-blue: #557a9d;
  --research-gold: #a96d32; --research-alert: #b1483b;
  --semantic-success: #2f7561; --semantic-success-soft: #e9f4ef;
}
body.dashboard-shell-v22 {
  overflow-x: clip;
  background: linear-gradient(180deg, #eef2f5 0, #f5f6f7 360px);
  color: var(--lab-ink);
}
body.dashboard-shell-v22::before { display: none; }
::selection { background: rgba(61, 102, 139, .2); color: var(--lab-ink-strong); }
.workspace-v22,
.work-main-v22,
.dashboard-section-v22,
.overview-grid-v22,
.dashboard-card-v22 { min-width: 0; }
.sidebar-v22 {
  background: linear-gradient(165deg, var(--lab-sidebar), var(--lab-sidebar-deep));
  color: #f5f7fa;
  box-shadow: 12px 0 34px rgba(13, 27, 41, .16);
}
.side-brand-v22 .side-brand-mark-v62 {
  border-color: rgba(255, 255, 255, .22);
  background: #edf1f5;
  color: #1d3850;
}
.side-brand-copy-v62 small,
.sidebar-v22 nav a,
.side-foot-v22 a { color: rgba(231, 237, 243, .7); }
.sidebar-v22 nav a[aria-current="page"] {
  border-color: rgba(150, 184, 214, .28);
  background: rgba(91, 132, 169, .25);
  box-shadow: inset 3px 0 0 #a8c2d9;
}
.sidebar-v22 nav a[aria-current="page"] .side-nav-index-v62 {
  background: #dce7f0;
  color: #294e70;
}
.topbar-v22 {
  border-bottom-color: var(--lab-line);
  background: rgba(248, 249, 250, .94);
  box-shadow: 0 8px 24px rgba(20, 34, 48, .06);
}
.dashboard-card-v22,
.metric-card-v22,
.gangue-folder,
.block-card,
.research-block-v22,
.record-section,
.metric-result-card-v22,
.calendar-collapse-v22 {
  border-color: var(--lab-line);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--lab-shadow-sm);
}
.metric-card-v22::before { background: var(--lab-green); }
.metric-card-v22.warn::before,
.metric-card-v22.warning::before { background: var(--lab-amber); }
.metric-card-v22.danger::before { background: var(--lab-red); }
.gangue-folder-head,
.block-head { background: #f7f9fa; }
.metric-choice:has(input:checked),
.chart-version-v49:has(input:checked),
.chart-block-picker-v310 label:has(input:checked) {
  border-color: rgba(61, 102, 139, .4);
  background: var(--lab-green-soft);
  color: var(--lab-green-strong);
  box-shadow: inset 3px 0 0 var(--lab-green);
}
.specimen-row-v22 [data-strength-mpa],
.converted-strength-pill-v33,
.specimen-converted-v559 .converted-strength-pill-v33,
.result-primary-pill-v73 {
  border-color: rgba(61, 102, 139, .25);
  background: var(--lab-blue-soft);
  color: var(--lab-green-strong);
}
.specimen-summary-v22,
.metric-result-help-v33 { border-color: var(--lab-line); background: #f5f7f9; color: var(--lab-muted); }
.card-actions-v22 a,
.chip-button,
button,
.actions .btn,
.record-tabbar button {
  border-color: var(--lab-line-strong);
  background: #fff;
  color: var(--lab-green-strong);
}
.card-actions-v22 a:hover,
.chip-button:hover,
button:hover,
.actions .btn:hover,
.record-tabbar button:hover {
  border-color: rgba(61, 102, 139, .42);
  background: var(--lab-green-soft);
}
button[type="submit"]:not(.secondary):not(.danger):not(.danger-soft):not(.delete-block):not(.delete-lab-image),
.record-savebar-v543 button.primary,
.record-drawer-body .record-tabbar button.active,
.floating-quicknav-v549 a[aria-current="page"],
.mobile-more-v521[open] > summary {
  border-color: var(--lab-green);
  background: var(--lab-green);
  color: #fff;
  box-shadow: none;
}
input:focus,
textarea:focus,
select:focus,
.search-field-v22:focus-within { border-color: var(--lab-green); box-shadow: var(--lab-focus); }
.dashboard-shell-v22 :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline-color: #426f96 !important;
}
.floating-quicknav-v549 {
  border-color: var(--lab-line-strong);
  background: rgba(250, 251, 252, .96);
  box-shadow: 0 16px 40px rgba(20, 34, 48, .2);
}
.mobile-more-v521 > div { box-shadow: 0 18px 46px rgba(20, 34, 48, .22); }
.lab-image-count-v519 {
  background: var(--lab-blue-soft);
  color: var(--lab-green-strong);
}
.lab-photo-links-v519 a {
  border-color: var(--lab-line);
  background: #f7f9fa;
  color: var(--lab-green-strong);
}
.lab-file-picker-v519 {
  border-color: var(--lab-line-strong);
  background: #f6f8fa;
}
.lab-upload-selection-v519 { border-color: var(--lab-line); background: #f7f9fa; }
.lab-upload-selection-preview-v519 { background: #e9eef3; }
.lab-photo-index-v521 { background: rgba(19, 34, 52, .78); }
.status-pill-v22.status-completed,
.task-row-v22.completed em,
.heat-cell-v23.done {
  border-color: rgba(47, 117, 97, .28);
  background: var(--semantic-success-soft);
  color: var(--semantic-success);
}
.heat-cell-v23.done span { color: var(--semantic-success); }
.status-pill-v22.status-upcoming,
.task-row-v22.upcoming em,
.heat-cell-v23.future {
  border-color: rgba(85, 122, 157, .28);
  background: var(--lab-blue-soft);
  color: var(--lab-blue);
}
.heat-cell-v23.future span { color: var(--lab-blue); }
.status-pill-v22.status-today,
.task-row-v22.today em,
.heat-cell-v23.due {
  border-color: rgba(183, 116, 48, .32);
  background: var(--lab-amber-soft);
  color: #965a21;
}
.heat-cell-v23.due span { color: #965a21; }
.status-pill-v22.status-overdue,
.task-row-v22.overdue em,
.heat-cell-v23.abnormal {
  border-color: rgba(177, 72, 59, .34);
  background: var(--lab-red-soft);
  color: var(--lab-red);
}
.heat-cell-v23.abnormal span { color: var(--lab-red); }
.calendar-kpis .today b { color: var(--lab-amber); }
.day-cell.today .day-number { color: #fff; background: var(--lab-green); }
.matrix-meter-v22 i::before,
.visual-panel .viz-fill { background: var(--research-root); }
.age-coverage-card-v251 { max-width: 100%; overflow: hidden; }
.age-heatmap-v23 {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.heatmap-tools-v49 {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  border-color: var(--research-line);
  background: #f7f9fa;
  box-shadow: none;
}
.heatmap-tools-v49 label { min-width: min(100%, 220px); }
.heatmap-tools-v49 small { color: var(--research-root); }
.heatmap-compact-list-v521 { min-width: 0; display: grid; gap: 9px; }
.heatmap-compact-row-v521 {
  min-width: 0 !important;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 0 9px;
}
.heatmap-compact-row-v521 > .heatmap-block-link-v65 { min-width: 220px; flex: 1 1 280px; }
.heatmap-compact-row-v521 > .heat-cell-v23 { min-width: 128px; flex: 1 1 145px; }
.heatmap-compact-empty-v521 {
  min-height: 64px;
  flex: 1 1 180px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--research-line-strong);
  color: var(--research-muted);
}
.heatmap-aligned-option-v521 {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--research-line);
  border-radius: 10px;
  background: #fff;
}
.heatmap-aligned-option-v521 > summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: var(--research-root);
  cursor: pointer;
  list-style: none;
}
.heatmap-aligned-option-v521 > summary::-webkit-details-marker { display: none; }
.heatmap-aligned-option-v521 > summary small { color: var(--research-muted); font-weight: 500; }
.heatmap-aligned-scroll-v521 {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
.heatmap-aligned-canvas-v521 {
  width: max(720px, calc(var(--heatmap-name-width, 260px) + var(--age-cols, 3) * 106px));
  min-width: 100%;
  padding: 10px;
}
.heatmap-aligned-canvas-v521 :is(.heatmap-head-v23, .heatmap-aligned-row-v521) {
  min-width: calc(var(--heatmap-name-width, 260px) + var(--age-cols, 3) * 106px);
}
.heatmap-aligned-note-v521 { margin: 0; padding: 9px 12px; color: var(--research-muted); font-size: 11px; }

@media (max-width: 760px) {
  .sidebar-v22 { box-shadow: 0 10px 26px rgba(13, 27, 41, .2); }
  .work-main-v22 { max-width: 100%; overflow-x: clip; }
  .heatmap-tools-v49 { position: static; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .heatmap-tools-v49 label { min-width: 0; grid-column: 1 / -1; grid-template-columns: 1fr; }
  .heatmap-tools-v49 small { margin: 0; white-space: normal; }
  .heatmap-compact-row-v521 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .heatmap-compact-row-v521 > .heatmap-block-link-v65 { min-width: 0; grid-column: 1 / -1; }
  .heatmap-compact-row-v521 > .heat-cell-v23 { min-width: 0; }
  .heatmap-compact-row-v521 > .heatmap-block-link-v65,
  .heatmap-aligned-row-v521 > .heatmap-block-link-v65 { position: static; }
  .heatmap-aligned-option-v521 > summary { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 430px) {
  .heatmap-compact-row-v521 { grid-template-columns: 1fr; }
  .heatmap-compact-row-v521 > .heatmap-block-link-v65 { grid-column: 1; }
}

/* v5.22 load-first result entry: kN is the primary measured value. */
:root {
  --entry-navy-v522: #244b6d;
  --entry-navy-strong-v522: #183750;
  --entry-blue-v522: #4e7395;
  --entry-blue-soft-v522: #edf3f8;
  --entry-paper-v522: #fbfcfd;
  --entry-line-v522: #d4dde6;
  --entry-line-strong-v522: #aebdca;
  --entry-muted-v522: #667583;
  --entry-focus-v522: 0 0 0 4px rgba(36, 75, 109, .16);
}

.record-drawer-body,
.record-form,
.record-panel,
.record-section,
.metric-result-card-v22:has(.specimen-entry-v522),
.specimen-table-v22,
.specimen-entry-v522,
.specimen-entry-primary-v522,
.specimen-auto-results-v522,
.specimen-secondary-v522,
.specimen-secondary-grid-v522 {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.metric-result-card-v22:has(.specimen-entry-v522) {
  overflow: hidden;
  border-color: var(--entry-line-v522);
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 38, 54, .04), 0 10px 28px rgba(20, 38, 54, .055);
}

.result-row:has(.specimen-entry-v522) {
  background: linear-gradient(180deg, #fff, #fafbfd);
}

.metric-result-card-v22:has(.specimen-entry-v522) :is(.source-pill-v22, .metric-result-help-v33.compact-v542 span) {
  border-color: var(--entry-line-v522);
  background: #f6f8fa;
  color: var(--entry-muted-v522);
}

.metric-result-card-v22:has(.specimen-entry-v522) .metric-result-help-v33.compact-v542 span:first-child {
  color: var(--entry-navy-v522);
}

.kn-entry-toolbar-v522 {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 12px;
  border: 1px solid var(--entry-line-v522);
  border-radius: 10px;
  background: #f6f8fa;
  color: var(--entry-muted-v522);
}

.kn-entry-toolbar-v522 > :is(p, span, small) {
  min-width: 0;
  margin: 0;
  line-height: 1.45;
}

.kn-entry-toolbar-v522 > span {
  display: grid;
  gap: 2px;
}

.kn-entry-toolbar-v522 > span small {
  color: var(--entry-muted-v522);
  font-size: 11px;
  font-weight: 650;
}

.kn-entry-feedback-v522 {
  flex: 1 0 100%;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--entry-line-v522);
  border-radius: 8px;
  background: #fff;
  color: var(--entry-muted-v522);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}

.kn-entry-feedback-v522:empty {
  display: none;
}

.kn-entry-feedback-v522[data-state="success"] {
  border-color: rgba(36, 75, 109, .3);
  background: var(--entry-blue-soft-v522);
  color: var(--entry-navy-strong-v522);
}

.kn-entry-feedback-v522[data-state="warning"] {
  border-color: rgba(183, 116, 48, .42);
  background: #fff7eb;
  color: #805022;
}

.kn-entry-toolbar-v522 strong {
  color: var(--entry-navy-strong-v522);
}

.kn-entry-toolbar-v522 [data-focus-next-load] {
  min-width: 132px;
  min-height: 44px;
  flex: 0 0 auto;
  border-color: var(--entry-line-strong-v522);
  background: #fff;
  color: var(--entry-navy-v522);
  font-weight: 800;
}

.kn-entry-toolbar-v522 [data-focus-next-load]:hover {
  border-color: var(--entry-blue-v522);
  background: var(--entry-blue-soft-v522);
}

.specimen-table-v22:has(.specimen-entry-v522) {
  width: 100%;
  overflow: visible;
  gap: 10px;
}

.specimen-table-v22:has(.specimen-entry-v522) > :is(
  .kn-entry-toolbar-v522,
  .specimen-entry-v522,
  .specimen-actions-v52,
  .specimen-summary-v22
) {
  order: initial;
}

.specimen-table-v22:has(.specimen-entry-v522) > :is(.specimen-actions-v52, .specimen-summary-v22) {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.specimen-row-v22.specimen-entry-v522 {
  width: 100%;
  min-width: 0 !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--entry-line-v522);
  border-radius: 11px;
  background: var(--entry-paper-v522);
}

.specimen-row-v22.specimen-entry-v522:focus-within {
  border-color: rgba(36, 75, 109, .52);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(36, 75, 109, .09);
}

.specimen-entry-primary-v522 {
  width: 100%;
  display: grid;
  grid-template-columns: 72px minmax(220px, 1.15fr) minmax(280px, 1fr) 44px;
  grid-template-areas: "number load calculated remove";
  align-items: end;
  gap: 10px;
}

.specimen-entry-primary-v522 > .specimen-no-v559 {
  grid-area: number;
}

.specimen-entry-primary-v522 > .kn-entry-v522 {
  grid-area: load;
}

.specimen-entry-primary-v522 > .specimen-auto-results-v522 {
  grid-area: calculated;
}

.specimen-entry-primary-v522 > .remove-specimen-v33 {
  grid-area: remove;
  width: 44px;
  min-width: 44px;
  min-height: 52px;
  align-self: end;
}

.specimen-entry-primary-v522 :is(input, select, button),
.specimen-secondary-grid-v522 :is(input, select, button) {
  max-width: 100%;
  box-sizing: border-box;
}

.specimen-entry-primary-v522 .specimen-cell-v559 > span:first-child,
.specimen-entry-primary-v522 .kn-entry-v522 > span:first-child {
  display: block;
  color: var(--entry-muted-v522);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.35;
}

.specimen-no-badge-v522 {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  overflow: hidden;
  border: 1px solid var(--entry-line-v522);
  border-radius: 9px;
  background: #fff;
  color: var(--entry-navy-strong-v522);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kn-entry-v522 {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.kn-entry-v522 > span:first-child {
  color: var(--entry-navy-v522) !important;
}

.kn-input-shell-v522 {
  min-width: 0;
  position: relative;
  display: grid;
  align-items: center;
  margin: 0 !important;
}

.kn-input-shell-v522 > input[data-pressure-kn] {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 10px 58px 10px 14px;
  border: 1.5px solid var(--entry-blue-v522);
  border-radius: 9px;
  background: #fff;
  color: var(--entry-navy-strong-v522);
  caret-color: var(--entry-navy-v522);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  letter-spacing: .01em;
  line-height: 1;
}

.kn-input-shell-v522 > input[data-pressure-kn]::placeholder {
  color: #96a4b0;
  font-weight: 650;
  opacity: 1;
}

.kn-input-shell-v522 > input[data-pressure-kn]:focus {
  border-color: var(--entry-navy-strong-v522);
  box-shadow: var(--entry-focus-v522);
}

.kn-unit-v522 {
  position: absolute;
  right: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 28px;
  padding: 0 7px;
  border-left: 1px solid var(--entry-line-v522);
  color: var(--entry-navy-v522);
  font-size: 13px;
  font-weight: 850;
  margin: 0 !important;
  pointer-events: none;
}

.specimen-auto-results-v522 {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.specimen-auto-results-v522 > * {
  min-width: 0;
}

.specimen-auto-results-v522 :is([data-raw-strength-display], [data-converted-strength]) {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  overflow-wrap: anywhere;
  border: 1px solid var(--entry-line-v522);
  border-radius: 9px;
  background: var(--entry-blue-soft-v522);
  color: var(--entry-navy-strong-v522);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
}

.specimen-auto-results-v522 [data-raw-strength-display] {
  background: #f5f7f9;
  color: #475b6d;
}

.specimen-auto-results-v522 [data-converted-strength] {
  border-color: rgba(36, 75, 109, .24);
}

.specimen-secondary-v522 {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--entry-line-v522);
  border-radius: 9px;
  background: #f7f9fb;
}

.specimen-secondary-v522 > summary {
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  color: var(--entry-muted-v522);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
  list-style: none;
}

.record-details[open] .specimen-secondary-v522 > summary {
  display: flex;
}

.specimen-secondary-v522 > summary::-webkit-details-marker {
  display: none;
}

.specimen-secondary-v522 > summary > :is(span, small) {
  min-width: 0;
  overflow-wrap: anywhere;
}

.specimen-secondary-v522 > summary > small {
  color: var(--entry-muted-v522);
  font-weight: 600;
  text-align: right;
}

.specimen-secondary-v522 > summary::after {
  content: "\2304";
  flex: 0 0 auto;
  color: var(--entry-blue-v522);
  font-size: 16px;
  transform: rotate(0);
  transition: transform .16s ease;
}

.record-details .specimen-secondary-v522 > summary::after {
  content: "\2304" !important;
  display: inline-flex !important;
}

.specimen-secondary-v522[open] > summary {
  border-bottom: 1px solid var(--entry-line-v522);
  background: #f2f5f8;
  color: var(--entry-navy-v522);
}

.specimen-secondary-v522[open] > summary::after {
  transform: rotate(180deg);
}

.specimen-secondary-grid-v522 {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  padding: 10px;
}

.specimen-secondary-grid-v522 .specimen-cell-v559 {
  min-width: 0;
}

.specimen-secondary-grid-v522 .specimen-cell-v559 > span:first-child {
  display: block;
  color: var(--entry-muted-v522);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.specimen-secondary-grid-v522 :is(input, select, .fixed-area-pill-v34, .coefficient-pill-v33) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border-color: var(--entry-line-v522);
  background: #fff;
  color: #405364;
  font-size: 14px;
}

.result-advanced-mpa-v522 {
  padding: 9px;
  border: 1px dashed var(--entry-line-strong-v522);
  border-radius: 8px;
  background: #f4f6f8;
}

.result-advanced-mpa-v522 input {
  font-variant-numeric: tabular-nums;
}

.specimen-no-edit-v522 input {
  font-variant-numeric: tabular-nums;
}

.record-details[open]::before,
.record-details[open]:before {
  background: rgba(15, 29, 43, .48);
}

.record-details[open] .record-drawer-body {
  box-shadow: -34px 0 90px rgba(15, 29, 43, .26);
}

.drawer-top-v22,
.record-drawer-body .record-tabbar,
.record-savebar-v543 {
  background: rgba(248, 250, 252, .95);
}

.metric-result-card-v22.target-flash-v548:has(.specimen-entry-v522),
.result-row.target-flash-v548:has(.specimen-entry-v522) {
  outline-color: rgba(36, 75, 109, .46);
  box-shadow: 0 0 0 6px rgba(36, 75, 109, .1), 0 18px 34px rgba(36, 75, 109, .16);
}

@keyframes pasteFlashV560 {
  0% {
    border-color: var(--entry-blue-v522);
    box-shadow: 0 0 0 4px rgba(36, 75, 109, .16);
  }
  100% {
    border-color: var(--entry-line-v522);
    box-shadow: none;
  }
}

.record-savebar-v543 {
  border-color: var(--entry-line-strong-v522);
  background: rgba(250, 251, 252, .96);
  box-shadow: 0 -8px 24px rgba(20, 38, 54, .08);
}

.record-savebar-v543 button.primary {
  min-height: 46px;
  border-color: var(--entry-navy-v522);
  background: var(--entry-navy-v522);
  color: #fff;
}

@media (max-width: 1040px) {
  .specimen-entry-primary-v522 {
    grid-template-columns: 68px minmax(190px, 1fr) minmax(230px, .9fr) 44px;
  }
}

@media (max-width: 760px) {
  .record-section:has(.specimen-entry-v522),
  .metric-result-card-v22:has(.specimen-entry-v522) {
    width: 100%;
    max-width: 100%;
  }

  .record-section:has(.specimen-entry-v522) {
    margin-inline: 0;
    padding: 10px;
  }

  .metric-result-card-v22:has(.specimen-entry-v522) {
    padding: 10px;
  }

  .kn-entry-toolbar-v522 {
    align-items: stretch;
  }

  .kn-entry-toolbar-v522 [data-focus-next-load] {
    width: 100%;
  }

  .specimen-row-v22.specimen-entry-v522 {
    padding: 9px;
  }

  .specimen-entry-primary-v522 {
    grid-template-columns: 66px minmax(0, 1fr) 44px;
    grid-template-areas:
      "number load remove"
      "calculated calculated calculated";
    align-items: end;
    gap: 8px;
  }

  .specimen-entry-primary-v522 > .remove-specimen-v33 {
    min-height: 54px;
  }

  .specimen-no-badge-v522,
  .kn-input-shell-v522 > input[data-pressure-kn] {
    min-height: 54px;
  }

  .kn-input-shell-v522 > input[data-pressure-kn] {
    padding-left: 12px;
    font-size: 21px;
  }

  .specimen-auto-results-v522 :is([data-raw-strength-display], [data-converted-strength]) {
    min-height: 48px;
    font-size: 16px;
  }

  .specimen-secondary-grid-v522 {
    grid-template-columns: minmax(0, 1fr);
  }

  .specimen-secondary-v522 > summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .specimen-secondary-v522 > summary > small {
    flex: 1 1 180px;
    text-align: left;
  }

  .specimen-secondary-grid-v522 .specimen-dimensions-v64 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .record-savebar-v543 {
    z-index: 4;
    gap: 8px;
  }
}

@media (max-width: 380px) {
  .specimen-entry-primary-v522 {
    grid-template-columns: 58px minmax(0, 1fr) 44px;
    gap: 6px;
  }

  .specimen-no-badge-v522 {
    padding-inline: 4px;
    font-size: 16px;
  }

  .kn-input-shell-v522 > input[data-pressure-kn] {
    padding-right: 50px;
    padding-left: 9px;
    font-size: 20px;
  }

  .kn-unit-v522 {
    right: 8px;
    min-width: 34px;
    padding-inline: 5px;
  }

  .specimen-auto-results-v522 {
    gap: 6px;
  }
}

/* v5.23 guided result entry: journal palette, visible progress and calculation receipts. */
:root {
  --entry-journal-navy-v523: #172b3f;
  --entry-journal-graphite-v523: #415466;
  --entry-journal-blue-v523: #2f628d;
  --entry-journal-blue-soft-v523: #eaf1f7;
  --entry-journal-paper-v523: #fbfcfd;
  --entry-journal-canvas-v523: #f2f5f7;
  --entry-journal-line-v523: #ced8e1;
  --entry-journal-muted-v523: #687785;
  --entry-journal-amber-v523: #9a6828;
  --entry-journal-red-v523: #a2463f;
}

.record-details[open] .record-drawer-body {
  background: var(--entry-journal-canvas-v523);
  color: var(--entry-journal-navy-v523);
}

.record-details[open] :is(.drawer-top-v22, .record-drawer-body .record-tabbar, .record-savebar-v543) {
  border-color: var(--entry-journal-line-v523);
  background: rgba(250, 252, 253, .97);
}

.record-details[open] .record-drawer-body .record-tabbar button {
  border-color: transparent;
  background: transparent;
  color: var(--entry-journal-graphite-v523);
}

.record-details[open] .record-drawer-body .record-tabbar button.active {
  border-color: var(--entry-journal-blue-v523);
  background: var(--entry-journal-navy-v523);
  color: #fff;
  box-shadow: none;
}

.record-details[open] .drawer-top-v22 > button {
  border-color: var(--entry-journal-line-v523);
  background: #fff;
  color: var(--entry-journal-navy-v523);
}

.record-response-v523 {
  margin: 10px 12px 0;
  padding: 10px 12px;
  border: 1px solid rgba(47, 98, 141, .3);
  border-radius: 8px;
  background: var(--entry-journal-blue-soft-v523);
  color: var(--entry-journal-navy-v523);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
}

.record-response-v523[hidden] {
  display: none;
}

.record-response-v523[data-state="saved"] {
  border-color: rgba(47, 98, 141, .34);
  background: #e8f0f7;
  color: #1d4d75;
}

.record-response-v523[data-state="error"] {
  border-color: rgba(162, 70, 63, .34);
  background: #fff0ef;
  color: var(--entry-journal-red-v523);
}

.metric-result-card-v22:has(.specimen-entry-v522) {
  border-color: var(--entry-journal-line-v523);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(23, 43, 63, .04), 0 12px 30px rgba(23, 43, 63, .06);
}

.metric-result-card-v22:has(.specimen-entry-v522) .metric-result-head-v22.compact-v542 {
  align-items: center;
  gap: 6px;
}

.metric-result-card-v22:has(.specimen-entry-v522) .metric-result-head-v22.compact-v542 > strong {
  color: var(--entry-journal-navy-v523);
}

.metric-result-card-v22:has(.specimen-entry-v522) .metric-result-head-v22.compact-v542 .metric-pill-core-v523 {
  border-color: rgba(47, 98, 141, .2);
  background: var(--entry-journal-blue-soft-v523);
  color: var(--entry-journal-navy-v523);
}

.kn-entry-toolbar-v522 {
  border-color: var(--entry-journal-line-v523);
  border-radius: 9px;
  background: #f6f8fa;
}

.kn-entry-progress-v523 {
  flex: 1 0 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 2fr);
  align-items: center;
  gap: 8px 14px;
  padding-top: 2px;
}

.kn-entry-progress-v523 > span {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.kn-entry-progress-v523 [data-entry-progress-count] {
  color: var(--entry-journal-navy-v523);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  white-space: nowrap;
}

.kn-entry-progress-v523 [data-entry-progress-label] {
  min-width: 0;
  color: var(--entry-journal-muted-v523);
  font-size: 11px;
  font-weight: 700;
}

.kn-entry-segments-v523 {
  min-width: 0;
  height: 5px;
  display: flex;
  gap: 3px;
  overflow: hidden;
  border-radius: 999px;
}

.kn-entry-segments-v523 > i {
  min-width: 2px;
  flex: 1 1 0;
  border-radius: 999px;
  background: #d8e0e7;
  transition: background-color .16s ease, transform .16s ease;
}

.kn-entry-segments-v523 > i[data-filled="1"] {
  background: var(--entry-journal-blue-v523);
}

.kn-entry-progress-v523[data-state="complete"] > span,
.kn-entry-progress-v523[data-state="complete"] [data-entry-progress-label] {
  color: var(--entry-journal-navy-v523);
}

.kn-entry-progress-v523[data-state="complete"] .kn-entry-segments-v523 > i[data-filled="1"] {
  background: var(--entry-journal-navy-v523);
}

.specimen-entry-primary-v522 {
  grid-template-columns: 72px minmax(220px, 1.15fr) minmax(280px, 1fr);
  grid-template-areas: "number load calculated";
}

.specimen-row-v22.specimen-entry-v522 {
  position: relative;
  border-color: var(--entry-journal-line-v523);
  border-left-width: 3px;
  border-radius: 9px;
  background: var(--entry-journal-paper-v523);
}

.specimen-row-v22.specimen-entry-v522[data-entry-state="waiting"] {
  border-left-color: #aeb9c3;
}

.specimen-row-v22.specimen-entry-v522[data-entry-state="ready"] {
  border-left-color: var(--entry-journal-blue-v523);
  background: #fbfdff;
}

.specimen-row-v22.specimen-entry-v522[data-entry-state="manual"] {
  border-left-color: var(--entry-journal-amber-v523);
  background: #fffdf8;
}

.specimen-row-v22.specimen-entry-v522[data-entry-state="history"] {
  border-left-color: var(--entry-journal-graphite-v523);
  background: #f7f9fa;
}

.specimen-row-v22.specimen-entry-v522[data-entry-state="error"] {
  border-left-color: var(--entry-journal-red-v523);
  background: #fffafa;
}

.specimen-entry-status-v523 {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid #dbe2e8;
  border-radius: 7px;
  background: #f5f7f9;
  color: var(--entry-journal-muted-v523);
  line-height: 1.4;
}

.specimen-entry-status-v523 > span {
  flex: 0 0 auto;
  color: var(--entry-journal-graphite-v523);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.specimen-entry-status-v523 > small {
  min-width: 0;
  overflow-wrap: anywhere;
  color: inherit;
  font-size: 11px;
  font-weight: 650;
}

.specimen-entry-status-v523[data-state="ready"] {
  border-color: rgba(47, 98, 141, .22);
  background: var(--entry-journal-blue-soft-v523);
  color: var(--entry-journal-blue-v523);
}

.specimen-entry-status-v523[data-state="manual"] {
  border-color: rgba(154, 104, 40, .28);
  background: #fff7e9;
  color: #80531d;
}

.specimen-entry-status-v523[data-state="history"] {
  border-color: #ccd5dc;
  background: #eef2f5;
  color: var(--entry-journal-graphite-v523);
}

.specimen-entry-status-v523[data-state="error"] {
  border-color: rgba(162, 70, 63, .3);
  background: #fff0ef;
  color: var(--entry-journal-red-v523);
}

.specimen-entry-status-v523:is([data-state="ready"], [data-state="manual"], [data-state="history"], [data-state="error"]) > span {
  color: inherit;
}

.specimen-secondary-actions-v523 {
  display: flex;
  justify-content: flex-end;
  padding: 0 10px 10px;
}

.specimen-secondary-actions-v523 .remove-specimen-v33 {
  width: auto;
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border-color: rgba(162, 70, 63, .25);
  background: #fff;
  color: var(--entry-journal-red-v523);
  font-size: 12px;
}

.record-savebar-v543 [data-record-save-status] {
  min-width: 0;
  color: var(--entry-journal-muted-v523);
}

.record-savebar-v543 [data-record-save-status][data-state="dirty"] {
  color: #80531d;
}

.record-savebar-v543 [data-record-save-status][data-state="saved"] {
  color: var(--entry-journal-blue-v523);
}

.record-savebar-v543 [data-record-save-status][data-state="error"] {
  color: var(--entry-journal-red-v523);
}

.specimen-entry-v522 :is(input, select)[aria-invalid="true"] {
  border-color: var(--entry-journal-red-v523) !important;
  box-shadow: 0 0 0 3px rgba(162, 70, 63, .12) !important;
}

.record-savebar-v543 button.primary[data-record-primary-save] {
  min-height: 48px;
  border-color: var(--entry-journal-navy-v523);
  background: var(--entry-journal-navy-v523);
  color: #fff;
  box-shadow: 0 8px 18px rgba(23, 43, 63, .16);
}

.record-details.is-dirty-v552 .record-savebar-v543 button.primary[data-record-primary-save] {
  border-color: var(--entry-journal-blue-v523);
  background: var(--entry-journal-blue-v523);
  box-shadow: 0 8px 18px rgba(47, 98, 141, .2);
}

@media (max-width: 1040px) {
  .specimen-entry-primary-v522 {
    grid-template-columns: 68px minmax(190px, 1fr) minmax(230px, .9fr);
  }
}

@media (max-width: 760px) {
  .record-panel[data-record-panel="results"],
  .record-panel[data-record-panel="results"] .result-list,
  .record-panel[data-record-panel="results"] .result-row,
  .record-panel[data-record-panel="results"] .metric-result-card-v22,
  .record-panel[data-record-panel="results"] .specimen-table-v22 {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .record-panel[data-record-panel="results"] {
    overflow-x: clip;
  }

  .metric-result-card-v22:has(.specimen-entry-v522) .metric-result-head-v22.compact-v542 > strong {
    flex: 1 0 100%;
  }

  .metric-result-card-v22:has(.specimen-entry-v522) .metric-pill-plan-v523,
  .metric-result-card-v22:has(.specimen-entry-v522) .metric-pill-secondary-v523 {
    display: none;
  }

  .metric-result-card-v22:has(.specimen-entry-v522) .metric-pill-core-v523 {
    width: auto !important;
    min-width: 0;
    max-width: 100%;
    flex: 0 1 auto;
    padding-inline: 8px;
    font-size: 10.5px;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .metric-result-card-v22:has(.specimen-entry-v522) {
    border-radius: 6px;
    box-shadow: none;
  }

  .specimen-row-v22.specimen-entry-v522 {
    border-radius: 6px;
    box-shadow: none;
  }

  .kn-entry-progress-v523 {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .specimen-entry-primary-v522 {
    grid-template-columns: 66px minmax(0, 1fr);
    grid-template-areas:
      "number load"
      "calculated calculated";
    align-items: end;
    gap: 8px;
  }

  .specimen-entry-status-v523 {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .specimen-entry-status-v523 > span {
    white-space: normal;
  }

  .specimen-secondary-actions-v523 {
    justify-content: stretch;
  }

  .specimen-secondary-actions-v523 .remove-specimen-v33 {
    width: 100%;
  }

  .record-savebar-v543 {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .record-savebar-v543 :is([data-record-save-return], [data-record-save-close]) {
    display: none !important;
  }

  .record-savebar-v543 button.primary[data-record-primary-save] {
    grid-column: 1;
    width: 100%;
    min-width: 0;
    min-height: 52px;
    margin: 0;
  }
}

@media (max-width: 680px) {
  .record-response-v523 {
    margin: 8px 10px 0;
  }

  .record-savebar-v543 {
    margin: 0;
    padding: 7px 10px max(8px, env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
  }

  .record-savebar-v543 [data-record-save-status] {
    grid-column: 1;
    margin: 0;
    overflow: hidden;
    color: var(--entry-journal-muted-v523);
    font-size: 11px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .record-savebar-v543 button.primary[data-record-primary-save] {
    font-size: 15px;
  }

  .specimen-actions-v52 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .specimen-actions-v52 .chip-button {
    width: 100%;
    min-width: 0 !important;
    min-height: 44px;
    margin: 0;
    padding-inline: 6px;
  }
}

@media (max-width: 380px) {
  .specimen-entry-primary-v522 {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 6px;
  }

  .kn-entry-progress-v523 > span {
    flex-wrap: wrap;
    gap: 2px 7px;
  }

  .metric-result-card-v22:has(.specimen-entry-v522) .metric-pill-core-v523 {
    padding-inline: 6px;
    font-size: 10px;
  }
}
