/* Hand-written and small on purpose. This page is opened from a phone camera,
   often on slow mobile data, and every kilobyte is one the reader waits for. */

:root {
  --brand: #2793ff;
  --brand-dark: #1268bf;
  --brand-tint: #eaf4ff;
  --fail: #d8315b;
  --page: #f4f7fa;
  --ink: #1a1a1a;
  --muted: #666;
  --line: #e5e7eb;
  --radius: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 2rem 1rem 3rem;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 60rem;
  margin: 0 auto;
}

.brand {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand-dark);
}

h1 {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.75rem;
  letter-spacing: -0.01em;
}

.lede {
  margin: 0 0 2rem;
  max-width: 40rem;
  color: var(--muted);
}

/* ── The form ─────────────────────────────────────────────────────────── */

form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

input[type='text'] {
  flex: 1 1 16rem;
  min-width: 0;
  padding: 0.85rem 1rem;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input[type='text']::placeholder {
  font-family: inherit;
  letter-spacing: normal;
  text-transform: none;
  color: #9a9a9a;
}

input[type='text']:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(39 147 255 / 0.25);
}

button {
  padding: 0.85rem 1.6rem;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: var(--brand-dark);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── The verdict ──────────────────────────────────────────────────────── */

.verdict {
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  margin-bottom: 1.5rem;
}

.verdict h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.verdict p {
  margin: 0;
  font-size: 0.9rem;
  color: #333;
}

.verdict--genuine {
  border-color: rgb(39 147 255 / 0.3);
  background: var(--brand-tint);
}
.verdict--genuine h2 {
  color: var(--brand-dark);
}

.verdict--absent {
  border-color: rgb(216 49 91 / 0.3);
  background: rgb(216 49 91 / 0.05);
}
.verdict--absent h2 {
  color: var(--fail);
}

.verdict--warning {
  border-color: #f5d78e;
  background: #fff8e6;
}
.verdict--warning h2 {
  color: #8a5b00;
}

.note {
  margin-top: 0.75rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid #f5d78e;
  background: #fff8e6;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #7a5b00;
}

/* ── The document ─────────────────────────────────────────────────────── */

.sheet {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.sheet__head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.sheet__head h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.sheet__head p {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem 2rem;
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
}

@media (min-width: 40rem) {
  .meta {
    grid-template-columns: 1fr 1fr;
  }
}

.meta div {
  display: flex;
  gap: 0.4rem;
}

.meta dt {
  color: var(--muted);
  white-space: nowrap;
}

.meta dd {
  margin: 0;
  font-weight: 600;
}

/* A wide table scrolls inside itself; the PAGE must never scroll sideways. */
.table-scroll {
  overflow-x: auto;
  border-block: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead th {
  position: sticky;
  top: 0;
  padding: 0.5rem 0.75rem;
  background: #f1f3f5;
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #555;
  white-space: nowrap;
}

tbody td {
  padding: 0.4rem 0.75rem;
  border-top: 1px solid #f1f1f1;
}

.num {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.name {
  text-transform: uppercase;
}

tr.voided {
  color: #9a9a9a;
  text-decoration: line-through;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
}

@media (min-width: 40rem) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-grid h3 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}

.footer-grid li {
  padding: 0.1rem 0;
}

.tally {
  border-top: 1px solid var(--line);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

.approval {
  border-left: 2px solid var(--ink);
  padding-left: 0.75rem;
  margin-bottom: 0.6rem;
}

.approval span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--muted);
}

.hidden {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
