@font-face {
  font-family: "Manrope";
  src: url("./assets/fonts/manrope-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("./assets/fonts/manrope-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("./assets/fonts/manrope-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: #f4f6f2;
  --paper: #ffffff;
  --mist: #edf2ee;
  --mist-strong: #e1e9e4;
  --ink: #17231f;
  --ink-soft: #40514b;
  --muted: #677871;
  --line: #ced9d3;
  --line-strong: #aabbb3;
  --teal: #0d665b;
  --teal-deep: #084a43;
  --teal-soft: #dcefe9;
  --ochre: #a96710;
  --ochre-soft: #f4ead5;
  --blue: #31758b;
  --blue-soft: #e0eef2;
  --danger: #a53e35;
  --danger-soft: #f7e6e3;
  --success: #257252;
  --success-soft: #e1f1e8;
  --warning: #865b17;
  --warning-soft: #f5ecd8;
  --focus: #075fdf;
  --shadow: 0 12px 32px rgb(27 51 43 / 10%);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
a,
select,
input[type="checkbox"] {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
}

button {
  border: 0;
}

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

h1,
h2,
h3,
h4,
p,
dl,
dd,
ol,
ul {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

::selection {
  color: #fff;
  background: var(--teal);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--mist);
}

::-webkit-scrollbar-thumb {
  border: 2px solid var(--mist);
  border-radius: 999px;
  background: var(--line-strong);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.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;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 12px;
  padding: 10px 14px;
  color: #fff;
  background: var(--teal-deep);
  border-radius: var(--radius-sm);
  transform: translateY(-140%);
  transition: transform 180ms var(--ease);
}

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

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

.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  width: 218px;
  flex-direction: column;
  padding: 16px 12px;
  background: #e8eeea;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: var(--teal-deep);
  border-radius: 9px;
}

.brand-mark svg {
  width: 19px;
  height: 19px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 13px;
}

.module-nav {
  display: grid;
  gap: 4px;
  margin-top: 38px;
}

.module-nav a {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 11px;
  padding: 0 11px;
  color: var(--ink-soft);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 650;
  transition: color 180ms var(--ease), background 180ms var(--ease);
}

.module-nav a:hover {
  color: var(--ink);
  background: rgb(255 255 255 / 62%);
}

.module-nav a.is-active {
  color: #fff;
  background: var(--teal-deep);
}

.module-nav svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.sidebar-foot {
  margin-top: auto;
  padding: 14px 8px 4px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.sidebar-foot p {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

.sidebar-foot p span,
.local-badge i {
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
}

.sidebar-foot small {
  display: block;
  margin: 4px 0 12px 14px;
  font-size: 12px;
  line-height: 1.5;
}

.text-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
}

.text-button:hover {
  color: var(--danger);
}

.text-button svg {
  width: 15px;
  height: 15px;
}

.topbar {
  position: sticky;
  z-index: 15;
  top: 0;
  grid-column: 2;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 22px;
  background: rgb(255 255 255 / 96%);
  border-bottom: 1px solid var(--line);
}

.mobile-route-control {
  display: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.local-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.local-badge i {
  display: block;
}

.role-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.role-control span {
  color: var(--muted);
  font-size: 13px;
}

.role-control select {
  min-height: 36px;
  padding: 0 28px 0 10px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 650;
}

.workspace {
  grid-column: 2;
  min-width: 0;
  padding: 20px 22px 32px;
}

#view-root {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
}

.page-intro {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.page-intro h2 {
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.page-intro p {
  max-width: 68ch;
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
}

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

.button,
.select-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
  transition: transform 160ms var(--ease), background 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
}

.button svg {
  width: 15px;
  height: 15px;
}

.button.primary {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.button.primary:hover {
  background: var(--teal-deep);
  border-color: var(--teal-deep);
}

.button.secondary {
  color: var(--ink-soft);
  background: var(--paper);
}

.button.secondary:hover {
  color: var(--ink);
  background: var(--mist);
  border-color: var(--ink-soft);
}

.button.danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #dbb8b3;
}

.button.danger:hover {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.button:active {
  transform: translateY(1px);
}

.select-button {
  position: relative;
  min-width: 200px;
  padding: 0;
  background: var(--paper);
}

.select-button select {
  width: 100%;
  min-height: 38px;
  padding: 0 36px 0 11px;
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.select-button > svg {
  position: absolute;
  right: 10px;
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.inline-composer {
  display: grid;
  grid-template-columns: 1.25fr repeat(2, minmax(160px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.inline-composer.wide {
  grid-template-columns: 1.1fr repeat(3, minmax(150px, 1fr));
}

.node-composer {
  grid-template-columns: 1.15fr repeat(4, minmax(120px, 1fr));
}

.node-composer .placement-state {
  grid-column: 1 / 4;
}

.node-composer .composer-actions {
  grid-column: 4 / 6;
  justify-content: flex-end;
}

.node-composer .form-error {
  grid-column: 1 / -1;
}

.placement-state {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  color: var(--ochre);
  background: var(--ochre-soft);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
}

.placement-state svg {
  width: 14px;
  height: 14px;
}

.inline-composer > div:first-child {
  align-self: center;
}

.inline-composer h3 {
  font-size: 16px;
}

.inline-composer p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

label {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

input,
select,
textarea {
  accent-color: var(--teal);
}

label > input:not([type="checkbox"]),
label > select,
label > textarea {
  display: block;
  width: 100%;
  min-height: 38px;
  margin-top: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

label > textarea {
  min-height: 86px;
  padding-block: 9px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #70817a;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
}

.check-field {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
}

.check-field input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.form-error {
  min-height: 16px;
  color: var(--danger) !important;
  font-size: 13px !important;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.summary-strip > div {
  min-width: 0;
  padding: 11px 13px;
}

.summary-strip > div + div {
  border-left: 1px solid var(--line);
}

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

.summary-strip dd {
  margin-top: 3px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-tools {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.search-field {
  position: relative;
  display: flex;
  width: min(300px, 100%);
  height: 40px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.search-field svg {
  width: 15px;
  height: 15px;
  margin-left: 11px;
  color: var(--muted);
}

.search-field input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 11px 0 8px;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 14px;
}

.compact-field {
  display: flex;
  height: 40px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.compact-field > span {
  padding-left: 10px;
  color: var(--muted);
  font-size: 12px;
}

.compact-field select {
  height: 100%;
  max-width: 155px;
  padding: 0 9px;
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 700;
}

.zoom-controls {
  display: flex;
  height: 40px;
  align-items: stretch;
  margin-left: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.zoom-controls button {
  display: inline-flex;
  min-width: 38px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  color: var(--ink-soft);
  background: transparent;
  border-left: 1px solid var(--line);
  cursor: pointer;
  font-size: 13px;
}

.zoom-controls button:first-child {
  border-left: 0;
}

.zoom-controls button:hover {
  color: var(--teal);
  background: var(--mist);
}

.zoom-controls button:disabled {
  color: var(--line-strong);
  background: var(--mist);
  cursor: default;
}

.zoom-controls output {
  display: grid;
  min-width: 52px;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}

.zoom-controls svg {
  width: 14px;
  height: 14px;
}

.drag-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.drag-hint svg {
  width: 14px;
  height: 14px;
}

.topology-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  gap: 12px;
  min-width: 0;
}

.graph-panel,
.inspector,
.table-panel,
.detail-panel,
.mapping-board,
.schema-column,
.history-panel,
.payload-panel,
.result-panel,
.request-list,
.quality-review,
.chat-panel,
.notes-panel,
.files-panel,
.audit-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.graph-panel {
  min-width: 0;
  overflow: hidden;
}

.graph-panel > header,
.panel-title {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.graph-panel h3,
.panel-title h3,
.inspector h3,
.detail-panel h3,
.mapping-board h3,
.schema-column h3,
.payload-panel h3,
.quality-review h3,
.file-detail h3 {
  font-size: 16px;
  letter-spacing: -0.02em;
}

.graph-panel header p,
.panel-title p,
.inspector header p,
.detail-panel header p,
.mapping-board header p,
.schema-column header p,
.payload-panel header p,
.quality-review header p,
.file-detail header p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.legend {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

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

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

.legend i.source {
  background: var(--blue);
}

.legend i.service {
  background: var(--success);
}

.graph-viewport {
  min-height: 520px;
  overflow: auto;
  background: #f8faf7;
}

.graph-viewport.is-placing {
  box-shadow: inset 0 0 0 2px var(--ochre);
}

.graph-viewport.is-placing .graph-stage {
  cursor: crosshair;
}

.stage-space {
  position: relative;
  min-width: 100%;
  min-height: 100%;
  background-color: #f8faf7;
  background-image: linear-gradient(#dce5df 1px, transparent 1px), linear-gradient(90deg, #dce5df 1px, transparent 1px);
  background-size: 46px 46px;
}

.graph-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 1040px;
  height: 650px;
  transform-origin: top left;
}

.graph-connections,
.graph-nodes {
  position: absolute;
  inset: 0;
  width: 1040px;
  height: 650px;
}

.graph-connections {
  overflow: visible;
  pointer-events: none;
}

.graph-connections marker path {
  fill: var(--line-strong);
  stroke: none;
}

.edge {
  color: var(--line-strong);
  transition: opacity 180ms var(--ease);
}

.edge > path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.edge text {
  fill: var(--muted);
  stroke: #f8faf7;
  stroke-width: 4px;
  paint-order: stroke;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 12px;
  font-weight: 650;
  text-anchor: middle;
}

.edge.is-active {
  color: var(--ochre);
}

.edge.is-active > path {
  stroke-width: 2;
}

.edge.is-active text {
  fill: var(--ochre);
}

.edge.is-muted {
  opacity: 0.08;
}

.graph-stage[data-last-result="failed"] .edge.is-active {
  color: var(--danger);
}

.graph-stage[data-last-result="failed"] .edge.is-active text {
  fill: var(--danger);
}

.graph-node {
  position: absolute;
  z-index: 2;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 8px;
  width: 180px;
  min-height: 78px;
  align-items: center;
  gap: 10px;
  padding: 12px 11px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: grab;
  touch-action: none;
  transform: translate(var(--x), var(--y));
  transition: background 160ms var(--ease), border-color 160ms var(--ease), opacity 160ms var(--ease), box-shadow 160ms var(--ease);
  user-select: none;
}

.placement-preview {
  position: absolute;
  z-index: 3;
  display: flex;
  width: 180px;
  min-height: 78px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--teal-deep);
  background: rgb(220 239 233 / 88%);
  border: 1px dashed var(--teal);
  border-radius: var(--radius);
  pointer-events: none;
  transform: translate(var(--x), var(--y));
  font-size: 14px;
  font-weight: 750;
}

.placement-preview[hidden] {
  display: none;
}

.placement-preview svg {
  width: 16px;
  height: 16px;
}

.graph-node:hover {
  background: #fbfdfb;
  border-color: var(--teal);
}

.graph-node.is-selected {
  background: var(--ochre-soft);
  border-color: var(--ochre);
  box-shadow: 0 10px 24px rgb(55 50 29 / 13%);
}

.graph-node.is-related:not(.is-selected) {
  border-color: #8ca69b;
}

.graph-node.is-hidden {
  opacity: 0.08;
  pointer-events: none;
}

.graph-node.is-dragging {
  z-index: 5;
  cursor: grabbing;
  box-shadow: var(--shadow);
  transition: none;
}

.drag-grip {
  position: absolute;
  top: 5px;
  right: 5px;
  color: var(--line-strong);
}

.drag-grip svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  stroke: none;
}

.node-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--ochre);
  background: var(--ochre-soft);
  border-radius: 7px;
}

.graph-node[data-category="source"] .node-icon {
  color: var(--blue);
  background: var(--blue-soft);
}

.graph-node[data-category="service"] .node-icon {
  color: var(--success);
  background: var(--success-soft);
}

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

.node-copy {
  min-width: 0;
  text-align: left;
}

.node-copy strong,
.node-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-copy strong {
  font-size: 14px;
  letter-spacing: -0.02em;
}

.node-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.node-state {
  width: 7px;
  height: 7px;
  background: var(--ochre);
  border-radius: 50%;
}

.graph-node[data-category="source"] .node-state {
  background: var(--blue);
}

.graph-node[data-category="service"] .node-state {
  background: var(--success);
}

.graph-panel > footer {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.inspector,
.detail-panel,
.quality-review {
  align-self: start;
  overflow: hidden;
}

.inspector > header,
.detail-panel > header,
.quality-review > header,
.file-detail > header {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.inspector > section,
.detail-panel > section {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.inspector h4,
.detail-panel h4,
.quality-review h4,
.schema-column h4 {
  margin-bottom: 9px;
  color: var(--ink-soft);
  font-size: 13px;
}

.definition-list > div,
.compare-records dl > div {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--mist-strong);
}

.definition-list > div:first-child,
.compare-records dl > div:first-child {
  border-top: 0;
}

.definition-list dt,
.compare-records dt {
  color: var(--muted);
  font-size: 12px;
}

.definition-list dd,
.compare-records dd {
  text-align: right;
  font-size: 12px;
  font-weight: 700;
}

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

.relationship-list li {
  padding: 9px;
  background: var(--mist);
  border-radius: var(--radius-sm);
}

.relationship-list span,
.relationship-list strong,
.relationship-list em {
  display: block;
}

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

.relationship-list strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 13px;
}

.relationship-list em {
  margin-top: 6px;
  color: var(--ochre);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.inspector > footer,
.detail-panel > footer,
.quality-review > footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 14px;
}

.inspector > footer .button {
  flex: 1;
}

.status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  color: var(--ink-soft);
  background: var(--mist);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.status.is-success {
  color: var(--success);
  background: var(--success-soft);
}

.status.is-danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.status.is-warning {
  color: var(--warning);
  background: var(--warning-soft);
}

.empty-state {
  display: grid;
  min-height: 150px;
  place-content: center;
  padding: 24px;
  text-align: center;
}

.empty-state p {
  font-weight: 750;
}

.empty-state small {
  max-width: 42ch;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

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

.catalog-toolbar p {
  color: var(--muted);
  font-size: 13px;
}

.list-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 12px;
  align-items: start;
}

.table-panel,
.history-panel {
  min-width: 0;
  overflow: hidden;
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--mist-strong);
}

th {
  color: var(--muted);
  background: #f9faf8;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

td {
  color: var(--ink-soft);
}

td strong,
td small {
  display: block;
}

td strong {
  color: var(--ink);
  font-size: 13px;
}

td small {
  max-width: 42ch;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

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

.selectable-row {
  cursor: pointer;
  transition: background 140ms var(--ease);
}

.selectable-row:hover,
.selectable-row.is-selected {
  background: var(--teal-soft);
}

.detail-panel section p,
.quality-review p {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.detail-panel section small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.tag-list span {
  padding: 5px 7px;
  color: var(--teal-deep);
  background: var(--teal-soft);
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.version-lock {
  padding: 8px 10px;
  color: var(--teal-deep);
  background: var(--teal-soft);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 750;
}

.mapping-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(460px, 1.8fr) minmax(180px, 0.75fr);
  gap: 12px;
  align-items: start;
}

.schema-column,
.mapping-board {
  overflow: hidden;
}

.schema-column > header,
.mapping-board > header,
.payload-panel > header {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.schema-column ul {
  padding: 6px 14px 12px;
}

.schema-column li {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--mist-strong);
}

.schema-column li:last-child {
  border-bottom: 0;
}

.schema-column strong,
.schema-column small {
  display: block;
}

.schema-column strong {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
}

.schema-column small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.schema-column em {
  color: var(--ochre);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

#mapping-rows {
  padding: 10px 12px;
}

.mapping-row {
  display: grid;
  grid-template-columns: 24px minmax(115px, 1fr) 18px minmax(115px, 1fr) minmax(100px, 0.8fr);
  align-items: end;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--mist-strong);
}

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

.mapping-row > svg {
  align-self: center;
  width: 14px;
  height: 14px;
  margin-top: 16px;
  color: var(--ochre);
}

.row-index {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  margin-bottom: 8px;
  color: var(--muted);
  background: var(--mist);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 750;
}

.mapping-row label span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.mapping-row select {
  width: 100%;
  height: 36px;
  padding: 0 8px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.mapping-board > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #f9faf8;
  border-top: 1px solid var(--line);
}

.history-panel {
  margin-top: 12px;
}

.history-panel > header {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.history-panel h3 {
  font-size: 16px;
}

.history-panel header p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.sandbox-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  color: var(--teal-deep);
  background: var(--teal-soft);
  border: 1px solid #b8d8ce;
  border-radius: var(--radius);
}

.sandbox-notice svg {
  flex: 0 0 auto;
}

.sandbox-notice strong,
.sandbox-notice span {
  display: block;
}

.sandbox-notice strong {
  font-size: 13px;
}

.sandbox-notice span {
  font-size: 12px;
}

.console-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 12px;
}

.payload-panel,
.result-panel {
  overflow: hidden;
}

.payload-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.payload-panel > header > span {
  color: var(--muted);
  font-size: 12px;
}

#payload-editor {
  display: block;
  width: calc(100% - 24px);
  min-height: 264px;
  margin: 12px;
  padding: 14px;
  color: #16362f;
  background: #f7faf8;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  caret-color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
}

.payload-panel > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 12px;
}

.payload-panel > footer > span {
  color: var(--muted);
  font-size: 12px;
}

.result-panel {
  min-height: 362px;
}

.result-block {
  min-height: 100%;
  padding: 18px;
}

.result-block > header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.result-block > header > svg {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 50%;
}

.result-block h3 {
  font-size: 16px;
}

.result-block header p,
.result-block > p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.result-block.is-passed {
  background: var(--success-soft);
}

.result-block.is-passed > header > svg {
  color: var(--success);
  background: #fff;
}

.result-block.is-failed {
  background: var(--danger-soft);
}

.result-block.is-failed > header > svg {
  color: var(--danger);
  background: #fff;
}

.result-block dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.result-block dl div {
  padding: 10px;
  background: rgb(255 255 255 / 70%);
  border-radius: var(--radius-sm);
}

.result-block dt {
  color: var(--muted);
  font-size: 12px;
}

.result-block dd {
  margin-top: 4px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
}

.result-block ul {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.result-block li {
  padding: 8px 10px;
  color: var(--danger);
  background: rgb(255 255 255 / 68%);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 650;
}

.icon-button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.icon-button:hover {
  color: var(--teal);
  background: var(--mist);
}

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

.request-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(320px, 0.72fr);
  gap: 12px;
  align-items: start;
}

.request-list {
  display: grid;
  gap: 0;
  overflow: hidden;
}

.request-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  padding: 14px;
  text-align: left;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

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

.request-item:hover,
.request-item.is-selected {
  background: var(--teal-soft);
}

.request-item strong,
.request-item small {
  display: block;
}

.request-item strong {
  font-size: 14px;
}

.request-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.request-item p,
.request-item em {
  grid-column: 1 / -1;
}

.request-item p {
  color: var(--ink-soft);
  font-size: 13px;
}

.request-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.permission-note {
  color: var(--warning);
  background: var(--warning-soft);
}

.request-detail > footer p {
  color: var(--muted);
  font-size: 12px;
}

.quality-summary {
  grid-template-columns: repeat(4, 1fr);
}

.quality-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
  gap: 12px;
  align-items: start;
}

.compare-records {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px;
}

.compare-records section {
  padding: 11px;
  background: var(--mist);
  border-radius: 8px;
}

.compare-records .is-issue {
  color: var(--danger);
}

.merge-preview {
  padding: 12px 14px;
  background: var(--ochre-soft);
  border-block: 1px solid #e2cda6;
}

.merge-preview strong {
  color: var(--ochre);
  font-size: 13px;
}

.merge-preview p {
  margin-top: 5px;
}

.team-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 12px;
  align-items: start;
}

.chat-panel {
  grid-column: 1 / -1;
  overflow: hidden;
}

.chat-local {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.chat-local i {
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
}

.chat-workspace {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 350px;
}

.chat-rooms {
  padding: 8px;
  background: #f9faf8;
  border-right: 1px solid var(--line);
}

.chat-rooms button {
  display: flex;
  width: 100%;
  min-height: 68px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  text-align: left;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
}

.chat-rooms button:hover,
.chat-rooms button.is-selected {
  background: var(--teal-soft);
}

.chat-rooms button > span:last-child,
.chat-rooms strong,
.chat-rooms small {
  display: block;
  min-width: 0;
}

.chat-rooms strong {
  font-size: 14px;
}

.chat-rooms small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-avatar {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--teal-deep);
  background: var(--teal-soft);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.chat-thread-wrap {
  display: grid;
  min-width: 0;
  grid-template-rows: minmax(270px, 1fr) auto;
}

.chat-thread {
  display: flex;
  max-height: 390px;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  overflow: auto;
}

.chat-thread li {
  display: flex;
  max-width: min(620px, 86%);
  align-items: flex-end;
  gap: 9px;
}

.chat-thread li.is-own {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-message {
  padding: 10px 12px;
  background: var(--mist);
  border-radius: var(--radius);
}

.chat-thread li.is-own .chat-message {
  background: var(--teal-soft);
}

.chat-message header {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.chat-message strong {
  display: block;
  font-size: 13px;
}

.chat-message header span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.chat-message p {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
  background: #f9faf8;
  border-top: 1px solid var(--line);
}

.chat-composer input:not([type="hidden"]) {
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.chat-composer .form-error {
  grid-column: 1 / -1;
  grid-row: 2;
}

.notes-panel,
.chat-panel,
.files-panel,
.audit-panel {
  overflow: hidden;
}

.notes-panel form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.notes-panel form .full,
.notes-panel .form-footer {
  grid-column: 1 / -1;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.note-list {
  max-height: 380px;
  overflow: auto;
}

.note-list li {
  padding: 13px 14px;
  border-bottom: 1px solid var(--mist-strong);
}

.note-list li:last-child {
  border-bottom: 0;
}

.note-list li > div,
.note-list footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.note-list strong {
  font-size: 13px;
}

.note-list span,
.note-list time {
  color: var(--muted);
  font-size: 12px;
}

.note-list p {
  margin: 8px 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.file-drop {
  position: relative;
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 11px;
  margin: 12px;
  padding: 12px;
  color: var(--teal-deep);
  background: var(--teal-soft);
  border: 1px dashed #8bb8aa;
  border-radius: 8px;
  cursor: pointer;
}

.file-drop > svg {
  width: 22px;
  height: 22px;
}

.file-drop strong,
.file-drop small {
  display: block;
}

.file-drop strong {
  font-size: 13px;
}

.file-drop small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.file-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-list {
  display: flex;
  gap: 7px;
  padding: 0 12px 12px;
  overflow: auto;
}

.file-list button {
  display: flex;
  min-width: 190px;
  align-items: center;
  gap: 8px;
  padding: 9px;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.file-list button.is-selected {
  background: var(--teal-soft);
  border-color: #8bb8aa;
}

.file-list strong,
.file-list small {
  display: block;
}

.file-list strong {
  max-width: 140px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.file-detail {
  border-top: 1px solid var(--line);
}

.file-preview {
  max-height: 170px;
  margin: 12px;
  padding: 12px;
  overflow: auto;
  color: var(--teal-deep);
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.boundary-copy {
  padding: 0 12px 12px;
  color: var(--muted);
  font-size: 12px;
}

.audit-panel {
  margin-top: 12px;
}

.audit-list {
  max-height: 360px;
  overflow: auto;
}

.audit-list li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 130px 92px;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--mist-strong);
}

.audit-list li:last-child {
  border-bottom: 0;
}

.event-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 50%;
}

.event-icon svg {
  width: 13px;
  height: 13px;
}

.audit-list strong {
  font-size: 13px;
}

.audit-list p,
.audit-list > li > span,
.audit-list time {
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  z-index: 90;
  right: 18px;
  bottom: 18px;
  max-width: min(390px, calc(100vw - 32px));
  padding: 12px 14px;
  color: #fff;
  background: var(--teal-deep);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 650;
}

.toast[data-kind="error"] {
  background: var(--danger);
}

.toast[hidden] {
  display: none;
}

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

  .sidebar {
    width: 190px;
  }

  .topology-layout,
  .list-detail-layout,
  .quality-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }

  .drag-hint {
    display: none;
  }

  .mapping-layout {
    grid-template-columns: 1fr 2fr;
  }

  .mapping-layout .schema-column:last-child {
    grid-column: 1 / -1;
  }

  .mapping-layout .schema-column:last-child ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 9px 12px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    min-height: 38px;
    padding: 0;
  }

  .module-nav {
    display: flex;
    gap: 3px;
    margin-top: 8px;
    overflow-x: auto;
  }

  .module-nav a {
    min-width: max-content;
    min-height: 38px;
    padding: 0 10px;
  }

  .sidebar-foot {
    display: none;
  }

  .topbar {
    position: static;
    padding: 10px 14px;
  }

  .workspace {
    padding: 16px 14px 28px;
  }

  .inline-composer,
  .inline-composer.wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inline-composer > div:first-child,
  .inline-composer .composer-actions,
  .inline-composer .form-error {
    grid-column: 1 / -1;
  }

  .node-composer .placement-state {
    grid-column: 1 / -1;
  }

  .topology-layout,
  .list-detail-layout,
  .quality-layout,
  .console-layout,
  .request-layout,
  .team-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .graph-viewport {
    min-height: 500px;
  }

  .inspector,
  .detail-panel,
  .quality-review {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .module-nav {
    display: none;
  }

  .topbar {
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
  }

  .local-badge,
  .role-control > span {
    display: none;
  }

  .mobile-route-control {
    display: grid;
    width: min(185px, 52vw);
    gap: 3px;
    color: var(--muted);
    font-size: 14px;
  }

  .mobile-route-control select {
    width: 100%;
    min-height: 44px;
    padding: 0 9px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
  }

  .topbar-actions {
    gap: 6px;
  }

  .role-control select {
    width: min(145px, 39vw);
    min-height: 44px;
  }

  .workspace {
    padding-inline: 12px;
  }

  .page-intro {
    display: block;
  }

  .page-intro h2 {
    font-size: 24px;
  }

  .page-intro p {
    font-size: 15px;
  }

  .page-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 12px;
  }

  .page-actions .select-button,
  .page-actions .version-lock {
    grid-column: 1 / -1;
    width: 100%;
  }

  .button,
  .select-button,
  .select-button select,
  .search-field,
  .compact-field,
  .zoom-controls,
  label > input:not([type="checkbox"]),
  label > select {
    min-height: 44px;
  }

  .button,
  .select-button select,
  .search-field input,
  .compact-field select,
  .zoom-controls button {
    font-size: 15px;
  }

  .inline-composer,
  .inline-composer.wide {
    grid-template-columns: 1fr;
  }

  .inline-composer > *,
  .inline-composer > div:first-child,
  .inline-composer .composer-actions,
  .inline-composer .form-error {
    grid-column: 1;
  }

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

  .summary-strip > div + div {
    border-left: 0;
  }

  .summary-strip > div:nth-child(even) {
    border-left: 1px solid var(--line);
  }

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

  .graph-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .search-field {
    grid-column: 1 / -1;
    width: 100%;
  }

  .compact-field,
  .zoom-controls {
    width: 100%;
    margin-left: 0;
  }

  .compact-field select {
    max-width: none;
    min-width: 0;
  }

  .zoom-controls output,
  .zoom-controls button {
    flex: 1;
  }

  .zoom-controls button {
    min-width: 44px;
  }

  .graph-viewport.is-fit-view {
    min-height: 552px;
    overflow: hidden;
  }

  .graph-viewport.is-fit-view .stage-space {
    background-size: 36px 36px;
  }

  .graph-stage.is-mobile-fit .graph-node {
    grid-template-columns: 30px minmax(0, 1fr) 8px;
    width: 160px;
    min-height: 70px;
    padding: 10px;
    cursor: pointer;
  }

  .graph-stage.is-mobile-fit .drag-grip {
    display: none;
  }

  .graph-stage.is-mobile-fit .node-copy strong {
    font-size: 14px;
  }

  .graph-stage.is-mobile-fit .node-copy span,
  .graph-stage.is-mobile-fit .edge text {
    font-size: 13px;
  }

  .graph-panel > header {
    align-items: flex-start;
  }

  .legend {
    display: grid;
    gap: 4px;
  }

  .graph-panel > footer {
    display: grid;
    gap: 2px;
    padding-block: 7px;
  }

  .mapping-layout {
    display: block;
  }

  .mapping-layout > section + section {
    margin-top: 10px;
  }

  .mapping-layout .schema-column:last-child ul {
    display: block;
  }

  .mapping-row {
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
  }

  .mapping-row > label,
  .mapping-row > svg {
    grid-column: 2;
  }

  .mapping-row > label:nth-of-type(1) {
    grid-row: 1;
  }

  .mapping-row > label:nth-of-type(2) {
    grid-row: 2;
  }

  .mapping-row > label:nth-of-type(3) {
    grid-row: 3;
  }

  .mapping-row > svg {
    display: none;
  }

  .row-index {
    grid-row: 1;
    align-self: end;
    margin-bottom: 8px;
  }

  .table-wrap table {
    min-width: 640px;
  }

  .icon-button {
    width: 44px;
    height: 44px;
  }

  .file-list button {
    min-height: 44px;
  }

  .chat-workspace {
    grid-template-columns: 1fr;
  }

  .chat-rooms {
    display: flex;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
  }

  .chat-rooms button {
    min-width: 50%;
  }

  .chat-thread {
    min-height: 280px;
    padding: 14px;
  }

  .chat-message header {
    display: block;
  }

  .chat-message header span,
  .chat-rooms small,
  .chat-local {
    font-size: 14px;
  }

  .chat-composer input:not([type="hidden"]) {
    min-height: 44px;
  }

  .page-intro p,
  .graph-panel header p,
  .panel-title p,
  .inspector header p,
  .detail-panel header p,
  .mapping-board header p,
  .schema-column header p,
  .payload-panel header p,
  .quality-review header p,
  .file-detail header p,
  .chat-message header span,
  .summary-strip dt,
  .definition-list dt,
  .definition-list dd,
  .relationship-list span,
  .relationship-list em,
  .schema-column small,
  .schema-column em,
  .mapping-row label span,
  .history-panel header p,
  .payload-panel > header > span,
  .payload-panel > footer > span,
  .result-block header p,
  .result-block > p,
  .result-block dt,
  .result-block li,
  .sandbox-notice span,
  td small,
  th,
  td,
  .request-item small,
  .request-item em,
  .detail-panel section small,
  .note-list span,
  .note-list time,
  .file-drop small,
  .file-list small,
  .boundary-copy,
  .audit-list p,
  .audit-list > li > span,
  .audit-list time,
  .graph-panel > footer,
  .drag-hint {
    font-size: 14px;
  }

  .status,
  .mapping-row select,
  .tag-list span,
  .file-preview {
    font-size: 13px;
  }

  .mapping-board > footer,
  .payload-panel > footer {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .result-block dl,
  .compare-records,
  .notes-panel form {
    grid-template-columns: 1fr;
  }

  .notes-panel form .full,
  .notes-panel .form-footer {
    grid-column: 1;
  }

  .audit-list li {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .audit-list > li > span:not(.event-icon),
  .audit-list time {
    grid-column: 2;
  }

  .toast {
    right: 12px;
    bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
