:root {
  --ink: #102a2a;
  --muted: #5c6f6d;
  --line: #dce7e4;
  --surface: #ffffff;
  --soft: #f4f8f6;
  --blue: #1665d8;
  --green: #0b7a4b;
  --red: #b42318;
  --amber: #a15c07;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Aptos", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(22, 101, 216, 0.12), transparent 34rem),
    linear-gradient(135deg, #f8fbfa 0%, #eef5f2 100%);
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 32px;
  align-items: end;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.lede {
  max-width: 660px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.status-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(16, 42, 42, 0.08);
}

.status-card {
  padding: 22px;
}

.status-card strong,
.status-card small {
  display: block;
}

.status-card small {
  margin-top: 8px;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e7f0ff;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
}

.checker-grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 22px;
}

.panel {
  padding: 24px;
}

.upload-panel {
  align-self: start;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
}

select,
input,
button {
  width: 100%;
  border-radius: 12px;
  font: inherit;
}

select,
input {
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.stacked {
  margin-top: 16px;
}

.field-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 220px;
  margin: 18px 0;
  padding: 24px;
  border: 2px dashed #aac4bd;
  border-radius: 16px;
  background: var(--soft);
  cursor: pointer;
  text-align: center;
}

.drop-zone input {
  width: 1px;
  height: 1px;
  opacity: 0;
  position: absolute;
}

.drop-zone span {
  display: block;
  font-weight: 900;
}

.drop-zone small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

button {
  border: 0;
  padding: 15px 18px;
  background: var(--blue);
  color: white;
  font-weight: 900;
  cursor: pointer;
}

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

.privacy-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.empty-state {
  min-height: 360px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
}

.empty-state span {
  color: var(--ink);
  font-size: 1.4rem;
  font-weight: 900;
}

.result-topline {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.result-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 9px 12px;
  background: #fff7ed;
  color: var(--amber);
  font-weight: 900;
}

.result-badge.pass {
  background: #e7f8ef;
  color: var(--green);
}

.result-badge.fail {
  background: #fff0ef;
  color: var(--red);
}

.summary-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
}

.summary-counts span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fbfdfc;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.extraction-meta {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbfa;
  color: var(--muted);
  font-size: 0.9rem;
}

.extraction-meta strong,
.extraction-meta span {
  display: block;
}

.extraction-meta strong {
  color: var(--ink);
}

.extraction-meta ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.extraction-meta li + li {
  margin-top: 4px;
}

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

.document-fields div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fbfdfc;
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 4px 0 0;
  font-weight: 750;
}

.check-row {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr 130px;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.check-row:first-child {
  border-top: 0;
}

.check-row small {
  display: block;
  color: var(--muted);
}

.check-status {
  justify-self: end;
  border-radius: 999px;
  padding: 6px 9px;
  background: #fff7ed;
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 900;
}

.check-status.pass {
  background: #e7f8ef;
  color: var(--green);
}

.check-status.fail {
  background: #fff0ef;
  color: var(--red);
}

.next-steps {
  margin: 22px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbfa;
}

.next-steps h2,
.email-card h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.next-steps ol {
  margin: 0;
  padding-left: 20px;
}

.next-steps li + li {
  margin-top: 6px;
}

.email-card {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #fbfdfc;
}

.email-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.email-card-head button {
  width: auto;
  padding: 9px 13px;
}

textarea {
  width: 100%;
  min-height: 220px;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: white;
  font: 0.95rem/1.5 ui-monospace, "SFMono-Regular", Consolas, monospace;
  resize: vertical;
}

details {
  margin-top: 20px;
}

pre {
  max-height: 360px;
  overflow: auto;
  padding: 16px;
  border-radius: 12px;
  background: #0f1f1f;
  color: #d8f5ec;
}

@media (max-width: 860px) {
  .hero,
  .checker-grid {
    grid-template-columns: 1fr;
  }

  .check-row,
  .document-fields {
    grid-template-columns: 1fr;
  }

  .check-status {
    justify-self: start;
  }
}
