:root {
  --mono-0: #ffffff;
  --mono-50: #fafafa;
  --mono-100: #f4f4f4;
  --mono-200: #e2e2e2;
  --mono-300: #bebebe;
  --mono-400: #9f9f9f;
  --mono-500: #828282;
  --mono-600: #6e6e6e;
  --mono-700: #545454;
  --mono-800: #2d2d2d;
  --mono-900: #1f1f1f;
  --mono-950: #111111;
  --ink: var(--mono-900);
  --muted: var(--mono-600);
  --line: var(--mono-200);
  --canvas: var(--mono-100);
  --panel: var(--mono-0);
  --sidebar: var(--mono-900);
  --sidebar-soft: var(--mono-800);
  --accent: var(--mono-300);
  --accent-dark: var(--mono-600);
  --violet: var(--mono-600);
  --blue: var(--mono-500);
  --amber: var(--mono-400);
  --green: var(--mono-700);
  --danger: var(--mono-800);
  --shadow: 0 12px 36px rgb(37 37 37 / 7%);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--canvas);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgb(190 190 190 / 35%);
  outline-offset: 2px;
}

code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.78em;
  overflow-wrap: anywhere;
}

.watermark {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 13px;
  padding: 7px 10px;
  border: 1px solid rgb(31 31 31 / 18%);
  border-radius: 7px;
  color: rgb(31 31 31 / 45%);
  background: rgb(255 255 255 / 80%);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 26px 18px 20px;
  color: #f6f6f6;
  background:
    radial-gradient(circle at 20% 0%, rgb(190 190 190 / 12%), transparent 32%),
    var(--sidebar);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 28px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px 4px 12px 12px;
  color: var(--sidebar);
  background: var(--accent);
  font-size: 20px;
  font-weight: 900;
}

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

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

.brand small {
  margin-top: 3px;
  color: #9f9f9f;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.sidebar nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 13px;
  border: 0;
  border-radius: 10px;
  color: #bababa;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
}

.nav-item span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #8f8f8f;
  font-size: 15px;
}

.nav-item:hover {
  color: #ffffff;
  background: rgb(255 255 255 / 5%);
}

.nav-item.active {
  color: #ffffff;
  background: var(--sidebar-soft);
  box-shadow: inset 3px 0 var(--accent);
}

.nav-item.active span {
  color: var(--accent);
}

.sidebar-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 13px;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 11px;
  background: rgb(255 255 255 / 3%);
}

.sidebar-note > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  color: var(--accent);
  background: rgb(190 190 190 / 12%);
  font-weight: 850;
}

.sidebar-note b,
.sidebar-note small {
  display: block;
}

.sidebar-note b {
  font-size: 12px;
}

.sidebar-note small {
  margin-top: 2px;
  color: #929292;
  font-size: 10px;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 0 6px;
  color: #919191;
  font-size: 10px;
}

.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgb(190 190 190 / 10%);
}

.workspace {
  display: flex;
  min-width: 0;
  min-height: 100vh;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 84%);
  backdrop-filter: blur(15px);
}

.topbar > div:first-child {
  display: flex;
  align-items: center;
  gap: 11px;
}

.topbar strong {
  font-size: 13px;
}

.environment-tag {
  padding: 5px 8px;
  border-radius: 6px;
  color: #585858;
  background: #f1f1f1;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

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

.external-disabled {
  color: #696969;
  font-size: 10px;
  font-weight: 750;
}

.external-disabled::first-letter {
  color: #afafaf;
}

.icon-button {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #4d4d4d;
  background: #ffffff;
  font-size: 10px;
  font-weight: 750;
}

.icon-button:hover {
  border-color: #c4c4c4;
  background: #fafafa;
}

.cto-avatar {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  background: #3a3a3a;
  font-size: 9px;
  font-weight: 850;
}

.disclaimer {
  padding: 9px 34px;
  border-bottom: 1px solid #dadada;
  color: #525252;
  background: #f7f7f7;
  font-size: 11px;
  line-height: 1.45;
}

main {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 30px 34px 42px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, 0.8fr);
  gap: 20px;
  align-items: start;
}

.primary-column,
.side-column {
  display: grid;
  gap: 18px;
}

.panel,
.gate-panel,
.evidence-bundle,
.empty-evidence {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  padding: 21px;
}

.objective-panel {
  position: relative;
  overflow: hidden;
  border-color: #dadada;
  background:
    linear-gradient(115deg, rgb(190 190 190 / 9%), transparent 52%),
    #ffffff;
}

.objective-panel::after {
  position: absolute;
  top: -58px;
  right: -38px;
  width: 150px;
  height: 150px;
  border: 24px solid rgb(190 190 190 / 8%);
  border-radius: 50%;
  content: "";
}

.section-heading {
  position: relative;
  z-index: 1;
  margin-bottom: 17px;
}

.section-heading.split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.section-heading h2,
.section-heading h3,
.section-heading p {
  margin: 0;
}

.section-heading h2 {
  margin-top: 4px;
  font-size: 20px;
  letter-spacing: -0.035em;
}

.section-heading h3 {
  margin-top: 4px;
  font-size: 16px;
  letter-spacing: -0.025em;
}

.section-heading p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.eyebrow {
  color: #7d7d7d;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.stage-chip {
  position: relative;
  z-index: 2;
  padding: 6px 9px;
  border: 1px solid #dcdcdc;
  border-radius: 999px;
  color: #5b5b5b;
  background: #f7f7f7;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.objective-copy {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 9px 0 18px;
  font-size: 15px;
  font-weight: 610;
  line-height: 1.55;
}

.fact-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.25fr 0.65fr 0.85fr;
  gap: 10px;
}

.fact-row span {
  padding: 10px 12px;
  border-radius: 9px;
  color: #626262;
  background: rgb(245 245 245 / 76%);
  font-size: 10px;
  line-height: 1.4;
}

.fact-row b {
  display: block;
  margin-bottom: 2px;
  color: #858585;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
}

.workflow-step {
  display: flex;
  gap: 10px;
  min-height: 76px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #808080;
  background: #fcfcfc;
}

.workflow-step.active {
  border-color: #cccccc;
  color: var(--ink);
  background: #f9f9f9;
}

.workflow-step.done {
  color: #616161;
  background: #f7f7f7;
}

.step-number {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  color: #888888;
  background: #efefef;
  font-size: 9px;
  font-weight: 850;
}

.workflow-step.active .step-number,
.workflow-step.done .step-number {
  color: #535353;
  background: #e8e8e8;
}

.workflow-step strong,
.workflow-step span:not(.step-number) {
  display: block;
}

.workflow-step strong {
  margin-top: 2px;
  font-size: 11px;
}

.workflow-step span:not(.step-number) {
  margin-top: 4px;
  font-size: 9px;
  line-height: 1.35;
}

.text-button {
  padding: 0;
  border: 0;
  color: var(--accent-dark);
  background: none;
  font-size: 10px;
  font-weight: 800;
}

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

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

.full-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 20px;
}

.agent-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  min-height: 160px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.agent-card.compact {
  min-height: 124px;
  padding: 14px;
  box-shadow: none;
}

.agent-card::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--agent-tone);
  content: "";
}

.tone-violet {
  --agent-tone: var(--violet);
}

.tone-blue {
  --agent-tone: var(--blue);
}

.tone-amber {
  --agent-tone: var(--amber);
}

.tone-green {
  --agent-tone: var(--green);
}

.agent-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: var(--agent-tone);
  background: color-mix(in srgb, var(--agent-tone) 11%, white);
  font-size: 11px;
  font-weight: 900;
}

.compact .agent-avatar {
  width: 35px;
  height: 35px;
  border-radius: 10px;
  font-size: 9px;
}

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

.agent-copy h3 {
  margin-top: 4px;
  font-size: 13px;
}

.agent-copy p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.agent-boundary {
  display: block;
  margin-top: 9px;
  color: #848484;
  font-size: 9px;
  line-height: 1.4;
}

.status-pill {
  position: absolute;
  right: 12px;
  bottom: 11px;
  padding: 5px 7px;
  border-radius: 6px;
  color: color-mix(in srgb, var(--agent-tone) 75%, black);
  background: color-mix(in srgb, var(--agent-tone) 9%, white);
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.05em;
}

.gate-panel {
  padding: 22px;
  border-color: #d6d6d6;
  background:
    linear-gradient(145deg, rgb(190 190 190 / 10%), transparent 60%),
    #ffffff;
}

.gate-panel h3,
.gate-panel p {
  margin: 0;
}

.gate-panel h3 {
  margin-top: 5px;
  font-size: 19px;
  letter-spacing: -0.035em;
}

.gate-panel p {
  margin: 8px 0 17px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.gate-panel.warning {
  border-color: #dadada;
  background: #fafafa;
}

.gate-panel.danger {
  border-color: #cdcdcd;
  background: #f7f7f7;
}

.gate-panel.success {
  border-color: #c9c9c9;
  background: #f9f9f9;
}

.gate-panel.paused {
  border-color: #d5d5d5;
  background: #fafafa;
}

.gate-panel.running {
  border-color: #cacaca;
  background: #f9f9f9;
}

.input-label {
  display: block;
  margin-bottom: 5px;
  color: #707070;
  font-size: 9px;
  font-weight: 750;
}

input,
select {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #d4d4d4;
  border-radius: 9px;
  color: var(--ink);
  background: #ffffff;
  font-size: 10px;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 8px;
  margin-top: 12px;
}

.button {
  min-height: 39px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 850;
}

.button.primary {
  border: 1px solid #363636;
  color: #ffffff;
  background: #363636;
  box-shadow: 0 6px 16px rgb(54 54 54 / 16%);
}

.button.primary:hover {
  background: #4a4a4a;
}

.button.secondary {
  border: 1px solid #d4d4d4;
  color: #464646;
  background: #ffffff;
}

.button.secondary:hover {
  background: #fafafa;
}

.button.full {
  width: 100%;
  margin-top: 12px;
}

.progress-track {
  height: 6px;
  margin: 12px 0 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e8e8;
}

.progress-track span {
  display: block;
  width: 48%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #a3a3a3);
  animation: test-progress 0.9s ease-in-out infinite alternate;
}

@keyframes test-progress {
  from {
    transform: translateX(-25%);
  }
  to {
    transform: translateX(135%);
  }
}

.safeguards p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.counter-grid div {
  padding: 10px;
  border-radius: 9px;
  background: #f6f6f6;
}

.counter-grid strong,
.counter-grid span {
  display: block;
}

.counter-grid strong {
  color: var(--accent-dark);
  font-size: 17px;
}

.counter-grid span {
  margin-top: 2px;
  color: #7c7c7c;
  font-size: 8px;
  text-transform: capitalize;
}

.event-preview ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-preview li {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 10px;
}

.event-dot {
  width: 7px;
  height: 7px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.event-dot.blocked {
  background: var(--danger);
}

.event-preview strong {
  font-size: 9px;
  text-transform: capitalize;
}

.event-preview p {
  margin: 3px 0;
  color: #656565;
  font-size: 9px;
  line-height: 1.4;
}

.event-preview small {
  color: #989898;
  font-size: 8px;
}

.empty-evidence {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 21px;
  border-style: dashed;
  box-shadow: none;
}

.empty-icon {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 11px;
  color: #929292;
  background: #f1f1f1;
}

.empty-evidence h3,
.empty-evidence p {
  margin: 0;
}

.empty-evidence h3 {
  font-size: 12px;
}

.empty-evidence p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.evidence-bundle {
  padding: 21px;
}

.evidence-bundle > p {
  margin: -5px 0 15px;
  color: var(--muted);
  font-size: 11px;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.evidence-item {
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfbfb;
}

.evidence-item.pass {
  border-color: #dcdcdc;
  background: #f9f9f9;
}

.evidence-item.fail {
  border-color: #c6c6c6;
  background: #f7f7f7;
}

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

.evidence-item span {
  color: #858585;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.evidence-item strong {
  margin-top: 7px;
  font-size: 12px;
}

.evidence-item small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
}

.page-intro {
  max-width: 760px;
  margin: 2px 0 24px;
}

.page-intro h1,
.page-intro p {
  margin: 0;
}

.page-intro h1 {
  margin-top: 6px;
  font-size: 30px;
  letter-spacing: -0.045em;
}

.page-intro p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.builder-intro {
  margin-bottom: 16px;
}

.builder-safety {
  margin-bottom: 18px;
  padding: 11px 14px;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  color: #535353;
  background: #f9f9f9;
  font-size: 10px;
  line-height: 1.5;
}

.builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 18px;
  align-items: start;
}

.hierarchy-canvas {
  min-width: 0;
  padding: 26px;
}

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

.builder-toolbar h2,
.builder-toolbar p,
.builder-inspector h3,
.builder-inspector p {
  margin: 0;
}

.builder-toolbar h2 {
  margin-top: 5px;
  font-size: 21px;
  letter-spacing: -0.035em;
}

.builder-toolbar p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.human-root {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 13px;
  align-items: center;
  width: min(100%, 500px);
  margin: 0 auto;
  padding: 15px;
  border: 1px solid #383838;
  border-radius: 13px;
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 0%, rgb(190 190 190 / 15%), transparent 38%),
    #343434;
  box-shadow: 0 12px 28px rgb(42 42 42 / 14%);
}

.cto-avatar.large {
  width: 42px;
  height: 42px;
  border: 1px solid rgb(255 255 255 / 12%);
  background: rgb(255 255 255 / 10%);
  font-size: 10px;
}

.human-root .eyebrow {
  color: #cecece;
}

.human-root strong,
.human-root p {
  display: block;
  margin: 0;
}

.human-root strong {
  margin-top: 3px;
  font-size: 14px;
}

.human-root p {
  margin-top: 3px;
  color: #c8c8c8;
  font-size: 9px;
}

.locked-chip {
  padding: 6px 7px;
  border: 1px solid rgb(190 190 190 / 30%);
  border-radius: 6px;
  color: #d8d8d8;
  background: rgb(190 190 190 / 9%);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.root-connector {
  width: 1px;
  height: 29px;
  margin: 0 auto;
  background: linear-gradient(#adadad, #e1e1e1);
}

.hierarchy-tier + .hierarchy-tier {
  margin-top: 26px;
}

.hierarchy-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.hierarchy-divider > div {
  min-width: 150px;
}

.hierarchy-divider span:not(.hierarchy-line),
.hierarchy-divider strong {
  display: block;
}

.hierarchy-divider span:not(.hierarchy-line) {
  color: #8d8d8d;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.hierarchy-divider strong {
  margin-top: 3px;
  color: #434343;
  font-size: 11px;
}

.hierarchy-line {
  height: 1px;
  flex: 1 1 auto;
  background: linear-gradient(90deg, #c5c5c5, #e7e7e7);
}

.hierarchy-divider small {
  min-width: 50px;
  color: #8d8d8d;
  font-size: 8px;
  text-align: right;
}

.hierarchy-drop-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 10px;
  min-height: 126px;
  padding: 11px;
  border: 1px dashed #d4d4d4;
  border-radius: 13px;
  background: #f9f9f9;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.hierarchy-drop-row.empty {
  place-items: stretch;
}

.tier-description {
  margin: 7px 3px 0;
  color: #8d8d8d;
  font-size: 8px;
  line-height: 1.45;
}

.builder-agent-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  min-width: 0;
  min-height: 160px;
  padding: 14px;
  border: 1px solid #e0e0e0;
  border-radius: 11px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgb(42 42 42 / 5%);
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.builder-agent-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  border-radius: 11px 0 0 11px;
  background: var(--agent-tone);
  content: "";
}

.builder-agent-card.selected {
  border-color: color-mix(in srgb, var(--agent-tone) 52%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--agent-tone) 10%, transparent);
}

.drag-handle {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  display: grid;
  width: 27px;
  height: 27px;
  padding: 0;
  place-items: center;
  border: 1px solid #e0e0e0;
  border-radius: 7px;
  color: #828282;
  background: #fafafa;
  cursor: grab;
  touch-action: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.builder-avatar {
  width: 35px;
  height: 35px;
  border-radius: 9px;
  font-size: 9px;
}

.builder-agent-copy {
  min-width: 0;
  padding-right: 24px;
}

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

.builder-agent-copy h3 {
  margin-top: 4px;
  font-size: 12px;
}

.builder-agent-copy p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.builder-scope {
  display: inline-flex;
  margin-top: 7px;
  padding: 4px 6px;
  border-radius: 5px;
  color: #6a6a6a;
  background: #f3f3f3;
  font-size: 7px;
  font-weight: 750;
}

.builder-card-controls {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr 31px 31px;
  gap: 5px;
  margin-top: auto;
}

.builder-control {
  min-height: 29px;
  padding: 5px 7px;
  border: 1px solid #dcdcdc;
  border-radius: 7px;
  color: #525252;
  background: #ffffff;
  font-size: 8px;
  font-weight: 800;
}

.builder-control:hover:not(:disabled) {
  border-color: #c1c1c1;
  background: #f9f9f9;
}

.builder-control:disabled {
  color: #bebebe;
  cursor: not-allowed;
}

.select-control[aria-pressed="true"] {
  border-color: #c3c3c3;
  color: #5c5c5c;
  background: #f5f5f5;
}

.builder-move-select {
  grid-column: 1 / -1;
  min-height: 31px;
  padding: 6px 8px;
  font-size: 8px;
}

.tier-drop-action {
  min-height: 122px;
  padding: 14px;
  border: 1px dashed #c2c2c2;
  border-radius: 10px;
  color: #6a6a6a;
  background: rgb(246 246 246 / 64%);
  font-size: 9px;
  font-weight: 800;
}

.tier-drop-action span {
  display: block;
  margin-bottom: 6px;
  font-size: 20px;
  font-weight: 400;
}

.tier-drop-action:disabled {
  color: #a1a1a1;
  background: #f6f6f6;
  cursor: default;
}

body.builder-dragging .builder-agent-card {
  opacity: 0.72;
}

body.builder-dragging .hierarchy-drop-row::before {
  position: absolute;
  z-index: 4;
  top: 8px;
  left: 50%;
  padding: 5px 8px;
  transform: translateX(-50%);
  border-radius: 6px;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.08em;
  pointer-events: none;
}

body.builder-dragging .hierarchy-drop-row.valid-target {
  border-color: #b3b3b3;
}

body.builder-dragging .hierarchy-drop-row.valid-target::before {
  color: #5c5c5c;
  background: #f1f1f1;
  content: "VALID DROP TARGET";
}

body.builder-dragging .hierarchy-drop-row.invalid-target {
  border-color: #a4a4a4;
}

body.builder-dragging .hierarchy-drop-row.invalid-target::before {
  color: #585858;
  background: #ececec;
  content: "MOVE BLOCKED";
}

body.builder-dragging .hierarchy-drop-row.drag-over.valid-target {
  background: #f6f6f6;
  box-shadow: inset 0 0 0 2px rgb(190 190 190 / 18%);
}

body.builder-dragging .hierarchy-drop-row.drag-over.invalid-target {
  background: #f6f6f6;
}

.builder-inspector {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 14px;
}

.builder-inspector .panel {
  padding: 18px;
}

.builder-inspector h3 {
  margin-top: 5px;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.builder-help {
  display: grid;
  gap: 9px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.builder-help li {
  padding-left: 10px;
  border-left: 2px solid #d8d8d8;
  color: #707070;
  font-size: 9px;
  line-height: 1.45;
}

.builder-help b {
  color: #464646;
}

.builder-empty-history {
  margin-top: 12px !important;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.builder-history {
  display: grid;
  gap: 9px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.builder-history li {
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid #ebebeb;
}

.builder-history li > span {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 6px;
  color: #636363;
  background: #f4f4f4;
  font-size: 7px;
  font-weight: 850;
}

.builder-history li.blocked > span {
  color: #585858;
  background: #ececec;
}

.builder-history strong,
.builder-history p {
  margin: 0;
}

.builder-history strong {
  font-size: 8px;
}

.builder-history p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.builder-guardrails > p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.builder-guardrails > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 13px;
  padding: 10px;
  border-radius: 9px;
  color: #6b6b6b;
  background: #f6f6f6;
  font-size: 8px;
}

.builder-guardrails > div strong {
  color: var(--accent-dark);
  font-size: 18px;
}

.builder-canvas-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(210px, 1fr));
  gap: 5px;
  margin-bottom: 18px;
  padding: 5px;
  border: 1px solid #dddddd;
  border-radius: 13px;
  background: #eeeeee;
}

.builder-canvas-tabs button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #6f6f6f;
  background: transparent;
  text-align: left;
}

.builder-canvas-tabs button > span {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 8px;
  color: #6b6b6b;
  background: rgb(255 255 255 / 55%);
  font-size: 15px;
}

.builder-canvas-tabs button strong,
.builder-canvas-tabs button small {
  display: block;
}

.builder-canvas-tabs button strong {
  font-size: 10px;
}

.builder-canvas-tabs button small {
  margin-top: 2px;
  color: #8d8d8d;
  font-size: 8px;
}

.builder-canvas-tabs button.active {
  border-color: #dfdfdf;
  color: #363636;
  background: #ffffff;
  box-shadow: 0 5px 13px rgb(46 46 46 / 7%);
}

.builder-canvas-tabs button.active > span {
  color: #626262;
  background: #f1f1f1;
}

.builder-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.builder-toolbar-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.builder-toolbar-actions .button:disabled {
  color: #a5a5a5;
  background: #f4f4f4;
  cursor: default;
}

.human-accountability-band {
  margin-top: 2px;
}

.human-accountability-band .human-root {
  width: min(100%, 560px);
}

.organization-band .hierarchy-divider strong,
.human-accountability-band .hierarchy-divider strong {
  letter-spacing: 0.045em;
}

.move-preflight {
  margin: -5px 0 24px;
  padding: 15px;
  border: 1px solid #d5d5d5;
  border-radius: 12px;
  background: #f9f9f9;
}

.move-preflight.blocked {
  border-color: #cdcdcd;
  background: #f7f7f7;
}

.move-preflight.noop,
.move-preflight.cancelled {
  border-color: #dddddd;
  background: #f9f9f9;
}

.move-preflight.moved {
  border-color: #d5d5d5;
  background: #f9f9f9;
}

.preflight-heading {
  display: grid;
  grid-template-columns: 31px 1fr;
  gap: 10px;
  align-items: start;
}

.preflight-heading h3,
.preflight-heading p {
  margin: 0;
}

.preflight-heading h3 {
  margin-top: 3px;
  font-size: 12px;
}

.preflight-heading p {
  margin-top: 4px;
  color: #6a6a6a;
  font-size: 9px;
  line-height: 1.5;
}

.preflight-icon {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  color: #636363;
  background: #ededed;
  font-size: 12px;
  font-weight: 900;
}

.blocked .preflight-icon {
  color: #5c5c5c;
  background: #e4e4e4;
}

.noop .preflight-icon,
.cancelled .preflight-icon {
  color: #707070;
  background: #ececec;
}

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

.guarantee-grid span {
  position: relative;
  padding: 7px 7px 7px 20px;
  border-radius: 7px;
  color: #5e5e5e;
  background: rgb(255 255 255 / 72%);
  font-size: 7px;
  font-weight: 760;
}

.guarantee-grid span::before {
  position: absolute;
  left: 7px;
  color: #717171;
  content: "✓";
}

.inspector-empty > p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.inspector-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inspector-title .agent-avatar {
  width: 37px;
  height: 37px;
  border-radius: 9px;
  font-size: 9px;
}

.policy-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 14px 0 0;
  overflow: hidden;
  border: 1px solid #e6e6e6;
  border-radius: 9px;
  background: #e6e6e6;
}

.policy-list > div {
  min-width: 0;
  padding: 9px;
  background: #fbfbfb;
}

.policy-list > div.wide {
  grid-column: 1 / -1;
}

.policy-list dt,
.policy-list dd {
  margin: 0;
}

.policy-list dt {
  color: #8e8e8e;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.policy-list dd {
  margin-top: 4px;
  color: #434343;
  font-size: 8px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.inspector-relationships {
  display: grid;
  gap: 7px;
  margin-top: 15px;
}

.relationship-card {
  --relationship-tone: #7c7c7c;
  min-width: 0;
  padding: 13px;
  border: 1px solid #e4e4e4;
  border-top: 3px solid var(--relationship-tone);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgb(39 39 39 / 4%);
}

.relationship-card.compact {
  padding: 9px;
  border-top-width: 2px;
  box-shadow: none;
}

.relationship-assigns {
  --relationship-tone: #7c7c7c;
}

.relationship-coordinates {
  --relationship-tone: #727272;
}

.relationship-requests_review {
  --relationship-tone: #9f9f9f;
}

.relationship-requests_acknowledgement {
  --relationship-tone: #828282;
}

.relationship-escalates {
  --relationship-tone: #777777;
}

.relationship-type {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--relationship-tone);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.relationship-type > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.relationship-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  color: #383838;
  font-size: 9px;
}

.relationship-route strong:last-child {
  text-align: right;
}

.relationship-route > span {
  color: var(--relationship-tone);
}

.relationship-card p {
  margin: 7px 0 0;
  color: #707070;
  font-size: 8px;
  line-height: 1.4;
}

.relationship-meta {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.relationship-meta span {
  padding: 4px 5px;
  border-radius: 5px;
  color: #777777;
  background: #f3f3f3;
  font-size: 6px;
  font-weight: 750;
  text-transform: lowercase;
}

.relationship-card.compact .relationship-meta,
.relationship-card.compact > p {
  display: none;
}

.execution-builder {
  display: grid;
  gap: 18px;
}

.execution-map,
.trace-lab {
  padding: 24px;
}

.relationship-lock {
  padding: 7px 9px;
  border: 1px solid #dcdcdc;
  border-radius: 7px;
  color: #6e6e6e;
  background: #f7f7f7;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.07em;
}

.relationship-legend {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: -8px 0 14px;
}

.relationship-legend span {
  position: relative;
  padding: 5px 7px 5px 17px;
  border-radius: 6px;
  color: #626262;
  background: #f4f4f4;
  font-size: 7px;
  font-weight: 760;
}

.relationship-legend span::before {
  position: absolute;
  top: 50%;
  left: 7px;
  width: 5px;
  height: 5px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #7c7c7c;
  content: "";
}

.relationship-legend .coordinates::before {
  background: #727272;
}

.relationship-legend .requests-review::before {
  background: #9f9f9f;
}

.relationship-legend .requests-acknowledgement::before {
  background: #828282;
}

.relationship-legend .escalates::before {
  background: #777777;
}

.execution-route-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.trace-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.trace-toolbar h2,
.trace-toolbar p,
.trace-empty h3,
.trace-empty p,
.checkpoint-summary h3 {
  margin: 0;
}

.trace-toolbar h2 {
  margin-top: 5px;
  font-size: 21px;
  letter-spacing: -0.035em;
}

.trace-toolbar p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.trace-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 6px;
  min-width: 360px;
}

.trace-controls label {
  grid-column: 1 / -1;
  color: #727272;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.trace-controls select {
  min-height: 35px;
  font-size: 9px;
}

.trace-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 130px;
  padding: 22px;
  border: 1px dashed #d6d6d6;
  border-radius: 12px;
  color: #6f6f6f;
  background: #fafafa;
}

.trace-empty > span {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #686868;
  background: #eeeeee;
  font-size: 12px;
}

.trace-empty h3 {
  color: #3d3d3d;
  font-size: 13px;
}

.trace-empty p {
  margin-top: 5px;
  font-size: 9px;
  line-height: 1.5;
}

.trace-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #e4e4e4;
  border-radius: 10px;
  background: #e4e4e4;
}

.trace-metrics > div {
  padding: 12px;
  background: #fafafa;
}

.trace-metrics span,
.trace-metrics strong {
  display: block;
}

.trace-metrics span {
  color: #8b8b8b;
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
}

.trace-metrics strong {
  margin-top: 5px;
  color: #3b3b3b;
  font-size: 13px;
}

.trace-progress {
  height: 3px;
  margin: 16px 0 8px 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaeaea;
}

.trace-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #bebebe, #7c7c7c);
  transition: width 220ms ease;
}

.trace-timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trace-step {
  position: relative;
  display: grid;
  grid-template-columns: 29px 1fr;
  gap: 10px;
  padding: 8px 0 8px 14px;
}

.trace-step::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 27px;
  width: 1px;
  background: #e4e4e4;
  content: "";
}

.trace-step:first-child::before {
  top: 22px;
}

.trace-step:last-child::before {
  bottom: calc(100% - 23px);
}

.trace-sequence {
  z-index: 1;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 50%;
  color: #5b5b5b;
  background: #eaeaea;
  box-shadow: 0 0 0 1px #dedede;
  font-size: 7px;
  font-weight: 900;
}

.trace-step.handoff .trace-sequence {
  color: #606060;
  background: #efefef;
}

.trace-step.pass .trace-sequence {
  color: #626262;
  background: #eeeeee;
}

.trace-step.fail .trace-sequence {
  color: #5d5d5d;
  background: #e6e6e6;
}

.trace-step-copy {
  padding: 10px 12px;
  border: 1px solid #e6e6e6;
  border-radius: 9px;
  background: #ffffff;
  animation: trace-reveal 180ms ease both;
}

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

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

.trace-step-copy > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.trace-step-copy > div small {
  color: #868686;
  font-size: 7px;
}

.trace-badge {
  padding: 4px 5px;
  border-radius: 5px;
  color: #535353;
  background: #f0f0f0;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.trace-step-copy > strong {
  display: block;
  margin-top: 7px;
  font-size: 10px;
}

.trace-step-copy > p {
  margin: 4px 0 0;
  color: #717171;
  font-size: 8px;
  line-height: 1.45;
}

.trace-step-metric {
  display: block;
  margin-top: 6px;
  color: #919191;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 6px;
}

.checkpoint-summary {
  margin-top: 15px;
  padding-top: 16px;
  border-top: 1px solid #e7e7e7;
}

.checkpoint-summary h3 {
  margin-top: 4px;
  font-size: 13px;
}

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

.checkpoint-card {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid #e3e3e3;
  border-radius: 9px;
  background: #fafafa;
}

.checkpoint-card > span {
  color: #8d8d8d;
  font-size: 6px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.checkpoint-card > strong {
  font-size: 9px;
}

.checkpoint-card > small {
  color: #838383;
  font-size: 7px;
}

.checkpoint-card > b {
  justify-self: start;
  margin-top: 3px;
  padding: 4px 6px;
  border-radius: 5px;
  color: #636363;
  background: #eeeeee;
  font-size: 6px;
}

.checkpoint-card.failed > b {
  color: #5b5b5b;
  background: #e3e3e3;
}

.checkpoint-card.pending > b,
.trace-checkpoint.pending > b {
  color: #636363;
  background: #ececec;
}

.trace-checkpoint.pending {
  border-color: #d4d4d4;
  background: #fafafa;
}

.checkpoint-card.not-reached > b {
  color: #757575;
  background: #ececec;
}

.boundary-table {
  overflow-x: auto;
}

.table-row {
  display: grid;
  grid-template-columns: 1.3fr repeat(5, minmax(90px, 1fr));
  min-width: 800px;
  border-top: 1px solid #ededed;
}

.table-row.header {
  border-top: 0;
  color: #898989;
  background: #f7f7f7;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.table-row span,
.table-row b,
.table-row i {
  padding: 12px 9px;
  font-size: 9px;
  font-style: normal;
}

.table-row span:first-child {
  color: #505050;
  font-weight: 760;
}

.table-row b {
  color: #676767;
}

.table-row i {
  color: #8d8d8d;
}

.ack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.acknowledgement-card {
  position: relative;
  min-height: 330px;
  padding: 26px;
  overflow: hidden;
}

.gate-number {
  display: inline-flex;
  padding: 6px 8px;
  border-radius: 6px;
  color: #5b5b5b;
  background: #f1f1f1;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.acknowledgement-card h2 {
  margin: 16px 0 7px;
  font-size: 21px;
  letter-spacing: -0.035em;
}

.acknowledgement-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.acknowledgement-card dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0;
  margin: 22px 0 0;
  border-top: 1px solid var(--line);
}

.acknowledgement-card dt,
.acknowledgement-card dd {
  margin: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
}

.acknowledgement-card dt {
  color: #888888;
}

.acknowledgement-card dd {
  color: #424242;
  font-weight: 700;
}

.event-table {
  padding: 0;
  overflow: hidden;
}

.event-table-head,
.event-table-row {
  display: grid;
  grid-template-columns: 42px 60px 1fr 1.8fr 1.35fr 80px;
  align-items: center;
  gap: 10px;
  min-width: 900px;
  padding: 11px 16px;
}

.event-table-head {
  color: #838383;
  background: #f6f6f6;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.event-table-row {
  border-top: 1px solid #ededed;
  color: #5e5e5e;
  font-size: 9px;
}

.event-table-row b,
.event-table-row small {
  display: block;
}

.event-table-row b {
  color: #3c3c3c;
  font-size: 9px;
}

.event-table-row small {
  margin-top: 3px;
  color: #868686;
  line-height: 1.35;
}

.event-outcome {
  padding: 5px 6px;
  border-radius: 5px;
  text-align: center;
  font-size: 7px;
  font-weight: 850;
}

.event-outcome.recorded {
  color: #5d5d5d;
  background: #f2f2f2;
}

.event-outcome.blocked {
  color: #585858;
  background: #ececec;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: auto;
  padding: 12px 34px 20px;
  color: #939393;
  font-size: 8px;
  letter-spacing: 0.03em;
}

footer strong {
  color: #747474;
}

#toast {
  position: fixed;
  z-index: 200;
  right: 20px;
  bottom: 45px;
  max-width: 360px;
  padding: 12px 15px;
  transform: translateY(20px);
  border-radius: 10px;
  color: #ffffff;
  background: #363636;
  box-shadow: 0 14px 36px rgb(34 34 34 / 24%);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
}

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

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

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

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

  .side-column {
    grid-template-columns: 1fr 1fr;
  }

  .side-column > :first-child {
    grid-column: 1 / -1;
  }

  .fact-row,
  .evidence-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .builder-inspector {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .builder-inspector > .agent-inspector,
  .builder-inspector > .inspector-empty {
    grid-column: 1 / -1;
  }

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

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

  .trace-controls {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .watermark {
    right: 8px;
    bottom: 7px;
    max-width: calc(100% - 16px);
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }

  .brand {
    padding-bottom: 15px;
  }

  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .nav-item {
    width: 100%;
    min-width: 0;
    padding: 10px;
    font-size: 11px;
  }

  .nav-item:last-child {
    grid-column: 1 / -1;
  }

  .sidebar-note,
  .sidebar-footer {
    display: none;
  }

  .topbar {
    align-items: flex-start;
    gap: 12px;
    padding: 15px 18px;
  }

  .topbar > div:first-child {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .external-disabled {
    display: none;
  }

  .disclaimer {
    padding: 9px 18px;
  }

  main {
    padding: 20px 16px 80px;
  }

  .workflow,
  .compact-list,
  .full-list,
  .ack-grid,
  .side-column,
  .fact-row,
  .evidence-grid,
  .builder-inspector,
  .hierarchy-drop-row {
    grid-template-columns: 1fr;
  }

  .hierarchy-canvas {
    padding: 18px;
  }

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

  .builder-toolbar .button {
    width: 100%;
  }

  .builder-canvas-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .builder-canvas-tabs button {
    padding: 7px 9px;
  }

  .builder-canvas-tabs button > span {
    display: none;
  }

  .builder-toolbar-actions,
  .builder-toolbar-actions .button {
    width: 100%;
  }

  .builder-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .guarantee-grid,
  .execution-route-map,
  .checkpoint-grid {
    grid-template-columns: 1fr;
  }

  .execution-map,
  .trace-lab {
    padding: 18px;
  }

  .relationship-lock {
    align-self: flex-start;
  }

  .trace-controls {
    grid-template-columns: 1fr;
  }

  .trace-controls label {
    grid-column: auto;
  }

  .trace-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .trace-step {
    padding-left: 0;
  }

  .trace-step::before {
    left: 13px;
  }

  .human-root {
    grid-template-columns: auto 1fr;
  }

  .human-root .locked-chip {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .hierarchy-divider {
    gap: 8px;
  }

  .hierarchy-divider > div {
    min-width: 130px;
  }

  .hierarchy-divider small {
    min-width: 42px;
  }

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

  .section-heading.split {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-intro h1 {
    font-size: 25px;
  }

  footer {
    padding: 12px 18px 40px;
  }
}

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