* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, #e0f2fe, transparent 35%),
    linear-gradient(135deg, #f8fafc, #eef2ff);
  color: #0f172a;
  min-height: 100vh;
}

.page {
  width: min(900px, 92vw);
  margin: 0 auto;
  padding: 56px 0;
}

.card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
  padding: 32px;
}

h1 {
  margin: 0 0 8px;
  font-size: 34px;
}

p {
  color: #64748b;
}

.hidden {
  display: none;
}

form {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

input, textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 16px;
  outline: none;
  background: white;
}

input:focus, textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

button {
  border: 0;
  border-radius: 16px;
  padding: 14px 20px;
  background: #4f46e5;
  color: white;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

button:hover {
  background: #4338ca;
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

button.secondary {
  background: #e2e8f0;
  color: #0f172a;
}

button.secondary:hover {
  background: #cbd5e1;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.actions {
  margin-top: 12px;
}

.result {
  margin-top: 28px;
  border-top: 1px solid #e2e8f0;
  padding-top: 24px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.item {
  background: #f8fafc;
  border-radius: 18px;
  padding: 16px;
  border: 1px solid #e2e8f0;
}

.label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
  margin-bottom: 6px;
}

.value {
  font-size: 22px;
  font-weight: 800;
}

.mutation {
  font-size: 36px;
  color: #4f46e5;
}

.error {
  color: #dc2626;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.block {
  margin-top: 28px;
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
}

.muted {
  color: #94a3b8;
  font-size: 14px;
}

.disclaimer {
  font-size: 13px;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 12px;
}

.analysis-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.badge-ok,
.badge-found        { background: #dcfce7; color: #166534; }
.badge-links_ready,
.badge-link         { background: #dbeafe; color: #1e40af; }
.badge-partial      { background: #fef3c7; color: #92400e; }
.badge-error        { background: #fee2e2; color: #991b1b; }
.badge-not_found    { background: #e2e8f0; color: #475569; }

.sources {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.src {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 16px;
}

.src-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.src-name {
  font-weight: 800;
  font-size: 15px;
}

.src-text {
  color: #475569;
  font-size: 14px;
  margin: 0 0 10px;
}

.link-btn {
  display: inline-block;
  text-decoration: none;
  background: #e0e7ff;
  color: #3730a3;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 12px;
}

.link-btn:hover {
  background: #c7d2fe;
}

@media (max-width: 700px) {
  form, .top {
    flex-direction: column;
    align-items: stretch;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}
