:root {
  --bg: #f4f7f6;
  --card: #ffffff;
  --text: #10201a;
  --muted: #65726d;
  --green: #0b6b4c;
  --green-2: #119a6d;
  --blue: #175ea8;
  --line: #dfe7e3;
  --warn: #a95d00;
  --warn-bg: #fff5df;
  --good-bg: #e9f8f1;
  --danger: #a12626;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

.topbar {
  min-height: 72px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px max(24px, calc((100vw - 1040px) / 2));
}

.brand {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
  text-decoration: none;
}

.brand span {
  color: var(--green-2);
}

nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.container {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 64px;
}

.hero {
  padding: 14px 0 12px;
  max-width: 720px;
}

h1 {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
  letter-spacing: 0;
  margin: 12px 0 14px;
  max-width: 680px;
}

h2 {
  margin: 0 0 8px;
}

h3 {
  font-size: 20px;
  margin: 0 0 18px;
}

.lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 700px;
}

.pill {
  display: inline-flex;
  border: 1px solid #b8d9cc;
  color: var(--green);
  background: #eef8f4;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .7px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  box-shadow: 0 12px 36px rgba(21, 44, 36, .05);
  margin: 18px 0;
}

.upload-card {
  max-width: 760px;
}

label {
  display: block;
  font-weight: 800;
  margin: 18px 0 8px;
}

.required {
  color: #c43b3b;
}

.drop {
  border: 2px dashed #b9cbc4;
  border-radius: 8px;
  padding: 26px;
  background: #fafcfb;
  display: grid;
  gap: 7px;
}

.drop input {
  margin-bottom: 8px;
}

.drop small,
.muted,
small {
  color: var(--muted);
}

textarea {
  width: 100%;
  border: 1px solid #cad8d2;
  border-radius: 8px;
  padding: 14px;
  font: inherit;
  resize: vertical;
  background: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 14px 18px;
  min-height: 48px;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  margin-top: 18px;
}

.primary {
  background: var(--green);
  color: #fff;
}

.secondary {
  background: #fff;
  color: var(--green);
  border: 1px solid #bad0c8;
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.page-head h1 {
  font-size: 36px;
  margin-bottom: 4px;
}

.result-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  border-radius: 8px;
  padding: 24px;
  margin: 18px 0;
  border: 1px solid;
}

.result-card.good {
  background: var(--good-bg);
  border-color: #bde6d2;
}

.result-card.warn {
  background: var(--warn-bg);
  border-color: #f0d09a;
}

.result-icon {
  height: 42px;
  width: 42px;
  border-radius: 999px;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 900;
  flex: 0 0 42px;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mini-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.status {
  display: inline-flex;
  width: max-content;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  background: #edf1ef;
}

.status.pending,
.status.review,
.status.needs_review {
  background: #fff0d8;
  color: #8e5100;
}

.status.justified,
.status.normal,
.status.completed {
  background: #e3f5ec;
  color: #086344;
}

.status.excessive {
  background: #ffe6e6;
  color: #9d2020;
}

.data-list {
  display: grid;
  gap: 14px;
}

.data-list div {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.data-list span {
  color: var(--muted);
}

.radio {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  margin: 10px 0;
  font-weight: 700;
}

.radio input {
  margin-right: 8px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
}

.review-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f6f8f7;
  padding: 16px;
  border-radius: 8px;
}

.review-link {
  display: inline-flex;
  margin-top: 7px;
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.review-link:hover {
  text-decoration: underline;
}

.error {
  border-left: 4px solid var(--danger);
  color: var(--danger);
}

@media (max-width: 650px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

  nav {
    gap: 14px;
    font-size: 14px;
  }

  .container {
    width: 100%;
    padding: 16px 12px 48px;
  }

  .hero {
    padding: 4px 0 8px;
  }

  h1 {
    font-size: 24px;
    line-height: 1.24;
    margin: 10px 0;
  }

  .lead {
    font-size: 15px;
    line-height: 1.5;
  }

  .pill {
    font-size: 11px;
    line-height: 1.2;
  }

  .card {
    padding: 16px;
    margin: 12px 0;
  }

  .drop {
    padding: 14px;
  }

  input[type="file"] {
    max-width: 100%;
    font-size: 14px;
  }

  textarea {
    font-size: 16px;
  }

  .btn {
    width: 100%;
    padding: 13px 14px;
  }

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

  .data-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-head h1 {
    font-size: 30px;
  }

  .result-card {
    padding: 18px;
    gap: 12px;
  }

  .result-icon {
    height: 36px;
    width: 36px;
    flex-basis: 36px;
  }

  .review-row {
    align-items: flex-start;
    flex-direction: column;
  }

  th,
  td {
    padding: 11px 10px;
  }
}
