:root {
  --ink: #1c2833;
  --muted: #5d6d7e;
  --paper: #f6f3ee;
  --card: #fffdf9;
  --line: #d8d0c4;
  --navy: #1f4e79;
  --navy-dark: #16395a;
  --teal: #1a6b62;
  --red: #c0392b;
  --yellow: #c89614;
  --green: #1e8449;
  --gray: #7f8c8d;
  --shadow: 0 10px 30px rgba(28, 40, 51, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, #e8f0ea 0%, transparent 42%),
    linear-gradient(180deg, #fbf8f3 0%, var(--paper) 100%);
  line-height: 1.5;
}

.hero, main, footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 48px 0 16px;
}

.eyebrow {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--teal);
  font-weight: 700;
  margin: 0 0 8px;
}

h1, h2 { margin: 0 0 12px; line-height: 1.2; }
h1 { font-size: 40px; }
h2 { font-size: 22px; }

.lede, .card p { color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin: 20px 0;
}

.grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.steps {
  margin: 0;
  padding-left: 22px;
}

.steps li { margin: 10px 0; }

.note {
  margin-top: 18px;
  padding: 12px 14px;
  background: #fff6e5;
  border-left: 4px solid var(--yellow);
  color: #6b5308;
  border-radius: 0 8px 8px 0;
}

.sample-preview {
  display: block;
  width: 92px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #eee;
  margin: 12px 0 16px;
}

.upload {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

label { font-weight: 600; font-size: 14px; }
input[type="file"], input[type="text"] {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  margin: 6px 6px 0 0;
}

.button.primary { background: var(--navy); color: #fff; }
.button.primary:hover { background: var(--navy-dark); }
.button.secondary { background: var(--teal); color: #fff; }
.button.ghost { background: #eef2f5; color: var(--ink); }
.button:disabled { opacity: 0.6; cursor: wait; }

.hint, .meta { color: var(--muted); font-size: 13px; }
.status { margin-top: 12px; font-weight: 600; }
.status.error { color: var(--red); }
.status.busy { color: var(--navy); }

.results-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.summary-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.badge.Positive { background: var(--red); }
.badge.Negative { background: var(--green); }
.badge.Undetermined { background: var(--yellow); }

.annotated {
  margin: 12px 0 20px;
  overflow: auto;
  background: #f4f0ea;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.annotated img {
  display: block;
  max-width: 100%;
  height: auto;
}

.table-wrap { overflow: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th { background: #f0ece6; }
tr.label-Red td:nth-child(6) { color: var(--red); font-weight: 700; }
tr.label-Yellow td:nth-child(6) { color: var(--yellow); font-weight: 700; }
tr.label-Green td:nth-child(6) { color: var(--green); font-weight: 700; }
tr.label-Out td:nth-child(6) { color: var(--gray); }

footer {
  padding: 28px 0 48px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 800px) {
  .grid.two { grid-template-columns: 1fr; }
  h1 { font-size: 30px; }
}
