:root {
  color-scheme: light;
  --bg: #f4f0e7;
  --bg-strong: #eee6d8;
  --ink: #191816;
  --muted: #6c675e;
  --line: #d8cfc1;
  --panel: #fffdf8;
  --panel-2: #f9f4eb;
  --charcoal: #242220;
  --teal: #0c8f7b;
  --teal-soft: #d7eee9;
  --coral: #d85c4a;
  --coral-soft: #f6ddd7;
  --gold: #e0a928;
  --gold-soft: #f5e7bd;
  --violet: #6157d8;
  --violet-soft: #e2e0fb;
  --green: #2c9958;
  --green-soft: #dceee2;
  --shadow: 0 24px 70px rgba(39, 34, 27, 0.11);
  --radius: 8px;
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --skeleton-base: #e7dece;
  --skeleton-shine: #fffaf0;
}

body.contrast {
  color-scheme: dark;
  --bg: #171511;
  --bg-strong: #211f19;
  --ink: #f7f0e4;
  --muted: #bdb5a8;
  --line: #39352d;
  --panel: #24211b;
  --panel-2: #1e1c17;
  --charcoal: #f7f0e4;
  --teal-soft: rgba(12, 143, 123, 0.22);
  --coral-soft: rgba(216, 92, 74, 0.22);
  --gold-soft: rgba(224, 169, 40, 0.22);
  --violet-soft: rgba(97, 87, 216, 0.24);
  --green-soft: rgba(44, 153, 88, 0.22);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --skeleton-base: #343026;
  --skeleton-shine: #4b4438;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(25, 24, 22, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(25, 24, 22, 0.03) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
  color: var(--ink);
  font-family: var(--font-sans);
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 34px;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.82);
  backdrop-filter: blur(18px);
  z-index: 5;
}

body.contrast .rail {
  background: rgba(36, 33, 27, 0.9);
}

.brand-lockup {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid color-mix(in srgb, var(--ink), transparent 78%);
  border-radius: 50%;
  background: var(--panel);
  box-shadow: 0 12px 24px rgba(25, 24, 22, 0.14);
}

.brand-mark img {
  display: block;
  width: 48px;
  height: 48px;
}

.brand-lockup p,
.brand-lockup span,
.rail-footer strong,
.rail-footer small {
  display: block;
}

.brand-lockup p {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.brand-lockup span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.nav-stack {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: background 170ms ease, color 170ms ease, border-color 170ms ease, transform 170ms ease;
}

.nav-item:hover,
.nav-item:focus-visible {
  border-color: var(--line);
  background: var(--panel-2);
  color: var(--ink);
  outline: none;
}

.nav-item.is-active {
  border-color: var(--ink);
  background: var(--charcoal);
  color: var(--bg);
  box-shadow: 6px 6px 0 var(--gold-soft);
}

body.contrast .nav-item.is-active {
  color: #171511;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--bg-strong);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.nav-item.is-active .nav-icon {
  background: var(--gold);
  color: #16130d;
}

.rail-footer {
  display: grid;
  grid-template-columns: 14px 1fr;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.rail-footer strong {
  font-size: 12px;
}

.rail-footer small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 7px var(--green-soft);
}

.workspace {
  display: grid;
  gap: 22px;
  align-content: start;
  padding: 26px;
  overflow: hidden;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 20px;
}

.eyebrow,
.card-kicker {
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.topbar h1 {
  max-width: 980px;
  margin: 0;
  color: var(--ink);
  font-size: 32px;
  line-height: 1.08;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.icon-button,
.tiny-button,
.segmented button,
.url-control button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font-size: 18px;
}

.icon-button:hover,
.tiny-button:hover,
.segmented button:hover,
.url-control button:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.icon-button:focus-visible,
.tiny-button:focus-visible,
.segmented button:focus-visible,
.url-control button:focus-visible,
.nav-item:focus-visible {
  outline: 3px solid var(--gold-soft);
  outline-offset: 2px;
}

.audit-console {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 14px;
  align-items: stretch;
}

.url-form,
.audit-status,
.panel,
.score-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.url-form {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.url-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.url-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.url-control span {
  color: var(--muted);
  font-weight: 700;
}

.url-control input {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  outline: none;
}

.url-control button {
  min-height: 42px;
  padding: 0 16px;
  background: var(--charcoal);
  color: var(--bg);
  font-weight: 700;
}

body.contrast .url-control button {
  color: #171511;
}

.url-control button:disabled {
  cursor: progress;
  opacity: 0.78;
}

.url-control button:disabled:hover {
  border-color: var(--line);
  transform: none;
}

.audit-status {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px;
}

.audit-status strong,
.audit-status small {
  display: block;
}

.audit-status strong {
  font-size: 14px;
}

.audit-status small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.status-ring {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: conic-gradient(var(--teal), var(--gold), var(--coral), var(--teal));
}

.status-ring::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--panel);
}

.audit-status.is-running .status-ring {
  animation: spin 1.6s linear infinite;
}

.view-panel {
  display: none;
  gap: 22px;
}

.view-panel.is-visible {
  display: grid;
}

.score-band {
  display: grid;
  grid-template-columns: minmax(360px, 1.45fr) repeat(2, minmax(220px, 0.75fr));
  gap: 14px;
}

.score-card {
  min-height: 190px;
  padding: 18px;
}

.score-card strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 46px;
  line-height: 1;
}

.score-card p {
  max-width: 42ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.primary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(12, 143, 123, 0.13), transparent 40%),
    linear-gradient(300deg, rgba(224, 169, 40, 0.2), transparent 35%),
    var(--panel);
}

#scoreCanvas {
  width: 180px;
  height: 180px;
}

.analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.7fr);
  gap: 14px;
}

.panel {
  min-width: 0;
  padding: 16px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.tiny-button {
  min-height: 34px;
  padding: 0 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.visual-panel {
  overflow: hidden;
}

#constellationCanvas {
  display: block;
  width: 100%;
  height: 430px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(25, 24, 22, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(25, 24, 22, 0.04) 1px, transparent 1px),
    var(--panel-2);
  background-size: 38px 38px;
}

.agent-list {
  display: grid;
  gap: 10px;
}

.agent-item,
.opportunity-card,
.model-card,
.probe-row,
.workflow-step,
.schema-checks article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.agent-item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 10px;
}

.agent-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #15130f;
  font-weight: 700;
}

.agent-item h3,
.agent-item p {
  margin: 0;
}

.agent-item h3 {
  font-size: 13px;
}

.agent-item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.agent-state {
  min-width: 74px;
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-width: 238px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.segmented button {
  min-height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.segmented button.is-selected {
  background: var(--charcoal);
  color: var(--bg);
}

body.contrast .segmented button.is-selected {
  color: #171511;
}

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

.opportunity-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 190px;
  padding: 14px;
}

.opportunity-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.opportunity-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.impact-pill {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #7a5200;
  font-size: 11px;
  font-weight: 700;
}

body.contrast .impact-pill {
  color: #f3cb68;
}

.opportunity-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.progress-track {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-strong);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--coral));
}

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

.model-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  min-height: 190px;
}

.model-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.model-card h3,
.model-card p {
  margin: 0;
}

.model-card h3 {
  font-size: 15px;
}

.model-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.model-score {
  color: var(--ink);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.heat-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  height: 36px;
}

.heat-cell {
  border-radius: 5px;
  background: var(--bg-strong);
}

.heat-cell.high {
  background: var(--teal);
}

.heat-cell.mid {
  background: var(--gold);
}

.heat-cell.low {
  background: var(--coral);
}

.probe-table {
  display: grid;
  gap: 9px;
}

.probe-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 140px 120px;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 12px;
}

.probe-row strong,
.probe-row span,
.probe-row small {
  min-width: 0;
}

.probe-row strong {
  font-size: 13px;
}

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

.probe-row small {
  justify-self: end;
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 12px;
}

.workflow-step {
  display: grid;
  gap: 14px;
  min-height: 260px;
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.workflow-step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent, var(--teal));
}

.workflow-step h3,
.workflow-step p,
.workflow-step ul {
  margin: 0;
}

.workflow-step h3 {
  font-size: 15px;
}

.workflow-step p,
.workflow-step li {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.workflow-step ul {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.workflow-step li {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.cycle-meter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}

.cycle-meter strong {
  color: var(--ink);
  font-size: 12px;
}

.content-lab {
  min-height: 610px;
}

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

.copy-layout article {
  min-height: 148px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.copy-layout span {
  display: block;
  margin-bottom: 10px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.copy-layout p {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
}

.schema-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.6fr);
  gap: 12px;
}

#schemaCode {
  min-height: 520px;
  max-height: 620px;
  margin: 0;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #15140f;
  color: #f7efd7;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.schema-checks {
  display: grid;
  align-content: start;
  gap: 10px;
}

.schema-checks article {
  padding: 12px;
}

.schema-checks strong {
  display: block;
  font-size: 13px;
}

.schema-checks p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.skeleton-card {
  position: relative;
  overflow: hidden;
}

.skeleton-item {
  overflow: hidden;
}

.skeleton {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(
    105deg,
    var(--skeleton-base) 0%,
    var(--skeleton-base) 34%,
    var(--skeleton-shine) 48%,
    var(--skeleton-base) 62%,
    var(--skeleton-base) 100%
  );
  background-size: 260% 100%;
  animation: shimmer 1.25s ease-in-out infinite;
}

.skeleton-heading {
  display: grid;
  gap: 10px;
  min-width: 220px;
}

.skeleton-kicker {
  width: 112px;
  height: 11px;
}

.skeleton-title {
  width: min(340px, 70%);
  height: 22px;
}

.skeleton-title.small {
  width: 155px;
  height: 16px;
}

.skeleton-score {
  width: 94px;
  height: 56px;
  margin: 14px 0;
}

.skeleton-metric {
  width: 116px;
  height: 46px;
  margin: 16px 0 12px;
}

.skeleton-line {
  height: 12px;
  margin-top: 10px;
}

.skeleton-line.wide {
  width: 92%;
}

.skeleton-line.medium {
  width: 68%;
}

.skeleton-line.short {
  width: 42%;
}

.skeleton-gauge {
  justify-self: center;
  width: 180px;
  height: 180px;
  border-radius: 50%;
}

.skeleton-button {
  width: 104px;
  height: 34px;
  border-radius: var(--radius);
}

.skeleton-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.skeleton-pill,
.skeleton-chip {
  width: 76px;
  height: 28px;
  border-radius: 999px;
}

.skeleton-track {
  width: 100%;
  height: 9px;
  margin-top: 12px;
  border-radius: 999px;
}

.skeleton-heat {
  height: 36px;
  border-radius: 5px;
}

.skeleton-segmented button {
  color: transparent;
  pointer-events: none;
}

.skeleton-constellation {
  position: relative;
  width: 100%;
  height: 430px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(25, 24, 22, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(25, 24, 22, 0.04) 1px, transparent 1px),
    var(--panel-2);
  background-size: 38px 38px;
}

.skeleton-constellation::before,
.skeleton-constellation::after {
  content: "";
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--muted), transparent 72%);
  border-radius: 50%;
  inset: 24%;
}

.skeleton-constellation::after {
  inset: 36%;
}

.skeleton-node {
  position: absolute;
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.skeleton-node.node-1 {
  top: 14%;
  left: 48%;
}

.skeleton-node.node-2 {
  top: 23%;
  left: 72%;
}

.skeleton-node.node-3 {
  top: 48%;
  left: 82%;
}

.skeleton-node.node-4 {
  top: 70%;
  left: 66%;
}

.skeleton-node.node-5 {
  top: 76%;
  left: 39%;
}

.skeleton-node.node-6 {
  top: 58%;
  left: 18%;
}

.skeleton-node.node-7 {
  top: 30%;
  left: 17%;
}

.skeleton-node.node-8 {
  top: 40%;
  left: 48%;
}

.skeleton-code {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 520px;
  max-height: 620px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #15140f;
}

.skeleton-code-line {
  height: 12px;
}

.skeleton-code-line.line-1 {
  width: 84%;
}

.skeleton-code-line.line-2 {
  width: 64%;
}

.skeleton-code-line.line-3 {
  width: 74%;
}

.skeleton-code-line.line-4 {
  width: 42%;
}

.skeleton-code-line.line-5 {
  width: 90%;
}

.is-flashing {
  animation: flash 480ms ease;
}

@keyframes shimmer {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes flash {
  0%,
  100% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(-2px);
    box-shadow: 0 0 0 4px var(--gold-soft), var(--shadow);
  }
}

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

  .rail {
    padding: 18px 12px;
    align-items: center;
  }

  .brand-lockup {
    grid-template-columns: 1fr;
  }

  .brand-lockup div:not(.brand-mark),
  .nav-item span:last-child,
  .rail-footer div {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .nav-item {
    grid-template-columns: 1fr;
    padding: 6px;
  }

  .rail-footer {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .score-band,
  .analysis-grid,
  .model-matrix,
  .workflow,
  .schema-layout {
    grid-template-columns: 1fr 1fr;
  }

  .primary-card {
    grid-column: 1 / -1;
  }

  .visual-panel {
    grid-column: 1 / -1;
  }
}

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

  .rail {
    position: static;
    flex-direction: row;
    width: 100%;
    height: auto;
    gap: 12px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail-footer {
    display: none;
  }

  .brand-lockup {
    display: grid;
    flex: 0 0 52px;
  }

  .nav-stack {
    grid-auto-flow: column;
    grid-auto-columns: minmax(64px, max-content);
    width: 100%;
    overflow-x: auto;
  }

  .nav-item {
    grid-template-columns: 34px auto;
    white-space: nowrap;
  }

  .nav-item span:last-child {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }

  .workspace {
    padding: 18px;
  }

  .topbar,
  .audit-console,
  .score-band,
  .analysis-grid,
  .model-matrix,
  .workflow,
  .schema-layout,
  .opportunity-grid {
    grid-template-columns: 1fr;
  }

  .topbar h1 {
    font-size: 26px;
  }

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

  .url-control {
    grid-template-columns: 1fr;
  }

  .url-control button {
    width: 100%;
  }

  .primary-card {
    grid-template-columns: 1fr;
  }

  #scoreCanvas {
    justify-self: center;
  }

  .panel-heading {
    display: grid;
  }

  .segmented {
    width: 100%;
    min-width: 0;
  }

  .probe-row {
    grid-template-columns: 1fr;
  }

  .probe-row small {
    justify-self: start;
  }

  .content-lab {
    min-height: auto;
  }
}

@media (max-width: 520px) {
  .workspace {
    padding: 12px;
  }

  .topbar h1 {
    font-size: 22px;
  }

  .score-card strong {
    font-size: 38px;
  }

  #constellationCanvas {
    height: 330px;
  }
}
