:root {
  --ink: #1c1a17;
  --paper: #faf7f2;
  --card: #ffffff;
  --accent: #b4552d;
  --accent-ink: #ffffff;
  --line: #e5ddd2;
  --muted: #6f675c;
  --warn-bg: #fdf3d7;
  --warn-line: #e3c566;
  --bar-bg: #efe9df;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

header h1 {
  margin: 0 0 4px;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.tagline { margin: 0 0 20px; color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}

.card h2 { margin: 0 0 8px; font-size: 1.15rem; }
.hint { color: var(--muted); font-size: 0.92rem; margin: 0 0 14px; }

.upload-btn {
  display: inline-block;
  border: 2px dashed var(--accent);
  color: var(--accent);
  border-radius: 10px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 14px;
}

.preview-box { margin: 0 0 14px; }
.preview-box img {
  max-width: 100%;
  max-height: 360px;
  border-radius: 10px;
  display: block;
}

button.primary, button.secondary {
  border: 0;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

button.primary { background: var(--accent); color: var(--accent-ink); width: 100%; }
button.primary:disabled { opacity: 0.45; cursor: not-allowed; }
button.secondary { background: var(--bar-bg); color: var(--ink); }

.status { min-height: 1.4em; color: var(--muted); margin: 10px 0 0; }
.status.error { color: #a12622; }

.mock-banner {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.summary { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.summary .stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 120px;
}
.summary .stat .num { font-size: 1.6rem; font-weight: 700; display: block; }
.summary .stat .lbl { color: var(--muted); font-size: 0.82rem; }

.metrics { display: grid; gap: 10px; margin-bottom: 20px; }
.metric { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.metric .name { font-weight: 600; text-transform: capitalize; }
.metric .score { font-variant-numeric: tabular-nums; font-weight: 700; }
.metric .bar {
  grid-column: 1 / -1;
  height: 8px;
  background: var(--bar-bg);
  border-radius: 99px;
  overflow: hidden;
}
.metric .bar > div { height: 100%; background: var(--accent); border-radius: 99px; }
.metric .mask { grid-column: 1 / -1; font-size: 0.85rem; }

.next-steps { margin: 0 0 14px; padding-left: 20px; }
.next-steps li { margin-bottom: 10px; }
.next-steps .concern { font-weight: 700; text-transform: capitalize; }

.disclaimer { color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); padding-top: 12px; }
