:root {
  --ink: #17231d;
  --paper: #f7f2e8;
  --line: #1c3026;
  --lime: #c7ff3d;
  --orange: #ff6d3d;
  --muted: #647168;
}
* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.45 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
}
header {
  min-height: 72px;
  padding: 18px 5vw;
  border-bottom: 2px solid var(--line);
  display: flex;
  gap: 24px;
  align-items: center;
}
header p {
  margin: 0;
  flex: 1;
}
.brand {
  font-weight: 900;
  font-size: 22px;
  color: inherit;
  text-decoration: none;
  letter-spacing: -1px;
}
.brand span {
  font-size: 10px;
}
.repo {
  color: inherit;
}
.intro,
main {
  width: 100%;
  max-width: 1300px;
  margin: auto;
}
.intro {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 48px;
  padding: 7vw 5vw 4vw;
}
.eyebrow {
  font-size: 12px;
  font-weight: 800;
  color: #496650;
  margin: 0;
}
h1 {
  font:
    clamp(42px, 7vw, 98px) / 0.9 Georgia,
    serif;
  letter-spacing: -0.07em;
  margin: 12px 0;
}
.workspace {
  min-width: 0;
  border-block: 2px solid var(--line);
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
}
.inputs,
.editor {
  min-width: 0;
  padding: 30px 5vw;
}
.inputs {
  border-right: 2px solid var(--line);
  background: #dce5d5;
}
.drop {
  display: flex;
  min-height: 150px;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  border: 2px dashed var(--line);
  background: var(--lime);
  cursor: pointer;
  margin-bottom: 10px;
  padding: 20px;
  text-align: center;
}
.drop:focus-visible {
  outline: 4px solid var(--orange);
  outline-offset: 3px;
}
.drop input,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.camera {
  width: 100%;
  margin-bottom: 8px;
}
.demo-button {
  width: 100%;
  margin-bottom: 8px;
  border-style: dashed;
}
.image-preview {
  margin: 16px 0;
  padding: 12px;
  border: 1.5px solid var(--line);
  background: #fffdf7;
}
.image-preview img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #eef1ea;
}
.image-preview p {
  margin: 8px 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.preview-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.privacy-note {
  color: var(--muted);
}
label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin: 12px 0;
}
input,
textarea,
select {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 14px;
  padding: 10px;
  border: 1.5px solid var(--line);
  background: #fffdf7;
  margin-top: 5px;
  border-radius: 0;
}
textarea {
  resize: vertical;
}
button,
.button {
  display: inline-block;
  background: var(--ink);
  border: 2px solid var(--ink);
  color: white;
  padding: 11px 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
button:disabled,
.button[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.65;
}
.quiet {
  background: transparent;
  color: var(--ink);
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}
details {
  font-size: 13px;
  margin-top: 26px;
}
code {
  background: #fff;
  padding: 2px;
}
.formgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 14px;
}
.output {
  min-width: 0;
  padding: 5vw 2.5vw;
}
.comparison {
  min-width: 0;
  display: grid;
  gap: 34px;
}
.source-evidence {
  background: #f0f1f4;
  border: 2px solid #8b909b;
  padding: clamp(18px, 3vw, 38px);
  position: relative;
}
.source-evidence::after {
  content: "↓ AUDIT";
  position: absolute;
  left: 50%;
  bottom: -28px;
  transform: translateX(-50%);
  z-index: 2;
  background: var(--ink);
  color: white;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.source-evidence h2 {
  margin: 0 0 16px;
  font:
    30px/1 Georgia,
    serif;
}
.source-evidence img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  background: white;
  border: 1px solid #c6c9d0;
}
.source-evidence > p:last-child {
  color: #646b77;
  font-size: 12px;
  margin-bottom: 0;
}
.source-label,
.rehab-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin: 0 0 8px;
}
.source-label {
  color: #646b77;
}
.rehab-label {
  color: #0f766e;
}
.chart-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  background: white;
  border: 2px solid var(--line);
  padding: clamp(20px, 4vw, 52px);
  box-shadow: 10px 10px 0 var(--orange);
}
.corrected-card {
  box-shadow: 10px 10px 0 #0f766e;
}
.winner-bar {
  position: relative;
}
.winner-bar .bar {
  background: #0f766e;
}
.winner-label {
  grid-column: 2;
  justify-self: start;
  margin-top: -9px;
  color: #0f766e;
  font-size: 10px;
  font-weight: 900;
}
.chart-card h2 {
  font:
    clamp(24px, 4vw, 50px) / 1 Georgia,
    serif;
  margin: 0 0 5px;
}
.chart-card .meta {
  color: var(--muted);
  margin: 0 0 36px;
}
.bar-row {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) minmax(100px, 3fr) auto;
  gap: 12px;
  align-items: center;
  margin: 13px 0;
}
.bar {
  height: 34px;
  background: var(--lime);
  border: 1.5px solid var(--line);
  min-width: 2px;
}
.bar-row:first-of-type .bar {
  background: var(--orange);
}
.bar-row strong {
  font-size: 14px;
}
.receipt {
  border-top: 1.5px solid var(--line);
  margin-top: 34px;
  padding-top: 14px;
  font-size: 13px;
}
.receipt p {
  margin: 5px 0;
}
.audit {
  font-size: 12px;
  margin-top: 28px;
  color: var(--muted);
}
#status.error {
  color: #b42318;
}
.matrix-card {
  padding: clamp(18px, 3vw, 42px);
}
.matrix-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 20px;
}
.matrix-heading h2 {
  max-width: 760px;
}
.legend {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 10px;
  font-weight: 900;
}
.legend span {
  border: 1px solid var(--line);
  padding: 5px 7px;
}
.legend-winner {
  background: #0f766e;
  color: white;
}
.legend-runner {
  background: #dbeafe;
}
.legend-missing {
  background: repeating-linear-gradient(
    -45deg,
    #fff,
    #fff 4px,
    #e6e8e5 4px,
    #e6e8e5 8px
  );
}
.crime-report {
  border: 1.5px solid var(--line);
  background: #fff8df;
  padding: clamp(18px, 3vw, 32px);
  margin: 0;
  font-size: 12px;
  position: relative;
}
.crime-report::after {
  content: "↓ REHABILITATE";
  position: absolute;
  left: 50%;
  bottom: -28px;
  transform: translateX(-50%);
  z-index: 2;
  background: var(--ink);
  color: white;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.crime-report > strong {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.crime-report ul {
  margin: 8px 0 0;
  padding-left: 20px;
}
.crime-report li {
  margin: 4px 0;
}
.crime-report li.crime::marker {
  color: #c2410c;
}
.crime-report li.fixed::marker {
  color: #0f766e;
}
.matrix-scroll {
  overflow-x: auto;
  border: 1.5px solid var(--line);
}
.matrix {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}
.matrix th,
.matrix td {
  border-right: 1px solid #cad0cc;
  border-bottom: 1px solid #cad0cc;
  padding: 13px 10px;
  vertical-align: middle;
}
.matrix tr:last-child th,
.matrix tr:last-child td {
  border-bottom: 0;
}
.matrix th:last-child,
.matrix td:last-child {
  border-right: 0;
}
.matrix thead th {
  background: #17231d;
  color: white;
  text-align: center;
  font-size: 12px;
}
.matrix thead th:first-child {
  width: 250px;
  text-align: left;
}
.matrix thead th span {
  display: block;
  margin-top: 3px;
  color: #b8c6be;
  font-size: 10px;
  font-weight: 500;
}
.matrix tbody th {
  background: #f4f5f2;
  text-align: left;
  font-size: 12px;
}
.matrix tbody th strong,
.matrix tbody th span,
.matrix tbody th small {
  display: block;
}
.matrix tbody th span {
  color: #5f6a63;
  font-weight: 500;
  margin-top: 2px;
}
.matrix tbody th small {
  color: #0f766e;
  margin-top: 5px;
  font-size: 9px;
  text-transform: uppercase;
}
.matrix td {
  position: relative;
  text-align: center;
  height: 76px;
  font-variant-numeric: tabular-nums;
}
.matrix td .value {
  display: block;
  font-size: 18px;
}
.matrix td .rank-label {
  display: block;
  margin-top: 4px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.matrix td.winner {
  background: #0f766e;
  color: white;
  box-shadow: inset 0 0 0 3px #084c47;
}
.matrix td.winner .value {
  font-weight: 900;
}
.matrix td.runner {
  background: #dbeafe;
  color: #102a43;
}
.matrix td.runner .value {
  font-weight: 750;
}
.matrix td.missing {
  color: #6b736e;
  background: repeating-linear-gradient(
    -45deg,
    #fff,
    #fff 6px,
    #eef0ed 6px,
    #eef0ed 12px
  );
}
.matrix .group-row th {
  background: #d7ded9;
  color: #17231d;
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
footer {
  padding: 28px 5vw;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
}
@media (max-width: 760px) {
  header {
    flex-wrap: wrap;
  }
  .intro,
  .workspace {
    display: block;
  }
  .inputs {
    border-right: 0;
    border-bottom: 2px solid var(--line);
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .bar-row {
    grid-template-columns: 90px 1fr auto;
  }
  .matrix-heading {
    display: block;
  }
  .legend {
    justify-content: flex-start;
    margin-top: 14px;
  }
  .source-evidence,
  .matrix-card {
    padding: 16px;
  }
  .matrix-scroll {
    overflow: visible;
    border: 0;
  }
  .matrix,
  .matrix thead,
  .matrix tbody,
  .matrix tr,
  .matrix th,
  .matrix td {
    display: block;
    width: 100%;
  }
  .matrix {
    min-width: 0;
    table-layout: auto;
  }
  .matrix thead {
    display: none;
  }
  .matrix .benchmark-row {
    margin-bottom: 14px;
    border: 1.5px solid var(--line);
  }
  .matrix .benchmark-row > th {
    border-right: 0;
    border-bottom: 1.5px solid var(--line);
    overflow-wrap: anywhere;
  }
  .matrix td {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "model value"
      "model rank";
    min-height: 54px;
    height: auto;
    align-items: center;
    gap: 2px 12px;
    border-right: 0;
    text-align: right;
  }
  .matrix td::before {
    content: attr(data-column);
    grid-area: model;
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: left;
    font-size: 11px;
    font-weight: 750;
  }
  .matrix td .value {
    grid-area: value;
  }
  .matrix td .rank-label {
    grid-area: rank;
  }
  .matrix .group-row {
    margin: 20px 0 8px;
  }
  .matrix .group-row:first-child {
    margin-top: 0;
  }
  .matrix .group-row th {
    border: 0;
  }
  .actions button,
  .actions .button {
    flex: 1 1 auto;
  }
}
