:root {
  color-scheme: light;
  --bg: #f4f8f5;
  --surface: #ffffff;
  --surface-2: #edf5f0;
  --ink: #111a1f;
  --muted: #5e6d70;
  --line: #d4ded8;
  --blue: #087f73;
  --blue-dark: #075d57;
  --green: #4d9f52;
  --amber: #b45f36;
  --red: #bd3b3b;
  --teal: #0d8a93;
  --lime: #b7de62;
  --coral: #d66a55;
  --charcoal: #10201d;
  --shadow: 0 14px 34px rgba(17, 26, 31, 0.08);
  --radius: 8px;
  --topbar-height: 74px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  scroll-padding-top: calc(var(--topbar-height) + 14px);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(135deg, #f8fbf7 0%, #f1f8f5 45%, #f8f9ef 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--lime), var(--coral));
}

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

svg,
img {
  max-width: 100%;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 12px;
  color: #fff;
  font-weight: 850;
  text-decoration: none;
  background: var(--charcoal);
  border-radius: 6px;
  box-shadow: var(--shadow);
  transform: translateY(-140%);
  transition: transform 140ms ease;
}

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

:focus-visible {
  outline: 3px solid rgba(8, 127, 115, 0.42);
  outline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--topbar-height);
  padding: 13px 22px 12px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  color: #fafff5;
  background: linear-gradient(135deg, #0b6f65 0%, #0f9282 56%, #9fcf4f 100%);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(8, 127, 115, 0.22);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: auto -18px -24px auto;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(26deg);
}

.brand-mark svg {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  fill: currentColor;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 1.15rem;
  font-weight: 760;
  letter-spacing: 0;
}

h2 {
  font-size: 1.55rem;
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  font-size: 1rem;
  letter-spacing: 0;
}

.brand p,
.screen-head p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 2px;
}

.top-actions,
.screen-actions,
.mini-actions,
.form-actions,
.bulk-actions,
.inline-help-row,
.intro-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.product-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-left: auto;
}

.top-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  color: #3f4c4d;
  font-size: 0.86rem;
  font-weight: 780;
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
}

.top-link:hover,
.top-link:focus-visible {
  color: var(--blue-dark);
  background: #edf6f1;
  border-color: #c8d8cf;
}

.shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - var(--topbar-height));
}

.rail {
  position: sticky;
  top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
  padding: 18px 12px;
  overflow-y: auto;
  background:
    linear-gradient(180deg, #10201d 0%, #152b27 52%, #101b1b 100%);
  border-right: 1px solid #0e1918;
}

.nav-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  width: 100%;
  gap: 10px;
  padding: 10px;
  color: #d8e8e2;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.nav-item:hover,
.nav-item.active,
.nav-item[aria-current="page"] {
  color: #fff;
  background: #203b35;
  border-color: #335a51;
}

.nav-item span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #c2d6ce;
  font-size: 0.78rem;
  background: #0c1716;
  border-radius: 999px;
}

.nav-item.active span,
.nav-item[aria-current="page"] span {
  color: #fff;
  background: var(--blue);
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.product-intro {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(300px, 0.86fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 251, 247, 0.98) 62%, rgba(250, 252, 240, 0.98) 100%);
  border: 1px solid #cadbd1;
  border-left: 5px solid var(--blue);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.intro-copy {
  display: grid;
  gap: 6px;
}

.intro-copy h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
  line-height: 1;
}

.intro-copy p {
  max-width: 760px;
  color: #4f5f61;
  font-size: 0.98rem;
  line-height: 1.48;
}

.intro-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.intro-stats div {
  min-height: 72px;
  padding: 11px 12px;
  background: #f8fbf7;
  border: 1px solid #d6e4db;
  border-radius: 7px;
}

.intro-stats dt {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 850;
}

.intro-stats dd {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.screen-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metric strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.metric span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.86rem;
}

.split-layout,
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(340px, 0.8fr);
  gap: 16px;
  align-items: start;
}

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

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

.policy-panel,
.bulk-panel {
  margin-bottom: 16px;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  background: #e3f5ee;
  border-radius: 999px;
}

.pill.muted {
  color: #4d5d5f;
  background: #eef4f0;
}

.pill.good {
  color: #126542;
  background: #e2f5e7;
}

.pill.warn {
  color: #934626;
  background: #fff0e9;
}

.pill.danger {
  color: #8f2c2c;
  background: #fde8e8;
}

.table-wrap {
  max-width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.table-wrap.tall {
  max-height: 60vh;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 11px 12px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.check-cell {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  padding-left: 12px;
  padding-right: 8px;
  text-align: center;
}

.check-cell input[type="checkbox"],
td.check-cell input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  margin: 0;
}

th {
  color: #536466;
  font-size: 0.76rem;
  text-align: left;
  text-transform: uppercase;
  background: #f8faf8;
}

td {
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

tr:hover td {
  background: #f6fbf8;
}

tr.mapping-selected td {
  background: #ecf8f2;
}

.row-title {
  display: block;
  font-weight: 730;
  overflow-wrap: anywhere;
}

.observed-key {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 210px;
}

.hover-action {
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

tr:hover .hover-action,
.observed-key:focus-within .hover-action {
  opacity: 1;
  transform: translateX(0);
}

.row-sub {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.detail-panel {
  position: sticky;
  top: 90px;
}

.form-grid {
  display: grid;
  gap: 12px;
  padding: 16px;
}

label {
  display: grid;
  gap: 6px;
  color: #536466;
  font-size: 0.82rem;
  font-weight: 700;
}

.field-note {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.35;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c7d6cf;
  border-radius: 6px;
  outline: none;
}

input,
select {
  height: 40px;
  padding: 0 10px;
}

textarea {
  resize: vertical;
  padding: 10px;
  line-height: 1.35;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(8, 127, 115, 0.16);
}

.check-row {
  grid-template-columns: 18px 1fr;
  align-items: center;
  color: var(--ink);
  font-weight: 650;
}

.check-row input {
  width: 18px;
  height: 18px;
}

.primary,
.secondary,
.ghost,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  gap: 8px;
  padding: 0 14px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid transparent;
}

.primary {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 8px 16px rgba(8, 127, 115, 0.16);
}

.primary:hover {
  background: var(--blue-dark);
}

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

.secondary:hover,
.icon-button:hover {
  border-color: #9fb8ad;
  background: #f5faf7;
}

.ghost {
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}

.ghost:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.small {
  min-height: 34px;
  padding: 0 11px;
  font-size: 0.84rem;
}

.icon-button svg,
.drop-zone svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.wide-select {
  min-width: 230px;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 220px 160px;
  gap: 10px;
  margin-bottom: 14px;
}

.plan-filter-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.mapping-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  min-height: 34px;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 800;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.tab-button.active {
  color: var(--blue-dark);
  background: #e3f5ee;
  border-color: #abd8ca;
}

.tab-button span {
  margin-left: 6px;
  color: var(--ink);
}

.bulk-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  padding: 16px;
}

.bulk-row .wide-field {
  grid-column: span 1;
}

.bulk-actions {
  padding: 0 16px 16px;
}

.inline-help-row {
  margin-bottom: 6px;
}

.inline-help-row select {
  flex: 1;
}

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

.library-card {
  display: grid;
  gap: 11px;
  min-height: 220px;
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.library-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.library-card h3 {
  font-size: 1.02rem;
}

.library-card p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.library-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.project-link {
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.project-link:hover,
.project-link:focus-visible {
  color: var(--blue-dark);
  text-decoration: underline;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 3px 7px;
  color: #4d5d5f;
  font-size: 0.75rem;
  font-weight: 700;
  background: #eef4f0;
  border-radius: 999px;
}

.chip.green {
  color: #126542;
  background: #e2f5e7;
}

.chip.amber {
  color: #934626;
  background: #fff0e9;
}

.chip.teal {
  color: #075e6e;
  background: #e1f5f8;
}

.drop-zone {
  display: grid;
  min-height: 168px;
  place-items: center;
  gap: 8px;
  margin: 16px;
  padding: 22px;
  color: var(--ink);
  text-align: center;
  border: 2px dashed #b4c9c0;
  border-radius: var(--radius);
  background: #f8fbf7;
  cursor: pointer;
}

.drop-zone.drag-over {
  color: var(--blue-dark);
  border-color: var(--blue);
  background: #edf8f2;
  box-shadow: inset 0 0 0 3px rgba(8, 127, 115, 0.12);
}

.drop-zone span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
}

.code-block {
  margin: 16px;
  padding: 14px;
  max-width: calc(100% - 32px);
  overflow: auto;
  color: #edf8f5;
  background: #10201d;
  border-radius: var(--radius);
  line-height: 1.45;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
}

.tall-code {
  min-height: 360px;
  max-height: 62vh;
}

.code-block.empty-preview {
  min-height: 170px;
  color: var(--muted);
  white-space: pre-wrap;
  background: #f8fbf7;
  border: 1px dashed #b4c9c0;
}

.signal-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.signal {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
  background: #f8fbf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.signal::before {
  content: "";
  width: 8px;
  height: 100%;
  min-height: 34px;
  background: var(--blue);
  border-radius: 99px;
}

.signal.warn::before {
  background: var(--amber);
}

.signal.good::before {
  background: var(--green);
}

.signal.danger::before {
  background: var(--red);
}

.signal strong {
  display: block;
  margin-bottom: 2px;
}

.signal span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.inline-select,
.inline-input {
  min-width: 170px;
  height: 34px;
}

.inline-input {
  min-width: 140px;
}

.confidence {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
}

.confidence-bar {
  width: 56px;
  height: 8px;
  overflow: hidden;
  background: #e0e9e3;
  border-radius: 999px;
}

.confidence-bar span {
  display: block;
  height: 100%;
  background: var(--teal);
}

.mapping-status-cell {
  min-width: 190px;
}

.status-note {
  display: block;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
}

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

.status-note.warn {
  color: var(--amber);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

tr.mapping-dirty {
  background: #fff8f4;
}

tr.mapping-handled {
  background: #f7fbf8;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  color: #fff;
  background: #10201d;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.file-button {
  display: inline-flex;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(13, 23, 35, 0.48);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  width: min(760px, 100%);
  max-height: min(92vh, 920px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(13, 23, 35, 0.28);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.modal-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

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

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

input:disabled,
select:disabled,
textarea:disabled {
  color: var(--muted);
  background: #eef4f0;
}

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

.ecosystem-links {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.64fr) minmax(220px, 0.64fr);
  gap: 12px;
  align-items: stretch;
  margin-top: 24px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.ecosystem-links h2 {
  font-size: 1.15rem;
}

.ecosystem-links p {
  max-width: 760px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.ecosystem-card {
  display: grid;
  gap: 5px;
  align-content: start;
  min-height: 92px;
  padding: 13px;
  color: var(--ink);
  text-decoration: none;
  background: #f8fbf7;
  border: 1px solid #d6e4db;
  border-radius: 7px;
}

.ecosystem-card:hover,
.ecosystem-card:focus-visible {
  border-color: #9fcdbd;
  box-shadow: 0 10px 22px rgba(8, 127, 115, 0.1);
}

.ecosystem-card strong {
  color: var(--blue-dark);
  font-size: 0.95rem;
}

.ecosystem-card span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

@media (max-width: 1180px) {
  .product-intro {
    grid-template-columns: 1fr;
  }

  .intro-actions {
    justify-content: flex-start;
  }

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

  .split-layout,
  .two-column,
  .ecosystem-links {
    grid-template-columns: 1fr;
  }

  .bulk-row,
  .modal-grid {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    position: static;
  }
}

@media (max-width: 800px) {
  html {
    scroll-padding-top: 86px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    position: static;
    gap: 12px;
    padding: 12px 14px;
  }

  .brand {
    width: 100%;
  }

  .product-nav {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  body:not([data-active-screen="model"]) .product-intro {
    display: none;
  }

  .top-link {
    min-height: 42px;
    flex: 0 0 auto;
  }

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

  .top-actions .icon-button {
    width: 100%;
  }

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

  .rail {
    position: sticky;
    top: 0;
    z-index: 16;
    display: flex;
    gap: 8px;
    height: auto;
    padding: 10px 12px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid #0e1918;
    -webkit-overflow-scrolling: touch;
  }

  .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    min-width: 86px;
    min-height: 62px;
    text-align: center;
  }

  .workspace {
    padding: 16px;
  }

  .screen-head {
    flex-direction: column;
  }

  .filter-row,
  .plan-filter-row,
  .intro-stats,
  .library-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  table {
    min-width: 980px;
  }
}

@media (max-width: 640px) {
  h2 {
    font-size: 1.32rem;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand p {
    font-size: 0.82rem;
  }

  .product-intro,
  .panel,
  .metric,
  .ecosystem-links {
    box-shadow: 0 8px 22px rgba(17, 26, 31, 0.06);
  }

  .product-intro {
    margin-bottom: 14px;
    padding: 14px;
  }

  .intro-copy h2 {
    font-size: 1.72rem;
  }

  .intro-copy p,
  .screen-head p {
    font-size: 0.9rem;
  }

  .screen-actions,
  .intro-actions,
  .bulk-actions,
  .form-actions {
    align-items: stretch;
    width: 100%;
  }

  .screen-actions > *,
  .intro-actions > *,
  .bulk-actions > *,
  .form-actions > * {
    flex: 1 1 160px;
  }

  .primary,
  .secondary,
  .ghost,
  .icon-button,
  .tab-button {
    min-height: 44px;
  }

  input,
  select {
    min-height: 44px;
    font-size: 1rem;
  }

  textarea {
    font-size: 1rem;
  }

  .wide-select,
  .inline-select,
  .inline-input {
    min-width: 0;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .pill {
    max-width: 100%;
    white-space: normal;
  }

  .table-wrap {
    overflow: visible;
  }

  .table-wrap.tall {
    max-height: none;
  }

  table {
    display: block;
    min-width: 0;
    table-layout: auto;
  }

  thead {
    display: none;
  }

  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  tr {
    margin: 10px 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  th,
  td {
    border-bottom: 0;
  }

  td {
    display: grid;
    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px 12px;
    border-bottom: 1px solid #edf3ef;
  }

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

  td::before {
    content: attr(data-label);
    color: #657275;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  td[colspan] {
    display: block;
  }

  td[colspan]::before {
    content: none;
  }

  .check-cell,
  td.check-cell {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: none;
    justify-content: space-between;
    text-align: left;
  }

  td.check-cell::before {
    content: "Select";
  }

  .observed-key {
    min-width: 0;
  }

  .hover-action {
    opacity: 1;
    transform: none;
  }

  .mapping-status-cell {
    min-width: 0;
  }

  .code-block {
    margin: 12px;
    max-width: calc(100% - 24px);
    font-size: 0.74rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .modal-backdrop {
    align-items: stretch;
    padding: 8px;
  }

  .modal {
    width: 100%;
    max-height: calc(100vh - 16px);
  }

  .modal-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--surface);
  }
}

@media (max-width: 430px) {
  .brand p {
    display: none;
  }

  .workspace {
    padding: 12px;
  }

  .top-link {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 5px;
    font-size: 0.78rem;
  }

  .product-nav {
    gap: 2px;
    overflow-x: visible;
  }

  .nav-item {
    min-width: 78px;
  }

  .nav-item span {
    width: 24px;
    height: 24px;
  }

  td {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

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