:root {
  --ground: #000000;
  --panel: #0a0a0a;
  --hairline: #1e1e1e;
  --inactive: #4a4a4a;
  --label: #8a8a8a;
  --body: #b4b4b4;
  --emph: #ffffff;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --display: Inter, ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--ground);
  color: var(--body);
  font-family: var(--mono);
  /* LB-A1 static guard: no descendant overflow may ever reach the viewport
     as a body-level horizontal scrollbar. Wide content scrolls inside its
     own container (see .dist-scroll) instead. */
  overflow-x: hidden;
}

body {
  padding: 20px;
}

.card {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 22px;
  padding: 20px;
}

.cta-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: #0f0f0f;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 8px 10px;
  margin-bottom: 8px;
}

.cta-action {
  min-width: 236px;
}

.cta-status {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--label);
}

.cta-button {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--ground);
  background: var(--emph);
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
}

.cta-button:hover,
.cta-button:focus-visible {
  background: #e4e4e4;
}

.cta-copy {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--body);
  max-width: 62em;
}

.cta-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.chip {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--label);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 4px 8px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .cta-panel {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .cta-action {
    min-width: 0;
  }
  .cta-chips {
    justify-content: flex-start;
  }
}

.header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--label);
}

.headline {
  margin: 0 0 8px;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: clamp(28px, 6vw, 44px);
  line-height: 1.05;
  color: #f7f7f7;
}

.subline {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--label);
}

.meta {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: end;
  min-width: 0;
}

.meta-row {
  display: grid;
  grid-template-columns: 76px auto;
  gap: 14px;
  font-size: 12px;
  white-space: normal;
}

.meta-row dt {
  margin: 0;
  color: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.meta-row dd {
  margin: 0;
  color: #e4e4e4;
}

.row {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.row-primary {
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr) minmax(220px, 320px);
  align-items: stretch;
}

.row-secondary {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
}

@media (max-width: 900px) {
  .row-primary,
  .row-secondary {
    grid-template-columns: 1fr;
  }
  .header {
    grid-template-columns: 1fr;
  }
  .meta {
    align-self: start;
  }
}

.tile {
  background: #0f0f0f;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 20px;
  min-width: 0;
}

.tile-label {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--label);
}

.tile-caption {
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--label);
}

.tile-hero {
  margin: 0 0 4px;
  font-size: clamp(34px, 8vw, 54px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--emph);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}

.split-label {
  margin: 0 0 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--label);
}

.split-value {
  margin: 0;
  font-size: 20px;
  color: var(--body);
}

.split-value--emph {
  color: var(--emph);
}

.tile-note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--body);
}

.axis {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6e6e6e;
  margin-bottom: 8px;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lane {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 60px;
  align-items: center;
  gap: 10px;
}

@media (max-width: 560px) {
  .lane {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.lane-label {
  font-size: 12px;
  color: #e4e4e4;
  white-space: normal;
  overflow-wrap: break-word;
}

.lane-track {
  position: relative;
  height: 16px;
  background: repeating-linear-gradient(to right, var(--inactive) 0 1px, transparent 1px 6px);
  border-radius: 2px;
}

.lane-bar {
  position: absolute;
  inset: 0;
  width: 0%;
  background: repeating-linear-gradient(to right, #ffffff 0 3px, transparent 3px 6px);
  border-radius: 2px;
}

/* LB-A2: dot + ring reads against both the empty track and the filled
   bar, at any position — including the ~1% mark where the GPU actually
   finishes. Monochrome only: --emph/--ground, no hue. */
.lane-marker {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--emph);
  box-shadow: 0 0 0 2px var(--ground);
  transform: translate(-50%, -50%);
}

.lane-marker--gpu {
  left: 0%;
}

/* Distinct host-completion endpoint marker: a tick, not a dot, so the two
   facts (GPU finished vs. host was told) never read as the same kind of mark. */
.lane-marker--host {
  top: -3px;
  width: 2px;
  height: 22px;
  border-radius: 1px;
  background: var(--emph);
  box-shadow: none;
  transform: translateX(-50%);
  left: 0%;
}

.lane-value {
  font-size: 13px;
  color: var(--emph);
  text-align: right;
}

.predict-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
}

.predict-row:first-of-type {
  border-top: none;
}

.predict-key {
  color: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
  flex: 0 0 auto;
}

.predict-val {
  color: var(--body);
  text-align: right;
}

.predict-val--emph {
  color: var(--emph);
  font-size: 16px;
}

.dist-scroll {
  overflow-x: auto;
  max-width: 100%;
}

.dist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.dist-table th,
.dist-table td {
  text-align: right;
  padding: 8px 6px;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}

.dist-table th:first-child,
.dist-table td:first-child {
  text-align: left;
  color: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  white-space: normal;
}

.dist-table td {
  color: var(--body);
}

/* Host-completion median is the one number the row argues from; min/max
   are context, not competing headlines (see the Chrome 39.9ms outlier). */
.dist-table td.dist-median {
  color: var(--emph);
}

.dist-table thead th {
  color: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  font-weight: 400;
}

.tile-limits .limits-list {
  margin: 0 0 16px;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--body);
}

.limits-list li {
  margin-bottom: 8px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}

.action {
  color: #e4e4e4;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 8px 10px;
}

.action:hover,
.action:focus-visible {
  color: var(--emph);
  border-color: var(--inactive);
}

@media (max-width: 380px) {
  .tile-label,
  .subline,
  .eyebrow {
    letter-spacing: 0.08em;
  }
}


/* Compact desktop slab: preserve every evidence surface while reducing dead vertical space. */
@media (min-width: 901px) {
  body {
    padding: 8px;
  }

  .card {
    max-width: 1440px;
    border-radius: 18px;
    padding: 10px;
  }

  .header {
    gap: 16px;
    padding-bottom: 8px;
    margin-bottom: 6px;
  }

  .headline {
    font-size: clamp(28px, 3vw, 38px);
  }

  .meta {
    gap: 3px;
  }

  .row {
    gap: 8px;
    margin-bottom: 8px;
  }

  .row-primary {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(220px, 280px);
  }

  .row-secondary {
    grid-template-columns: minmax(0, 1fr) minmax(440px, 500px);
  }

  .tile {
    border-radius: 14px;
    padding: 12px;
  }

  .tile-label {
    margin-bottom: 8px;
  }

  .tile-caption {
    margin-bottom: 8px;
  }

  .tile-hero {
    font-size: 44px;
  }

  .split {
    margin: 8px 0;
    padding-top: 7px;
  }

  .tile-note {
    margin-top: 7px;
    font-size: 10.5px;
    line-height: 1.34;
  }

  .timeline {
    gap: 8px;
  }

  .predict-row {
    padding: 6px 0;
  }

  .tile-limits .limits-list {
    margin-bottom: 8px;
    font-size: 10.5px;
    line-height: 1.3;
  }

  .limits-list li {
    margin-bottom: 4px;
  }

  .actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    padding-top: 6px;
  }

  .action {
    font-size: 9px;
    padding: 5px 7px;
  }
}

/* Timeline events are annotations, not draggable controls. */
.lane-track,
.lane-marker {
  pointer-events: none;
}

.lane-marker--gpu {
  top: 1px;
}

.lane-marker--gpu::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 8px;
  width: 1px;
  height: 6px;
  background: var(--emph);
  transform: translateX(-50%);
}

.lane-marker--host {
  top: 1px;
  width: 2px;
  height: 14px;
  border-radius: 0;
  transform: translateX(-50%);
}

/* Native modal keeps the one real reproducer on the same visual surface. */
#repro-dialog {
  width: min(1180px, calc(100vw - 28px));
  max-width: 1180px;
  height: min(820px, calc(100vh - 28px));
  max-height: 820px;
  margin: auto;
  padding: 0;
  color: var(--body);
  background: #080808;
  border: 1px solid #2a2a2a;
  border-radius: 18px;
  overflow: hidden;
}

#repro-dialog::backdrop {
  background: rgb(0 0 0 / 0.82);
}

.repro-dialog-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
}

.repro-dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline);
  background: #0d0d0d;
}

.repro-dialog-kicker {
  margin: 0 0 3px;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--label);
}

.repro-dialog-bar h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  color: var(--emph);
}

.repro-dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.repro-direct,
.repro-close {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--body);
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 7px 10px;
}

.repro-close {
  cursor: pointer;
}

.repro-direct:hover,
.repro-direct:focus-visible,
.repro-close:hover,
.repro-close:focus-visible {
  color: var(--emph);
  border-color: var(--inactive);
}

.repro-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #050505;
}

@media (max-width: 600px) {
  #repro-dialog {
    width: calc(100vw - 12px);
    height: calc(100vh - 12px);
    border-radius: 12px;
  }
  .repro-dialog-bar {
    align-items: flex-start;
    padding: 9px;
  }
  .repro-dialog-bar h2 {
    font-size: 14px;
  }
}
