:root {
  color-scheme: light;
  --ink: #17201c;
  --muted: #637069;
  --line: #d9e1dc;
  --paper: #fbfcf9;
  --panel: #ffffff;
  --accent: #176b4d;
  --accent-ink: #0d4d37;
  --pass: #1f8a5f;
  --warn: #b46a00;
  --fail: #c0372b;
  --unknown: #58647a;
  --shadow: 0 20px 60px rgba(28, 43, 35, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(23, 107, 77, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(180, 106, 0, 0.08), transparent 32%),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 38px 0;
}

.workspace {
  display: grid;
  gap: 24px;
}

.mast,
.result-head,
.input-row,
.button-row,
.count-pills {
  display: flex;
  align-items: center;
}

.mast,
.result-head {
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.92;
}

h2 {
  font-size: 1.45rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(23, 107, 77, 0.24);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--accent-ink);
  background: rgba(23, 107, 77, 0.08);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.check-form,
.result-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.check-form {
  display: grid;
  gap: 10px;
  padding: 18px;
}

label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.input-row {
  gap: 10px;
}

input {
  width: 100%;
  height: 48px;
  border: 1px solid #c8d3cd;
  border-radius: 7px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(23, 107, 77, 0.12);
}

button {
  height: 48px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 16px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

button:hover {
  background: #24312b;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.status-line {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
}

.result-panel {
  padding: 18px;
}

.count-pills {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  background: #f2f5f1;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 800;
}

.pill.pass {
  color: var(--pass);
}

.pill.warn {
  color: var(--warn);
}

.pill.fail {
  color: var(--fail);
}

.pill.unknown {
  color: var(--unknown);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 18px;
  margin-top: 18px;
}

.checks-wrap {
  min-width: 0;
}

.checks-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-item {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--unknown);
  border-radius: 8px;
  padding: 13px 14px;
  background: var(--panel);
}

.check-item.pass {
  border-left-color: var(--pass);
}

.check-item.warn {
  border-left-color: var(--warn);
}

.check-item.fail {
  border-left-color: var(--fail);
}

.check-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.check-title {
  font-weight: 850;
}

.check-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  white-space: nowrap;
}

.check-summary,
.check-evidence {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.check-evidence {
  overflow-wrap: anywhere;
  font-size: 0.86rem;
}

.receipt-wrap {
  display: grid;
  align-content: start;
  gap: 10px;
}

#receipt-preview {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101418;
  box-shadow: 0 18px 40px rgba(16, 20, 24, 0.16);
}

.button-row {
  gap: 8px;
}

.button-row button,
.wide {
  width: 100%;
  background: #fff;
  color: var(--ink);
  border-color: #cbd5cf;
}

.button-row button:hover,
.wide:hover {
  background: #f3f6f2;
}

@media (max-width: 820px) {
  .shell {
    width: min(100vw - 20px, 680px);
    padding: 20px 0;
  }

  .mast,
  .result-head,
  .input-row {
    align-items: stretch;
    flex-direction: column;
  }

  .badge {
    width: max-content;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .count-pills {
    justify-content: flex-start;
  }
}
