:root {
  --paper: #FAF7F0;
  --deep-paper: #F1ECDE;
  --ink: #1C1B19;
  --soft-ink: #58554D;
  --faint-ink: #8B877C;
  --verifying-teal: #0F6D5C;
  --amber: #AE5A1B;
  --critical: #8C2F1E;
  --rule: #DDD5C4;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(250, 247, 240, 0.96), rgba(241, 236, 222, 0.98)),
    repeating-linear-gradient(90deg, transparent 0, transparent 22px, rgba(28, 27, 25, 0.025) 23px);
  color: var(--ink);
  font-family: Inter, "Segoe UI", sans-serif;
  line-height: 1.55;
}

.sheet {
  width: min(920px, calc(100% - 32px));
  margin: 32px auto;
  padding: 28px 0;
}

.summary-card,
.signup-gate,
.status-sheet,
.field-group,
.upload-sheet {
  border-bottom: 1px solid var(--rule);
  padding: 24px 0;
}

.eyebrow,
.verified-marker,
.confidence,
.file-note,
code {
  font-family: "IBM Plex Mono", Consolas, monospace;
}

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

h1,
h2,
h3 {
  font-family: Newsreader, Georgia, serif;
  margin-top: 0;
}

h1 {
  font-size: 2.6rem;
  line-height: 1.05;
}

h2 {
  font-size: 1.55rem;
}

.lede,
.muted,
.file-note {
  color: var(--soft-ink);
}

.dropzone {
  display: grid;
  min-height: 160px;
  place-items: center;
  border: 1px dashed var(--faint-ink);
  background: var(--deep-paper);
  cursor: pointer;
}

input,
button {
  font: inherit;
}

button {
  background: var(--ink);
  border: 0;
  color: var(--paper);
  margin-top: 16px;
  padding: 10px 14px;
}

.red-flag-card,
.field-row {
  border-top: 1px solid var(--rule);
  padding: 16px 0;
}

.red-flag-card .eyebrow {
  color: var(--amber);
}

.scenario {
  border-left: 3px solid var(--amber);
  color: var(--ink);
  padding-left: 12px;
}

.scenario::before {
  content: "If - ";
  color: var(--amber);
  font-weight: 700;
}

.clause-box {
  background: #fffdf8;
  border: 1px solid var(--rule);
  margin-top: 12px;
}

.verified-marker {
  color: var(--verifying-teal);
  font-size: 0.78rem;
  margin: 0;
  padding: 10px 12px 0;
  text-transform: uppercase;
}

.verified-marker::before {
  content: "\2713 ";
}

.raw-clause {
  background: transparent;
  border: 0;
  color: var(--ink);
  font-family: "IBM Plex Mono", Consolas, monospace;
  margin: 0;
  max-height: 240px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

details summary {
  cursor: pointer;
}

code {
  background: var(--deep-paper);
  padding: 2px 4px;
}

a {
  color: var(--verifying-teal);
}

@media (max-width: 640px) {
  .sheet {
    width: min(100% - 24px, 920px);
    margin: 16px auto;
  }

  h1 {
    font-size: 2rem;
  }
}
