:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #1c2430;
  --muted: #5a6675;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --pass: #15803d;
  --fail: #b91c1c;
  --border: #d8dee7;
  --radius: 12px;
}

* { box-sizing: border-box; }

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

main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.site-header {
  text-align: center;
  padding: 2.25rem 1rem 1rem;
}

.site-header h1 { margin: 0 0 0.25rem; font-size: 1.75rem; }
.tagline { color: var(--muted); margin: 0; }

.dropzone {
  background: var(--panel);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.25rem;
  text-align: center;
  margin: 1.5rem 0;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.dropzone.dragover {
  border-color: var(--accent);
  background: #eef4ff;
}

.dropzone-primary { margin: 0 0 0.75rem; font-weight: 600; }
.dropzone-hint { color: var(--muted); font-size: 0.9rem; margin: 0.75rem 0 0; }

button {
  font: inherit;
  border-radius: 8px;
  border: 1px solid var(--accent-dark);
  background: var(--accent);
  color: #fff;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
}

button:hover { background: var(--accent-dark); }
button:disabled { background: #9aa5b1; border-color: #9aa5b1; cursor: not-allowed; }

button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.limits {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.limits h2 { margin-top: 0; font-size: 1.1rem; }

.limits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.limits-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.limits-grid input {
  font: inherit;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  width: 100%;
}

.limits-note { color: var(--muted); font-size: 0.85rem; margin-bottom: 0; }

.actions { margin: 1rem 0; }

#clear-button {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--border);
}

#clear-button:hover:not(:disabled) { background: #eceff3; }

.status {
  min-height: 1.4rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.result-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.result-card h2 { margin-top: 0; font-size: 1.15rem; }

.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1rem;
  margin: 0 0 1rem;
}

.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

.checks { list-style: none; padding: 0; margin: 0 0 0.75rem; }
.checks li { padding: 0.4rem 0; border-top: 1px solid var(--border); }
.checks li:first-child { border-top: 0; }

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  margin-right: 0.35rem;
}

.checks .pass .badge { background: #dcfce7; color: var(--pass); }
.checks .fail .badge { background: #fee2e2; color: var(--fail); }
.checks .fail { color: var(--fail); }

.verdict { margin: 0; font-weight: 600; }
.verdict-pass { color: var(--pass); }
.verdict-fail { color: var(--fail); }

.result-unsupported { border-color: #f3c88f; background: #fffaf1; }

.about { color: var(--muted); font-size: 0.95rem; }
.about h2 { color: var(--ink); font-size: 1.1rem; }
.about ul { padding-left: 1.2rem; }
.about li { margin-bottom: 0.5rem; }

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1.5rem 1rem 2.5rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 34rem) {
  .limits-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 0.1rem; }
  .facts dt { margin-top: 0.4rem; }
  .site-header h1 { font-size: 1.45rem; }
}
