:root {
  --research-nav-ink: var(--tickets-ink, var(--brs-ink, #2b2924));
  --research-nav-paper: var(--tickets-paper, var(--brs-paper, #f1eee6));
  --research-nav-red: var(--tickets-red, var(--brs-red, #87372d));
  --research-nav-rule: var(--tickets-rule, var(--brs-rule, #c8c0b2));
}

/* Preserve the archive language while separating actions from metadata. */
.tickets-surface-nav a[href="invalidated-tickets-archive.html"],
.tickets-surface-nav a[href="invalidated-tickets-machine-reading-preview.html"] {
  border-color: var(--research-nav-ink);
  background: rgba(249, 247, 241, 0.94);
}

.tickets-surface-nav a[href="invalidated-tickets-archive.html"]:hover,
.tickets-surface-nav a[href="invalidated-tickets-machine-reading-preview.html"]:hover {
  background: var(--research-nav-ink);
  color: var(--research-nav-paper);
}

.tickets-surface-nav .tickets-surface-experiment {
  border-color: var(--research-nav-rule);
  background: transparent;
  color: inherit;
  opacity: 0.72;
}

a[href="invalidated-tickets-human-machine-review-20.html"] {
  display: inline-grid;
  gap: 7px;
  padding: 15px 18px;
  border: 1px solid var(--research-nav-red);
  background: var(--research-nav-red);
  color: var(--research-nav-paper);
  font-family: "SFMono-Regular", "Roboto Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.075em;
  line-height: 1.35;
  text-decoration: none;
  text-transform: uppercase;
}

a[href="invalidated-tickets-human-machine-review-20.html"]::after {
  content: "20/20 judgments recorded · trigger audit pending";
  font-size: 7px;
  font-weight: 400;
  letter-spacing: 0.045em;
  opacity: 0.76;
  text-transform: none;
}

a[href="invalidated-tickets-human-machine-review-20.html"]:hover {
  border-color: var(--research-nav-ink);
  background: var(--research-nav-ink);
}

a[href="invalidated-tickets-machine-network-preview.html"] {
  border-color: var(--research-nav-red);
}

.review-actions button:last-child {
  margin-left: auto;
  border-color: var(--research-nav-rule);
  background: transparent;
  color: inherit;
  opacity: 0.64;
}

/* Evidence-ledger rows should fit their real content instead of reserving
   three empty workstation columns and a decorative 90px floor. */
.machine-reading-version {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  padding-bottom: 0;
}

.bureau-back {
  width: auto;
  min-width: 28px;
  padding: 0 9px;
  border-radius: 0;
}

.bureau-back::after {
  margin-left: 7px;
  content: "MACHINE READING STUDY";
  font-size: 6px;
  letter-spacing: 0.055em;
  white-space: nowrap;
}

.rf-topbar > a:first-child,
.machine-reading-review-page > header > a:first-child,
.archive-topbar a:first-child {
  font-family: "SFMono-Regular", "Roboto Mono", ui-monospace, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 700px) {
  a[href="invalidated-tickets-human-machine-review-20.html"] {
    width: 100%;
    box-sizing: border-box;
  }

  .review-actions button:last-child {
    width: 100%;
    margin-left: 0;
  }

  .bureau-back::after {
    display: none;
  }
}
