:root {
  color-scheme: light;
  --ink: #1f2937;
  --ink-soft: #3d4b5f;
  --muted: #64748b;
  --line: #d5dce6;
  --line-strong: #91a2b8;
  --surface: #ffffff;
  --surface-soft: #f5f7fa;
  --page: #e9eef5;
  --kpmg-blue: #00338d;
  --kpmg-medium-blue: #005eb8;
  --kpmg-light-blue: #0091da;
  --kpmg-blue-soft: #edf4fc;
  --teal: var(--kpmg-medium-blue);
  --teal-dark: var(--kpmg-blue);
  --green-soft: #edf7f3;
  --warning-soft: #fff5e5;
  --warning: #8a5200;
  --highlight-soft: #eef6fc;
  --highlight: #00529b;
  --error-soft: #fdf0ef;
  --error: #a43835;
  --shadow-soft: 0 12px 30px rgba(0, 51, 141, 0.08);
  --font-ui:
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans CJK SC",
    Arial,
    sans-serif;
  --font-data: Arial, "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0;
}

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

button,
select,
input[type="checkbox"],
input[type="radio"] {
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
}

.app-shell {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  width: min(100%, 1600px);
  min-height: 100vh;
  margin: 0 auto;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(145, 162, 184, 0.42);
}

.dossier-spine {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 24px;
  height: 100vh;
  padding: 24px 0 20px;
  color: #ffffff;
  background: var(--kpmg-blue);
}

.spine-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.64);
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 700;
}

.spine-title {
  flex: 1;
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 700;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.spine-year {
  font-family: var(--font-data);
  font-size: 10px;
}

.dossier-sheet {
  min-width: 0;
  min-height: 100vh;
  background: var(--surface);
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 92px;
  padding: 20px 42px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.app-shell[data-page-state="initial"] .topbar {
  min-height: 116px;
  padding: 26px 42px 24px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--kpmg-medium-blue);
  font-size: 12px;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.35;
}

h2 {
  font-size: 18px;
  line-height: 1.35;
}

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

.document-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.document-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tools-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #a9b7c8;
  border-radius: 5px;
  font-weight: 700;
  text-decoration: none;
}

.document-classification {
  color: var(--muted);
  font-size: 11px;
}

.result-actions,
.sort-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(31, 41, 55, 0.34);
}

.history-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 21;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(440px, 100%);
  height: 100vh;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -16px 0 36px rgba(0, 51, 141, 0.16);
  transform: translateX(100%);
  transition: transform 180ms ease;
}

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

.history-heading,
.history-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.history-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.history-list {
  overflow-y: auto;
}

.history-empty {
  margin: 0;
  padding: 40px 20px;
  color: var(--muted);
  text-align: center;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 14px 20px;
  border-bottom: 1px solid var(--line);
  transition: background-color 140ms ease;
}

.history-heading {
  border-top: 4px solid var(--kpmg-blue);
}

.history-item:hover {
  background: var(--kpmg-blue-soft);
}

.history-open,
.history-feedback,
.history-delete {
  min-height: 36px;
}

.history-open {
  display: grid;
  gap: 5px;
  border: 0;
  padding: 4px 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
  line-height: 1.45;
}

.history-open:hover {
  color: var(--kpmg-blue);
}

.history-open strong,
.history-open span {
  overflow-wrap: anywhere;
}

.history-open span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.history-actions {
  display: grid;
  gap: 6px;
}

.history-feedback,
.history-delete {
  padding: 0 10px;
  background: var(--surface);
}

.history-feedback {
  color: var(--kpmg-blue);
  border-color: #9ab8d6;
}

.history-delete {
  color: var(--error);
  border-color: #d9b2b0;
}

button {
  min-height: 40px;
  border-radius: 5px;
  border: 1px solid transparent;
  padding: 0 16px;
  font-weight: 700;
  transition:
    border-color 140ms ease,
    background-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

.primary-button {
  color: #ffffff;
  border-color: var(--kpmg-blue);
  background: var(--kpmg-blue);
}

.primary-button:hover:not(:disabled) {
  border-color: #002664;
  background: #002664;
}

.secondary-button,
.icon-button {
  color: var(--ink);
  border-color: #a9b7c8;
  background: var(--surface);
}

.secondary-button:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  color: var(--kpmg-blue);
  border-color: var(--kpmg-blue);
  background: var(--kpmg-blue-soft);
}

button:disabled {
  opacity: 0.48;
}

.icon-button {
  width: 40px;
  min-width: 40px;
  padding: 0;
  font-size: 19px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  width: min(calc(100% - 88px), 880px);
  margin: clamp(44px, 7vh, 72px) auto 0;
  padding: 0 0 80px;
  background: var(--surface);
}

.search-panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--kpmg-blue);
}

.search-panel-heading h2 {
  font-size: 20px;
}

.search-panel-heading > p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.form-code {
  margin: 0 0 4px;
  color: var(--kpmg-medium-blue);
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 700;
}

.workflow-fields {
  border-top: 1px solid var(--line);
}

.workpaper-mode-switch {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 0 18px;
  border: 0;
}

.workpaper-mode-switch legend {
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.category-segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
}

.category-segmented-control label {
  min-width: 0;
}

.category-segmented-control label + label {
  border-left: 1px solid var(--line-strong);
}

.category-segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.category-segmented-control span {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 16px;
  color: var(--ink-soft);
  background: var(--surface);
}

.category-segmented-control strong {
  font-size: 16px;
}

.category-segmented-control small {
  color: var(--muted);
  text-align: right;
}

.category-segmented-control input:checked + span {
  color: #ffffff;
  background: var(--kpmg-blue);
}

.category-segmented-control input:checked + span small {
  color: rgba(255, 255, 255, 0.78);
}

.category-segmented-control input:focus-visible + span {
  box-shadow: inset 0 0 0 3px rgba(0, 145, 218, 0.5);
}

.category-fields {
  display: contents;
}

.workflow-field {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  min-width: 0;
  margin: 0;
  padding: 22px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.field-index {
  color: var(--kpmg-blue);
  font-family: var(--font-data);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.field-body {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.field-label,
.sort-label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.asset-type-field {
  min-inline-size: 0;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

input:focus,
select:focus,
button:focus-visible {
  border-color: var(--kpmg-medium-blue);
  box-shadow: 0 0 0 3px rgba(0, 94, 184, 0.14);
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 48px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
}

.land-type-control {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.collateral-form-control {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segmented-control label {
  display: block;
  min-width: 72px;
  border-right: 1px solid var(--line);
}

.segmented-control label:last-child {
  border-right: 0;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: grid;
  min-height: 46px;
  place-items: center;
  padding: 0 12px;
  color: var(--ink-soft);
  font-weight: 700;
}

.segmented-control input:checked + span {
  color: #ffffff;
  background: var(--kpmg-blue);
}

.segmented-control input:focus-visible + span {
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.7);
}

.search-button {
  width: min(100%, 280px);
  min-height: 50px;
}

.search-submit {
  display: grid;
  justify-items: end;
  gap: 10px;
  margin-top: 2px;
}

.search-caption {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.app-shell[data-page-state="initial"] {
  background: transparent;
}

.app-shell[data-page-state="initial"] .history-button {
  align-self: flex-start;
}

.app-shell[data-page-state="searching"] .topbar,
.app-shell[data-page-state="results"] .topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  min-height: 76px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.app-shell[data-page-state="searching"] .document-subtitle,
.app-shell[data-page-state="results"] .document-subtitle {
  display: none;
}

.search-progress:not([hidden]),
.results-section:not([hidden]) {
  animation: workpaper-reveal 180ms ease-out;
}

@keyframes workpaper-reveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-progress {
  padding: 24px 42px 22px;
  border-top: 4px solid var(--kpmg-blue);
  border-bottom: 1px solid var(--line);
  background: var(--kpmg-blue-soft);
}

.progress-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.query-summary {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.query-summary span {
  color: var(--muted);
  font-size: 12px;
}

.query-summary strong {
  color: var(--ink);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.progress-state {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  color: var(--kpmg-blue);
  font-size: 12px;
  font-weight: 700;
}

.progress-state::before {
  width: 3px;
  height: 16px;
  background: currentColor;
  content: "";
}

.verification-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 24px 0 18px;
  padding: 0;
  list-style: none;
}

.verification-track li {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 9px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.verification-track li::before {
  position: absolute;
  top: 14px;
  right: 0;
  left: 30px;
  height: 2px;
  background: var(--line);
  content: "";
}

.verification-track li:last-child::before {
  display: none;
}

.track-index {
  position: relative;
  z-index: 1;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--muted);
  background: var(--surface);
  font-family: var(--font-data);
  font-size: 12px;
}

.verification-track li.completed,
.verification-track li.active {
  color: var(--ink);
}

.verification-track li.completed::before {
  background: var(--kpmg-medium-blue);
}

.verification-track li.completed .track-index {
  color: #ffffff;
  border-color: var(--kpmg-medium-blue);
  background: var(--kpmg-medium-blue);
}

.verification-track li.active .track-index {
  color: var(--kpmg-blue);
  border: 2px solid var(--kpmg-blue);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(0, 94, 184, 0.12);
}

.progress-details {
  border-top: 1px solid #bdcbe0;
}

.progress-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  color: var(--ink-soft);
  font-weight: 700;
  cursor: pointer;
}

.details-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.progress-log {
  height: 154px;
  overflow-y: auto;
  padding: 4px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.progress-log p {
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid #e7ecf2;
  line-height: 1.55;
}

.progress-log p:last-child {
  border-bottom: 0;
}

.feedback-dialog {
  width: min(calc(100% - 32px), 560px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  position: fixed;
  inset: 72px 24px auto auto;
  z-index: 30;
  margin: 0;
  border: 1px solid #91a2b8;
  border-top: 4px solid var(--kpmg-blue);
  border-radius: 4px;
  padding: 24px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 20px 54px rgba(0, 51, 141, 0.18);
}

.feedback-heading,
.feedback-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feedback-heading {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  cursor: move;
  user-select: none;
}

.feedback-heading button {
  cursor: pointer;
}

.feedback-dialog.is-dragging {
  box-shadow: 0 24px 58px rgba(0, 51, 141, 0.26);
}

.feedback-choice {
  margin-top: 20px;
  flex-wrap: wrap;
}

.feedback-choice button {
  flex: 1 1 140px;
}

.feedback-next-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.feedback-details {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.feedback-details fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.feedback-details legend,
.feedback-details label > span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.feedback-details label {
  display: grid;
  gap: 7px;
}

.feedback-details fieldset label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback-details textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  outline: none;
}

.feedback-details textarea:focus {
  border-color: var(--kpmg-medium-blue);
  box-shadow: 0 0 0 3px rgba(0, 94, 184, 0.14);
}

.feedback-details textarea::placeholder {
  color: #7b898e;
}

.feedback-screenshot-preview {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.feedback-screenshot-preview img {
  width: 96px;
  height: 64px;
  object-fit: contain;
  background: var(--surface);
}

.feedback-screenshot-preview span {
  overflow-wrap: anywhere;
}

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

.feedback-status {
  margin: 16px 0 0;
  color: var(--error);
}

.status-strip {
  display: grid;
  grid-template-columns: 0.8fr 0.65fr 0.65fr 1.35fr 1.2fr;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--kpmg-blue);
  background: var(--surface);
}

.status-strip > div {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 76px;
  padding: 12px 16px;
  border-right: 1px solid var(--line);
}

.status-strip > div:last-child {
  border-right: 0;
}

.status-strip span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.status-strip strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.status-strip .average-summary {
  background: var(--kpmg-blue-soft);
}

.status-strip .average-summary span {
  color: var(--kpmg-blue);
  font-weight: 700;
}

.status-strip .average-summary strong {
  color: var(--kpmg-blue);
  font-family: var(--font-data);
  font-size: 22px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.app-shell[data-collateral-category="land"] .status-strip {
  grid-template-columns: 0.75fr 0.6fr 0.6fr 1.15fr 1.15fr 1.25fr;
}

.search-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 24px;
  border-bottom: 1px solid #ead2ae;
  color: var(--warning);
  background: var(--warning-soft);
}

.search-notice[hidden] {
  display: none;
}

.search-notice.error {
  color: var(--error);
  border-bottom-color: #e7bfbd;
  background: var(--error-soft);
}

.location-suggestions {
  display: grid;
  gap: 12px;
  padding: 16px 24px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--kpmg-blue-soft);
}

.location-suggestions[hidden] {
  display: none;
}

.location-suggestions > div:first-child {
  display: grid;
  gap: 3px;
}

.location-suggestions > div:first-child span {
  color: var(--muted);
  font-size: 12px;
}

.location-suggestion-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}

.location-suggestion-list button {
  display: grid;
  gap: 4px;
  min-height: 58px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 9px 11px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
}

.location-suggestion-list button:hover {
  border-color: var(--kpmg-blue);
  background: var(--surface);
}

.location-suggestion-list span {
  color: var(--muted);
  font-size: 12px;
}

.results-section {
  padding: 26px 42px 34px;
}

.results-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--kpmg-blue);
}

.results-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 4px 16px;
  min-width: 0;
}

.results-heading .eyebrow {
  grid-column: 1 / -1;
  color: var(--kpmg-medium-blue);
}

.next-collateral-button {
  grid-column: 2;
  grid-row: 2;
}

.result-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.benchmark-grade-confirmation {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 24px;
  margin: 18px 0 4px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.benchmark-grade-confirmation h3,
.benchmark-grade-confirmation p {
  margin: 0;
}

.benchmark-grade-confirmation h3 {
  color: var(--kpmg-blue);
  font-size: 18px;
}

.benchmark-grade-confirmation p {
  margin-top: 6px;
  color: var(--muted);
}

.benchmark-grade-options,
.benchmark-grade-group,
.benchmark-grade-group > div {
  display: flex;
  gap: 10px;
}

.benchmark-grade-options,
.benchmark-grade-group {
  flex-direction: column;
}

.benchmark-grade-group > div {
  flex-wrap: wrap;
}

.benchmark-grade-group button {
  min-height: 48px;
  padding: 7px 12px;
  color: var(--kpmg-blue);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-weight: 700;
  text-align: left;
}

.benchmark-grade-group button:hover,
.benchmark-grade-group button:focus-visible {
  background: var(--kpmg-blue-soft);
  border-color: var(--kpmg-medium-blue);
}

.benchmark-grade-group button span {
  display: block;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 400;
}

.review-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 64px;
  margin-top: 16px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.case-map-section {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.case-map-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0 12px;
}

.case-map-heading h3 {
  margin: 0;
  font-size: 16px;
}

.case-map-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.case-map {
  width: 100%;
  height: 420px;
  border: 1px solid var(--line-strong);
  background: #eef2f7;
}

.case-map.map-unavailable {
  display: grid;
  height: 180px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.map-case-marker {
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 50%;
  padding: 0 7px;
  color: #ffffff;
  background: var(--kpmg-blue);
  box-shadow: 0 3px 10px rgba(31, 41, 55, 0.3);
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 700;
}

button.map-case-marker {
  cursor: pointer;
}

.map-case-marker-land-market {
  background: #188a8a;
}

.map-case-marker-judicial-auction {
  background: #c00000;
}

.map-case-marker-market-listing {
  background: #2f7d5c;
}

.map-case-marker-pending {
  color: #4c3a00;
  background: #f5c542;
}

.map-case-marker.is-highlighted {
  border-color: #ffd400;
  box-shadow:
    0 0 0 4px rgba(255, 212, 0, 0.42),
    0 4px 12px rgba(31, 41, 55, 0.32);
}

.map-unresolved {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 20px;
  padding: 12px 0 16px;
  color: var(--warning);
  font-size: 12px;
}

.map-unresolved ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding-left: 18px;
}

.sort-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sort-label {
  margin-right: 4px;
}

.sort-field-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sort-field-button {
  min-height: 36px;
  padding: 0 12px;
  color: var(--ink);
  border-color: #a9b7c8;
  background: var(--surface);
}

.sort-field-button:hover,
.sort-field-button.active {
  color: #ffffff;
  border-color: var(--kpmg-blue);
  background: var(--kpmg-blue);
}

.table-shell {
  width: 100%;
  overflow: auto;
  border: 1px solid #8297b0;
  background: var(--surface);
  box-shadow: none;
}

.results-source-note {
  margin: 12px 0 0;
  padding-left: 10px;
  border-left: 3px solid var(--kpmg-medium-blue);
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

.case-table {
  width: 100%;
  min-width: 1294px;
  table-layout: fixed;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: 10pt;
}

.case-table th,
.case-table td {
  border-right: 1px solid #91a2b8;
  border-bottom: 1px solid #91a2b8;
  padding: 10px 11px;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.case-table th:last-child,
.case-table td:last-child {
  border-right: 0;
}

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

.case-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 48px;
  color: #ffffff;
  background: var(--kpmg-blue);
  font-size: inherit;
  font-weight: 700;
  text-align: center;
}

.case-table td {
  min-height: 56px;
  background: var(--surface);
  font-weight: 400;
  line-height: 1.6;
}

.case-table tbody tr:hover td {
  background: var(--kpmg-blue-soft);
}

.case-table tbody tr.map-highlight td {
  background: #e8f2ff;
  box-shadow: inset 0 2px 0 var(--kpmg-light-blue),
    inset 0 -2px 0 var(--kpmg-light-blue);
}

.case-table tbody tr.self-case td {
  background: var(--green-soft);
}

.case-table tbody tr.self-case:hover td {
  background: #e4f2e8;
}

.case-table th:nth-child(1),
.case-table td:nth-child(1) {
  position: sticky;
  left: 0;
  width: 44px;
  padding-right: 6px;
  padding-left: 6px;
  text-align: center;
}

.case-table th:nth-child(1) {
  z-index: 3;
}

.case-table td:nth-child(1) {
  z-index: 2;
}

.case-table th:nth-child(2),
.case-table td:nth-child(2) {
  width: 250px;
}

.case-table th:nth-child(3),
.case-table td:nth-child(3) {
  width: 100px;
}

.case-table th:nth-child(4),
.case-table td:nth-child(4) {
  width: 110px;
}

.case-table th:nth-child(5),
.case-table td:nth-child(5) {
  width: 130px;
}

.case-table th:nth-child(6),
.case-table td:nth-child(6) {
  width: 110px;
}

.case-table th:nth-child(7),
.case-table td:nth-child(7) {
  width: 190px;
}

.case-table th:nth-child(8),
.case-table td:nth-child(8) {
  width: 250px;
}

.case-table th:nth-child(9),
.case-table td:nth-child(9) {
  width: 110px;
}

.case-table td.cell-right {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.case-table td.cell-left {
  text-align: left;
}

.case-table td.cell-center {
  text-align: center;
}

.case-table td.calculation-placeholder {
  background: #fff2cc;
}

.case-table input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--kpmg-blue);
}

.source-links {
  display: grid;
  gap: 5px;
}

.source-links a {
  color: var(--kpmg-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.remark-lines {
  white-space: pre-line;
}

.distance-review-note {
  color: #c00000;
  font-size: inherit;
  font-weight: 400;
}

.empty-state {
  height: 180px;
  color: var(--muted);
  text-align: center;
}

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

  .dossier-spine {
    gap: 18px;
  }

  .topbar,
  .app-shell[data-page-state="initial"] .topbar {
    padding-right: 28px;
    padding-left: 28px;
  }

  .search-panel {
    width: min(calc(100% - 56px), 820px);
  }

  .workflow-field {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 18px;
  }

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

  .app-shell[data-collateral-category="land"] .status-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .status-strip > div {
    border-bottom: 1px solid var(--line);
  }

  .status-strip > div:nth-child(even) {
    border-right: 0;
  }

  .status-strip > div:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  .app-shell {
    grid-template-columns: 8px minmax(0, 1fr);
    box-shadow: none;
  }

  .dossier-spine {
    position: static;
    height: auto;
    min-height: 100%;
    padding: 0;
  }

  .dossier-spine > * {
    display: none;
  }

  .topbar {
    gap: 16px;
    min-height: 64px;
    padding: 12px 16px;
  }

  .app-shell[data-page-state="initial"] .topbar {
    align-items: center;
    min-height: 88px;
    padding: 16px;
  }

  .document-subtitle,
  .document-classification {
    display: none;
  }

  .document-tools {
    gap: 8px;
  }

  .history-button {
    min-width: 88px;
    padding: 0 12px;
  }

  h1 {
    font-size: 18px;
  }

  h2 {
    font-size: 17px;
  }

  .search-panel {
    width: calc(100% - 32px);
    gap: 22px;
    margin-top: 32px;
    padding: 0 0 40px;
  }

  .search-panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 16px;
  }

  .search-panel-heading > p {
    max-width: none;
    text-align: left;
  }

  .workflow-field {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 18px 0;
  }

  .land-type-control {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-segmented-control span {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .category-segmented-control small {
    text-align: left;
  }

  .field-index {
    font-size: 18px;
  }

  .search-submit {
    justify-items: stretch;
  }

  .search-button {
    width: 100%;
  }

  .search-caption {
    text-align: center;
  }

  .search-progress {
    padding: 18px 16px 16px;
  }

  .progress-heading {
    gap: 12px;
  }

  .verification-track {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin: 20px 0 16px;
  }

  .verification-track li {
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    justify-items: stretch;
  }

  .verification-track li::before {
    top: 28px;
    bottom: -10px;
    left: 13px;
    width: 1px;
    height: auto;
  }

  .details-hint {
    display: none;
  }

  .status-strip > div {
    padding: 11px 16px;
  }

  .status-strip .average-summary,
  .status-strip > div:last-child {
    grid-column: 1 / -1;
  }

  .status-strip .average-summary {
    border-right: 0;
  }

  .search-notice {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    padding: 10px 16px;
  }

  .location-suggestions {
    padding: 14px 16px 18px;
  }

  .location-suggestion-list {
    grid-template-columns: 1fr;
  }

  .results-section {
    padding: 18px 16px 24px;
  }

  .case-map-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .case-map {
    height: 340px;
  }

  .map-unresolved {
    grid-template-columns: 1fr;
  }

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

  .results-heading {
    grid-template-columns: minmax(0, 1fr);
  }

  .next-collateral-button {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin-top: 8px;
  }

  .result-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .result-actions button {
    width: 100%;
  }

  .result-actions .primary-button {
    grid-column: 1 / -1;
  }

  .benchmark-grade-confirmation {
    grid-template-columns: 1fr;
  }

  .benchmark-grade-group button {
    flex: 1 1 100%;
  }

  .review-controls {
    align-items: stretch;
    justify-content: flex-start;
    padding: 14px 0;
  }

  .sort-controls {
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
  }

  .sort-label {
    flex: 0 0 100%;
    margin: 0;
  }

  .sort-field-buttons {
    flex: 1;
  }

  .sort-field-button {
    flex: 1 1 calc(50% - 6px);
    padding: 0 8px;
  }

  .table-shell {
    width: calc(100% + 32px);
    margin-left: -16px;
    border-right: 0;
    border-left: 0;
    box-shadow: none;
  }

  .results-source-note {
    margin-top: 10px;
  }

  .feedback-dialog {
    width: calc(100% - 24px);
    max-height: calc(100vh - 24px);
    padding: 18px;
  }

  .feedback-choice {
    align-items: stretch;
    flex-direction: column;
  }

  .feedback-choice button {
    flex-basis: auto;
    width: 100%;
  }

  .feedback-screenshot-preview {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .feedback-screenshot-preview img {
    width: 72px;
    height: 54px;
  }

  .feedback-screenshot-preview button {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
