:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #667085;
  --border: #d9e2ec;
  --accent: #0067b8;
  --accent-dark: #004b86;
  --ok: #0f766e;
  --ok-bg: #e6fffb;
  --warn: #b45309;
  --warn-bg: #fff7ed;
  --error: #b42318;
  --error-bg: #fff1f0;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
.container {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
}
.brand {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
  font-size: 18px;
}
.hero {
  padding: 36px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #e9f4ff 100%);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.hero.compact { padding: 24px 28px; }
h1 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 44px); line-height: 1.1; }
h2 { margin: 0 0 10px; font-size: 22px; }
p { margin: 0 0 12px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}
.card.small { padding: 20px; }
.card.ok { border-color: rgba(15, 118, 110, 0.35); background: linear-gradient(180deg, #ffffff 0%, var(--ok-bg) 100%); }
.card.warn { border-color: rgba(180, 83, 9, 0.35); background: linear-gradient(180deg, #ffffff 0%, var(--warn-bg) 100%); }
label { display: block; font-weight: 700; margin-bottom: 8px; }
input[type="file"] {
  width: 100%;
  padding: 14px;
  border: 1px dashed #9db9d4;
  border-radius: 16px;
  background: #f8fbff;
}
button, .button {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button:hover, .button:hover { background: var(--accent-dark); }
.secondary {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 11px 16px;
  background: #fff;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.muted { color: var(--muted); }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; }
.metric { display: block; font-weight: 900; font-size: 28px; }
.label { display: block; color: var(--muted); font-size: 14px; }
.result-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.badge { display: inline-flex; border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.alert { padding: 14px 16px; border-radius: 16px; margin-bottom: 16px; border: 1px solid var(--border); background: #fff; }
.alert-error { color: var(--error); background: var(--error-bg); border-color: rgba(180, 35, 24, 0.25); }
.alert-info { color: var(--accent); background: #eef6ff; border-color: #b7d8f5; }
pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #0f172a;
  color: #e5e7eb;
  padding: 18px;
  border-radius: 16px;
  overflow: auto;
  font-size: 13px;
}
code {
  background: #eef2f7;
  color: #1e3a8a;
  padding: 2px 6px;
  border-radius: 6px;
}
ul { margin-bottom: 0; }
@media (max-width: 760px) {
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .result-line { flex-direction: column; }
  .topbar { flex-direction: column; align-items: flex-start; }
}
