/* =====================================================================
   TypoSweep — site styles

   Plain CSS, no framework. Aesthetic matches the audit report's HTML
   output (system fonts, light gray bg, subtle borders, restrained
   color). The goal is "looks like a serious tool, not a toy."
   ===================================================================== */

:root {
  --fg: #1c1c1e;
  --fg-muted: #6b6b70;
  --fg-faint: #a8a8ad;
  --bg: #fafafa;
  --card-bg: #ffffff;
  --border: #e5e5ea;

  --accent: #1c1c1e;       /* primary button: deep neutral, not blue */
  --accent-fg: #ffffff;

  --warn: #c0392b;
  --good: #1d6f3f;

  --highlight: #fff8d6;
  --highlight-border: #e8c547;
  --highlight-fg: #6b5e1c;

  --removed-bg: #fadcdc;
  --removed-fg: #9a2a2a;
  --added-bg:   #d6f5dc;
  --added-fg:   #1d6f3f;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a {
  color: var(--accent);
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 96px 24px;
}

/* ---------- Site chrome ---------- */

.site-header {
  margin-bottom: 40px;
}
.site-header .brand {
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 18px;
  text-decoration: none;
  color: var(--fg);
}

.site-footer {
  margin-top: 80px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--fg-faint);
  text-align: center;
}
.site-footer a {
  color: var(--fg-muted);
  text-decoration: none;
  margin: 0 6px;
}

/* ---------- Hero (landing) ---------- */

.hero h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 16px 0;
  line-height: 1.2;
}
.hero .lede {
  font-size: 17px;
  color: var(--fg-muted);
  max-width: 580px;
  margin: 0 0 32px 0;
}

/* ---------- Forms ---------- */

.upload-form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  margin-bottom: 48px;
}

.field {
  display: block;
  margin-bottom: 20px;
}
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  margin-bottom: 6px;
}
.field-hint {
  display: block;
  font-size: 13px;
  color: var(--fg-faint);
  margin-top: 6px;
  line-height: 1.45;
}

.field input[type="email"],
.field input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
}
.field input[type="email"]:focus,
.field input[type="file"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.file-field input[type="file"] {
  padding: 8px;
  background: var(--bg);
}

.cf-turnstile {
  margin: 20px 0;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 12px 20px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--fg);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #f3f3f5; }
.btn.primary {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}
.btn.primary:hover { background: #000; }

.form-fine-print {
  font-size: 12px;
  color: var(--fg-faint);
  margin-top: 16px;
  line-height: 1.5;
}

/* ---------- How it works / What you get ---------- */

.how-it-works, .what-you-get {
  margin: 56px 0;
}
.how-it-works h2, .what-you-get h2 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.steps {
  list-style: decimal;
  padding-left: 22px;
  margin: 0;
}
.steps li { margin: 0 0 12px 0; }

.bullets {
  list-style: disc;
  padding-left: 22px;
  margin: 0;
}
.bullets li { margin: 0 0 10px 0; }
.bullets.compact li { margin-bottom: 4px; }

/* ---------- Job page ---------- */

.job-header {
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}
.job-header h1 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px 0;
}
.job-header .job-meta {
  font-size: 13px;
  color: var(--fg-faint);
  margin: 0;
}

.job-state {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  margin-bottom: 24px;
}
.job-state h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px 0;
}
.job-state p { margin: 0 0 12px 0; }
.job-stage {
  font-size: 13px;
  color: var(--fg-faint);
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin-bottom: 16px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Preview samples ---------- */

.preview-summary { font-size: 16px; }
.samples { margin: 28px 0; }
.samples h3 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  margin: 0 0 12px 0;
}
.sample {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--warn);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 12px;
  font-family: Georgia, "Times New Roman", serif;
}
.sample-tag {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-faint);
  margin-bottom: 6px;
}
.sample-context { margin: 0 0 6px 0; }
.sample-context .dim { color: var(--fg-faint); }
.sample-context .flagged { background: var(--removed-bg); color: var(--removed-fg); padding: 0 2px; }
.sample-fix {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  color: var(--good);
  margin: 6px 0 0 0;
}

/* ---------- Upsell block ---------- */

.upsell {
  margin-top: 32px;
  padding: 24px;
  background: var(--highlight);
  border-left: 4px solid var(--highlight-border);
  border-radius: 6px;
  color: var(--highlight-fg);
}
.upsell h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: var(--fg);
}
.upsell p { color: var(--fg); }
.upsell .bullets { color: var(--fg); }
.checkout-form { margin: 16px 0 8px 0; }

/* ---------- Downloads (full_done) ---------- */

.downloads { margin: 20px 0 0 0; }
.downloads .btn { margin: 0 8px 8px 0; }

/* ---------- Failed / expired ---------- */

.job-state.failed { border-left: 4px solid var(--warn); }
.job-state.expired { border-left: 4px solid var(--fg-faint); }

/* ---------- Legal pages ---------- */

.legal h1 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 24px 0;
}
.legal h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 32px 0 12px 0;
}
.legal p, .legal ul {
  font-size: 15px;
  color: var(--fg);
  line-height: 1.65;
}
.legal ul { padding-left: 22px; }
.legal li { margin: 0 0 8px 0; }
.legal-meta {
  font-size: 13px;
  color: var(--fg-faint);
  font-style: italic;
}
.legal-disclaimer {
  margin-top: 40px;
  padding: 12px 14px;
  background: var(--card-bg);
  border-left: 3px solid var(--highlight-border);
  border-radius: 4px;
  font-size: 13px;
  color: var(--fg-muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
  .wrap { padding: 24px 16px 64px 16px; }
  .hero h1 { font-size: 26px; }
  .upload-form, .job-state { padding: 20px; }
  .downloads .btn { display: block; margin-bottom: 8px; }
}
