:root {
  --bg: #151719;
  --surface: #1a1d20;
  --surface-2: #202428;
  --surface-3: #272c30;
  --line: #343a3f;
  --line-soft: #292e32;
  --text: #f2f3f3;
  --muted: #b2b8bd;
  --faint: #8d959b;
  --lime: #a8c79a;
  --lime-2: #93b585;
  --blue: #8fa8ad;
  --orange: #b7a48d;
  --danger: #c58f8b;
  --shadow: 0 14px 36px rgba(0, 0, 0, .16);
  --radius: 14px;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f3f5f2;
  --surface: #fbfcfa;
  --surface-2: #f0f2ef;
  --surface-3: #e8ebe7;
  --line: #d4d9d3;
  --line-soft: #e1e5e0;
  --text: #1b1f1c;
  --muted: #626b65;
  --faint: #7c867f;
  --lime: #77956c;
  --lime-2: #66865d;
  --blue: #6f8c91;
  --orange: #967e66;
  --danger: #a46561;
  --shadow: 0 12px 32px rgba(31, 39, 33, .08);
  color-scheme: light;
}

html { font-size: 16px; }
[hidden] { display: none !important; }
body {
  min-width: 0;
  background: var(--bg);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font-size: 14px; }
.app-shell { grid-template-columns: 264px minmax(0, 1fr); }
.sidebar {
  width: 264px;
  padding: 34px 24px 24px;
  background: color-mix(in srgb, var(--surface) 72%, var(--bg));
  border-color: var(--line);
}
.brand { gap: 12px; padding: 0; font-size: 22px; letter-spacing: -.5px; }
.brand-mark {
  width: auto;
  height: auto;
  display: inline-block;
  color: var(--lime);
  font-size: 30px;
  transform: none;
}
.brand span:last-child b:last-child { color: var(--lime); }
.brand-caption {
  margin: 8px 0 0;
  color: var(--faint);
  font-size: 12px;
  letter-spacing: .2px;
}
.nav { gap: 8px; margin-top: 52px; }
.nav-item {
  min-height: 50px;
  gap: 14px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 520;
}
.nav-item:hover { background: var(--surface-2); }
.nav-item.active {
  color: var(--text);
  background: var(--surface-2);
}
.nav-item.active .nav-icon { color: var(--lime); }
.nav-icon { width: 22px; font-size: 21px; }
.sidebar-bottom { gap: 18px; }
.privacy-note {
  gap: 12px;
  padding: 14px;
  border-color: var(--line);
  border-radius: 10px;
  background: transparent;
}
.privacy-note b { font-size: 12px; }
.privacy-note small { margin-top: 3px; font-size: 11px; line-height: 1.35; }
.status-icon { color: var(--lime); font-size: 20px; }
.theme-toggle {
  grid-template-columns: 24px 1fr 38px;
  padding: 5px 8px;
  font-size: 13px;
}
.theme-icon { font-size: 19px; }
.theme-toggle .theme-icon {
  position: static;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.theme-toggle .theme-icon::after { display: none; }
.theme-toggle .switch {
  width: 38px;
  height: 22px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-3);
}
.theme-toggle .switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--lime);
  transition: transform .2s ease;
}
[data-theme="light"] .theme-toggle .switch::after { transform: translateX(16px); }
.topbar { display: none; }
main { grid-column: 2; }
.content {
  width: 100%;
  max-width: 1500px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 56px 64px;
}
.page { animation: fade .2s ease; }
.eyebrow {
  margin-bottom: 10px;
  color: var(--lime);
  font-size: 11px;
  letter-spacing: 1.8px;
}
.overview-heading h2 {
  margin: 0;
  font-size: clamp(34px, 3vw, 42px);
  line-height: 1.15;
  letter-spacing: -1.4px;
}
.overview-heading > p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}
.flow-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 42px 0 38px;
  padding: 0;
  list-style: none;
}
.flow-steps::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 23px;
  left: 23px;
  right: 23px;
  height: 1px;
  background: var(--line);
}
.flow-steps li {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 14px;
}
.flow-steps li > div { width: fit-content; padding: 2px 10px 2px 0; background: var(--bg); }
.flow-steps li > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface);
  font-size: 16px;
  font-weight: 700;
}
.flow-steps li.active > span {
  color: #172015;
  border-color: var(--lime);
  background: var(--lime);
}
[data-theme="light"] .flow-steps li.active > span { color: #fff; }
.flow-steps b, .flow-steps small { display: block; }
.flow-steps b { font-size: 16px; font-weight: 650; }
.flow-steps small { margin-top: 3px; color: var(--muted); font-size: 13px; }
.flow-steps .active b { color: var(--lime); }
.drop-card {
  min-height: 570px;
  padding: 52px;
  border: 1px dashed color-mix(in srgb, var(--line) 90%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 82%, var(--bg));
}
.empty-view[hidden] { display: none; }
.drop-card.dragging {
  border-color: var(--lime);
  background: color-mix(in srgb, var(--lime) 6%, var(--surface));
  transform: none;
}
.upload-icon {
  width: auto;
  height: auto;
  border: 0;
  background: transparent;
  color: var(--lime);
  font-size: 72px;
}
.drop-card h3 {
  margin: 24px 0 10px;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -.6px;
}
.drop-card p {
  max-width: 540px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 15px;
}
.upload-actions { display: flex; gap: 12px; }
.primary-btn, .secondary-btn {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 650;
  box-shadow: none;
}
.primary-btn {
  border-color: var(--lime);
  background: var(--lime);
  color: #172015;
}
[data-theme="light"] .primary-btn { color: #fff; }
.primary-btn:hover { background: var(--lime-2); transform: none; }
.primary-btn i, .secondary-btn i { margin-right: 7px; font-size: 18px; vertical-align: -2px; }
.secondary-btn {
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.demo-btn {
  width: auto;
  margin-top: 28px;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.local-note {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  margin-top: 28px;
  color: var(--muted);
}
.local-note > i { margin-top: 3px; color: var(--lime); font-size: 20px; }
.local-note b, .local-note span { display: block; }
.local-note b { color: var(--text); font-size: 14px; font-weight: 580; }
.local-note span { margin-top: 3px; font-size: 13px; }

/* Project/task workspace */
.project-dashboard-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}
.project-dashboard-head h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: -1.2px;
}
.project-dashboard-head p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}
.project-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--line-soft);
}
.project-summary > div {
  padding: 20px 22px;
  background: var(--surface);
}
.project-summary span, .project-summary b { display: block; }
.project-summary span { color: var(--muted); font-size: 12px; }
.project-summary b { margin-top: 6px; font-size: 26px; line-height: 1.2; }
.task-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 26px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.task-card:hover, .task-card:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--lime) 60%, var(--line));
  background: color-mix(in srgb, var(--lime) 3%, var(--surface));
}
.task-folder {
  display: grid;
  place-items: center;
  min-height: 170px;
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--lime);
}
.task-folder i { font-size: 58px; }
.task-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.task-title-row h3 {
  margin: 6px 0 0;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -.4px;
}
.task-status {
  color: var(--lime);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
}
.task-caret { color: var(--muted); font-size: 25px; }
.task-main > p { margin: 9px 0 22px; color: var(--muted); font-size: 14px; }
.task-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 8px;
  font-size: 12px;
}
.task-progress-meta span { color: var(--muted); }
.task-progress-meta b { color: var(--text); }
.task-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-3);
}
.task-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--lime);
  transition: width .3s ease;
}
.task-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
}
.task-footer > span { color: var(--muted); font-size: 12px; }
.task-footer > span i { margin-right: 7px; color: var(--lime); font-size: 17px; vertical-align: -2px; }
.task-footer > span b { color: var(--text); }
.back-projects {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.back-projects:hover { color: var(--text); }
body.review-mode .app-shell { grid-template-columns: minmax(0, 1fr); }
body.review-mode .sidebar { display: none; }
body.review-mode main { grid-column: 1; }
body.review-mode .content {
  max-width: none;
  height: 100vh;
  padding: 12px;
  overflow: hidden;
}
body.review-mode #workspace {
  height: 100%;
  display: flex;
  flex-direction: column;
}
body.review-mode .section-heading {
  min-height: 50px;
  margin: 0 0 10px;
  padding: 0 4px;
  align-items: center;
}
body.review-mode .section-heading > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
body.review-mode .section-heading .back-projects { margin: 0; }
body.review-mode .section-heading .eyebrow,
body.review-mode .section-heading > div:first-child > p:last-child { display: none; }
body.review-mode .section-heading h2 {
  max-width: min(42vw, 560px);
  margin: 0;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.review-mode .workspace-actions { gap: 8px; }
body.review-mode .workspace-actions .mini { min-height: 36px; }
body.review-mode .progress-summary span { font-size: 17px; }
body.review-mode .progress-summary small { display: none; }
body.review-mode .filter-bar { display: none; margin: 0 0 10px; }
body.review-mode.review-filters-open .filter-bar { display: flex; }
body.review-mode .workspace-layout {
  flex: 1;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 10px;
}
body.review-mode .viewer-card {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
}
body.review-mode .viewer-toolbar { flex: 0 0 auto; }
body.review-mode .canvas-wrap {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}
body.review-mode .viewer-nav { flex: 0 0 auto; }
body.review-mode .assign-panel {
  height: 100%;
  padding: 18px;
  overflow: auto;
}

/* Shared product surfaces */
.section-heading { align-items: center; margin-bottom: 30px; }
.section-heading h2 { font-size: 34px; line-height: 1.15; letter-spacing: -1px; }
.section-heading > div > p:last-child { margin-top: 9px; font-size: 15px; line-height: 1.5; }
.progress-summary span { font-size: 22px; }
.progress-summary small { font-size: 12px; }
.drop-card, .guide-card, .chart-card, .ratio-card, .table-card, .viewer-card, .assign-panel,
.metric-grid article, .tree-card, .check-card, .download-card {
  border-color: var(--line-soft);
  background: var(--surface);
  box-shadow: none;
}
.card-head { padding-bottom: 16px; border-color: var(--line-soft); }
.card-head span { font-size: 15px; }
.card-head small { font-size: 11px; letter-spacing: .7px; }
.metric-grid { gap: 14px; margin-bottom: 20px; }
.metric-grid article { padding: 22px; }
.metric-grid span { font-size: 12px; }
.metric-grid b { margin: 10px 0 4px; font-size: 30px; }
.metric-grid small { font-size: 11px; }
.filter-bar {
  min-height: 62px;
  gap: 12px;
  padding: 10px 14px;
  border-color: var(--line-soft);
  background: var(--surface);
}
.filter-bar label, .filter-bar > span { font-size: 12px; }
.filter-bar select, .filter-bar input, .strategy-label select, .export-options select {
  min-height: 38px;
  padding: 0 11px;
  border-color: var(--line);
  background: var(--surface-2);
  font-size: 13px;
}
.workspace-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; }
.viewer-toolbar, .viewer-nav { min-height: 60px; padding: 0 20px; font-size: 13px; }
.small-icon { min-height: 34px; padding: 0 10px; font-size: 12px; }
.viewer-toolbar > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.viewer-tools { align-items: center; flex: 0 0 auto; }
.small-icon.icon-only {
  width: 36px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}
.small-icon i { font-size: 16px; }
.zoom-controls {
  height: 36px;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.zoom-controls .small-icon {
  width: 34px;
  min-height: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.zoom-controls .small-icon:hover { background: var(--surface-3); }
.zoom-level {
  min-width: 56px;
  height: 34px;
  padding: 0 6px;
  border: 0;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}
.small-icon:disabled { opacity: .38; cursor: default; }
.canvas-wrap {
  background:
    radial-gradient(circle at center, rgba(255,255,255,.035), transparent 42%),
    #0b0d0f;
  user-select: none;
}
[data-theme="light"] .canvas-wrap {
  background:
    radial-gradient(circle at center, rgba(255,255,255,.7), transparent 48%),
    #d9ddda;
}
.canvas-wrap canvas {
  transform-origin: center center;
  cursor: grab;
  touch-action: none;
  will-change: transform;
  transition: transform .11s ease-out, box-shadow .18s ease;
  box-shadow: 0 16px 46px rgba(0, 0, 0, .35);
}
.canvas-wrap.is-panning canvas {
  cursor: grabbing;
  transition: none;
}
.canvas-hint {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 32px);
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  color: rgba(255,255,255,.72);
  background: rgba(8, 10, 11, .72);
  backdrop-filter: blur(10px);
  font-size: 10px;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
  animation: hint-out .35s ease 4s forwards;
}
.canvas-hint i { font-size: 15px; }
@keyframes hint-out { to { opacity: 0; visibility: hidden; } }
.viewer-card:fullscreen {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
  background: var(--surface);
}
.viewer-card:fullscreen .canvas-wrap { flex: 1; min-height: 0; height: auto; }
.assign-panel { padding: 22px; }
.panel-title b { font-size: 15px; }
.panel-title small { font-size: 11px; }
.split-button { min-height: 62px; padding: 12px; margin-bottom: 10px; border-color: var(--line); }
.split-button kbd { width: 30px; height: 30px; font-size: 12px; }
.split-button span b { font-size: 13px; }
.split-button span small, .split-button > i { font-size: 10px; }
.objects-list { margin-top: 24px; }
.list-title { font-size: 13px; }
.object-row { margin: 11px 0; font-size: 12px; }
.review-check { font-size: 12px; }
.analytics-grid, .export-layout { gap: 20px; }
.chart-card, .ratio-card, .table-card, .tree-card, .check-card, .download-card { padding: 24px; }
.class-chart { min-height: 280px; }
.bar-item small, .bar::before { font-size: 11px; }
.ratio-inputs label, .seed-label, .strategy-label { font-size: 12px; }
.ratio-counts { font-size: 11px; }
table { font-size: 13px; }
th { padding: 15px 12px; font-size: 10px; }
td { padding: 14px 12px; }
.quality-layout { gap: 20px; }
.issue-filters button { min-height: 34px; padding: 0 12px; font-size: 11px; }
.issue-row b { font-size: 12px; }
.issue-row small, .issue-row > span { font-size: 10px; }
.quality-copy, .download-card p { font-size: 12px; }
.check-card > small, .download-card > small { font-size: 10px; }
.validation-badge { padding: 9px 14px; font-size: 11px; }
.tree-root { font-size: 15px; }
.tree-branch p { font-size: 11px; }
.tree-branch div small { font-size: 10px; }
.check-card li { padding: 14px 2px; font-size: 12px; }
.toast { width: 360px; padding: 15px 17px; grid-template-columns: 26px 1fr; }
.toast b { font-size: 13px; }
.toast small { font-size: 11px; }
.modal-card { width: min(520px, calc(100vw - 32px)); padding: 32px; }
.modal-card p { font-size: 14px; }

@media (min-width: 1600px) {
  .content { padding-inline: 72px; }
  .drop-card { min-height: 610px; }
}

@media (max-width: 1280px) {
  .app-shell { grid-template-columns: 232px minmax(0, 1fr); }
  .sidebar { width: 232px; padding-inline: 18px; }
  .content { padding: 40px 36px 56px; }
  .flow-steps { gap: 18px; }
  .flow-steps small { font-size: 12px; }
  .workspace-layout { grid-template-columns: minmax(0, 1fr) 290px; }
  body.review-mode .workspace-layout { grid-template-columns: minmax(0, 1fr) 270px; }
  .filter-bar { flex-wrap: wrap; }
  .filter-bar .search-field { min-width: 230px; }
  .analytics-grid { grid-template-columns: minmax(0, 1.2fr) minmax(290px, .8fr); }
  .quality-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .task-card { grid-template-columns: 110px minmax(0, 1fr); }
  .task-folder { min-height: 155px; }
}

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 204px minmax(0, 1fr); }
  .sidebar { width: 204px; padding: 28px 14px 20px; }
  .brand { padding-left: 8px; font-size: 19px; }
  .brand-caption { padding-left: 8px; font-size: 10px; }
  .nav-item { font-size: 13px; }
  .content { padding: 34px 28px 50px; }
  .overview-heading h2, .section-heading h2 { font-size: 32px; }
  .overview-heading > p:last-child { font-size: 15px; }
  .flow-steps { margin: 34px 0 30px; }
  .flow-steps li { grid-template-columns: 40px 1fr; gap: 10px; }
  .flow-steps li > span { width: 40px; height: 40px; }
  .flow-steps::before { top: 20px; }
  .flow-steps b { font-size: 14px; }
  .flow-steps small { font-size: 11px; }
  .drop-card { min-height: 500px; padding: 40px 28px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-grid, .analytics-grid.lower, .quality-layout, .export-layout { grid-template-columns: 1fr; }
  .quality-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-dashboard-head h2 { font-size: 32px; }
  .workspace-layout { grid-template-columns: 1fr; }
  body.review-mode .workspace-layout { grid-template-columns: minmax(0, 1fr) 260px; }
  .assign-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .panel-title, .objects-list, .review-check, .bulk-note { grid-column: 1 / -1; }
  .split-button { margin: 0; }
  .canvas-wrap { height: min(62vh, 620px); min-height: 430px; }
  .tree-card { min-height: auto; }
}

@media (max-width: 820px) {
  body { padding-bottom: 72px; }
  .app-shell { display: block; }
  .sidebar {
    position: sticky;
    top: 0;
    right: auto;
    bottom: auto;
    width: 100%;
    height: 66px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(18px);
  }
  .brand { padding: 0; font-size: 19px; }
  .brand-mark { font-size: 25px; }
  .brand-caption, .privacy-note { display: none; }
  .sidebar-bottom {
    display: block;
    margin: 0 0 0 auto;
  }
  .theme-toggle {
    width: 40px;
    height: 40px;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface-2);
  }
  .theme-toggle .theme-label, .theme-toggle .switch { display: none; }
  .nav {
    position: fixed;
    z-index: 30;
    left: 0;
    right: 0;
    bottom: 0;
    height: 72px;
    margin: 0;
    padding: 7px max(8px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    backdrop-filter: blur(18px);
  }
  .nav-item {
    min-width: 0;
    min-height: 56px;
    padding: 5px 2px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    border-radius: 8px;
    font-size: 10px;
    line-height: 1.1;
    text-align: center;
  }
  .nav-icon { width: auto; font-size: 20px; }
  main { display: block; }
  .content {
    max-width: none;
    padding: 30px 24px calc(42px + env(safe-area-inset-bottom));
  }
  .section-heading {
    align-items: flex-start;
    gap: 20px;
  }
  .workspace-actions { flex-wrap: wrap; justify-content: flex-end; }
  .flow-steps { gap: 10px; margin: 30px 0 26px; }
  .flow-steps li { grid-template-columns: 36px 1fr; gap: 8px; }
  .flow-steps li > span { width: 36px; height: 36px; font-size: 13px; }
  .flow-steps::before { top: 18px; }
  .flow-steps li > div { padding-right: 5px; }
  .flow-steps b { font-size: 13px; }
  .flow-steps small { display: none; }
  .drop-card { min-height: 470px; padding: 36px 22px; }
  .filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }
  .filter-bar label { display: grid; gap: 6px; }
  .filter-bar .search-field { grid-column: 1 / -1; min-width: 0; display: flex; }
  .filter-bar > span { align-self: center; }
  .filter-bar .secondary-btn { width: 100%; }
  .quality-side { grid-template-columns: 1fr; }
  .table-wrap { margin-inline: -24px; padding-inline: 24px; }
  table { min-width: 760px; }
  .canvas-wrap { height: 54vh; min-height: 360px; }
  .viewer-toolbar { flex-wrap: wrap; gap: 8px; padding-block: 10px; }
  .export-side { grid-template-columns: 1fr; }
  .project-dashboard-head { align-items: flex-start; }
  .task-card { grid-template-columns: 100px minmax(0, 1fr); gap: 18px; }
  .task-folder { min-height: 150px; }
  body.review-mode { padding-bottom: 0; }
  body.review-mode .content { height: auto; min-height: 100vh; padding: 12px; overflow: visible; }
  body.review-mode #workspace { min-height: calc(100vh - 24px); }
  body.review-mode .workspace-layout { grid-template-columns: 1fr; }
  body.review-mode .viewer-card { height: auto; }
  body.review-mode .canvas-wrap { height: calc(100vh - 245px); min-height: 440px; }
  body.review-mode .assign-panel { height: auto; }
}

@media (max-width: 560px) {
  .sidebar { height: 60px; padding-inline: 14px; }
  .brand { font-size: 18px; }
  .content { padding: 24px 16px 36px; }
  .eyebrow { font-size: 10px; }
  .overview-heading h2, .section-heading h2 { font-size: 28px; letter-spacing: -.7px; }
  .overview-heading > p:last-child, .section-heading > div > p:last-child { font-size: 14px; }
  .project-dashboard-head { display: grid; gap: 18px; margin-bottom: 24px; }
  .project-dashboard-head h2 { font-size: 28px; }
  .project-dashboard-head .secondary-btn { width: 100%; }
  .project-summary { grid-template-columns: repeat(3, 1fr); }
  .project-summary > div { padding: 14px 10px; text-align: center; }
  .project-summary span { font-size: 10px; }
  .project-summary b { font-size: 22px; }
  .task-card { grid-template-columns: 1fr; padding: 16px; }
  .task-folder { min-height: 120px; }
  .task-folder i { font-size: 48px; }
  .task-title-row h3 { font-size: 20px; }
  .task-footer { align-items: stretch; flex-direction: column; }
  .task-footer .primary-btn { width: 100%; }
  .section-heading { display: grid; margin-bottom: 22px; }
  .section-heading > div:last-child:not(:first-child) { justify-self: stretch; }
  .section-heading > .primary-btn, .section-heading > div > .primary-btn { width: 100%; }
  .workspace-actions { justify-content: flex-start; }
  .progress-summary { margin-left: auto; }
  .flow-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .flow-steps li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
  }
  .flow-steps li > div { padding: 0 3px; }
  .flow-steps b { font-size: 11px; }
  .drop-card { min-height: 400px; padding: 30px 16px; }
  .upload-icon { font-size: 58px; }
  .drop-card h3 { margin-top: 18px; font-size: 24px; text-align: center; }
  .drop-card p { max-width: 330px; font-size: 14px; text-align: center; }
  .upload-actions { width: 100%; max-width: 320px; flex-direction: column; }
  .upload-actions button { width: 100%; }
  .demo-btn { max-width: 290px; line-height: 1.45; }
  .local-note { align-items: center; text-align: left; }
  .local-note b { font-size: 12px; }
  .local-note span { font-size: 11px; }
  .metric-grid, .quality-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric-grid article { padding: 16px; }
  .metric-grid b { font-size: 25px; }
  .chart-card, .ratio-card, .table-card, .tree-card, .check-card, .download-card { padding: 18px; }
  .class-chart { min-height: 230px; }
  .bar-item { min-width: 48px; }
  .filter-bar { grid-template-columns: 1fr; }
  .filter-bar .search-field { grid-column: auto; }
  .filter-bar > span { padding: 4px 0; }
  .assign-panel { grid-template-columns: 1fr; }
  .panel-title, .objects-list, .review-check, .bulk-note { grid-column: 1; }
  .canvas-wrap { height: 48vh; min-height: 310px; }
  .viewer-toolbar, .viewer-nav { padding-inline: 14px; }
  .viewer-toolbar > span { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .viewer-nav { min-height: 54px; }
  .ratio-inputs label { grid-template-columns: 10px minmax(0, 1fr) 56px 10px; }
  .issue-filters { overflow-x: auto; }
  .issue-filters button { flex: none; }
  .folder-tree { padding-inline: 0; }
  .toast-stack { left: 12px; right: 12px; bottom: 84px; }
  .toast { width: 100%; }
  .modal-card { max-height: calc(100vh - 32px); overflow: auto; }
  body.review-mode .content { padding: 14px 12px 24px; }
  body.review-mode .content { padding-bottom: 100px; }
  body.review-mode .section-heading { display: flex; min-height: 42px; align-items: center; margin-bottom: 8px; padding: 0; }
  body.review-mode .section-heading > div:first-child { gap: 8px; }
  body.review-mode .section-heading .back-projects { width: 38px; height: 38px; margin: 0; font-size: 0; justify-content: center; }
  body.review-mode .section-heading .back-projects i { margin: 0; font-size: 18px; }
  body.review-mode .section-heading .eyebrow,
  body.review-mode .section-heading > div:first-child > p:last-child,
  body.review-mode .workspace-actions { display: none; }
  body.review-mode .section-heading h2 { font-size: 22px; }
  body.review-mode.review-filters-open .filter-bar {
    display: grid;
    margin-bottom: 8px;
  }
  body.review-mode .workspace-layout { display: block; }
  body.review-mode .viewer-card { border-radius: 12px; }
  body.review-mode .viewer-toolbar { min-height: 52px; flex-wrap: nowrap; padding: 8px 10px; }
  body.review-mode .viewer-toolbar > span { max-width: 30%; }
  body.review-mode .viewer-tools { gap: 4px; }
  body.review-mode .viewer-tools #toggleBoxes,
  body.review-mode .viewer-tools #actualSize { display: none; }
  body.review-mode .canvas-wrap { height: calc(100vh - 228px); min-height: 390px; }
  .small-icon.icon-only { width: 34px; }
  .zoom-level { min-width: 48px; }
  .canvas-hint { bottom: 10px; font-size: 9px; }
  body.review-mode .assign-panel {
    position: fixed;
    z-index: 45;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 8px 8px max(8px, env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: 0;
    background: color-mix(in srgb, var(--surface) 97%, transparent);
    backdrop-filter: blur(18px);
  }
  body.review-mode .assign-panel .panel-title,
  body.review-mode .assign-panel .objects-list,
  body.review-mode .assign-panel .bulk-note,
  body.review-mode .assign-panel .review-check { display: none; }
  body.review-mode .split-button {
    min-height: 68px;
    grid-template-columns: 1fr;
    place-items: center;
    gap: 3px;
    padding: 7px 3px;
    text-align: center;
  }
  body.review-mode .split-button kbd { width: 24px; height: 24px; }
  body.review-mode .split-button span b { font-size: 10px; }
  body.review-mode .split-button span small,
  body.review-mode .split-button > i { display: none; }
}

@media (max-width: 380px) {
  .nav-item { font-size: 9px; }
  .nav-icon { font-size: 19px; }
  .content { padding-inline: 12px; }
  .metric-grid, .quality-metrics { grid-template-columns: 1fr; }
  .flow-steps b { font-size: 10px; }
}
