:root {
  --paper: #f4efe7;
  --paper-strong: #fffaf3;
  --ink: #1e2430;
  --ink-soft: #576173;
  --accent: #b84a2b;
  --accent-strong: #8f3218;
  --line: rgba(30, 36, 48, 0.12);
  --ok: #1d7a58;
  --warn: #a66a00;
  --error: #a22d2d;
  --shadow: 0 24px 48px rgba(30, 36, 48, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(184, 74, 43, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(29, 122, 88, 0.12), transparent 22%),
    linear-gradient(180deg, #efe5d8 0%, var(--paper) 48%, #f8f3ec 100%);
}

.shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.hero,
.panel {
  background: rgba(255, 250, 243, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero {
  padding: 34px 32px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

h1,
h2 {
  margin: 0;
  font-family: "Georgia", "Times New Roman", serif;
  letter-spacing: -0.02em;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  line-height: 0.98;
}

h2 {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
}

.lede {
  max-width: 70ch;
  margin: 18px 0 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

.contract {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.contract p {
  margin: 0;
  line-height: 1.55;
}

.panel {
  margin-top: 20px;
  padding: 24px;
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 220px;
  padding: 28px;
  border: 2px dashed rgba(184, 74, 43, 0.36);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 247, 238, 0.82)),
    repeating-linear-gradient(
      135deg,
      rgba(184, 74, 43, 0.04),
      rgba(184, 74, 43, 0.04) 12px,
      transparent 12px,
      transparent 24px
    );
  text-align: center;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.dropzone:hover,
.dropzone.dragover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 240, 229, 0.94)),
    repeating-linear-gradient(
      135deg,
      rgba(184, 74, 43, 0.08),
      rgba(184, 74, 43, 0.08) 12px,
      transparent 12px,
      transparent 24px
    );
}

.dropzone-title {
  font-size: 1.4rem;
  font-weight: 700;
}

.dropzone-copy {
  color: var(--ink-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.button-primary {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 14px 24px rgba(184, 74, 43, 0.22);
}

.button-secondary {
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
}

.status {
  margin: 16px 0 0;
  color: var(--ink-soft);
}

.status.ok {
  color: var(--ok);
}

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

.status.error {
  color: var(--error);
}

.panel-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading p {
  margin: 0;
  color: var(--ink-soft);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.metric {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid var(--line);
}

.metric-label {
  display: block;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.metric-value {
  display: block;
  margin-top: 8px;
  font-size: 1.6rem;
  font-weight: 700;
}

.results {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.results.empty {
  color: var(--ink-soft);
}

.card {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
}

.card-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.card h3 {
  margin: 0;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-ok {
  color: var(--ok);
  background: rgba(29, 122, 88, 0.1);
}

.badge-warn {
  color: var(--warn);
  background: rgba(166, 106, 0, 0.1);
}

.card-meta,
.card-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(30, 36, 48, 0.06);
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.notes-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
}

.notes-list li + li {
  margin-top: 6px;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 24px, 1080px);
    padding: 20px 0 32px;
  }

  .hero,
  .panel {
    padding: 20px;
  }

  .dropzone {
    min-height: 180px;
  }
}
