:root {
  color-scheme: dark;
  --ink: #f4f0e8;
  --muted: #a8a399;
  --paper: #151714;
  --panel: #20231e;
  --line: #3a3f36;
  --acid: #d7ff4f;
  --red: #ff715b;
  --blue: #7eb8ff;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

.masthead {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem 3vw;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font:
    600 0.72rem/1.4 ui-monospace,
    monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.masthead a {
  color: var(--acid);
  text-decoration: none;
}
main {
  width: min(1180px, 94vw);
  margin: 0 auto 8rem;
}
.intro {
  padding: clamp(4rem, 10vw, 9rem) 0 3rem;
  max-width: 880px;
}
.eyebrow {
  color: var(--acid);
  font:
    700 0.75rem/1.4 ui-monospace,
    monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
h1,
h2,
h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}
h1 {
  font-size: clamp(3.2rem, 9vw, 7.5rem);
  line-height: 0.88;
  letter-spacing: -0.065em;
}
h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}
h3 {
  font-size: 1.45rem;
}
.lede {
  max-width: 660px;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.access-panel,
.decision-panel {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1rem;
  align-items: end;
  padding: 1.4rem;
  border: 1px solid var(--line);
  background: var(--panel);
}

label {
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
  font:
    600 0.75rem/1.3 ui-monospace,
    monospace;
  text-transform: uppercase;
}
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #0e100d;
  color: var(--ink);
  padding: 0.85rem;
  font:
    500 0.9rem/1.4 ui-monospace,
    monospace;
}
input:focus,
textarea:focus {
  outline: 2px solid var(--acid);
  outline-offset: 1px;
}
button {
  border: 1px solid var(--acid);
  border-radius: 0;
  background: var(--acid);
  color: #10120d;
  padding: 0.9rem 1.2rem;
  font:
    800 0.78rem/1 ui-monospace,
    monospace;
  text-transform: uppercase;
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
}
#access-status,
#decision-status {
  grid-column: 1 / -1;
  min-height: 1.2em;
  margin: 0;
  color: var(--red);
}

.report {
  margin-top: 5rem;
}
.report-meta {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.digest {
  overflow-wrap: anywhere;
  color: var(--blue);
  font:
    0.78rem/1.6 ui-monospace,
    monospace;
}
.status-chip {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--acid);
  color: var(--acid);
  font:
    700 0.7rem/1 ui-monospace,
    monospace;
  text-transform: uppercase;
}
.provider {
  padding: 4rem 0;
  border-bottom: 1px solid var(--line);
}
.provider-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  margin-bottom: 3rem;
}
.provider-summary {
  color: var(--muted);
  line-height: 1.7;
}
.finding-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.finding {
  min-width: 0;
  padding: 1.3rem;
  background: var(--panel);
}
.finding-kind {
  color: var(--acid);
  font:
    700 0.68rem/1 ui-monospace,
    monospace;
  text-transform: uppercase;
}
.finding p {
  color: var(--muted);
  line-height: 1.55;
}
.finding strong {
  color: var(--ink);
}
.evidence {
  border-left: 2px solid var(--blue);
  padding-left: 0.8rem;
  font-size: 0.85rem;
}
.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}
.file-list code {
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line);
  color: var(--muted);
}
.patch {
  margin-top: 1rem;
  border: 1px solid var(--line);
  background: #090a08;
}
.patch > summary {
  padding: 1rem;
  overflow-wrap: anywhere;
}
.diff-controls {
  display: flex;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.diff-controls button {
  padding: 0.55rem 0.7rem;
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}
.diff-controls button.active {
  border-color: var(--acid);
  color: var(--acid);
}
.diff-warning {
  display: block;
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--red);
  color: var(--red);
  font-size: 0.82rem;
}
.diff-warning input {
  width: auto;
  margin-left: 0.5rem;
}
.diff-content {
  max-height: 42rem;
  overflow: auto;
  font:
    0.75rem/1.55 ui-monospace,
    monospace;
}
.diff-line {
  display: grid;
  grid-template-columns: 3.5rem 3.5rem 1.5rem minmax(max-content, 1fr);
  min-width: max-content;
}
.diff-line code,
.diff-cell code {
  padding-right: 1rem;
  white-space: pre;
}
.line-number {
  padding: 0 0.55rem;
  color: #6f746a;
  text-align: right;
  user-select: none;
}
.diff-marker {
  color: var(--muted);
}
.diff-line.add,
.diff-cell.add {
  background: rgba(126, 184, 255, 0.13);
}
.diff-line.delete,
.diff-cell.delete {
  background: rgba(255, 113, 91, 0.13);
}
.diff-banner {
  min-width: max-content;
  padding: 0.25rem 0.8rem;
  color: var(--muted);
  white-space: pre;
}
.diff-banner.file {
  padding-block: 0.7rem;
  color: var(--acid);
  border-top: 1px solid var(--line);
}
.diff-banner.hunk {
  color: var(--blue);
  background: rgba(126, 184, 255, 0.07);
}
.diff-pair {
  display: grid;
  grid-template-columns: minmax(28rem, 1fr) minmax(28rem, 1fr);
  min-width: 56rem;
}
.diff-cell {
  display: grid;
  grid-template-columns: 3.5rem minmax(max-content, 1fr);
  border-right: 1px solid var(--line);
}
.diff-raw {
  max-height: 38rem;
  margin: 0;
  overflow: auto;
  padding: 1rem;
  color: #d2d7ca;
  font:
    0.75rem/1.55 ui-monospace,
    monospace;
  white-space: pre;
}
.commit-stack {
  margin: 2.5rem 0;
}
.commit-card {
  position: relative;
  margin-top: 1rem;
  padding: 1.2rem 1.2rem 1.2rem 4.5rem;
  border: 1px solid var(--line);
  background: var(--panel);
}
.commit-index {
  position: absolute;
  left: 1.2rem;
  top: 1.2rem;
  color: var(--acid);
  font:
    700 1rem/1 ui-monospace,
    monospace;
}
#execution {
  padding: 5rem 0;
  border-bottom: 1px solid var(--line);
}
.model-list {
  display: grid;
  gap: 0.5rem;
  align-content: start;
}
.model-list code {
  color: var(--blue);
  overflow-wrap: anywhere;
}
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 13rem minmax(15rem, 1fr) 7rem minmax(14rem, 1fr);
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}
.timeline li::before {
  content: "●";
  position: absolute;
  transform: translateX(-1.3rem);
  color: var(--acid);
}
.timeline li.failed::before {
  color: var(--red);
}
.timeline li.running::before {
  color: var(--blue);
}
.timeline strong {
  color: var(--ink);
}
.timeline code {
  color: var(--blue);
  overflow-wrap: anywhere;
}
.timeline .evidence {
  grid-column: 1 / -1;
}
.validation {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  color: var(--muted);
  font:
    0.76rem/1.5 ui-monospace,
    monospace;
}
.validation .pass {
  color: var(--acid);
}
.empty {
  padding: 1.5rem;
  border: 1px solid var(--line);
  color: var(--muted);
}
.decision-panel {
  grid-template-columns: 1fr 1.4fr;
  margin-top: 5rem;
  align-items: start;
}
.decision-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  grid-column: 2;
}
.decision-actions .reject {
  border-color: var(--red);
  background: transparent;
  color: var(--red);
}
.decision-actions .approve {
  border-color: var(--acid);
}

@media (max-width: 760px) {
  .masthead {
    padding-inline: 4vw;
  }
  .masthead span {
    display: none;
  }
  .access-panel,
  .decision-panel,
  .report-meta,
  .provider-head {
    grid-template-columns: 1fr;
  }
  .finding-grid {
    grid-template-columns: 1fr;
  }
  .decision-actions {
    grid-column: 1;
    flex-direction: column;
  }
  .validation {
    flex-direction: column;
  }
  .timeline li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding-left: 1.3rem;
  }
  .commit-card {
    padding-left: 1.2rem;
    padding-top: 3.5rem;
  }
  .decision-actions button {
    width: 100%;
  }
}
