:root {
  color-scheme: light;
  --bg: #f3f5f3;
  --surface: #ffffff;
  --surface-muted: #f7f8f7;
  --surface-strong: #eef1ef;
  --ink: #17201d;
  --ink-2: #3f4945;
  --muted: #707b76;
  --line: #dfe4e1;
  --line-strong: #cbd3cf;
  --sidebar: #171c1b;
  --sidebar-2: #202725;
  --accent: #167354;
  --accent-strong: #0d5d43;
  --accent-soft: #e3f2eb;
  --blue: #256d85;
  --blue-soft: #e6f1f4;
  --amber: #a8620c;
  --amber-soft: #fff2dc;
  --red: #b73733;
  --red-soft: #fce9e7;
  --violet: #6e5d98;
  --violet-soft: #f0ebf7;
  --shadow-sm: 0 1px 2px rgba(19, 30, 25, 0.06);
  --shadow-md: 0 12px 34px rgba(19, 30, 25, 0.1);
  --sidebar-width: 236px;
  --topbar-height: 64px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
  flex: 0 0 auto;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  color: #f4f7f5;
  background: var(--sidebar);
  border-right: 1px solid #2a322f;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  height: var(--topbar-height);
  padding: 0 18px;
  border-bottom: 1px solid #2b3230;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 6px;
  color: #15211d;
  background: #82d1ad;
  font-weight: 800;
  font-size: 13px;
}

.brand-copy {
  min-width: 0;
}

.brand-title {
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  font-weight: 720;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brand-subtitle {
  color: #9ba8a3;
  font-size: 11px;
}

.sidebar-section-label {
  margin: 20px 18px 8px;
  color: #74817c;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.side-nav {
  display: grid;
  gap: 3px;
  padding: 0 10px;
}

.nav-item {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  gap: 11px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  color: #b9c2be;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: color 140ms ease, background 140ms ease;
}

.nav-item:hover {
  color: #ffffff;
  background: #232a28;
}

.nav-item.active {
  color: #ffffff;
  background: #293631;
}

.nav-item.active svg {
  color: #81d4ae;
}

.nav-item .nav-count {
  min-width: 20px;
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 9px;
  color: #d9e2de;
  background: #38413e;
  font-size: 11px;
  text-align: center;
}

.nav-item .nav-count.danger {
  color: #ffd8d3;
  background: #65312f;
}

.sidebar-spacer {
  flex: 1;
}

.environment-note {
  margin: 12px 12px 14px;
  padding: 11px 12px;
  border: 1px solid #33403b;
  border-radius: 6px;
  color: #aab5b0;
  background: #1d2422;
  font-size: 11px;
}

.environment-note strong {
  display: block;
  margin-bottom: 2px;
  color: #e5eee9;
  font-size: 12px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 10px 16px;
  border-top: 1px solid #2b3230;
}

.avatar {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #214a3b;
  background: #d8eee4;
  font-size: 12px;
  font-weight: 750;
}

.user-name {
  color: #f2f6f4;
  font-size: 12px;
  font-weight: 650;
}

.user-role {
  color: #87938e;
  font-size: 10px;
}

.work-area {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  height: var(--topbar-height);
  grid-template-columns: minmax(220px, 1fr) minmax(240px, 420px) minmax(280px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.topbar-left,
.topbar-actions,
.crumbs,
.inline,
.inline-wrap {
  display: flex;
  align-items: center;
}

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

.crumbs {
  min-width: 0;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.crumbs strong {
  overflow: hidden;
  color: var(--ink);
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.search-box {
  position: relative;
  min-width: 0;
}

.search-box svg {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 16px;
  height: 16px;
  color: #86908b;
  transform: translateY(-50%);
}

.search-box input {
  width: 100%;
  height: 36px;
  padding: 0 38px 0 35px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
  color: var(--ink);
  background: #f7f8f7;
}

.search-box input:focus {
  border-color: #73a993;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(22, 115, 84, 0.1);
}

.search-shortcut {
  position: absolute;
  top: 50%;
  right: 8px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #8a948f;
  background: #ffffff;
  font-size: 10px;
  transform: translateY(-50%);
}

.topbar-actions {
  justify-content: flex-end;
  gap: 8px;
}

.mobile-menu,
.mobile-only {
  display: none;
}

.icon-btn.mobile-menu {
  display: none;
}

.main-content {
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 24px 28px 52px;
}

.page-head {
  display: flex;
  min-height: 54px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.page-head-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 760;
  line-height: 1.2;
}

.page-description {
  max-width: 760px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.page-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.btn {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.btn.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.btn.secondary {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line-strong);
}

.btn.secondary:hover {
  border-color: #97a59f;
  background: #f8faf9;
}

.btn.ghost {
  color: var(--ink-2);
  background: transparent;
}

.btn.ghost:hover {
  background: var(--surface-strong);
}

.btn.danger {
  color: var(--red);
  background: #fff;
  border-color: #efc5c1;
}

.btn.small {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

.icon-btn {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ink-2);
  background: transparent;
  cursor: pointer;
}

.icon-btn:hover {
  border-color: var(--line);
  background: var(--surface-muted);
}

.badge,
.status-pill,
.confidence-pill,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.badge {
  min-height: 23px;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
}

.badge.green,
.status-pill.matched,
.status-pill.valid,
.status-pill.ready {
  color: #0b6748;
  background: var(--accent-soft);
}

.badge.blue {
  color: #1f657c;
  background: var(--blue-soft);
}

.badge.amber,
.status-pill.partial,
.status-pill.warning,
.status-pill.expiring,
.status-pill.review {
  color: #915307;
  background: var(--amber-soft);
}

.badge.red,
.status-pill.missing,
.status-pill.gap {
  color: #a12c28;
  background: var(--red-soft);
}

.badge.violet {
  color: #67538e;
  background: var(--violet-soft);
}

.badge.gray,
.status-pill.pending {
  color: #5f6b66;
  background: #edf0ee;
}

.badge svg {
  width: 12px;
  height: 12px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 720;
}

.panel-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.panel-body {
  padding: 18px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.stat-item {
  min-width: 0;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.stat-item:last-child {
  border-right: 0;
}

.stat-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

.stat-label svg {
  width: 15px;
  height: 15px;
  color: #8a9791;
}

.stat-value {
  overflow: hidden;
  color: var(--ink);
  font-size: 24px;
  font-weight: 760;
  line-height: 1.05;
  text-overflow: ellipsis;
}

.stat-value small {
  margin-left: 3px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}

.stat-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr);
  gap: 18px;
}

.dashboard-main,
.dashboard-rail {
  display: grid;
  align-content: start;
  gap: 18px;
}

.project-summary {
  overflow: hidden;
}

.project-summary-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.project-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 760;
}

.project-summary h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 750;
  line-height: 1.35;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
}

.project-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.project-meta svg {
  width: 13px;
  height: 13px;
}

.score-dial {
  display: grid;
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  place-items: center;
  border: 6px solid #d8ece3;
  border-top-color: var(--accent);
  border-radius: 50%;
  background: #ffffff;
  text-align: center;
}

.score-dial strong {
  display: block;
  font-size: 20px;
  line-height: 1;
}

.score-dial span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.deadline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0 20px;
}

.deadline-item {
  padding: 17px 18px 17px 0;
  border-right: 1px solid var(--line);
}

.deadline-item + .deadline-item {
  padding-left: 18px;
}

.deadline-item:last-child {
  border-right: 0;
}

.deadline-label {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
}

.deadline-value {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.deadline-value.warning {
  color: var(--amber);
}

.deadline-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.workflow-progress {
  padding: 18px 20px 20px;
  border-top: 1px solid var(--line);
}

.progress-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  color: var(--ink-2);
  font-size: 11px;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: #e7ebe8;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
}

.stage-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 13px;
}

.stage {
  position: relative;
  padding-top: 17px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.stage::before {
  position: absolute;
  top: 0;
  left: calc(50% - 5px);
  width: 10px;
  height: 10px;
  border: 2px solid #cbd3cf;
  border-radius: 50%;
  background: #ffffff;
  content: "";
}

.stage::after {
  position: absolute;
  top: 5px;
  right: 50%;
  width: 100%;
  height: 1px;
  background: #d8ddda;
  content: "";
  z-index: 0;
}

.stage:first-child::after {
  display: none;
}

.stage.done,
.stage.active {
  color: var(--ink-2);
}

.stage.done::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 2px #ffffff;
}

.stage.done::after,
.stage.active::after {
  background: #66a58d;
}

.stage.active::before {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.stage.blocked {
  color: var(--red);
}

.stage.blocked::before {
  border-color: var(--red);
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(177, 70, 61, 0.12);
}

.stage.blocked::after {
  background: #e6b7b2;
}

.action-list,
.risk-list,
.activity-list,
.check-list,
.file-list {
  display: grid;
}

.action-row,
.activity-row,
.check-row,
.file-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}

.action-row:last-child,
.activity-row:last-child,
.check-row:last-child,
.file-row:last-child {
  border-bottom: 0;
}

.row-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  color: var(--blue);
  background: var(--blue-soft);
}

.row-icon.warning {
  color: var(--amber);
  background: var(--amber-soft);
}

.row-icon.danger {
  color: var(--red);
  background: var(--red-soft);
}

.row-icon.success {
  color: var(--accent);
  background: var(--accent-soft);
}

.row-icon svg {
  width: 16px;
  height: 16px;
}

.row-main {
  min-width: 0;
  flex: 1;
}

.row-title {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-subtitle {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-side {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.risk-mini-row {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.risk-mini-row:last-child {
  border-bottom: 0;
}

.severity-bar {
  width: 4px;
  min-height: 36px;
  border-radius: 2px;
  background: var(--amber);
}

.severity-bar.critical {
  background: var(--red);
}

.severity-bar.info {
  background: var(--blue);
}

.risk-title {
  margin: 0;
  font-size: 12px;
  font-weight: 670;
}

.risk-detail {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.ring-metric {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 18px;
}

.ring {
  position: relative;
  display: grid;
  width: 100px;
  height: 100px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0 var(--coverage, 0%), #e5eae7 var(--coverage, 0%) 100%);
}

.ring::after {
  position: absolute;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #ffffff;
  content: "";
}

.ring-value {
  position: relative;
  z-index: 1;
  text-align: center;
}

.ring-value strong {
  display: block;
  font-size: 23px;
  line-height: 1;
}

.ring-value span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

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

.legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-2);
  font-size: 11px;
}

.legend-label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.legend-dot.amber {
  background: var(--amber);
}

.legend-dot.red {
  background: var(--red);
}

.legend-dot.gray {
  background: #b6bfbb;
}

.view-tabs {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.view-tabs::-webkit-scrollbar {
  display: none;
}

.view-tab {
  position: relative;
  min-height: 44px;
  padding: 0 17px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 620;
  white-space: nowrap;
}

.view-tab:hover {
  color: var(--ink);
}

.view-tab.active {
  color: var(--accent);
}

.view-tab.active::after {
  position: absolute;
  right: 17px;
  bottom: -1px;
  left: 17px;
  height: 2px;
  background: var(--accent);
  content: "";
}

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

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 7px;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eff2f0;
}

.segment {
  min-height: 29px;
  padding: 0 11px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  white-space: nowrap;
}

.segment.active {
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.filter-input,
.select-control,
.text-control,
.textarea-control {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: none;
  color: var(--ink);
  background: #ffffff;
}

.filter-input,
.select-control,
.text-control {
  height: 36px;
  padding: 0 10px;
}

.filter-input:focus,
.select-control:focus,
.text-control:focus,
.textarea-control:focus {
  border-color: #73a993;
  box-shadow: 0 0 0 3px rgba(22, 115, 84, 0.09);
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table th {
  height: 40px;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #f7f8f7;
  font-size: 10px;
  font-weight: 720;
  text-align: left;
}

.data-table td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 11px;
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover td {
  background: #fafcfb;
}

.cell-title {
  display: block;
  color: var(--ink);
  font-weight: 660;
}

.cell-subtitle {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.status-pill {
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 11px;
  font-size: 10px;
  font-weight: 680;
}

.confidence-pill {
  min-width: 38px;
  min-height: 22px;
  border-radius: 11px;
  color: #466159;
  background: #edf3f0;
  font-size: 10px;
  font-weight: 700;
}

.requirement-main {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 9px;
}

.requirement-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  color: var(--violet);
  background: var(--violet-soft);
}

.requirement-icon svg {
  width: 14px;
  height: 14px;
}

.source-ref {
  color: var(--blue);
  font-size: 10px;
}

.mandatory-mark {
  margin-left: 5px;
  color: var(--red);
  font-size: 9px;
  font-weight: 740;
}

.analysis-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.5fr);
  gap: 16px;
  margin-bottom: 16px;
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.summary-cell {
  min-width: 0;
  padding: 15px 16px;
  border-right: 1px solid var(--line);
}

.summary-cell:last-child {
  border-right: 0;
}

.summary-cell span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.summary-cell strong {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: var(--ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.decision-band {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #b9daca;
  border-radius: 7px;
  background: var(--accent-soft);
}

.decision-band .decision-score {
  font-size: 25px;
  font-weight: 770;
}

.decision-band strong {
  display: block;
  color: #10583f;
  font-size: 12px;
}

.decision-band span {
  display: block;
  margin-top: 2px;
  color: #4e7667;
  font-size: 10px;
}

.document-stale-band {
  flex-wrap: wrap;
}

.document-stale-band > div:nth-child(2) {
  flex: 1;
  min-width: 180px;
}

.document-stale-band .btn {
  margin-left: auto;
}

.upload-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
}

.project-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

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

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 650;
}

.field small {
  color: var(--muted);
  font-size: 9px;
}

.upload-lanes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.upload-lane {
  position: relative;
  min-height: 176px;
  padding: 18px 14px;
  border: 1px dashed #b9c6c0;
  border-radius: 7px;
  background: #fafcfb;
  cursor: pointer;
  text-align: center;
  transition: border-color 140ms ease, background 140ms ease;
}

.upload-lane:hover,
.upload-lane.dragging {
  border-color: var(--accent);
  background: #f3faf6;
}

.upload-lane input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.upload-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin: 2px auto 11px;
  place-items: center;
  border-radius: 6px;
  color: var(--accent);
  background: var(--accent-soft);
}

.upload-lane.company .upload-icon {
  color: var(--blue);
  background: var(--blue-soft);
}

.upload-lane.qualification .upload-icon {
  color: var(--violet);
  background: var(--violet-soft);
}

.upload-lane h3 {
  margin: 0;
  font-size: 12px;
}

.upload-lane p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.upload-lane .file-count {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 690;
}

.upload-file-preview {
  margin: 0 18px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.file-row.compact {
  padding: 10px 12px;
}

.file-type {
  display: grid;
  width: 30px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #cfd8d4;
  border-radius: 4px;
  color: var(--blue);
  background: #ffffff;
  font-size: 8px;
  font-weight: 780;
}

.parse-panel {
  position: sticky;
  top: calc(var(--topbar-height) + 24px);
  align-self: start;
}

.parse-readiness {
  padding: 18px;
}

.readiness-score {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.readiness-score strong {
  font-size: 30px;
  line-height: 1;
}

.readiness-score span {
  color: var(--muted);
  font-size: 11px;
}

.readiness-list {
  display: grid;
  gap: 9px;
  margin: 16px 0;
}

.readiness-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 11px;
}

.readiness-item svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.readiness-item.pending svg {
  color: var(--amber);
}

.parse-steps {
  display: grid;
  gap: 0;
  margin-top: 15px;
  border-top: 1px solid var(--line);
}

.parse-step {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.parse-step-index {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  background: #ffffff;
  font-size: 9px;
}

.parse-step.active {
  color: var(--ink);
}

.parse-step.active .parse-step-index {
  border-color: var(--accent);
  color: #ffffff;
  background: var(--accent);
}

.parse-step.done .parse-step-index {
  border-color: #86bda7;
  color: var(--accent);
  background: var(--accent-soft);
}

.analyzing-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 23, 20, 0.54);
  backdrop-filter: blur(4px);
}

.analyzing-box {
  width: min(520px, 100%);
  padding: 28px;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.analyzing-head {
  display: flex;
  align-items: center;
  gap: 13px;
}

.pulse-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 6px;
  color: var(--accent);
  background: var(--accent-soft);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 115, 84, 0.1); }
  50% { box-shadow: 0 0 0 10px rgba(22, 115, 84, 0.08); }
}

.analyzing-head h2 {
  margin: 0;
  font-size: 16px;
}

.analyzing-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.analysis-progress {
  height: 7px;
  margin: 22px 0 9px;
  overflow: hidden;
  border-radius: 4px;
  background: #e8ecea;
}

.analysis-progress div {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
  transition: width 300ms ease;
}

.analysis-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}

.editor-layout {
  display: grid;
  min-height: calc(100vh - 188px);
  grid-template-columns: 248px minmax(520px, 1fr) 280px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.doc-tree,
.review-rail {
  min-width: 0;
  background: #f8f9f8;
}

.doc-tree {
  border-right: 1px solid var(--line);
}

.review-rail {
  border-left: 1px solid var(--line);
}

.tree-head,
.review-head {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.tree-head h3,
.review-head h3 {
  margin: 0;
  font-size: 12px;
}

.doc-tree-scroll,
.review-scroll {
  max-height: calc(100vh - 240px);
  overflow-y: auto;
}

.tree-group {
  padding: 12px 9px 6px;
}

.tree-group-title {
  padding: 0 8px 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
  text-transform: uppercase;
}

.tree-item {
  display: grid;
  width: 100%;
  min-height: 39px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 0;
  border-radius: 5px;
  color: var(--ink-2);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.tree-item:hover {
  background: #eef2f0;
}

.tree-item.active {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.tree-item-title {
  overflow: hidden;
  font-size: 11px;
  font-weight: 610;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-item-meta {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
}

.doc-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.doc-status-dot.review {
  background: var(--amber);
}

.doc-status-dot.gap {
  background: var(--red);
}

.editor-main {
  min-width: 0;
  background: #e9ecea;
}

.editor-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.format-tools {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 3px;
}

.tool-btn {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: var(--ink-2);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.tool-btn:hover {
  background: var(--surface-strong);
}

.tool-btn svg {
  width: 15px;
  height: 15px;
}

.tool-separator {
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: var(--line);
}

.zoom-control {
  min-width: 58px;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.page-stage {
  max-height: calc(100vh - 240px);
  overflow: auto;
  padding: 28px;
}

.document-page {
  width: min(794px, 100%);
  min-height: 1123px;
  margin: 0 auto;
  padding: 74px 72px 86px;
  outline: none;
  color: #171b19;
  background: #ffffff;
  box-shadow: 0 3px 20px rgba(18, 28, 24, 0.13);
  font-family: "Songti SC", SimSun, serif;
  font-size: 16px;
  line-height: 1.9;
}

.document-page:focus {
  box-shadow: 0 3px 22px rgba(18, 28, 24, 0.16), 0 0 0 2px rgba(22, 115, 84, 0.15);
}

.document-page h1 {
  margin: 120px 0 34px;
  font-size: 30px;
  line-height: 1.45;
  text-align: center;
}

.document-page h2 {
  margin: 0 0 26px;
  font-size: 23px;
  line-height: 1.4;
  text-align: center;
}

.document-page h3 {
  margin: 22px 0 10px;
  font-size: 17px;
}

.document-page p {
  margin: 10px 0;
  text-align: justify;
  text-indent: 2em;
}

.document-page .doc-subtitle {
  margin: 20px 0 150px;
  font-size: 25px;
  font-weight: 720;
  text-align: center;
  text-indent: 0;
}

.document-page .doc-meta {
  margin: 12px auto;
  max-width: 520px;
  text-indent: 0;
}

.document-page table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
  line-height: 1.55;
}

.document-page th,
.document-page td {
  padding: 9px 10px;
  border: 1px solid #313735;
  vertical-align: top;
}

.document-page mark {
  color: #752b27;
  background: #ffe6a8;
  cursor: pointer;
}

.gap-action-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.gap-action {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 9px;
  border: 1px solid #e7c66f;
  border-radius: 5px;
  color: #752b27;
  background: #fff8df;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.gap-action span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gap-action svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.mobile-save-version,
.document-review-toggle {
  display: none;
}

.document-page ol {
  padding-left: 30px;
}

.document-page .doc-break {
  height: 240px;
  border-bottom: 1px dashed #d5dbd7;
}

.review-card {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.review-card h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  font-size: 11px;
}

.review-card h4 svg {
  width: 14px;
  height: 14px;
}

.review-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.review-source {
  margin-top: 8px;
  padding: 8px;
  border-left: 2px solid var(--blue);
  color: var(--ink-2);
  background: var(--blue-soft);
  font-size: 9px;
}

.editor-save-state {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
}

.editor-save-state svg {
  width: 13px;
  height: 13px;
  color: var(--accent);
}

.risk-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
}

.risk-full-row {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr) 120px 130px;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.risk-full-row:last-child {
  border-bottom: 0;
}

.risk-full-main h3 {
  margin: 0;
  font-size: 13px;
}

.risk-full-main p {
  margin: 5px 0;
  color: var(--muted);
  font-size: 10px;
}

.risk-meta {
  color: var(--muted);
  font-size: 9px;
}

.risk-owner,
.risk-action {
  align-self: center;
}

.risk-owner strong {
  display: block;
  font-size: 11px;
}

.risk-owner span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.checklist-progress {
  padding: 18px;
}

.checklist-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.checklist-title strong {
  font-size: 25px;
}

.checklist-title span {
  color: var(--muted);
  font-size: 10px;
}

.check-group {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}

.check-group h4 {
  margin: 0 0 8px;
  font-size: 11px;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 7px 0;
  color: var(--ink-2);
  font-size: 10px;
}

.check-line svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.check-line.pending svg {
  color: var(--amber);
}

.material-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  margin-bottom: 16px;
}

.library-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.library-summary .summary-cell strong {
  font-size: 18px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag {
  min-height: 19px;
  padding: 1px 6px;
  border-radius: 9px;
  color: #53615b;
  background: #eef1ef;
  font-size: 9px;
}

.project-table .progress-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-progress {
  width: 72px;
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: #e6eae8;
}

.mini-progress div {
  height: 100%;
  background: var(--accent);
}

.qualification-grade {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 5px;
  color: #126646;
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 780;
}

.qualification-grade.C {
  color: var(--red);
  background: var(--red-soft);
}

.empty-state {
  display: grid;
  min-height: 300px;
  place-items: center;
  padding: 30px;
  text-align: center;
}

.empty-state-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface-strong);
}

.empty-state h3 {
  margin: 0;
  font-size: 14px;
}

.empty-state p {
  max-width: 360px;
  margin: 6px auto 16px;
  color: var(--muted);
  font-size: 11px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 23, 20, 0.55);
  backdrop-filter: blur(4px);
}

.modal {
  width: min(610px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.modal.wide {
  width: min(850px, 100%);
}

.modal-head {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 16px;
}

.modal-body {
  padding: 20px;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fafbfa;
}

.export-options {
  display: grid;
  gap: 10px;
}

.export-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.export-option:hover {
  border-color: #aebbb5;
  background: #fbfcfb;
}

.export-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.export-option strong {
  display: block;
  font-size: 12px;
}

.export-option span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.export-option svg {
  color: var(--muted);
}

.export-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf9;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 10px;
}

.checkbox-row input {
  accent-color: var(--accent);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(16, 23, 20, 0.35);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  width: min(440px, 100%);
  overflow-y: auto;
  background: #ffffff;
  box-shadow: -12px 0 36px rgba(19, 30, 25, 0.14);
}

.drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.drawer-head h2 {
  margin: 0;
  font-size: 15px;
}

.drawer-body {
  padding: 20px;
}

.detail-block {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.detail-block:first-child {
  padding-top: 0;
}

.detail-block h3 {
  margin: 0 0 8px;
  font-size: 11px;
}

.detail-block p {
  margin: 0;
  color: var(--ink-2);
  font-size: 11px;
}

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

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.detail-item strong {
  display: block;
  margin-top: 3px;
  font-size: 11px;
}

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 150;
  display: grid;
  width: min(360px, calc(100vw - 40px));
  gap: 8px;
}

.toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  animation: toast-in 180ms ease-out;
}

.toast.error {
  border-left-color: var(--red);
}

.toast.warning {
  border-left-color: var(--amber);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.toast.error svg {
  color: var(--red);
}

.toast-title {
  font-size: 11px;
  font-weight: 680;
}

.toast-message {
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
}

.toast-close {
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.muted {
  color: var(--muted);
}

.text-red {
  color: var(--red);
}

.text-amber {
  color: var(--amber);
}

.text-green {
  color: var(--accent);
}

.text-blue {
  color: var(--blue);
}

.font-medium {
  font-weight: 650;
}

.nowrap {
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

.spin {
  animation: spin 900ms linear infinite;
}

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

@media (max-width: 1260px) {
  .topbar {
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 360px) minmax(230px, 1fr);
    padding: 0 20px;
  }

  .main-content {
    padding-right: 20px;
    padding-left: 20px;
  }

  .editor-layout {
    grid-template-columns: 220px minmax(480px, 1fr);
  }

  .review-rail {
    display: none;
  }

  .document-review-toggle {
    display: inline-grid;
  }

  .analysis-summary {
    grid-template-columns: 1fr;
  }

  .upload-lanes {
    grid-template-columns: 1fr;
  }

  .upload-lane {
    min-height: 130px;
  }
}

@media (max-width: 1024px) {
  :root {
    --sidebar-width: 0px;
  }

  .sidebar {
    width: 236px;
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .sidebar-open .sidebar {
    transform: translateX(0);
  }

  .mobile-scrim {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: none;
    background: rgba(16, 23, 20, 0.42);
  }

  .sidebar-open .mobile-scrim {
    display: block;
  }

  .mobile-menu {
    display: inline-grid;
  }

  .icon-btn.mobile-menu {
    display: inline-grid;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 380px) auto;
  }

  .topbar .hide-tablet {
    display: none;
  }

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

  .stat-item:nth-child(3) {
    border-right: 0;
  }

  .stat-item:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

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

  .upload-workspace,
  .risk-page-grid {
    grid-template-columns: 1fr;
  }

  .parse-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: 56px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0 12px;
  }

  .topbar .search-box,
  .topbar .topbar-status,
  .topbar .desktop-action {
    display: none;
  }

  .topbar .mobile-save-version {
    display: inline-grid;
  }

  .main-content {
    padding: 16px 12px 78px;
  }

  .page-head {
    display: grid;
    gap: 13px;
    margin-bottom: 16px;
  }

  .page-title {
    font-size: 21px;
  }

  .page-actions {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .page-actions .btn {
    flex: 0 0 auto;
  }

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

  .stat-item,
  .stat-item:nth-child(3) {
    border-right: 1px solid var(--line);
    border-top: 1px solid var(--line);
  }

  .stat-item:nth-child(1),
  .stat-item:nth-child(2) {
    border-top: 0;
  }

  .stat-item:nth-child(even) {
    border-right: 0;
  }

  .stat-item:last-child {
    grid-column: 1 / -1;
    border-right: 0;
  }

  .stat-value {
    font-size: 20px;
  }

  .project-summary-top {
    padding: 16px;
  }

  .project-summary h2 {
    font-size: 16px;
  }

  .score-dial {
    width: 64px;
    height: 64px;
  }

  .deadline-grid {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }

  .deadline-item,
  .deadline-item + .deadline-item {
    padding: 13px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .deadline-item:last-child {
    border-bottom: 0;
  }

  .workflow-progress {
    padding-right: 16px;
    padding-left: 16px;
  }

  .stage {
    font-size: 8px;
  }

  .dashboard-rail {
    grid-template-columns: 1fr;
  }

  .ring-metric {
    grid-template-columns: 98px 1fr;
  }

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

  .summary-cell:nth-child(2) {
    border-right: 0;
  }

  .summary-cell:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .project-form {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .field.full {
    grid-column: auto;
  }

  .upload-lanes {
    padding: 14px;
  }

  .upload-file-preview {
    margin: 0 14px 14px;
  }

  .toolbar-row {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-group {
    overflow-x: auto;
  }

  .editor-layout {
    display: block;
    min-height: 0;
    overflow: visible;
  }

  .doc-tree {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .doc-tree-scroll {
    display: flex;
    max-height: none;
    overflow-x: auto;
    padding: 8px;
  }

  .tree-group {
    display: contents;
  }

  .tree-group-title {
    display: none;
  }

  .tree-item {
    width: 154px;
    min-width: 154px;
    margin-right: 6px;
  }

  .tree-head {
    display: none;
  }

  .editor-toolbar {
    position: static;
    display: block;
    overflow-x: auto;
    padding: 7px 8px;
  }

  .format-tools {
    min-width: max-content;
  }

  .editor-toolbar > .inline {
    display: flex;
    width: max-content;
    min-width: 100%;
    justify-content: flex-end;
    margin-top: 8px;
  }

  .editor-toolbar .editor-save-state,
  .editor-toolbar .zoom-control {
    display: none;
  }

  .page-stage {
    max-height: none;
    padding: 12px;
  }

  .document-page {
    min-height: 760px;
    padding: 44px 28px 60px;
    font-size: 14px;
  }

  .document-page h1 {
    margin-top: 70px;
    font-size: 22px;
  }

  .document-page h2 {
    font-size: 19px;
  }

  .risk-full-row {
    grid-template-columns: 5px minmax(0, 1fr);
  }

  .risk-owner,
  .risk-action {
    grid-column: 2;
  }

  .risk-action .btn {
    width: 100%;
  }

  .material-head {
    grid-template-columns: 1fr;
  }

  .export-checks,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .modal-foot {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .modal-foot .btn {
    width: 100%;
  }

  .document-stale-band .btn {
    width: 100%;
    margin-left: 0;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: inline-flex;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .sidebar,
  .topbar,
  .page-head,
  .doc-tree,
  .review-rail,
  .editor-toolbar,
  .toast-stack {
    display: none !important;
  }

  .work-area,
  .main-content,
  .editor-layout,
  .editor-main,
  .page-stage {
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: visible;
    background: #ffffff;
    box-shadow: none;
  }

  .document-page {
    width: 210mm;
    min-height: 297mm;
    padding: 22mm 20mm 24mm;
    box-shadow: none;
  }
}
