* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f6f8;
  color: #1f2933;
  line-height: 1.5;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

header {
  text-align: center;
  margin-bottom: 28px;
}

h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 600;
}

.subtitle {
  margin: 0;
  color: #5a6675;
  font-size: 14px;
}

main {
  background: #fff;
  border: 1px solid #e2e6ed;
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  min-height: 160px;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  color: #5a6675;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e2e6ed;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-radius: 6px;
  margin: -28px -28px 24px;
  border-radius: 8px 8px 0 0;
}

.banner.ok    { background: #ecfdf5; border-bottom: 1px solid #a7f3d0; color: #064e3b; }
.banner.bad   { background: #fef2f2; border-bottom: 1px solid #fecaca; color: #7f1d1d; }
.banner.error { background: #fffbeb; border-bottom: 1px solid #fde68a; color: #78350f; }

.banner-icon {
  flex: 0 0 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  color: #fff;
}

.banner.ok    .banner-icon { background: #16a34a; }
.banner.bad   .banner-icon { background: #dc2626; }
.banner.error .banner-icon { background: #d97706; }

.banner h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
}

.banner p {
  margin: 0;
  font-size: 14px;
  opacity: 0.85;
}

dl.meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  margin: 0 0 24px;
  font-size: 14px;
}

dl.meta dt {
  font-weight: 600;
  color: #475569;
}

dl.meta dd {
  margin: 0;
  word-break: break-all;
}

dl.meta dd code {
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 13px;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 0;
}

.btn:hover { background: #1d4ed8; }
.btn.secondary { background: #fff; color: #2563eb; border: 1px solid #2563eb; }
.btn.secondary:hover { background: #eff6ff; }

.compare-section {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e2e6ed;
}

.compare-section h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: #1f2933;
}

.compare-section .hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: #5a6675;
}

input[type="file"] {
  font-size: 13px;
  padding: 6px;
  border: 1px dashed #cbd5e1;
  border-radius: 4px;
  background: #f8fafc;
  width: 100%;
  cursor: pointer;
}

input[type="file"]:hover { background: #f1f5f9; }

.local {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 14px;
}

.local.ok  { background: #ecfdf5; border: 1px solid #a7f3d0; color: #064e3b; }
.local.bad { background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d; }

.local strong { display: block; margin-bottom: 4px; font-size: 14px; }
.local p { margin: 0; font-size: 13px; }
.local .hashes { margin-top: 6px; font-size: 12px; }

footer {
  margin-top: 32px;
  padding: 0 8px;
  color: #5a6675;
  font-size: 12px;
}

footer p { margin: 0 0 10px; }
footer code { font-size: 11px; word-break: break-all; }
footer a { color: #2563eb; text-decoration: none; }
footer a:hover { text-decoration: underline; }
