.platform-hybrid-page main {
  background: var(--surface-page);
}

.hybrid-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(var(--split-visual-min), 1.18fr);
  align-items: center;
  gap: var(--section-gap-generous);
}

.hybrid-hero-copy .lede {
  max-width: var(--measure-lede);
  margin-bottom: var(--space-8);
  font-size: var(--type-lede);
}

.platform-command-headline {
  display: grid;
  max-width: var(--measure-display);
  gap: var(--space-2);
}

.platform-command-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: var(--space-3);
}

.platform-command-line strong {
  color: var(--text-primary);
  font-size: var(--type-page);
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}

.platform-command-line > span {
  color: var(--text-muted);
  font-size: var(--type-body);
  font-weight: 500;
  line-height: var(--leading-body);
  letter-spacing: normal;
  white-space: nowrap;
}

.console-frame {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-media);
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    var(--surface-raised);
  background-size: var(--visual-grid-unit) var(--visual-grid-unit);
  box-shadow: var(--shadow-panel);
}

.console-chrome {
  display: flex;
  min-height: var(--visual-chrome-header);
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 0 var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-panel);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: var(--type-caption);
  font-weight: 600;
  text-transform: uppercase;
}

.console-chrome > span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.console-status::before {
  width: var(--space-2);
  height: var(--space-2);
  border-radius: var(--radius-status);
  background: var(--status-success);
  content: "";
}

.runtime-console {
  min-height: var(--visual-min-height-hero);
}

.runtime-console-body {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  min-height: calc(var(--visual-min-height-hero) - var(--visual-chrome-header));
}

.runtime-snapshot {
  padding: var(--space-6);
  border-right: 1px solid var(--border-subtle);
  background: var(--surface-soft);
}

.runtime-label,
.runtime-snapshot dt,
.run-lane dt,
.runner-command,
.runner-artifact,
.inspector-heading,
.entity-table th,
.event-code,
.actor-role,
.clock-label,
.future-meta,
.report-label,
.metric-table th,
.invariant-list code,
.diff-block,
.boundary-label,
.contract-matrix dt {
  font-family: var(--mono);
  font-size: var(--type-caption);
}

.runtime-label,
.runtime-snapshot dt,
.run-lane dt,
.inspector-heading,
.actor-role,
.clock-label,
.future-meta,
.report-label,
.metric-table th,
.boundary-label,
.contract-matrix dt {
  color: var(--text-muted);
  text-transform: uppercase;
}

.runtime-world-name {
  display: block;
  margin: var(--space-3) 0 var(--space-6);
  font-size: var(--type-subtitle);
}

.runtime-snapshot dl,
.run-lane dl {
  margin: 0;
}

.runtime-snapshot dl div,
.run-lane dl div {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-top: 1px solid var(--border-subtle);
}

.runtime-snapshot dd,
.run-lane dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font-family: var(--mono);
  font-size: var(--type-meta);
}

.runtime-branch {
  display: grid;
  align-content: center;
  gap: var(--space-4);
  padding: var(--space-6);
}

.branch-origin {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: var(--type-caption);
}

.branch-origin::before,
.branch-origin::after {
  height: 1px;
  background: var(--border-strong);
  content: "";
}

.branch-origin::before {
  width: var(--space-8);
}

.branch-origin::after {
  flex: 1;
}

.run-lanes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.run-lane {
  padding: var(--space-4);
  border: 1px solid var(--border-strong);
  background: var(--surface-raised);
}

.run-lane-current {
  border-top: 3px solid var(--structure-primary);
}

.run-lane-candidate {
  border-top: 3px solid var(--interaction-primary);
}

.run-lane header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.run-lane header strong {
  font-family: var(--mono);
  font-size: var(--type-meta);
}

.run-lane header span {
  color: var(--structure-primary);
  font-family: var(--mono);
  font-size: var(--type-caption);
}

.candidate-mark {
  color: var(--interaction-primary) !important;
}

.runtime-diff {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border-strong);
  background: var(--surface-panel);
}

.runtime-diff div {
  padding: var(--space-3);
}

.runtime-diff div + div {
  border-left: 1px solid var(--border-subtle);
}

.runtime-diff span,
.runtime-diff strong {
  display: block;
  font-family: var(--mono);
  font-size: var(--type-caption);
}

.runtime-diff span {
  color: var(--text-muted);
}

.runtime-diff strong {
  margin-top: var(--space-1);
  color: var(--text-primary);
}

.runner-frame {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-media);
  background: var(--surface-raised);
}

.runner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.runner-step {
  min-width: 0;
  padding: var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
}

.runner-step:not(:nth-child(3n + 1)) {
  border-left: 1px solid var(--border-subtle);
}

.runner-step:nth-child(n + 4) {
  border-bottom: 0;
}

.runner-step header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.runner-step header span:first-child {
  color: var(--action-primary-strong);
  font-family: var(--mono);
  font-size: var(--type-caption);
  font-weight: 600;
}

.runner-state {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--structure-primary);
  font-family: var(--mono);
  font-size: var(--type-caption);
}

.runner-state::before {
  width: var(--space-2);
  height: var(--space-2);
  border-radius: var(--radius-status);
  background: var(--status-success);
  content: "";
}

.runner-command {
  display: block;
  min-height: var(--space-12);
  margin-bottom: var(--space-4);
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.runner-artifact {
  color: var(--text-muted);
}

.world-inspector {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-media);
  background: var(--surface-raised);
  box-shadow: var(--shadow-panel);
}

.world-fidelity-intro {
  margin-bottom: var(--space-8);
}

.world-fidelity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-optical);
  margin-bottom: var(--space-10);
  border: 1px solid var(--border-strong);
  background: var(--border-strong);
}

.world-fidelity-grid article {
  min-width: 0;
  padding: var(--space-5);
  background: var(--surface-raised);
  box-shadow: inset 0 3px 0 var(--structure-primary);
}

.world-fidelity-grid span {
  color: var(--structure-primary);
  font-family: var(--mono);
  font-size: var(--type-caption);
  font-weight: 700;
  text-transform: uppercase;
}

.world-fidelity-grid h3 {
  margin: var(--space-3) 0 var(--space-2);
  font-size: var(--type-ui);
}

.world-fidelity-grid p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--type-meta);
}

.inspector-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr) minmax(0, 0.82fr);
}

.inspector-panel {
  min-width: 0;
  padding: var(--space-5);
}

.inspector-panel + .inspector-panel {
  border-left: 1px solid var(--border-subtle);
}

.inspector-heading {
  display: block;
  margin-bottom: var(--space-4);
}

.entity-table,
.metric-table {
  width: 100%;
  border-collapse: collapse;
}

.entity-table th,
.entity-table td,
.metric-table th,
.metric-table td {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.entity-table th:last-child,
.entity-table td:last-child,
.metric-table th:not(:first-child),
.metric-table td:not(:first-child) {
  text-align: right;
}

.entity-table td,
.metric-table td {
  color: var(--text-secondary);
  font-size: var(--type-meta);
}

.event-stream,
.actor-list,
.invariant-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-stream li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.event-code {
  color: var(--action-primary-strong);
}

.event-stream p {
  margin: 0;
  font-size: var(--type-meta);
}

.actor-list li {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-subtle);
}

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

.actor-list span:last-child {
  margin-top: var(--space-1);
  color: var(--text-secondary);
  font-size: var(--type-meta);
}

.world-clock {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border-strong);
  background: var(--surface-panel);
}

.clock-track {
  position: relative;
  height: 2px;
  background: var(--border-strong);
}

.clock-track::before {
  position: absolute;
  top: 50%;
  left: 58%;
  width: var(--space-3);
  height: var(--space-3);
  border: 3px solid var(--surface-panel);
  border-radius: var(--radius-status);
  background: var(--action-primary);
  box-shadow: 0 0 0 1px var(--action-primary);
  content: "";
  transform: translate(-50%, -50%);
}

.clock-value {
  color: var(--text-primary);
  font-family: var(--mono);
  font-size: var(--type-caption);
}

.future-frame {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-media);
  background: var(--surface-raised);
}

.future-origin {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  padding: var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-panel);
}

.future-origin div span,
.future-origin div strong {
  display: block;
  font-family: var(--mono);
  font-size: var(--type-caption);
}

.future-origin div span {
  color: var(--text-muted);
}

.future-origin div strong {
  margin-top: var(--space-1);
}

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

.future-lane {
  min-width: 0;
  padding: var(--space-6);
}

.future-lane + .future-lane {
  border-left: 1px solid var(--border-strong);
}

.future-lane-current {
  box-shadow: inset 0 3px 0 var(--structure-primary);
}

.future-lane-candidate {
  box-shadow: inset 0 3px 0 var(--interaction-primary);
}

.future-lane header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.future-lane h3 {
  margin: var(--space-2) 0 0;
}

.future-config {
  margin: 0 0 var(--space-5);
  padding: var(--space-4);
  border: 1px solid var(--border-subtle);
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: var(--type-caption);
  white-space: pre-wrap;
}

.future-result {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border-strong);
}

.future-result div {
  padding: var(--space-3) var(--space-2) 0 0;
}

.future-result span,
.future-result strong {
  display: block;
  font-family: var(--mono);
  font-size: var(--type-caption);
}

.future-result span {
  color: var(--text-muted);
}

.future-result strong {
  margin-top: var(--space-1);
}

.report-frame {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-media);
  background: var(--surface-raised);
  box-shadow: var(--shadow-panel);
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.report-panel {
  min-width: 0;
  padding: var(--space-6);
}

.report-panel + .report-panel {
  border-left: 1px solid var(--border-subtle);
}

.report-label {
  display: block;
  margin-bottom: var(--space-4);
}

.metric-positive {
  color: var(--structure-primary) !important;
  font-weight: 600;
}

.metric-negative {
  color: var(--action-primary-strong) !important;
  font-weight: 600;
}

.invariant-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.invariant-list li::before {
  width: var(--space-2);
  height: var(--space-2);
  border-radius: var(--radius-status);
  background: var(--status-success);
  content: "";
}

.invariant-list code {
  overflow-wrap: anywhere;
  color: var(--text-secondary);
}

.invariant-list strong {
  color: var(--structure-primary);
  font-family: var(--mono);
  font-size: var(--type-caption);
}

.diff-block {
  margin: 0;
  padding: var(--space-6);
  overflow-x: auto;
  border-top: 1px solid var(--border-strong);
  background: var(--surface-panel);
  color: var(--text-secondary);
  line-height: 1.8;
}

.diff-remove {
  color: var(--action-primary-strong);
}

.diff-add {
  color: var(--structure-primary);
}

.integration-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(var(--split-visual-min), 1.22fr);
  align-items: start;
  gap: var(--section-gap-generous);
}

.boundary-map {
  margin-top: var(--space-10);
  border-top: 1px solid var(--border-strong);
}

.boundary-map article {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.boundary-map h3 {
  margin: var(--space-2) 0;
  font-size: var(--type-subtitle);
}

.boundary-map p {
  margin: 0;
  font-size: var(--type-meta);
}

.integration-code {
  box-shadow: none;
}

.trust-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(var(--split-visual-min), 1fr);
  align-items: start;
  gap: var(--section-gap-generous);
}

.contract-matrix {
  margin: 0;
  border-top: 1px solid var(--border-strong);
}

.contract-matrix div {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: var(--space-5);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.contract-matrix dd {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--type-meta);
}

.trust-cta {
  margin-top: var(--space-12);
  padding-top: var(--space-10);
  border-top: 1px solid var(--border-strong);
}

.trust-cta h2 {
  max-width: var(--measure-heading);
}

@media (max-width: 1040px) {
  .hybrid-hero-grid,
  .integration-layout,
  .trust-layout {
    grid-template-columns: minmax(0, 1fr) minmax(350px, 0.9fr);
    gap: var(--space-12);
  }

  .runtime-console-body {
    grid-template-columns: 1fr;
  }

  .runtime-snapshot {
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
  }

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

  .inspector-panel:nth-child(3) {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border-subtle);
    border-left: 0;
  }
}

@media (max-width: 820px) {
  .hybrid-hero-grid,
  .integration-layout,
  .trust-layout,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .runtime-console {
    min-height: 0;
  }

  .runtime-console-body {
    min-height: 0;
  }

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

  .runner-step:not(:nth-child(3n + 1)) {
    border-left: 0;
  }

  .runner-step:nth-child(n + 4) {
    border-bottom: 1px solid var(--border-subtle);
  }

  .runner-step:nth-child(even) {
    border-left: 1px solid var(--border-subtle);
  }

  .runner-step:nth-child(n + 5) {
    border-bottom: 0;
  }

  .report-panel + .report-panel {
    border-top: 1px solid var(--border-subtle);
    border-left: 0;
  }
}

@media (max-width: 560px) {
  .run-lanes,
  .runtime-diff,
  .runner-grid,
  .inspector-grid,
  .future-lanes,
  .future-origin,
  .future-result {
    grid-template-columns: 1fr;
  }

  .world-fidelity-grid {
    grid-template-columns: 1fr;
  }

  .runtime-diff div + div,
  .runner-step:nth-child(even),
  .inspector-panel + .inspector-panel,
  .future-lane + .future-lane {
    border-left: 0;
  }

  .runtime-diff div + div,
  .inspector-panel + .inspector-panel,
  .future-lane + .future-lane {
    border-top: 1px solid var(--border-subtle);
  }

  .runner-step,
  .runner-step:nth-child(n + 4),
  .runner-step:nth-child(n + 5) {
    border-bottom: 1px solid var(--border-subtle);
  }

  .runner-step:last-child {
    border-bottom: 0;
  }

  .inspector-panel:nth-child(3) {
    grid-column: auto;
  }

  .world-clock {
    grid-template-columns: 1fr;
  }

  .clock-track {
    margin: var(--space-2) 0;
  }

  .future-lane {
    padding: var(--space-5);
  }

  .metric-table th:nth-child(2),
  .metric-table td:nth-child(2) {
    display: none;
  }

  .invariant-list li {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .invariant-list strong {
    grid-column: 2;
  }

  .contract-matrix div {
    grid-template-columns: 1fr;
    gap: var(--space-1);
  }
}
