:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --ink: #0b0c0c;
  --muted: #505a5f;
  --line: #b1b4b6;
  --brand: #0d5c63;
  --brand-light: #e6f3f4;
  --accent: #e07a5f;
  --source: #1d70b8;
  --source-bg: #e8f1f8;
  --target: #00703c;
  --target-bg: #cce2d8;
  /* The two systems: warm grey for the old one, teal for the new one. */
  --old: #5f5e5a;
  --old-ink: #444441;
  --old-bg: #f1efe8;
  --new: #0d5c63;
  --new-ink: #0a4a50;
  --new-bg: #e6f3f4;
  --warn: #594d00;
  --danger: #d4351c;
  --shadow: none;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
}

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

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: rgba(255,255,255,0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
}

.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 0;
  background: linear-gradient(135deg, var(--brand), #1a8a94);
  color: white;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
}

.app-main {
  flex: 1;
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border-radius: 0;
  font-weight: 600;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary { background: var(--brand); color: white; }
.btn-secondary { background: white; border: 1px solid var(--line); color: var(--ink); }
.btn-danger { background: #fbe5e1; color: var(--danger); border: 1px solid #e6a294; }
.btn-ghost { background: transparent; color: var(--brand); border: 1px solid rgba(13,92,99,0.25); }
.btn-sm { padding: 0.4rem 0.7rem; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.card + .card { margin-top: 1rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
/* The grid gap already spaces its cards; the general .card + .card margin would push the second one down. */
.grid-2 > .card + .card { margin-top: 0; }

.field { margin-bottom: 0.85rem; }
.field label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.3rem; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0;
  font: inherit;
  font-size: 0.9rem;
}
.field textarea { min-height: 80px; resize: vertical; }

.auth-page {
  max-width: 420px;
  margin: 3rem auto;
}

.auth-page h1 { font-size: 1.6rem; margin-bottom: 0.35rem; }
.auth-page p { color: var(--muted); margin-bottom: 1.25rem; font-size: 0.92rem; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.page-head h1 { font-size: 1.5rem; letter-spacing: -0.02em; }
.page-head p { color: var(--muted); font-size: 0.92rem; margin-top: 0.25rem; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.project-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 1.1rem;
  transition: border-color 0.15s, transform 0.15s;
  cursor: pointer;
}
.project-card:hover { border-color: var(--brand); transform: translateY(-2px); }

.project-card h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.project-meta { font-size: 0.82rem; color: var(--muted); }
.status-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 0;
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 0.5rem;
}
.status-active { background: #d2e2f1; color: #1d70b8; }
.status-mapping { background: #fff7bf; color: #594d00; }
.status-closed { background: #f3f2f1; color: #505a5f; }

.steps-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.step-chip {
  padding: 0.35rem 0.7rem;
  border-radius: 0;
  font-size: 0.78rem;
  font-weight: 600;
  background: white;
  border: 1px solid var(--line);
  color: var(--muted);
}
.step-chip.active { background: var(--brand-light); border-color: rgba(13,92,99,0.3); color: var(--brand); }
.step-chip.done { background: #cce2d8; border-color: #85b49b; color: var(--target); }

.upload-zone {
  border: 2px dashed var(--line);
  border-radius: 0;
  padding: 2rem;
  text-align: center;
  background: #f3f2f1;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--brand);
  background: var(--brand-light);
}
.upload-zone input { display: none; }

.schema-preview {
  margin-top: 1rem;
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0;
}
.schema-preview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.schema-preview th, .schema-preview td {
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.schema-preview th { background: #f3f2f1; font-weight: 600; }
.schema-preview td:nth-child(4),
.schema-preview td:nth-child(5) {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 0.75rem;
  max-width: 11rem;
}

.schema-examples-card {
  margin-top: 1.25rem;
  padding: 0;
  overflow: hidden;
}
.schema-examples-card summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem 1.25rem;
  background: #f3f2f1;
  border-bottom: 1px solid transparent;
}
.schema-examples-card[open] summary {
  border-bottom-color: var(--line);
}
.schema-examples-card summary::-webkit-details-marker { display: none; }
.schema-examples-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
}
.schema-examples-title {
  font-size: 0.95rem;
  font-weight: 600;
}
.schema-examples-title::before {
  content: '▸';
  display: inline-block;
  margin-right: 0.4rem;
  color: var(--muted);
  transition: transform 0.15s ease;
}
.schema-examples-card[open] .schema-examples-title::before {
  transform: rotate(90deg);
}
.schema-examples-meta {
  font-size: 0.82rem;
  color: var(--muted);
}
.schema-examples-body {
  padding: 1.25rem;
}
.schema-examples-lede {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 1rem;
  max-width: 52rem;
  line-height: 1.5;
}
.schema-examples-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.schema-example-block h4 {
  font-size: 0.88rem;
  margin: 0 0 0.5rem;
}
.schema-example-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 0.45rem;
}
.schema-example-code {
  margin: 0;
  padding: 0.85rem;
  background: #0b0c0c;
  color: #b1b4b6;
  border-radius: 0;
  font-family: ui-monospace, Menlo, Consolas, "Courier New", monospace;
  font-size: 0.68rem;
  line-height: 1.45;
  overflow-x: auto;
  white-space: pre;
}
.schema-example-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}
.schema-example-pairs h4 {
  font-size: 0.88rem;
  margin: 0 0 0.65rem;
}
.schema-pairs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
}
.schema-pairs-table th,
.schema-pairs-table td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.schema-pairs-table th {
  background: #f3f2f1;
  font-size: 0.72rem;
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.schema-pairs-table tr:last-child td { border-bottom: none; }
@media (max-width: 768px) {
  .schema-examples-grid { grid-template-columns: 1fr; }
}

/* Mapping workspace */
.workspace {
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: 0;
  height: calc(100vh - 140px);
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  background: white;
}

.panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel-source { background: #fff; border-right: 1px solid var(--line); }
.panel-target { background: #fff; border-left: 1px solid var(--line); }

.panel-header {
  padding: 0.75rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.06em;
  background: rgba(255,255,255,0.5);
}

.panel-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.table-group {
  margin-bottom: 0.65rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
}
.table-group summary {
  padding: 0.45rem 0.55rem;
  font-family: ui-monospace, Menlo, Consolas, "Courier New", monospace;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
}
.table-group summary::-webkit-details-marker { display: none; }

.col-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  font-family: ui-monospace, Menlo, Consolas, "Courier New", monospace;
  font-size: 0.68rem;
  border-top: 1px solid #f3f2f1;
  position: relative;
}
.col-main { flex: 1; min-width: 0; }
.col-name-row { display: flex; align-items: center; justify-content: space-between; gap: 0.35rem; }
.col-name { font-weight: 600; }
.col-desc {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 0.62rem;
  color: var(--ink);
  line-height: 1.35;
  margin-top: 0.2rem;
}
.col-desc-missing { color: var(--muted); font-style: italic; }
.col-values {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 0.6rem;
  margin-top: 0.2rem;
  line-height: 1.35;
}
.col-values-label { color: var(--muted); font-weight: 600; }
.col-values-missing { color: var(--muted); font-style: italic; }
.value-chip {
  display: inline-block;
  padding: 0.08rem 0.35rem;
  border-radius: 0;
  background: #f3f2f1;
  border: 1px solid var(--line);
  font-family: ui-monospace, Menlo, Consolas, "Courier New", monospace;
  font-size: 0.58rem;
  color: var(--ink);
}
.col-item.value-mismatch {
  background: #fff7bf;
  border-left: 2px solid var(--warn);
}
.col-values-warn {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 0.58rem;
  color: #594d00;
  font-weight: 600;
  margin-top: 0.2rem;
}
.col-item.mapped { background: rgba(37, 99, 235, 0.06); }
.col-item.mapped.value-mismatch { background: #fff7bf; }
.col-item.unmapped { color: var(--warn); }
.col-type { font-size: 0.6rem; color: var(--muted); margin-left: 0.35rem; font-weight: 400; }

.col-def-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.col-def-card {
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #f3f2f1;
}
.col-def-source { border-top: 4px solid var(--old); }
.col-def-target { border-top: 4px solid var(--new); }
.col-def-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.col-def-name {
  font-family: ui-monospace, Menlo, Consolas, "Courier New", monospace;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.col-def-text {
  font-size: 0.82rem;
  line-height: 1.45;
  margin: 0 0 0.5rem;
  color: var(--ink);
}
.col-def-values { font-size: 0.78rem; }
.col-def-missing { color: var(--muted); font-style: italic; font-size: 0.78rem; }
.col-def-empty { font-size: 0.82rem; color: var(--muted); margin: 0; }
.col-def-alert { margin-top: 0.75rem; font-size: 0.82rem; }
@media (max-width: 520px) {
  .col-def-grid { grid-template-columns: 1fr; }
}

.handle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: white;
  cursor: crosshair;
  flex-shrink: 0;
  transition: transform 0.12s, border-color 0.12s, background 0.12s;
}
.handle.source { border-color: var(--old); }
.handle.target { border-color: var(--new); }
.handle.active { background: var(--accent); border-color: var(--accent); transform: scale(1.2); }
.handle:hover { transform: scale(1.15); }

.canvas-wrap {
  position: relative;
  background: #fbfcfd;
  overflow: hidden;
}
.canvas-wrap svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.mapping-line {
  fill: none;
  stroke-width: 2.5;
  pointer-events: stroke;
  cursor: pointer;
}
.mapping-line.selected { stroke-width: 3.5; filter: drop-shadow(0 0 4px rgba(224,122,95,0.5)); }
.mapping-line.temp { stroke: var(--accent); stroke-dasharray: 6 4; opacity: 0.7; }

.canvas-toolbar {
  position: absolute;
  top: 0.65rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  z-index: 5;
  box-shadow: none;
}

.workspace-footer {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--line);
  background: #f3f2f1;
  font-size: 0.8rem;
  color: var(--muted);
}

.progress-bar {
  width: 140px;
  height: 6px;
  background: var(--line);
  border-radius: 0;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #1a8a94);
  border-radius: 0;
  transition: width 0.3s;
}

.drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: min(400px, 100vw);
  height: 100vh;
  background: white;
  border-left: 1px solid var(--line);
  box-shadow: none;
  z-index: 60;
  transition: right 0.25s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.drawer.open { right: 0; }
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.25);
  z-index: 55;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.drawer-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: #f3f2f1;
  flex-shrink: 0;
}
.drawer-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.drawer-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.drawer-col-ref {
  font-family: ui-monospace, Menlo, Consolas, "Courier New", monospace;
  font-size: 0.75rem;
  line-height: 1.45;
  word-break: break-word;
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1.25rem 1rem;
}
.drawer-footer {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--line);
  background: #f3f2f1;
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.drawer-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}
.drawer-meta-row .field { margin-bottom: 0; }
.drawer-meta-row .field label {
  font-size: 0.72rem;
  color: var(--muted);
}
.drawer-section {
  border: 1px solid var(--line);
  border-radius: 0;
  margin-bottom: 0.65rem;
  overflow: hidden;
  background: white;
}
.drawer-section summary {
  padding: 0.65rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  background: #f3f2f1;
  border-bottom: 1px solid transparent;
}
.drawer-section[open] summary {
  border-bottom-color: var(--line);
}
.drawer-section summary::-webkit-details-marker { display: none; }
.drawer-section-body {
  padding: 0.75rem;
}
.drawer-section-body .field:last-child { margin-bottom: 0; }
.drawer-section-body .field label {
  font-size: 0.75rem;
}
.drawer-section-body textarea {
  min-height: 64px;
}
.history-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.history-timeline li {
  position: relative;
  padding: 0 0 0.85rem 0.85rem;
  margin-left: 0.35rem;
  border-left: 2px solid var(--line);
  font-size: 0.78rem;
}
.history-timeline li:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}
.history-timeline .hist-status {
  font-weight: 600;
  font-size: 0.78rem;
}
.history-timeline .hist-note {
  color: var(--ink);
  margin: 0.15rem 0;
  font-size: 0.76rem;
}
.history-timeline .hist-meta {
  color: var(--muted);
  font-size: 0.7rem;
}
.history-timeline li.hist-revert {
  border-left-color: #fdba74;
  background: #fff7bf;
  margin-left: 0;
  padding: 0.5rem 0.65rem 0.5rem 0.85rem;
  border-radius: 0;
  margin-bottom: 0.35rem;
}
.history-timeline li.hist-revert .hist-status {
  color: #594d00;
}
.drawer-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0.15rem;
  flex-shrink: 0;
}
.drawer-close:hover { color: var(--ink); }
.drawer-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.5rem;
  line-height: 1.4;
}

.invite-list { list-style: none; }
.invite-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  background: var(--ink);
  color: white;
  padding: 0.7rem 1rem;
  border-radius: 0;
  font-size: 0.85rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateY(0); }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 0;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}
.alert-info { background: var(--brand-light); color: var(--brand); }
.alert-warn { background: #fff7bf; color: #594d00; }
.alert-success { background: #cce2d8; color: #00703c; }

    .status-signed_off { background: #cce2d8; color: #00703c; }

.verification-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.verify-page-head { margin-bottom: 1rem; }
.verify-lede { max-width: 42rem; }
.verify-workspace {
  padding: 0;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.verify-toolbar {
  padding: 1rem 1.25rem;
  background: #f3f2f1;
  border-bottom: 1px solid var(--line);
}
.verify-toolbar-block { min-width: 0; }
.verify-toolbar-block + .verify-toolbar-block { margin-top: 0.85rem; }
.verify-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: flex-start;
}
.verify-toolbar-areas { flex: 1 1 14rem; }
.verify-toolbar-show { flex: 0 0 auto; }
.verify-toolbar-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.45rem;
}
.verify-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.verify-pill-warn:not(.active) { border-color: #e6a294; color: #d4351c; }
.verification-pill:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.verify-table-wrap { overflow-x: auto; }
.verify-empty { padding: 2.5rem 1.5rem; }
.verify-empty-hint {
  font-size: 0.85rem;
  margin-top: 0.5rem;
  color: var(--muted);
}
.col-mapping-code {
  font-size: 0.75rem;
  font-family: var(--mono, 'JetBrains Mono', monospace);
}
.verification-table .col-status {
  width: 6.5rem;
  white-space: nowrap;
}
.verification-table .col-service-area {
  width: 7.5rem;
}
.trace-pipeline-compact {
  min-width: 12rem;
}
.trace-pipeline-compact .trace-node {
  min-width: 1.5rem;
  max-width: 2rem;
}
.trace-pipeline-compact .trace-node-btn:hover {
  background: rgba(13, 92, 99, 0.08);
}
.verification-pill {
  padding: 0.35rem 0.65rem;
  border-radius: 0;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: white;
  cursor: pointer;
}
.verification-pill.active { outline: 2px solid var(--brand); }
.verification-pill .count { opacity: 0.7; margin-left: 0.25rem; }

.verification-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
}
.verification-table th,
.verification-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.verification-table th {
  background: #f3f2f1;
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.verification-table tr:last-child td { border-bottom: none; }
.verification-table tr { cursor: pointer; }
.verification-table tr:hover { background: #f3f2f1; }

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 0;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.phase-bar {
  display: flex;
  gap: 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}
.phase-step {
  flex: 1 1 0;
  min-width: 3.75rem;
  text-align: center;
  padding: 0.45rem 0.25rem;
  border-radius: 0;
  background: #f3f2f1;
  color: var(--muted);
  line-height: 1.2;
}
.phase-step-label {
  display: block;
  font-size: 0.62rem;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.phase-step-btn {
  border: 1px solid var(--line);
  cursor: pointer;
  font: inherit;
  font-size: inherit;
  font-weight: 600;
  transition: background 0.12s, border-color 0.12s;
}
.phase-step-btn:hover { background: var(--brand-light); border-color: rgba(13,92,99,0.3); }
.phase-step.current { background: var(--brand-light); color: var(--brand); border-color: rgba(13,92,99,0.35); }
.phase-count {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 0.15rem;
}
.phase-step.current .phase-count { color: var(--brand); }

.verification-table tr { cursor: default; }
.verification-table tr:hover { background: #f3f2f1; }
.verification-table tr.row-live {
  background: #cce2d8;
  border-left: 3px solid #00703c;
}
.verification-table tr.row-live td:first-child {
  padding-left: calc(0.75rem - 3px);
}
.verification-table tr.row-live:hover { background: #cce2d8; }
.verification-table tr.row-live.row-live-failed {
  background: #fbe5e1;
  border-left-color: #d4351c;
}
.verification-table tr.row-live.row-live-failed:hover { background: #f6d7d2; }
.verify-workspace .verification-table {
  border: none;
  border-radius: 0;
}
.verification-table .col-mapping,
.verification-table .col-status { cursor: pointer; }
.verification-table .col-mapping:hover { background: #f3f2f1; }
.verification-table tr.row-live .col-mapping:hover { background: #85b49b; }
.verification-table tr.row-live.row-live-failed .col-mapping:hover { background: #e6a294; }

.verification-table .col-trace {
  min-width: 28rem;
  max-width: 36rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  overflow-x: auto;
}
.verification-table tr.row-done {
  background: #e6f1ec;
  border-left: 3px solid #0d5c63;
}
.verification-table tr.row-done td:first-child {
  padding-left: calc(0.75rem - 3px);
}

/* Horizontal trace pipeline (table) */
.trace-pipeline {
  display: flex;
  align-items: flex-start;
  gap: 0;
  min-width: max-content;
}
.trace-connector {
  flex: 0 0 0.4rem;
  height: 2px;
  background: #b1b4b6;
  margin-top: 0.65rem;
  border-radius: 0;
}
.trace-connector.done { background: #34d399; }
.trace-node {
  flex: 1 1 0;
  min-width: 3.5rem;
  max-width: 4.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-align: center;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
}
.trace-node-btn {
  cursor: pointer;
  border-radius: 0;
  transition: background 0.12s, transform 0.12s;
}
.trace-node-btn:hover { background: #cce2d8; }
.trace-node-btn:active { transform: scale(0.97); }
.trace-node-marker {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 2px solid #b1b4b6;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.trace-node.done .trace-node-marker {
  background: #00703c;
  border-color: #00703c;
}
.trace-node.failed .trace-node-marker {
  background: #d4351c;
  border-color: #d4351c;
}
.trace-node.next .trace-node-marker {
  background: white;
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
  animation: trace-pulse 2s ease-in-out infinite;
}
.trace-node.pending .trace-node-marker {
  background: #f3f2f1;
}
@keyframes trace-pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--brand-light); }
  50% { box-shadow: none; }
}
.trace-node-text {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  width: 100%;
}
.trace-action {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}
.trace-node.pending .trace-action { color: var(--muted); }
.trace-person {
  font-size: 0.6rem;
  font-weight: 500;
  color: #00703c;
  line-height: 1.15;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
}
.trace-node.pending .trace-person {
  color: #626a6e;
  font-style: italic;
  font-weight: 400;
}
.trace-node.next .trace-person {
  color: var(--brand);
  font-weight: 600;
  font-style: normal;
}
.trace-node.failed .trace-person { color: #d4351c; }

/* Vertical trace timeline (drawer) */
.trace-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.trace-timeline-item {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 0.65rem;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  text-align: left;
  width: 100%;
}
.trace-timeline-btn {
  cursor: pointer;
  border-radius: 0;
  padding: 0.25rem;
  margin: -0.25rem;
  transition: background 0.12s;
}
.trace-timeline-btn:hover { background: #cce2d8; }
.trace-timeline-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.trace-timeline-marker {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: 2px solid #b1b4b6;
  background: #f3f2f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.trace-timeline-item.done .trace-timeline-marker {
  background: #00703c;
  border-color: #00703c;
}
.trace-timeline-item.failed .trace-timeline-marker {
  background: #d4351c;
  border-color: #d4351c;
}
.trace-timeline-item.next .trace-timeline-marker {
  background: white;
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}
.trace-timeline-line {
  flex: 1;
  width: 2px;
  min-height: 1.25rem;
  background: #b1b4b6;
  margin: 0.2rem 0;
}
.trace-timeline-item.done .trace-timeline-line,
.trace-timeline-item.failed .trace-timeline-line { background: #85b49b; }
.trace-timeline-content {
  padding-bottom: 0.85rem;
}
.trace-timeline-item:last-child .trace-timeline-content { padding-bottom: 0; }
.trace-timeline-content .trace-action {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.trace-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
  font-size: 0.75rem;
}
.trace-person-name {
  font-weight: 600;
  color: var(--ink);
}
.trace-date {
  color: var(--muted);
}
.trace-meta-pending {
  color: #626a6e;
  font-style: italic;
}
.trace-meta-next {
  color: var(--brand);
  font-weight: 500;
  font-style: normal;
}
.trace-node-btn.revert:hover { background: #fdf0e6; }
.trace-node.revert.done .trace-node-marker,
.trace-node.revert.failed .trace-node-marker {
  cursor: pointer;
}
.trace-node.revert:hover .trace-node-marker {
  box-shadow: none;
}
.trace-timeline-btn.revert:hover { background: #fdf0e6; }
.trace-meta-revert {
  color: #594d00;
  font-size: 0.68rem;
  font-weight: 500;
  font-style: normal;
}

.status-select {
  width: 100%;
  min-width: 130px;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  background: white;
  cursor: pointer;
}
.status-select:focus {
  outline: 2px solid var(--brand-light);
  border-color: var(--brand);
}

.parties-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.party-block {
  padding: 0.75rem;
  background: #f3f2f1;
  border: 1px solid var(--line);
  border-radius: 0;
}
@media (max-width: 900px) {
  .parties-grid { grid-template-columns: 1fr; }
  .workspace { grid-template-columns: 1fr; height: auto; }
  .canvas-wrap { min-height: 200px; order: -1; }
  .grid-2 { grid-template-columns: 1fr; }
}

.team-card { margin-bottom: 1rem; }
.project-setup-card {
  margin-bottom: 1rem;
  padding: 0;
  overflow: hidden;
}
.project-setup-card summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem 1.25rem;
  background: #f3f2f1;
  border-bottom: 1px solid transparent;
}
.project-setup-card[open] summary {
  border-bottom-color: var(--line);
}
.project-setup-card summary::-webkit-details-marker { display: none; }
.setup-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
}
.setup-summary-title {
  font-size: 0.95rem;
  font-weight: 600;
}
.setup-summary-title::before {
  content: '▸';
  display: inline-block;
  margin-right: 0.4rem;
  color: var(--muted);
  transition: transform 0.15s ease;
}
.project-setup-card[open] .setup-summary-title::before {
  transform: rotate(90deg);
}
.setup-summary-meta {
  font-size: 0.82rem;
  color: var(--muted);
}
.project-setup-card .project-setup-grid {
  padding: 1.25rem;
}
.project-setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 768px) {
  .project-setup-grid { grid-template-columns: 1fr; }
}
.team-chip.area-chip { background: #e8f1f8; border-color: #d2e2f1; }
.service-area-select {
  width: 100%;
  min-width: 6.5rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 0;
  font: inherit;
  font-size: 0.78rem;
  background: white;
  cursor: pointer;
}
.verification-table .col-service-area { min-width: 7rem; }
.team-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.team-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: #f3f2f1;
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 0.82rem;
  font-weight: 500;
}
.team-chip-remove {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}
.team-chip-remove:hover { color: var(--ink); }
.team-add-form {
  display: flex;
  gap: 0.5rem;
}
.team-add-form input {
  flex: 1;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 0;
  font: inherit;
  font-size: 0.88rem;
}

.record-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.record-modal {
  background: white;
  border-radius: 0;
  padding: 1.25rem;
  width: min(360px, 100%);
  box-shadow: none;
}
.record-modal h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}
.record-modal-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.85rem;
}
.record-modal-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 200px;
  overflow-y: auto;
}
.record-modal-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0;
  cursor: pointer;
  font-size: 0.88rem;
}
.record-modal-option:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-light);
}
.record-modal-empty {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}
.record-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Traceability dashboard */
.trace-dashboard {
  margin-bottom: 1.25rem;
  padding: 0;
  overflow: hidden;
}
.trace-dashboard summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem 1.25rem;
  background: #f3f2f1;
  border-bottom: 1px solid transparent;
}
.trace-dashboard[open] summary {
  border-bottom-color: var(--line);
}
.trace-dashboard summary::-webkit-details-marker { display: none; }
.dash-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.dash-summary-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  min-width: 0;
}
.dash-summary-title {
  font-size: 0.95rem;
  font-weight: 600;
}
.dash-summary-title::before {
  content: '▸';
  display: inline-block;
  margin-right: 0.4rem;
  color: var(--muted);
  transition: transform 0.15s ease;
}
.trace-dashboard[open] .dash-summary-title::before {
  transform: rotate(90deg);
}
.dash-summary-meta {
  font-size: 0.82rem;
  color: var(--muted);
}
.dash-body {
  padding: 1.25rem;
}
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}
.dash-live {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand);
  text-transform: none;
  letter-spacing: 0.04em;
}
.dash-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: dash-pulse 2s ease-in-out infinite;
}
@keyframes dash-pulse {
  0%, 100% { opacity: 1; box-shadow: none; }
  50% { opacity: 0.85; box-shadow: none; }
}
.dash-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}
.dash-stat {
  padding: 0.75rem;
  background: #f3f2f1;
  border: 1px solid var(--line);
  border-radius: 0;
  text-align: center;
}
.dash-stat-brand { background: var(--brand-light); border-color: rgba(13, 92, 99, 0.2); }
.dash-stat-warn { background: #fbe5e1; border-color: #e6a294; }
.dash-stat-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}
.dash-stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.dash-charts-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
}
.dash-chart-card {
  padding: 1rem;
  background: #f3f2f1;
  border: 1px solid var(--line);
  border-radius: 0;
}
.dash-chart-card h3 { font-size: 0.88rem; margin: 0; }
.dash-chart-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0.2rem 0 0.65rem;
}
.dash-chart-wrap {
  position: relative;
  height: 220px;
  max-height: 220px;
  overflow: hidden;
}
.dash-chart-square { height: 200px; max-height: 200px; }
.dash-chart-main .dash-chart-wrap {
  height: 300px;
  max-height: 300px;
}
.dash-chart-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-height: 100%;
}
.dash-chart-main { grid-row: span 2; align-self: start; }
.dash-chart-wide { grid-column: 1 / -1; }

.dash-action-panel { padding: 1rem 1.25rem; }
.dash-action-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1.5rem;
}
.dash-action-block h3 {
  font-size: 0.88rem;
  margin: 0;
}
.dash-action-block .dash-chart-hint {
  margin-bottom: 0.65rem;
}
.dash-action-empty {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  padding: 0.5rem 0;
}
.dash-backlog-list,
.dash-activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dash-backlog-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}
.dash-backlog-item:last-child { border-bottom: none; }
.dash-backlog-label { font-weight: 500; }
.dash-backlog-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-light);
  padding: 0.15rem 0.45rem;
  border-radius: 0;
  min-width: 1.5rem;
  text-align: center;
}
.dash-activity-list {
  max-height: 220px;
  overflow-y: auto;
}
.dash-activity-item {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  border-radius: 0;
  margin: 0 -0.35rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}
.dash-activity-item:last-child { border-bottom: none; }
.dash-activity-item:hover { background: #f3f2f1; }
.dash-activity-item:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}
.dash-activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.dash-activity-status {
  font-size: 0.78rem;
  font-weight: 600;
}
.dash-activity-time {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}
.dash-activity-col {
  font-family: ui-monospace, Menlo, Consolas, "Courier New", monospace;
  font-size: 0.72rem;
  margin-top: 0.15rem;
}
.dash-activity-meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.1rem;
  line-height: 1.35;
}
@media (max-width: 768px) {
  .dash-action-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .dash-stats { grid-template-columns: repeat(3, 1fr); }
  .dash-charts-grid { grid-template-columns: 1fr; }
  .dash-chart-main { grid-row: span 1; }
  .dash-chart-main .dash-chart-wrap { height: 260px; max-height: 260px; }
}
@media (max-width: 520px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
}

.ai-settings-modal .field label {
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
  display: block;
}

.ai-settings-modal .field input,
.ai-settings-modal .field select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0;
  font-family: inherit;
  font-size: 0.88rem;
}

.ai-settings-modal .field {
  margin-bottom: 0.85rem;
}

.ai-suggest-modal {
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

.suggestions-grid {
  display: grid;
  gap: 0.75rem;
}

.suggestion-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0.85rem;
  transition: border-color 0.2s, background 0.2s;
}

.suggestion-card.suggestion-accepted {
  border-color: var(--target);
  background: var(--target-bg);
}

.suggestion-card.suggestion-rejected {
  opacity: 0.5;
  border-color: var(--line);
}

.suggestion-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.suggestion-mapping {
  flex: 1;
  font-family: ui-monospace, Menlo, Consolas, "Courier New", monospace;
  font-size: 0.82rem;
  font-weight: 500;
}

.suggestion-confidence {
  padding: 0.25rem 0.55rem;
  border-radius: 0;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.suggestion-reason {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.suggestion-translations {
  font-size: 0.8rem;
  margin-bottom: 0.65rem;
}

.suggestion-translations strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
}

.suggestion-translations code {
  display: inline-block;
  margin-right: 0.35rem;
  margin-top: 0.25rem;
}

.suggestion-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}


/* ---------- Reconciliation and readiness report ---------- */

.recon-h2 { font-size: 1.05rem; margin-bottom: 0.85rem; }
.recon-mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.82em; }
.recon-sub { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 0.15rem; }
.recon-warn { color: var(--warn); font-weight: 600; }
.recon-c { text-align: center; }
.recon-r { text-align: right; font-variant-numeric: tabular-nums; }
.recon-bad { color: var(--danger); font-weight: 700; }
.recon-good { color: var(--target); font-weight: 600; }

.recon-demo { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; border-color: rgba(13,92,99,0.3); background: var(--brand-light); }

.recon-pair { border: 1px solid var(--line); border-radius: 0; padding: 1rem; margin-bottom: 0.85rem; }
.recon-pair h3 { font-size: 0.95rem; margin-bottom: 0.75rem; }
.recon-files .field { margin-bottom: 0.4rem; }
.recon-fields summary { cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--brand); padding: 0.35rem 0; }
.recon-privacy { font-size: 0.82rem; color: var(--muted); margin: 0.5rem 0 1rem; max-width: 70ch; }
.recon-error { background: #fbe5e1; border: 1px solid #e6a294; color: var(--danger); border-radius: 0; padding: 0.6rem 0.8rem; font-size: 0.88rem; margin-bottom: 0.85rem; }

.recon-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin: 0.5rem 0 1rem; }
.recon-table th { text-align: left; font-size: 0.74rem; text-transform: none; letter-spacing: 0.03em; color: var(--muted); font-weight: 600; padding: 0.45rem 0.6rem; border-bottom: 2px solid var(--line); vertical-align: bottom; }
.recon-table th.recon-r { text-align: right; }
.recon-table th.recon-c { text-align: center; }
.recon-table td { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }

.recon-run { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.recon-run:last-child { border-bottom: none; }
.recon-run-right { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }

.recon-chip { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 0; white-space: nowrap; }
.recon-high { background: #f6d7d2; color: #942514; }
.recon-medium { background: #fff7bf; color: #594d00; }
.recon-low { background: #b1b4b6; color: #0b0c0c; }
.recon-ok { background: #cce2d8; color: #005a30; }

.recon-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }

.recon-report { background: var(--surface); border: 1px solid var(--line); border-radius: 0; padding: 2rem 2.25rem; box-shadow: var(--shadow); }
.recon-report section { margin-top: 1.75rem; }
.recon-report h2 { font-size: 1.1rem; margin-bottom: 0.6rem; padding-bottom: 0.35rem; border-bottom: 1px solid var(--line); }
.recon-report h3 { font-size: 0.95rem; margin: 1rem 0 0.25rem; }
.recon-report h4 { font-size: 0.85rem; margin: 0.75rem 0 0.25rem; }
.recon-report-head h1 { font-size: 1.6rem; line-height: 1.2; margin: 0.15rem 0 0.4rem; }
.recon-eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: none; color: var(--brand); }
.recon-meta { font-size: 0.85rem; color: var(--muted); }

.recon-banner { border-radius: 0; padding: 0.85rem 1rem; font-weight: 700; font-size: 1rem; }
.recon-banner span { display: block; font-weight: 400; font-size: 0.82rem; margin-top: 0.2rem; }
.recon-banner-high { background: #fbe5e1; border: 1px solid #e6a294; color: #942514; }
.recon-banner-medium { background: #fff7bf; border: 1px solid #e8ce45; color: #594d00; }
.recon-banner-ok { background: #cce2d8; border: 1px solid #85b49b; color: #005a30; }

.recon-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.75rem; margin-top: 0.85rem; }
.recon-tile { border: 1px solid var(--line); border-radius: 0; padding: 0.75rem 0.85rem; }
.recon-tile b { display: block; font-size: 1.35rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.recon-tile span { font-size: 0.76rem; color: var(--muted); }

.recon-ref { font-weight: 700; white-space: nowrap; }
.recon-examples { width: 100%; border-collapse: collapse; margin-top: 0.4rem; font-size: 0.78rem; background: var(--bg); border-radius: 0; }
.recon-examples th, .recon-examples td { padding: 0.25rem 0.5rem; text-align: left; border: none; }
.recon-examples th { font-size: 0.68rem; text-transform: none; color: var(--muted); border: none; }

.recon-change { margin-top: 0.6rem; }
.recon-change ul, .recon-method { margin: 0.25rem 0 0.5rem 1.2rem; font-size: 0.85rem; }
.recon-change li, .recon-method li { margin-bottom: 0.25rem; }
.recon-change-new h4 { color: var(--danger); }
.recon-change-open h4 { color: var(--warn); }
.recon-change-fixed h4 { color: var(--target); }

.recon-block { margin-bottom: 1.25rem; }
.recon-review-form { display: flex; gap: 0.6rem; align-items: flex-end; flex-wrap: wrap; margin-top: 0.5rem; }
.recon-review-form .field { flex: 1; min-width: 160px; margin-bottom: 0; }
.recon-foot { margin-top: 2rem; padding-top: 0.75rem; border-top: 1px solid var(--line); font-size: 0.75rem; color: var(--muted); word-break: break-all; }

@media (max-width: 900px) {
  .recon-tiles { grid-template-columns: repeat(2, 1fr); }
  .recon-report { padding: 1.25rem; }
  .recon-table { display: block; overflow-x: auto; }
}

@media print {
  .no-print, .app-nav, .steps-bar, .toast, .drawer, .drawer-backdrop { display: none !important; }
  body { background: white; }
  .app-main { width: 100%; padding: 0; }
  .recon-report { border: none; box-shadow: none; padding: 0; }
  .recon-report section { break-inside: auto; }
  .recon-ex, .recon-tile, .recon-banner, .recon-block table { break-inside: avoid; }
  .recon-table { font-size: 9.5pt; }
  .recon-tiles { grid-template-columns: repeat(5, 1fr); gap: 6pt; }
  .recon-tile { padding: 6pt 7pt; }
  .recon-tile b { font-size: 13pt; }
  .recon-table { display: table; overflow: visible; }
  .recon-table thead { display: table-header-group; }
  @page { margin: 16mm 14mm; }
}

/* ---------- Plain-English reconciliation summary ---------- */

.recon-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 0; padding: 3px; background: var(--surface); }
.recon-switch button { border: none; background: transparent; font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--muted); padding: 0.35rem 0.95rem; border-radius: 0; cursor: pointer; }
.recon-switch button[aria-selected="true"] { background: var(--brand); color: white; }
.recon-switch button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.recon-plain { max-width: 820px; margin: 0 auto; }
.recon-plain h2 { border-bottom: none; padding-bottom: 0; font-size: 1.05rem; }
.recon-lead { font-size: 1rem; margin-bottom: 0.45rem; max-width: 68ch; }

.recon-status { border-radius: 0; padding: 1.1rem 1.25rem; border: 1px solid; }
.recon-status-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.07em; text-transform: none; }
.recon-status-headline { font-size: 1.3rem; font-weight: 700; line-height: 1.3; margin-top: 0.2rem; }
.recon-status-attention { background: #fbe5e1; border-color: #e6a294; color: #942514; }
.recon-status-nearly { background: #fff7bf; border-color: #e8ce45; color: #594d00; }
.recon-status-clear { background: #cce2d8; border-color: #85b49b; color: #005a30; }

.recon-two { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.recon-checks { list-style: none; margin: 0; padding: 0; }
.recon-checks li { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 0.7rem; font-size: 0.95rem; }
.recon-checks small { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 0.15rem; font-variant-numeric: tabular-nums; }
.recon-mark { flex: none; width: 1.4rem; height: 1.4rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 800; margin-top: 0.1rem; }
.recon-mark-ok { background: #cce2d8; color: #005a30; }
.recon-mark-bad { background: #f6d7d2; color: #942514; }

.recon-issues { list-style: none; margin: 0; padding: 0; }
.recon-issue { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0.75rem; align-items: start; padding: 0.8rem 0; border-top: 1px solid var(--line); }
.recon-issue:first-child { border-top: none; padding-top: 0.2rem; }
.recon-issue p { font-size: 0.95rem; }
.recon-issue .recon-chip { justify-self: start; margin-top: 0.15rem; }

.recon-trend { margin-top: 0.75rem; max-width: 560px; }
.recon-trend-row { display: grid; grid-template-columns: 9.5rem 1fr 9rem; gap: 0.6rem; align-items: center; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.35rem; }
.recon-trend-current { color: var(--ink); font-weight: 600; }
.recon-trend-bar { display: flex; height: 0.7rem; background: var(--bg); border-radius: 0; overflow: hidden; }
.recon-trend-bar i { display: block; height: 100%; }
.recon-trend-serious { background: #d4351c; }
.recon-trend-other { background: #f59e0b; }

@media (max-width: 900px) {
  .recon-two { grid-template-columns: 1fr; gap: 0.5rem; }
  .recon-issue { grid-template-columns: 1fr; gap: 0.3rem; }
  .recon-trend-row { grid-template-columns: 1fr; gap: 0.15rem; }
}

@media print {
  [hidden] { display: none !important; }
  .recon-plain { max-width: none; }
  .recon-two { grid-template-columns: 1fr 1fr; gap: 18pt; }
  .recon-issue { grid-template-columns: 5.5rem 1fr; break-inside: avoid; }
  .recon-status, .recon-trend-bar i, .recon-mark, .recon-chip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Project data check overview ---------- */
.recon-status-incomplete { background: #f3f2f1; border-color: #b1b4b6; color: #0b0c0c; }
.recon-tiles-4 { grid-template-columns: repeat(4, 1fr); }
.recon-area h2 { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.recon-signoff { margin: -0.4rem 0 0.4rem; }
.recon-review-form label { display: block; font-size: 0.85rem; font-weight: 600; }
.recon-review-form label input, .recon-review-form label select { margin-top: 0.3rem; font-weight: 400; }
@media (max-width: 900px) { .recon-tiles-4 { grid-template-columns: repeat(2, 1fr); } }
@media print { .recon-tiles-4 { grid-template-columns: repeat(4, 1fr); } .recon-area { break-inside: avoid; } }

/* ---------- Step bar states and project home ---------- */
.step-chip.step-home { background: transparent; border-style: dashed; }
.step-chip.step-done { background: #cce2d8; border-color: #85b49b; color: var(--target); }
.step-chip.step-blocked { color: #626a6e; background: #f3f2f1; }
.step-chip.active, .step-chip.step-done.active { background: var(--brand); border-color: var(--brand); color: white; }
.steps-sub { display: flex; gap: 1rem; margin: -0.6rem 0 1.1rem 0.25rem; font-size: 0.82rem; }
.steps-sub a { color: var(--muted); font-weight: 600; padding-bottom: 0.15rem; border-bottom: 2px solid transparent; }
.steps-sub a.active { color: var(--brand); border-bottom-color: var(--brand); }

.project-next { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.6rem; }

.home-next { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; border-color: rgba(13,92,99,0.35); }
.home-next-text { font-size: 1.15rem; font-weight: 700; line-height: 1.3; margin-top: 0.15rem; }
.home-status { margin-bottom: 1rem; }
.home-status .recon-status-headline { font-size: 1.05rem; }
.home-steps { list-style: none; margin: 0; padding: 0; }
.home-step { display: flex; gap: 0.85rem; align-items: flex-start; padding: 0.9rem 0; border-top: 1px solid var(--line); }
.home-step:first-child { border-top: none; padding-top: 0.2rem; }
.home-step:last-child { padding-bottom: 0.2rem; }
.home-step-num { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; background: var(--bg); color: var(--ink-soft); border: 1px solid var(--line); }
.home-step-done .home-step-num { background: #cce2d8; border-color: #85b49b; color: #005a30; }
.home-step-progress .home-step-num { background: #fff7bf; border-color: #e8ce45; color: #594d00; }
.home-step-blocked .home-step-title, .home-step-blocked .home-step-num { color: #626a6e; }
.home-step-body { flex: 1; min-width: 0; }
.home-step-title { font-weight: 700; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.home-step-links { display: flex; gap: 1rem; margin-top: 0.35rem; font-size: 0.82rem; }
.home-step-links a { color: var(--brand); font-weight: 600; }

/* ---------- Field tracker linked to load checks ---------- */
.tracker-conflict { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.col-check { white-space: nowrap; }
.col-check .check-run { display: block; font-size: 0.74rem; color: var(--muted); margin-top: 0.2rem; text-decoration: underline; text-underline-offset: 2px; }
.col-check .check-conflict { display: block; font-size: 0.72rem; font-weight: 700; color: var(--danger); margin-top: 0.15rem; }
.verification-table tr.row-conflict td { background: #fbe5e1; }
.check-warn-list { margin: 0.5rem 0 0 1.1rem; font-size: 0.88rem; }
.check-warn-list li { margin-bottom: 0.3rem; }

/* ---------- Plain-English guidance ---------- */
.home-intro { font-size: 1.02rem; max-width: 66ch; margin: -0.5rem 0 1.1rem; color: var(--ink-soft); }
.home-next-why { font-size: 0.92rem; color: var(--ink-soft); margin-top: 0.25rem; max-width: 60ch; }
.home-step-what { font-size: 0.97rem; margin: 0.2rem 0 0.35rem; max-width: 62ch; }
.home-step-guide { margin: 0.2rem 0 0.45rem; }
.home-step-guide summary, .step-help summary, .home-glossary summary { cursor: pointer; font-weight: 600; font-size: 0.88rem; color: var(--brand); }
.home-step-guide ol { margin: 0.5rem 0 0.5rem 1.3rem; font-size: 0.95rem; max-width: 62ch; }
.home-step-guide li { margin-bottom: 0.35rem; }
.home-step-guide p { font-size: 0.92rem; }
.home-glossary { margin-top: 1rem; }
.home-glossary dl { margin-top: 0.75rem; display: grid; grid-template-columns: 7rem 1fr; gap: 0.45rem 1rem; font-size: 0.93rem; }
.home-glossary dt { font-weight: 700; }
.home-glossary dd { margin: 0; max-width: 60ch; }

.step-help { background: var(--brand-light); border: 1px solid rgba(13,92,99,0.2); border-radius: 0; padding: 0.6rem 0.9rem; margin: 0 0 1.1rem; }
.step-help ul { margin: 0.5rem 0 0.2rem 1.2rem; font-size: 0.95rem; max-width: 70ch; }
.step-help li { margin-bottom: 0.3rem; }
@media (max-width: 900px) { .home-glossary dl { grid-template-columns: 1fr; gap: 0.1rem 0; } .home-glossary dd { margin-bottom: 0.5rem; } }
@media print { .step-help, .steps-sub { display: none !important; } }

/* ---------- Project home, second layout: one task, then steps at a glance ---------- */
.home-next { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.25rem 2rem; align-items: start; padding: 1.4rem 1.5rem; margin-bottom: 1.5rem; }
.home-next-main .btn { margin-top: 0.9rem; }
h2.home-next-text { font-size: 1.45rem; line-height: 1.25; margin-top: 0.3rem; }
.home-next-list { margin: 0; padding: 0.9rem 1rem 0.9rem 2.2rem; background: var(--bg); border-radius: 0; font-size: 0.95rem; }
.home-next-list li { margin-bottom: 0.4rem; }
.home-next-list li:last-child { margin-bottom: 0; }
.home-next-status { grid-column: 1 / -1; font-size: 0.88rem; padding: 0.55rem 0.8rem; border-radius: 0; margin: 0; }
.home-next-status-attention { background: #fbe5e1; color: #942514; }
.home-next-status-incomplete { background: #f3f2f1; color: #0b0c0c; }
.home-next-status-nearly { background: #fff7bf; color: #594d00; }
.home-next-status-clear { background: #cce2d8; color: #005a30; }

.home-heading { font-size: 0.8rem; text-transform: none; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 0.5rem 0.25rem; }
.home-steps { padding: 0.25rem 1.1rem; }
details.home-step { display: block; padding: 0; border-top: 1px solid var(--line); }
details.home-step:first-child { border-top: none; }
details.home-step > summary { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0; cursor: pointer; list-style: none; }
details.home-step > summary::-webkit-details-marker { display: none; }
details.home-step > summary::after { content: '▸'; margin-left: auto; color: var(--muted); font-size: 0.85rem; }
details.home-step[open] > summary::after { content: '▾'; }
details.home-step > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 0; }
details.home-step .home-step-title { flex: none; font-weight: 700; display: inline; }
.home-step-sum { color: var(--muted); font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
details.home-step[open] .home-step-sum { white-space: normal; }
.home-step-current .home-step-num { box-shadow: none; }
details.home-step .home-step-body { padding: 0 0 0.9rem 2.65rem; }
.home-step-body ol { margin: 0 0 0.5rem 1.2rem; font-size: 0.93rem; max-width: 62ch; }
.home-step-body li { margin-bottom: 0.3rem; }
.home-step-body p { font-size: 0.9rem; margin-bottom: 0.3rem; }
.home-step-body .home-step-links { margin-top: 0.6rem; gap: 0.5rem; }

@media (max-width: 800px) {
  .home-next { grid-template-columns: 1fr; }
  .home-step-sum { display: none; }
  details.home-step[open] .home-step-sum { display: block; flex-basis: 100%; }
  details.home-step > summary { flex-wrap: wrap; }
}

/* ---------- Mapping template import ---------- */
.template-import { margin-bottom: 1rem; }
.template-import summary { cursor: pointer; }
.template-found { margin-top: 0.9rem; padding: 0.9rem 1rem; background: var(--bg); border-radius: 0; font-size: 0.93rem; }
.template-found ul { margin: 0.4rem 0 0.5rem 1.2rem; }
.template-found li { margin-bottom: 0.2rem; }

/* ---------- Import result ---------- */
.template-result { margin-bottom: 1rem; border-color: #85b49b; background: #f0fdf9; outline: none; }
.template-result-title { font-size: 1.2rem; line-height: 1.3; margin: 0.25rem 0 0.9rem; }
.template-result-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-bottom: 0.9rem; }
.template-result-grid div { background: white; border: 1px solid var(--line); border-radius: 0; padding: 0.65rem 0.8rem; }
.template-result-grid b { display: block; font-size: 1.3rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.template-result-grid span { font-size: 0.78rem; color: var(--muted); }
.template-result-next { font-size: 0.93rem; margin-bottom: 0.8rem; max-width: 70ch; }
@media (max-width: 800px) { .template-result-grid { grid-template-columns: repeat(2, 1fr); } }

/* Screenshot dictionary */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.shot-warning { font-size: 0.9rem; margin: 0.25rem 0; }
.shot-agree { display: flex; gap: 0.5rem; align-items: flex-start; margin-top: 0.75rem; font-size: 0.9rem; }
.shot-agree input { margin-top: 0.2rem; }
.shot-notes { margin: 0.75rem 0 0 1.2rem; font-size: 0.88rem; }
.shot-notes.recon-error { margin-left: 0; padding-left: 2rem; }
.shot-detail { margin: 0 0 0.75rem 1.2rem; font-size: 0.92rem; }
.shot-table input[type="text"] { width: 100%; min-width: 10rem; padding: 0.25rem 0.4rem; font: inherit; }
.shot-table select { font: inherit; padding: 0.2rem; }
.shot-already td { color: var(--muted); }
.shot-tag { display: inline-block; font-size: 0.78rem; padding: 0.1rem 0.45rem; border-radius: 0; background: #fff7bf; color: #594d00; white-space: nowrap; }
.result-hide { margin-left: auto; }

/* Tracing known records */
.trace-steps { margin: 0 0 0.75rem 1.3rem; font-size: 0.92rem; }
.trace-steps li { margin-bottom: 0.2rem; }
.trace-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.75rem; }
.trace-row label { min-width: 5.5rem; }
.trace-row select { font: inherit; padding: 0.3rem; max-width: 100%; }
.trace-runs { margin: 0.6rem 0 0 1.2rem; font-size: 0.88rem; }
.trace-runs .btn-link { background: none; border: none; color: var(--brand); text-decoration: underline; cursor: pointer; padding: 0 0.3rem; font: inherit; }
.trace-table select { font: inherit; padding: 0.2rem; max-width: 26rem; }
.trace-status { font-weight: 600; }
.trace-one .trace-status { color: #00703c; }
.trace-likely .trace-status { color: #0f766e; }
.trace-several .trace-status, .trace-conflict .trace-status { color: #594d00; }
.trace-none .trace-status { color: var(--muted); }

/* Faster review of screenshot names */
.shot-bar { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin: 0.6rem 0; }
.shot-only { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; }
.shot-group td { background: var(--bg); border-top: 2px solid var(--line); }
.shot-table .shot-group .shot-screen { width: 22rem; max-width: 60%; min-width: 0; font-weight: 600; margin-right: 0.6rem; }
.shot-odd td { background: #fff7bf; }
.shot-look { font-size: 0.84rem; color: #594d00; }
.btn-link { background: none; border: none; color: var(--brand); text-decoration: underline; cursor: pointer; padding: 0; font: inherit; }

/* Project home: to-do list and area board */
.home-todo ol { margin: 0; padding-left: 1.4rem; }
.home-todo li { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.home-todo li:last-child { border-bottom: none; }
.home-todo details summary { cursor: pointer; margin-top: 0.5rem; color: var(--brand); font-size: 0.9rem; }
.home-area { display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 0.1rem 0.45rem; margin-right: 0.45rem; border-radius: 0; background: var(--brand-light); color: var(--brand); }
.home-board th[scope="row"] { text-align: left; font-weight: 600; white-space: nowrap; }
.home-cell { font-size: 0.88rem; }
.home-cell-done { color: #00703c; }
.home-cell-open { color: #594d00; font-weight: 600; }
.home-cell-none { color: var(--muted); }
.home-todo, .home-board { margin-bottom: 1.25rem; }

/* Rarely used options, one click deeper */
.other-ways { margin-top: 0.65rem; font-size: 0.9rem; }
.other-ways summary { cursor: pointer; color: var(--muted); }
.other-ways-body { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }

/* Help panel */
.help-modal { width: min(720px, calc(100% - 2rem)); max-height: calc(100vh - 4rem); overflow: auto; outline: none; }
.help-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.help-head h2 { font-size: 1.3rem; margin: 0; }
.help-modal h3 { font-size: 1.05rem; margin: 1.1rem 0 0.4rem; }
.help-step { border-top: 1px solid var(--line); padding: 0.55rem 0; }
.help-step summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.help-step-num { display: inline-flex; width: 1.6rem; height: 1.6rem; border-radius: 50%; align-items: center; justify-content: center; background: var(--bg); font-weight: 600; font-size: 0.85rem; }
.help-step-title { font-weight: 600; }
.help-step-what { flex-basis: 100%; color: var(--muted); font-size: 0.9rem; padding-left: 2.1rem; }
.help-step-body { padding: 0.4rem 0 0 2.1rem; font-size: 0.92rem; }
.help-step-body ol { margin: 0 0 0.5rem 1.1rem; }
.help-words { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; font-size: 0.92rem; }
.help-words dt { font-weight: 600; }
.home-help { margin: 0.5rem 0 1.5rem; }

/* Start questions */
.route-head { font-size: 1.05rem; margin: 1.2rem 0 0.25rem; }
.route-q { border: 1px solid var(--line); border-radius: 0; padding: 0.6rem 0.9rem; margin: 0 0 0.6rem; }
.route-q legend { font-weight: 600; padding: 0 0.3rem; font-size: 0.95rem; }
.route-opt { display: inline-flex; align-items: center; gap: 0.35rem; margin-right: 1.1rem; font-size: 0.92rem; cursor: pointer; }
.route-card { margin-bottom: 1rem; }
.route-card summary { cursor: pointer; }
.route-hint { margin: 0.35rem 0 0; font-size: 0.82rem; color: var(--muted); }
.home-board .schema-preview td { font-size: 0.88rem; max-width: none; }
.home-board td.home-cell-done { color: #00703c; }
.home-board td.home-cell-open { color: #594d00; font-weight: 600; }
.home-board td.home-cell-none { color: var(--muted); }

/* Area page */
.area-cells { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.5rem; padding: 0.75rem; margin-bottom: 1.25rem; }
.area-cell { border: 1px solid var(--line); border-radius: 0; padding: 0.55rem 0.7rem; background: white; }
.area-cell-label { display: block; font-size: 0.78rem; color: var(--muted); text-transform: none; letter-spacing: 0.04em; }
.area-cell-text { font-weight: 600; font-size: 0.95rem; }
.area-cell-done .area-cell-text { color: #00703c; }
.area-cell-open { border-color: #e8ce45; background: #fff7bf; }
.area-cell-open .area-cell-text { color: #594d00; }
.area-cell-none .area-cell-text { color: var(--muted); font-weight: 400; }
.area-table { margin-bottom: 1rem; }
.area-table h3 { font-size: 1rem; margin: 0 0 0.5rem; }
.area-table .schema-preview td { font-size: 0.88rem; max-width: none; }
.area-stage { font-weight: 600; }
.area-stage-liveFailed .area-stage, .area-stage-testFailed .area-stage { color: var(--danger); }
.area-stage-inLive .area-stage, .area-stage-inTest .area-stage { color: #594d00; }
.area-stage-testPassed .area-stage { color: #00703c; }
.area-field-done .area-stage { color: #00703c; }
.area-signoffs { margin: 0.5rem 0 0.75rem 1.2rem; font-size: 0.9rem; }
a.home-area { text-decoration: none; }
@media (max-width: 760px) { .area-cells { grid-template-columns: repeat(2, 1fr); } }
.area-table .schema-preview { max-height: none; overflow: visible; }
.area-table h3 .recon-sub { display: inline; font-weight: 400; }

/* Project settings */
.step-settings { margin-left: auto; }
.settings-section { margin-bottom: 1rem; }
.settings-section h2 { font-size: 1.1rem; margin: 0 0 0.3rem; }
.settings-form { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 0.75rem; align-items: end; margin-top: 0.6rem; }
.settings-form .field { margin: 0; }
.settings-table { max-height: none; }
.settings-table td { font-size: 0.9rem; max-width: none; }
.settings-table input { width: 100%; padding: 0.3rem 0.45rem; font: inherit; }
.route-card { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 1rem; }
@media (max-width: 760px) { .settings-form { grid-template-columns: 1fr; } }

/* ---- GOV.UK patterns, in MapBridge colours (piece 8) ---- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; white-space: nowrap; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; padding: 0.6rem 1rem; background: #ffdd00; color: #0b0c0c; font-weight: 700; text-decoration: underline; }
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* A strong focus ring everyone can see: yellow with a dark edge. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #ffdd00 !important; outline-offset: 0 !important; box-shadow: 0 0 0 5px #0b0c0c !important;
}
#app-main:focus { outline: none; box-shadow: none !important; }

.error-summary { border: 4px solid var(--danger); background: var(--surface); padding: 1rem 1.15rem; margin: 0 0 1.25rem; border-radius: 0; flex-basis: 100%; }
.error-summary:focus { outline: 3px solid #ffdd00; outline-offset: 0; }
.error-summary-title { font-size: 1.1rem; margin: 0 0 0.5rem; }
.error-summary-list { margin: 0; padding-left: 1.1rem; }
.error-summary-list a { color: var(--danger); font-weight: 700; text-decoration: underline; }
.error-message, .auth-page p.error-message, .field p.error-message { color: var(--danger); font-weight: 700; margin: 0.25rem 0 0.4rem; font-size: 0.92rem; flex-basis: 100%; }
.has-error { border-left: 4px solid var(--danger); padding-left: 0.75rem; }
.team-add-form.has-error, .team-add-form { flex-wrap: wrap; }
[aria-invalid="true"] { border: 2px solid var(--danger) !important; }

.confirm-panel { background: var(--target); color: #fff; text-align: center; padding: 1.5rem 1.25rem; border-radius: 0; margin: 0 0 1.25rem; }
.confirm-panel-title { color: #fff; font-size: 1.6rem; margin: 0 0 0.35rem; }
.confirm-panel-body { font-size: 1.05rem; }

.summary-list { margin: 0 0 1rem; }
.summary-list-row { display: grid; grid-template-columns: minmax(10rem, 1fr) 2fr auto; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.summary-list-key { font-weight: 600; margin: 0; }
.summary-list-value, .summary-list-actions { margin: 0; }
.summary-list-actions a { color: var(--brand); font-weight: 600; }

.pass-q { margin-top: 0.5rem; }
.radio-reveal { margin: 0.5rem 0 0 0.6rem; padding-left: 1rem; border-left: 4px solid var(--line); }
.radio-reveal textarea { width: 100%; }
.route-card-title { font-size: 1.05rem; margin: 0 0 0.25rem; }

/* ---- Problems log ---- */
.step-problems.has-open { border-color: #e6a294; }
.problems-count { display: inline-block; margin-left: 0.3rem; padding: 0 0.45rem; border-radius: 0; background: var(--danger); color: #fff; font-size: 0.72rem; font-weight: 700; }
.problems-counts { grid-template-columns: repeat(3, 1fr); }
.area-cell-failed { border-color: #e6a294; background: #fbe5e1; }
.area-cell-failed .area-cell-text { color: #d4351c; }
.problems-filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; margin-bottom: 0.5rem; }
.problems-filters .field { margin: 0; }
.problems-table { max-height: none; }
.problem-status { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 0; font-size: 0.8rem; font-weight: 600; background: var(--bg); }
.problem-status-open { background: #fbe5e1; color: #d4351c; }
.problem-status-reloaded { background: #fff7bf; color: #594d00; }
.problem-status-fixed, .problem-status-signed { background: #cce2d8; color: #00703c; }
.problem-status-withdrawn { color: var(--muted); text-decoration: line-through; }
.problems-table td a { color: var(--brand); text-decoration: underline; font-weight: 600; }

/* ---------- Executive overview ---------- */
.step-exec { border-color: var(--brand); color: var(--brand); font-weight: 600; }
.step-exec.active { background: var(--brand); color: #fff; }
.exec { display: grid; gap: 1rem; }
.exec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.exec-head h1 { margin: 0.2rem 0 0.25rem; font-size: 1.75rem; }
.exec-ready { border-radius: 0; padding: 1.25rem 1.4rem; border: 1px solid; }
.exec-ready h2 { margin: 0.15rem 0 0.4rem; font-size: 1.6rem; letter-spacing: -0.02em; }
.exec-ready p { margin: 0; font-size: 1.02rem; }
.exec-ready .exec-ready-left { margin-top: 0.45rem; font-size: 0.92rem; opacity: 0.85; }
.exec-ready-eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: none; }
.exec-ready-red { background: #fbe5e1; border-color: #fecdca; color: #912018; }
.exec-ready-amber { background: #fff7bf; border-color: #e8ce45; color: #594d00; }
.exec-ready-green { background: #ecfdf3; border-color: #85b49b; color: #005a30; }
.exec-ready-grey { background: var(--surface); border-color: var(--line); color: var(--ink); }
.exec-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.exec-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 0; padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.2rem; }
.exec-tile b { font-size: 1.9rem; line-height: 1.05; letter-spacing: -0.02em; }
.exec-tile b i { font-style: normal; font-size: 1rem; font-weight: 600; color: var(--muted); }
.exec-tile span { font-size: 0.86rem; color: var(--ink); font-weight: 600; }
.exec-tile small { font-size: 0.8rem; color: var(--muted); }
.exec-tile-red b { color: #d4351c; }
.exec-tile-green b { color: #00703c; }
.exec-two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.exec-card { background: var(--surface); border: 1px solid var(--line); border-radius: 0; padding: 1.1rem 1.25rem; }
.exec-card h2 { font-size: 1.1rem; margin: 0 0 0.75rem; }
.exec-trend { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.exec-trend li { display: grid; gap: 0.25rem; }
.exec-trend-label { font-weight: 600; font-size: 0.92rem; display: flex; justify-content: space-between; gap: 0.5rem; }
.exec-trend-label small { color: var(--muted); font-weight: 400; }
.exec-bar { display: flex; height: 12px; background: #f3f2f1; border-radius: 0; overflow: hidden; }
.exec-bar-serious { background: #d92d20; }
.exec-bar-smaller { background: #f47738; }
.exec-trend-n { font-size: 0.85rem; color: var(--muted); }
.exec-trend-n strong { color: var(--ink); }
.exec-line { margin: 0.8rem 0 0.3rem; font-weight: 600; }
.exec-key { margin: 0; font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 0.35rem; }
.exec-dot { display: inline-block; width: 10px; height: 10px; border-radius: 0; }
.exec-dot-serious { background: #d92d20; }
.exec-dot-smaller { background: #f47738; margin-left: 0.6rem; }
.exec-risks { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.6rem; }
.exec-risks p { margin: 0; }
.exec-risks p:first-child { font-weight: 600; }
.exec-none { color: #00703c; font-weight: 600; margin: 0; }
.exec-areas { width: 100%; }
.exec-areas td small { display: block; color: var(--muted); font-size: 0.8rem; }
.exec-pill { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 0; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.exec-pill-red { background: #f6d7d2; color: #912018; }
.exec-pill-amber { background: #fff7bf; color: #594d00; }
.exec-pill-green { background: #dcfae6; color: #005a30; }
.exec-pill-grey { background: #f3f2f1; color: var(--muted); }
.exec-mini { display: inline-block; width: 60px; height: 8px; background: #f3f2f1; border-radius: 0; overflow: hidden; margin-right: 0.45rem; vertical-align: middle; }
.exec-mini span { display: block; height: 100%; background: #12b76a; }
.exec-proof { margin: 0 0 0.75rem; padding-left: 1.2rem; display: grid; gap: 0.35rem; }
.exec-warn { color: var(--warn); }
.exec-foot { font-size: 0.82rem; color: var(--muted); margin: 0; }
@media (max-width: 760px) {
  .exec-tiles { grid-template-columns: repeat(2, 1fr); }
  .exec-two { grid-template-columns: 1fr; }
}
@media print {
  .exec-tiles { grid-template-columns: repeat(4, 1fr); }
  .exec-two { grid-template-columns: 1fr 1fr; }
  .exec { zoom: 0.78; gap: 0.7rem; }
  .exec-card, .exec-tile, .exec-ready { break-inside: avoid; }
  .exec-bar, .exec-bar span, .exec-mini, .exec-mini span, .exec-pill, .exec-ready { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Set up: one question per system ---------- */
.setup-flow { display: flex; align-items: center; justify-content: center; gap: 0.6rem; flex-wrap: wrap; margin: 0 0 1.1rem; }
.setup-flow-box { padding: 0.45rem 0.9rem; border: 1px dashed var(--line); border-radius: 0; font-size: 0.9rem; color: var(--muted); background: var(--surface); }
.setup-flow-box.is-done { border-style: solid; border-color: #85b49b; background: #ecfdf3; color: #005a30; font-weight: 600; }
.setup-flow-match { border-style: solid; border-color: var(--brand); color: var(--brand); font-weight: 700; }
.setup-flow-arrow { color: var(--muted); font-size: 1.1rem; }
.setup-sides { align-items: start; }
.setup-side { min-width: 0; }
.setup-side-title { font-size: 1.1rem; margin: 0 0 0.6rem; }
.setup-done { margin: 0 0 0.25rem; font-weight: 600; color: #005a30; }
.setup-change { font-size: 0.88rem; }
.setup-routes { border: 0; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.55rem; }
.setup-routes legend { font-weight: 600; margin-bottom: 0.55rem; padding: 0; }
.setup-route { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: 0; cursor: pointer; background: var(--surface); }
.setup-route:hover { border-color: var(--brand); }
.setup-route.is-on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; background: #f0f9fa; }
.setup-route input { margin-top: 0.2rem; accent-color: var(--brand); }
.setup-route-text { display: flex; flex-direction: column; gap: 0.15rem; }
.setup-route-title { font-weight: 600; }
.setup-route-best { font-size: 0.86rem; color: var(--muted); }
.setup-panel { margin-top: 1rem; }
.setup-panel-title { font-size: 1.05rem; margin: 0 0 0.3rem; }
.setup-panel > details.template-import { border: 0; padding: 0; box-shadow: none; margin: 0; background: none; }
.setup-panel > details.template-import > summary { display: none; }
.setup-steps { margin: 0 0 0.75rem; padding-left: 1.2rem; display: grid; gap: 0.3rem; }
.setup-then { margin: 1.25rem 0 0.25rem; font-size: 1rem; }
.setup-next { margin-top: 1.25rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.setup-next-text { margin: 0; font-weight: 600; }
@media (max-width: 760px) {
  .schema-examples-grid { grid-template-columns: 1fr; }
  .schema-example-block { min-width: 0; }
  .schema-example-code { overflow-x: auto; }
}
.setup-actions { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; margin: 0.5rem 0 0.25rem; }
.setup-orphans { margin: 0.5rem 0; }
.delivery-review { border: 1px solid #e8ce45; background: #fff7bf; border-radius: 0; padding: 0.9rem 1rem; margin: 0.6rem 0; }
.delivery-review h4 { margin: 0 0 0.25rem; font-size: 1rem; }
.delivery-table { padding: 0.6rem 0; border-top: 1px solid #fde7a8; }
.delivery-table:first-of-type { border-top: 0; }
.delivery-diff { margin: 0.3rem 0 0.4rem; padding-left: 1.2rem; font-size: 0.9rem; }
.delivery-choice { display: block; font-size: 0.92rem; margin: 0.15rem 0; }
.setup-extra { margin-top: 1rem; }
.setup-extra summary { cursor: pointer; }
.expected-list { list-style: none; padding: 0; margin: 0 0 0.75rem; display: grid; gap: 0.2rem; font-size: 0.92rem; }
.expected-list .is-in { color: #005a30; }
.expected-list .is-waiting { color: var(--ink); }
.setup-extra textarea { width: 100%; font: inherit; padding: 0.5rem; border: 1px solid var(--line); border-radius: 0; }
.table-new-badge { display: inline-block; margin-left: 0.4rem; padding: 0.05rem 0.45rem; border-radius: 0; background: #dcfae6; color: #005a30; font-size: 0.72rem; font-weight: 700; vertical-align: middle; }
.map-new-bar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: space-between; background: #e6f1ec; border: 1px solid #85b49b; border-radius: 0; padding: 0.55rem 0.9rem; margin: 0 0 0.9rem; font-size: 0.92rem; }
.map-new-bar label { display: flex; gap: 0.4rem; align-items: center; cursor: pointer; }

/* ---------- Move the data: table by table ---------- */
.jr-steps { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.jr-steps li { border: 1px solid var(--line); border-radius: 0; padding: 0.7rem 0.85rem; background: var(--surface); display: flex; flex-direction: column; gap: 0.2rem; }
.jr-steps li span { font-size: 0.88rem; color: var(--muted); }
.jr-table { width: 100%; }
.jr-table td { vertical-align: top; font-size: 0.92rem; }
.jr-table td > div + div { margin-top: 0.2rem; }
.jr-ok { color: #00703c; font-weight: 700; }
.jr-ok-text { color: #00703c; font-weight: 600; }
.jr-part { color: #594d00; font-weight: 600; }
.jr-todo { color: var(--muted); }
.jr-bad { color: #d4351c; font-weight: 600; }
.jr-next { min-width: 220px; }
.jr-next-text { font-weight: 600; margin-bottom: 0.35rem; }
.jr-next .btn { margin: 0 0.25rem 0.25rem 0; }
.jr-request td { background: #f3f2f1; }
.jr-request-text { white-space: pre-wrap; font-size: 0.82rem; background: #fff; border: 1px solid var(--line); border-radius: 0; padding: 0.6rem; margin: 0 0 0.5rem; }
.jr-stage { border: 0; padding: 0; margin: 0 0 0.9rem; display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: center; }
.jr-stage legend { font-weight: 600; padding: 0; margin-bottom: 0.4rem; width: 100%; }
.jr-stage label { display: flex; gap: 0.4rem; align-items: center; cursor: pointer; }
.jr-stage-pill { display: inline-block; padding: 0.05rem 0.5rem; border-radius: 0; font-size: 0.72rem; font-weight: 700; vertical-align: middle; }
.jr-stage-test { background: #fff7bf; color: #594d00; }
.jr-stage-live { background: #ede9fe; color: #5b21b6; }
.jr-focus { outline: 3px solid var(--brand); outline-offset: 4px; border-radius: 0; transition: outline 0.3s; }
@media (max-width: 760px) { .jr-steps { grid-template-columns: 1fr; } }
.jr-gives { background: #f3f2f1; border: 1px solid var(--line); border-radius: 0; padding: 0.6rem 0.85rem; margin: 0 0 0.9rem; font-size: 0.92rem; }
.jr-gives ul { margin: 0.3rem 0 0; padding-left: 1.2rem; }
.jr-scope { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 0 0 1rem; }
.jr-scope > div { border: 1px solid var(--line); border-radius: 0; padding: 0.75rem 0.95rem; background: var(--surface); }
.jr-scope > div:first-child { border-left: 4px solid #00703c; }
.jr-scope > div:last-child { border-left: 4px solid #98a2b3; }
.jr-scope h2 { font-size: 0.98rem; margin: 0 0 0.35rem; }
.jr-scope ul { margin: 0; padding-left: 1.15rem; font-size: 0.92rem; }
.jr-scope li + li { margin-top: 0.2rem; }
@media (max-width: 760px) { .jr-scope { grid-template-columns: 1fr; } }
.exec-sub-h { font-size: 0.92rem; margin: 1rem 0 0.4rem; color: var(--muted); }
.exec-mini-wide { width: 100%; max-width: 320px; display: block; margin: 0.3rem 0 0.2rem; }
.page-intro { margin: 0.6rem 0 0.9rem; font-size: 1.02rem; color: var(--text, #1d2939); border-left: 4px solid var(--brand); padding: 0.15rem 0 0.15rem 0.75rem; max-width: 760px; }
.auth-or { font-size: 0.95rem; margin: 0.5rem 0 0.75rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.empty-state h2 { font-size: 1.2rem; margin: 0 0 0.4rem; }

/* ---------- Figures that stand out ---------- */
.fig { font-variant-numeric: tabular-nums; font-weight: 700; line-height: 1; color: var(--text, #1d2939); }
.fig-bad { color: #d4351c; }
.fig-good { color: #00703c; }
.fig-big { font-size: 3rem; min-width: 3.5rem; text-align: center; }
.fig-inline { font-size: 1.1em; font-weight: 700; }
.home-next-fig { display: flex; gap: 1rem; align-items: center; margin: 0.4rem 0 0.9rem; }
.home-next-fig h2.home-next-text { margin: 0; }
.home-next-what { margin: 0.2rem 0 0; color: var(--muted); }
.home-todo-list { list-style: none; margin: 0; padding: 0; }
.home-todo-list li { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto auto; align-items: center; gap: 0.75rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.home-todo-list li:last-child { border-bottom: none; }
.home-todo-list .fig { font-size: 1.6rem; text-align: right; }
.home-todo-text { display: flex; flex-direction: column; gap: 0.1rem; }
.home-todo-what { font-weight: 600; }
.home-todo-action { color: var(--muted); font-size: 0.9rem; }
.home-todo-list .home-area { margin: 0; white-space: nowrap; }
@media (max-width: 640px) {
  .home-todo-list li { grid-template-columns: 2.4rem minmax(0, 1fr) auto; }
  .home-todo-list .home-area { grid-column: 2; justify-self: start; }
  .fig-big { font-size: 2.4rem; min-width: 2.6rem; }
}
.home-cell-failed { color: #d4351c; font-weight: 600; }
.area-cell-text .fig-inline, .home-cell .fig-inline { font-size: 1.2em; }
.problems-counts .area-cell-text, .area-cells .area-cell-text { font-variant-numeric: tabular-nums; }
.problems-counts .area-cell-text { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }

.count-chip { display: inline-block; min-width: 1.6em; padding: 0.05rem 0.45rem; margin-left: 0.35rem; border-radius: 0; background: #f6d7d2; color: #d4351c; font-size: 0.85em; text-align: center; letter-spacing: 0; }

/* ---------- Old and new system: one look everywhere ---------- */
.sys-tag { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; font-weight: 600; padding: 0.15rem 0.55rem; border-radius: 0; vertical-align: middle; }
.sys-tag.sys-old, .sys-field.sys-old { background: var(--old-bg); color: var(--old-ink); }
.sys-tag.sys-new, .sys-field.sys-new { background: var(--new-bg); color: var(--new-ink); }
.sys-icon { flex: none; }
.sys-field { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.1rem 0.45rem; border-radius: 0; max-width: 100%; }
.sys-field code { background: none; padding: 0; color: inherit; font-size: 0.86rem; overflow-wrap: anywhere; }
.sys-pair { display: inline-flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.sys-arrow { color: var(--muted); }
.setup-side.sys-side-old { border-top: 5px solid var(--old); }
.setup-side.sys-side-new { border-top: 5px solid var(--new); }
.setup-side-title { margin-top: 0.45rem; }
.panel-source .panel-header { background: var(--old-bg); color: var(--old-ink); border-bottom: 3px solid var(--old); }
.panel-target .panel-header { background: var(--new-bg); color: var(--new-ink); border-bottom: 3px solid var(--new); }
.panel-header .sys-tag { background: #fff; margin-right: 0.4rem; }
.sys-from { margin-top: 0.3rem; }
.sys-from .sys-field code { font-size: 0.8rem; }
.setup-flow-box.sys-flow-old { background: var(--old-bg); color: var(--old-ink); border-color: var(--old); }
.setup-flow-box.sys-flow-new { background: var(--new-bg); color: var(--new-ink); border-color: var(--new); }
.panel-source .panel-header, .panel-target .panel-header { display: flex; align-items: center; gap: 0.4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-header .sys-tag { margin-right: 0; flex: none; }

/* To-do rows: "Open" always lines up on the right, with or without an area label. */
.home-todo-list li { grid-template-columns: 3rem minmax(0, 1fr) auto 4.5rem; }
.home-todo-list li > .btn { justify-self: end; }
.home-todo-chip { display: flex; justify-content: flex-end; }
.home-todo-chip:empty { display: block; }
.home-todo details { border-top: 1px solid var(--line); }
.home-todo details > summary { padding: 0.7rem 0 0.5rem; margin-top: 0; }
.home-todo details[open] > summary { border-bottom: 1px solid var(--line); }
@media (max-width: 640px) {
  .home-todo-list li { grid-template-columns: 2.4rem minmax(0, 1fr) auto; }
  .home-todo-chip { grid-column: 2; justify-content: flex-start; }
  .home-todo-chip:empty { display: none; }
}

/* ==========================================================================
   GOV.UK Frontend patterns, MapBridge brand
   The design follows the GOV.UK Design System (square corners, Arial, green
   action buttons, yellow focus, plain tags, ruled tables) with MapBridge's
   own teal as the only brand colour, as GOV.UK advises for services that
   are not part of GOV.UK. Red means failed and green means passed only.
   ========================================================================== */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #0b0c0c;
  --text: #0b0c0c;
  --muted: #505a5f;
  --line: #b1b4b6;
  --brand: #0b4a50;
  --brand-light: #e3eff0;
  --accent: #0b4a50;
  --danger: #d4351c;
  --warn: #594d00;
  --target: #00703c;
  --target-bg: #cce2d8;
  --radius: 0;
  --shadow: none;
  --focus: #ffdd00;
  --link: #1d70b8;
  --link-hover: #003078;
  --link-visited: #4c2c92;
  --old: #505a5f;
  --old-ink: #0b0c0c;
  --old-bg: #f3f2f1;
  --new: #0b4a50;
  --new-ink: #0b4a50;
  --new-bg: #e3eff0;
}
body { background: #fff; color: var(--ink); font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 700; letter-spacing: 0; }
h1 { font-size: 2.25rem; line-height: 1.11; }
.page-head p, .recon-sub, .verify-lede { color: var(--muted); }

/* Links */
a { color: var(--link); text-decoration: underline; text-decoration-thickness: max(1px, .0625rem); text-underline-offset: .1578em; }
a:hover { color: var(--link-hover); text-decoration-thickness: max(3px, .1875rem); }
.btn-link { color: var(--link); }

/* Focus: GOV.UK yellow, black underline */
a:focus-visible, .btn-link:focus-visible, summary:focus-visible {
  outline: 3px solid transparent; color: #0b0c0c !important; background-color: var(--focus) !important;
  box-shadow: 0 -2px var(--focus), 0 4px #0b0c0c !important; text-decoration: none;
}
input:focus-visible, select:focus-visible, textarea:focus-visible, .field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid var(--focus) !important; outline-offset: 0; box-shadow: inset 0 0 0 2px #0b0c0c !important;
}

/* Buttons */
.btn {
  font-family: inherit; font-weight: 400; font-size: 1rem; line-height: 1.1875; border-radius: 0;
  padding: 8px 10px 7px; border: 2px solid transparent; background: #00703c; color: #fff;
  box-shadow: 0 2px 0 #002d18; cursor: pointer; text-decoration: none; text-align: center;
}
.btn:hover { background: #005a30; color: #fff; text-decoration: none; }
.btn:active { transform: translateY(2px); box-shadow: none; }
.btn-primary { background: #00703c; color: #fff; box-shadow: 0 2px 0 #002d18; }
.btn-primary:hover { background: #005a30; color: #fff; }
.btn-secondary { background: #f3f2f1; color: #0b0c0c; border-color: transparent; box-shadow: 0 2px 0 #929191; }
.btn-secondary:hover { background: #dbdad9; color: #0b0c0c; }
.btn-danger { background: #d4351c; color: #fff; border-color: transparent; box-shadow: 0 2px 0 #55150b; }
.btn-danger:hover { background: #aa2a16; color: #fff; }
/* Small actions in lists read as links, as in GOV.UK summary lists */
.btn-ghost { background: none; border: 0; box-shadow: none; color: var(--link); text-decoration: underline; text-underline-offset: .1578em; padding: 4px 2px; }
.btn-ghost:hover { background: none; color: var(--link-hover); text-decoration-thickness: 3px; }
.btn-ghost:active { transform: none; }
.btn-sm { font-size: 0.9rem; padding: 5px 8px 4px; }
.btn-ghost.btn-sm { padding: 2px; }
.btn:focus-visible, .btn:focus { outline: 3px solid transparent; background: var(--focus) !important; color: #0b0c0c !important; box-shadow: 0 2px 0 #0b0c0c !important; border-color: var(--focus) !important; text-decoration: none; }
.btn:disabled { opacity: 0.5; }

/* Form fields */
.field label, label { color: var(--ink); }
.field input, .field select, .field textarea, input[type="text"], input[type="email"], input[type="password"], input:not([type]), select, textarea {
  border: 2px solid #0b0c0c; border-radius: 0; background: #fff; color: #0b0c0c; font-family: inherit;
}

/* Header: MapBridge teal, white text */
.app-nav { background: var(--brand); border-bottom: 0; color: #fff; }
.app-nav .logo, .app-nav .logo:hover { color: #fff; text-decoration: none; font-weight: 700; }
.app-nav .logo-mark { background: #fff; color: var(--brand); border-radius: 0; }
.app-nav > div { color: #fff !important; }
.app-nav > div span { color: #fff; }
.app-nav .btn-ghost { color: #fff; }
.app-nav .btn-ghost:hover { color: #fff; }

/* Step bar: GOV.UK service navigation */
.steps-bar { gap: 0 !important; border-bottom: 1px solid var(--line); padding: 0 !important; background: none !important; }
.step-chip, .step-chip.step-home, .step-chip.step-exec {
  background: none !important; border: 0 !important; border-bottom: 4px solid transparent !important; border-radius: 0 !important;
  color: var(--link) !important; text-decoration: underline; text-underline-offset: .1578em; padding: 0.7rem 0.75rem 0.55rem !important; font-weight: 400; box-shadow: none !important;
}
.step-chip:hover { color: var(--link-hover) !important; text-decoration-thickness: 3px; }
.step-chip.active, .step-chip.step-done.active { color: #0b0c0c !important; border-bottom-color: var(--brand) !important; font-weight: 700; text-decoration: none; background: none !important; }
.step-chip.step-done { color: var(--link) !important; }
.step-chip.step-blocked { color: var(--muted) !important; }
.step-chip .problems-count { border-radius: 0; background: #d4351c; color: #fff; }
.steps-sub { border-bottom: 1px solid #f3f2f1; }
.steps-sub a { color: var(--link); }
.steps-sub a.active { color: #0b0c0c; font-weight: 700; text-decoration: none; border-bottom-color: var(--brand); }

/* Page intro: GOV.UK inset text */
.page-intro { border-left: 5px solid var(--line); padding: 0.4rem 0 0.4rem 1rem; color: #0b0c0c; }

/* Cards: plain panels with a hairline, no shadow */
.card { border: 1px solid var(--line); border-radius: 0; box-shadow: none; background: #fff; }
.home-next { border: 0; border-left: 10px solid var(--brand); background: #f3f2f1; }
.home-heading { color: #0b0c0c; font-size: 1.5rem; letter-spacing: 0; text-transform: none; }
.recon-eyebrow { color: var(--muted); font-weight: 400; font-size: 1rem; letter-spacing: 0; }

/* Tags: GOV.UK tag */
.home-area, .status-badge, .sys-tag, .count-chip, .verification-pill .count, .jr-stage-pill {
  border-radius: 0 !important; font-weight: 400;
}
.home-area { background: #e3eff0; color: #0b4a50; padding: 2px 8px 3px; font-size: 0.875rem; text-decoration: none; }
.home-area:hover { background: #cfe3e5; color: #0b4a50; }
.count-chip { background: #f4cdc6; color: #2a0b06; }

/* Tables: GOV.UK table */
table th { font-weight: 700; color: #0b0c0c; background: none; }
table th, table td { border-bottom: 1px solid var(--line); }
.verification-table thead th, .recon-table thead th, .schema-preview thead th { background: none !important; text-transform: none; letter-spacing: 0; font-size: 0.95rem; color: #0b0c0c; }

/* Pills used as filters read as plain selectable tags */
.verification-pill { border-radius: 0 !important; border: 2px solid var(--line) !important; background: #fff; color: #0b0c0c; }
.verification-pill.active { border-color: #0b0c0c !important; background: #fff; font-weight: 700; }

/* Status colours, GOV.UK palette */
.fig-bad, .home-cell-failed { color: #d4351c; }
.fig-good, .home-cell-done { color: #00703c; }
.home-cell-open { color: #0b0c0c; }

/* Alerts and warnings */
.alert { border-radius: 0; border-width: 0 0 0 5px; }

/* Yellow is for small tags only. Larger "needs a look" surfaces use light
   grey with a GOV.UK orange edge, so pages stay calm. */
.col-item.value-mismatch, .col-item.mapped.value-mismatch { background: #fff; border-left: 4px solid #f47738; }
.col-item.mapped { background: #fff; }
.col-values-warn { color: #0b0c0c; font-weight: 700; }
.history-timeline li.hist-revert, .recon-banner-medium, .recon-status-nearly, .home-next-status-nearly,
.area-cell-open, .exec-ready-amber, .delivery-review, .alert-warn, .shot-odd td {
  background: #f3f2f1; border-color: #f47738; color: #0b0c0c;
}
.alert-warn, .recon-banner-medium, .delivery-review { border-left: 5px solid #f47738; }
.area-cell-open .area-cell-text, .home-cell-open { color: #0b0c0c; }

/* "What do I do here?": GOV.UK details */
.step-help { background: none; border: 0; padding: 0; margin: 0 0 1.25rem; }
.step-help > summary { color: var(--link); text-decoration: underline; text-underline-offset: .1578em; cursor: pointer; font-weight: 400; display: inline-block; }
.step-help > summary:hover { color: var(--link-hover); }
.step-help[open] > ul { border-left: 5px solid var(--line); margin: 0.5rem 0 0 0; padding: 0.6rem 0 0.6rem 2.2rem; }

/* Sizes */
.step-chip { font-size: 1rem !important; }
.page-head h1 { font-size: 2.25rem; line-height: 1.11; margin-bottom: 0.4rem; }

/* Project cards: the name is the link; the rest is plain text */
.project-card { text-decoration: none; color: #0b0c0c; border: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.project-card h3 { color: var(--link); text-decoration: underline; text-underline-offset: .1578em; }
.project-card:hover h3 { color: var(--link-hover); text-decoration-thickness: 3px; }
.project-card .project-meta { color: var(--muted); }
.project-card .project-next { color: #0b0c0c; }
.project-card:focus-visible { background: var(--focus) !important; box-shadow: 0 0 0 3px #0b0c0c !important; }
.project-card:focus-visible h3 { color: #0b0c0c; }
/* Executive overview on phones: the header wraps instead of pushing the page wide */
@media (max-width: 640px) {
  .exec-head { flex-wrap: wrap; gap: 0.75rem; }
  .exec-head > div { min-width: 0; flex: 1 1 100%; }
  .exec { max-width: 100%; overflow-wrap: anywhere; }
}

/* Ready field lists (system profiles) */
.profile-pick { border: 0; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.profile-pick legend { font-weight: 700; margin-bottom: 0.5rem; }
.profile-option { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.75rem 0.9rem; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.profile-option:hover { border-color: var(--brand); }
.profile-option input { margin-top: 0.25rem; accent-color: var(--brand); }
.profile-option-text { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.profile-option-title { font-weight: 700; }
.profile-option-meta, .profile-option-note { font-size: 0.9rem; color: var(--muted); }
.profile-option-note { color: #0b0c0c; }
.profile-badge { display: inline-block; align-self: flex-start; font-size: 0.85rem; font-weight: 700; padding: 0.1rem 0.5rem; border: 1px solid; }
.profile-badge-standard { background: #f3f2f1; color: #0b0c0c; border-color: #505a5f; }
.profile-badge-docs { background: #f3f2f1; color: #505a5f; border-color: #b1b4b6; }
.profile-badge-supplier { background: #e3eff0; color: #0b4a50; border-color: #0b4a50; }
.profile-source { margin: 0.25rem 0 0.5rem; }

/* Supplier area: separate from the council journey */
.supplier-page { max-width: 960px; }
.supplier-kicker { display: inline-block; font-size: 1rem; color: var(--muted); margin-bottom: 0.25rem; }
.supplier-page h2 { font-size: 1.5rem; margin: 0 0 0.6rem; }
.supplier-page .card { margin-bottom: 1.25rem; }
.supplier-grid { margin-bottom: 0; }
.supplier-list { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.4rem; }
.supplier-terms { margin: 0; display: grid; gap: 0.6rem; }
.supplier-terms > div { display: grid; grid-template-columns: 12rem 1fr; gap: 1rem; border-bottom: 1px solid #b1b4b6; padding-bottom: 0.6rem; }
.supplier-terms dt { font-weight: 700; }
.supplier-terms dd { margin: 0; }
.supplier-held { width: 100%; border-collapse: collapse; }
.supplier-held th, .supplier-held td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid #b1b4b6; }
.supplier-errors { border: 5px solid #d4351c; padding: 1rem 1.25rem; margin-top: 0.75rem; }
.supplier-errors h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.supplier-errors ul, .supplier-warnings ul { margin: 0.4rem 0 0; padding-left: 1.25rem; }
.supplier-check .alert { margin-top: 0.75rem; }
.supplier-affiliation { margin: 0 0 2rem; }
@media (max-width: 640px) {
  .supplier-terms > div { grid-template-columns: 1fr; gap: 0.2rem; }
  .supplier-held { font-size: 0.9rem; }
}
.profile-group { display: grid; gap: 0.6rem; }
.profile-group + .profile-group { margin-top: 0.9rem; }
.profile-group-title { font-size: 1.05rem; margin: 0; }
.profile-group-note { margin: -0.3rem 0 0.1rem; font-size: 0.92rem; color: var(--muted); }
.profile-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.profile-type { display: inline-block; font-size: 0.85rem; font-weight: 700; padding: 0.1rem 0.5rem; border: 2px solid; }
.profile-type-system { background: #fff; color: #0b4a50; border-color: #0b4a50; }
.profile-type-statutory { background: #fff; color: #0b0c0c; border-color: #0b0c0c; border-style: dashed; }

/* Field record: decisions, search, removal and the sign-off report */
.decisions-panel { margin-top: 1rem; }
.decisions-panel h2, .field-find h2 { font-size: 1.25rem; margin: 0 0 0.4rem; }
.decision-list { list-style: none; margin: 0.75rem 0 0; padding: 0; }
.decision-row { display: grid; grid-template-columns: minmax(10rem, 16rem) 1fr auto; gap: 0.75rem; align-items: center; padding: 0.55rem 0; border-bottom: 1px solid #b1b4b6; }
.decision-row.decided { background: #f3f2f1; padding-left: 0.5rem; padding-right: 0.5rem; }
.decision-field { font-family: var(--mono, monospace); font-size: 0.9rem; word-break: break-all; }
.decision-form { grid-column: 2 / 4; display: grid; gap: 0.35rem; }
.decision-form input, .remove-match-form input, .field-find input { max-width: 32rem; width: 100%; }
.decision-actions { display: flex; gap: 0.5rem; }
.decision-error { color: #d4351c; font-weight: 700; margin: 0; }
.field-find { margin-bottom: 1rem; }
.field-find-list { list-style: none; margin: 0.75rem 0 0; padding: 0; }
.field-find-hit { display: grid; gap: 0.25rem; padding: 0.6rem 0.75rem; border-left: 4px solid #b1b4b6; margin-bottom: 0.5rem; background: #fff; }
.field-find-matched { border-left-color: #0b4a50; }
.field-find-not_moving { border-left-color: #505a5f; background: #f3f2f1; }
.field-find-undecided { border-left-color: #f47738; }
.field-find-hit .btn { justify-self: start; }
.remove-match summary { cursor: pointer; color: #d4351c; font-weight: 700; }
.remove-match-form { display: grid; gap: 0.4rem; margin-top: 0.5rem; }
.remove-match-form .btn { justify-self: start; }
@media (max-width: 700px) { .decision-row { grid-template-columns: 1fr; } .decision-form { grid-column: auto; } }

.report { max-width: 1100px; background: #fff; }
.report-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; border-bottom: 5px solid #0b4a50; padding-bottom: 0.75rem; margin-bottom: 1rem; }
.report-head h1 { margin: 0.1rem 0 0.25rem; }
.report-eyebrow { color: #505a5f; margin: 0; }
.report h2 { font-size: 1.35rem; margin: 1.75rem 0 0.4rem; }
.report h3 { font-size: 1.1rem; margin: 1.1rem 0 0.4rem; }
.report-gaps { border: 5px solid #d4351c; padding: 0.75rem 1rem; margin: 1rem 0; }
.report-ok { border: 5px solid #00703c; padding: 0.75rem 1rem; margin: 1rem 0; }
.report-gaps h2, .report-ok h2 { margin: 0 0 0.3rem; }
.report-gaps ul { margin: 0; padding-left: 1.25rem; }
.report-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; margin: 1rem 0; }
.report-stat { background: #f3f2f1; border-top: 4px solid #0b4a50; padding: 0.6rem 0.75rem; display: flex; flex-direction: column; }
.report-stat-n { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.report-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.report-table th, .report-table td { text-align: left; vertical-align: top; padding: 0.45rem 0.6rem 0.45rem 0; border-bottom: 1px solid #b1b4b6; }
.report-table td:first-child, .report-table td:nth-child(2) { font-family: var(--mono, monospace); font-size: 0.85rem; word-break: break-all; }
.report-mono { font-family: var(--mono, monospace); word-break: break-all; }
.report-warn { color: #d4351c; font-weight: 700; }
.report-fingerprint { border-top: 1px solid #b1b4b6; margin-top: 1.5rem; }
.report-sign p { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; align-items: end; margin: 1.25rem 0; }
.report-line { border-bottom: 1px solid #0b0c0c; height: 1.5rem; }
@media print {
  .report { max-width: none; }
  .report-table { font-size: 9pt; }
  .report h2 { break-after: avoid; }
  .report-table tr { break-inside: avoid; }
}
.field-find input[type=search] { min-height: 2.5rem; padding: 0.35rem 0.6rem; border: 2px solid #0b0c0c; font-size: 1rem; }
@media print { .page-intro, .screen-help, .steps-sub { display: none !important; } }

/* Roadmap: one line per area across the stages */
.roadmap { margin: 0; }
.rm-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem 1.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.rm-head h2 { margin: 0; font-size: 1.35rem; }
.rm-summary { margin: 0; display: flex; gap: 0.25rem 1rem; flex-wrap: wrap; align-items: baseline; }
.rm-summary span { color: #505a5f; }
.rm-grid { display: grid; gap: 6px; }
.rm-row { display: grid; grid-template-columns: minmax(9rem, 13rem) repeat(6, minmax(0, 1fr)); gap: 4px; align-items: center; }
.rm-labels div { font-size: 0.85rem; color: #505a5f; text-align: center; }
.rm-name { font-weight: 700; font-size: 0.95rem; line-height: 1.25; padding-right: 0.5rem; }
.rm-name small { display: block; font-weight: 400; color: #505a5f; font-size: 0.82rem; }
.rm-seg { height: 2rem; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; line-height: 1.1; text-align: center; padding: 0 0.25rem; overflow: hidden; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rm-done { background: #0b4a50; color: #fff; }
.rm-now { background: #e3eff0; color: #0b4a50; border: 2px solid #0b4a50; font-weight: 700; }
.rm-blocked { background: #fff; color: #d4351c; border: 2px solid #d4351c; font-weight: 700; }
.rm-todo { background: #f3f2f1; }
.rm-phase { font-weight: 700; font-size: 0.9rem; color: #505a5f; border-bottom: 1px solid #b1b4b6; padding: 0.6rem 0 0.2rem; margin-top: 0.2rem; }
.rm-key { display: flex; gap: 1.25rem; flex-wrap: wrap; margin: 0.75rem 0 0; font-size: 0.85rem; color: #505a5f; }
.rm-swatch { display: inline-block; width: 1.1rem; height: 0.75rem; margin-right: 0.4rem; vertical-align: -1px; border-width: 1px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rm-help { margin: 0.6rem 0 0; }
.exec-roadmap { margin-bottom: 1rem; }
.settings-phase { max-width: 8rem; }
.settings-milestone { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end; }
.settings-milestone .field { margin: 0; }
@media (max-width: 700px) {
  .rm-row { grid-template-columns: 7rem repeat(6, minmax(0, 1fr)); gap: 3px; }
  .rm-labels div { font-size: 0.68rem; }
  .rm-seg span:not([aria-hidden]) { display: none; }
  .rm-seg { height: 1.5rem; }
  .rm-name { font-size: 0.85rem; }
}
@media print { .rm-row { break-inside: avoid; } .rm-help { display: none; } }

/* Review and sign-off forms: every label, box and button on one line. */
.recon-review-form .field > label { margin: 0 0 0.3rem; line-height: 1.25; }
.recon-review-form input, .recon-review-form select { box-sizing: border-box; height: 2.75rem; margin-top: 0; }
.recon-review-form label input, .recon-review-form label select { margin-top: 0.3rem; }
.recon-review-form > .btn, .recon-review-form > button { box-sizing: border-box; height: 2.75rem; margin: 0; }
.home-todo-wait { display: block; font-size: 0.8rem; color: #505a5f; margin-top: 0.15rem; }
.exec-totals { margin-bottom: 1rem; } .exec-totals .recon-checks { margin-top: 0.5rem; }
.demo-again { margin: -0.5rem 0 1rem; font-size: 0.9rem; color: #505a5f; }

/* Backups */
.backup-warn { border: 2px solid #f47738; border-left-width: 8px; background: #fff7f0; padding: 1rem 1.25rem; margin: 0 0 1.25rem; }
.backup-warn h2 { font-size: 1.15rem; margin: 0 0 0.4rem; }
.backup-warn p { margin: 0.4rem 0; }
.backup-warn .btn { margin-right: 0.5rem; }
.backup-ok { font-size: 0.9rem; color: #505a5f; margin: -0.5rem 0 1rem; }
.restore-box { margin-top: 1rem; }
.backup-advice { font-size: 0.9rem; color: #505a5f; }
.project-cell { display: flex; flex-direction: column; }
.project-cell .project-card { flex: 1; }
.project-backup-slot:empty { display: none; }
.project-backup { margin: 0; padding: 0.5rem 1.1rem; border: 1px solid var(--line); border-top: 0; font-size: 0.85rem; background: #f8f8f8; display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.project-backup.warn { background: #fff7f0; border-color: #f4b383; }
.project-backup.warn span::before { content: "! "; font-weight: 700; color: #b5461a; }
.project-backup.ok { color: #505a5f; }
.project-backup.ok::before { content: "✓"; color: #00703c; font-weight: 700; }
.restore-hint { font-size: 0.9rem; color: var(--muted); margin: -0.5rem 0 1rem; }
.backup-start { margin-top: 0.5rem; }
.decision-required { display: inline-block; margin-left: 0.4rem; padding: 0 0.35rem; font-size: 0.75rem; font-weight: 700; color: #fff; background: #b5461a; vertical-align: middle; }

/* Bulk steps on the field tracker */
.col-select { width: 2.25rem; text-align: center; }
.col-select input { width: 1.1rem; height: 1.1rem; cursor: pointer; }
.bulk-hint { font-size: 0.88rem; color: var(--muted); margin: 0 0 0.6rem; }
.bulk-bar { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; padding: 0.7rem 0.9rem; margin: 0 0 0.75rem; background: #e3eff0; border-left: 5px solid #0b4a50; position: sticky; top: 0; z-index: 5; }
.bulk-area { display: inline-flex; gap: 0.4rem; align-items: center; }
.bulk-area select { height: 2.1rem; }
.bulk-note { font-size: 0.85rem; color: #505a5f; }

/* Sign off page */
.signoff-summary { margin: 0 0 0.75rem; }
.signoff-table td { vertical-align: top; }
.signoff-action { text-align: right; white-space: nowrap; }
.signoff-tag { display: inline-block; font-size: 0.82rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 4px; background: var(--surface-2, #eef0f2); color: var(--muted, #505a5f); }
.signoff-tag-ready { background: #fff4d6; color: #6b4a00; }
.signoff-tag-done { background: #e3f4ea; color: #1d6b3c; }
.area-signoff-change { margin-top: 0.75rem; }
.area-signoff-change summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.area-signoff-change[open] summary { margin-bottom: 0.75rem; }
.signoff-heading { margin-top: 1.75rem; }
