:root {
  --bone: #f4efe6;
  --stone: #2a2622;
  --charcoal: #1a1714;
  --ember: #d4652f;
  --moss: #5c6b4a;
  --ash: #8a8178;
  --pass: #3d6b4f;
  --fail: #8b3a2f;
  --card: #fffbf5;
  --line: #e0d6c8;
  --shadow: 0 12px 40px rgba(26, 23, 20, 0.12);
  --radius: 18px;
  --font: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--stone);
  font-family: var(--sans);
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--ember); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(920px, calc(100% - 2rem)); margin: 0 auto; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.5rem;
}
.brand { display: flex; flex-direction: column; gap: 0.15rem; }
.brand strong { font-family: var(--font); font-size: 1.15rem; letter-spacing: 0.02em; color: var(--charcoal); }
.brand span { font-size: 0.8rem; color: var(--ash); }
.nav { display: flex; gap: 1.25rem; font-size: 0.95rem; }
.nav a { color: var(--stone); }

.hero { padding: 1rem 0 3rem; }
.hero h1 {
  font-family: var(--font);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  color: var(--charcoal);
  max-width: 14ch;
}
.hero .line {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
  color: var(--stone);
}
.hero .caveman {
  font-family: var(--font);
  font-style: italic;
  color: var(--ash);
  margin: 0 0 2rem;
}
.hero p.lead { max-width: 42ch; color: var(--stone); margin: 0 0 2rem; font-size: 1.05rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1.4rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn-primary { background: var(--ember); color: #fff; }
.btn-ghost { background: transparent; color: var(--stone); border: 1px solid var(--line); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 3rem 0;
}
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.step .n {
  font-family: var(--font);
  color: var(--ember);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}
.step h3 { margin: 0 0 0.4rem; font-family: var(--font); font-size: 1.2rem; }
.step p { margin: 0; color: var(--ash); font-size: 0.95rem; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.panel h2 { font-family: var(--font); margin: 0 0 0.75rem; font-size: 1.5rem; }
.muted { color: var(--ash); font-size: 0.95rem; }

.drop {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 2rem 1rem;
  text-align: center;
  background: #faf6ef;
  transition: border-color 0.15s, background 0.15s;
}
.drop.drag { border-color: var(--ember); background: #fff4eb; }
.drop input[type="file"] { display: none; }
.drop label { cursor: pointer; color: var(--ember); font-weight: 600; }

.field {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.field input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font: inherit;
  background: #fff;
  color: var(--stone);
}
.field input:focus { outline: 2px solid var(--ember); outline-offset: 1px; }

.pipeline {
  display: grid;
  gap: 0.6rem;
  margin: 1.25rem 0;
}
.pipe-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ash);
}
.pipe-step .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--line);
  flex-shrink: 0;
}
.pipe-step.active { color: var(--stone); border-color: #d9b39a; }
.pipe-step.active .dot { background: var(--ember); }
.pipe-step.ok { color: var(--pass); border-color: #b7d0c0; }
.pipe-step.ok .dot { background: var(--pass); }
.pipe-step.bad { color: var(--fail); border-color: #e0b4ad; }
.pipe-step.bad .dot { background: var(--fail); }

.stamp-wrap { text-align: center; padding: 1.5rem 0 0.5rem; }
.stamp {
  display: inline-block;
  font-family: var(--font);
  font-size: clamp(3rem, 12vw, 5.5rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.35rem 1.2rem;
  border: 6px solid currentColor;
  border-radius: 8px;
  transform: rotate(-4deg);
  line-height: 1;
}
.stamp.pass { color: var(--pass); }
.stamp.fail { color: var(--fail); }
.demo-badge {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--stone);
  color: var(--bone);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
}

.meta {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.55rem;
}
.meta li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.meta li span:last-child { font-weight: 600; text-align: right; }
.reason {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: #f8ebe8;
  color: var(--fail);
  font-size: 0.98rem;
}

.site-footer {
  margin-top: 4rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--ash);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}
.site-footer a { color: var(--ash); }

.hidden { display: none !important; }

@media (max-width: 560px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}
