:root {
  color-scheme: light dark;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f2f5;
  color: #1a1a1a;
}

.card {
  width: min(540px, 94vw);
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 24px 48px rgba(33, 43, 54, 0.12);
  text-align: center;
}

.brand {
  display: inline-flex;
  padding: 0.15rem;
  margin-bottom: 0.6rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.06);
}

.brand svg {
  width: 42px;
  height: 42px;
  display: block;
}

h1 {
  margin: 0;
  font-size: clamp(1.95rem, 2.3vw, 2.5rem);
}

h2 {
  margin: 0.2rem 0 1.4rem;
  font-weight: 600;
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  color: #334155;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.lead {
  margin: 0.75rem 0 2rem;
  color: #4b5563;
  font-size: 0.95rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

input[type="text"] {
  padding: 1.05rem 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  font-size: 1.05rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  min-height: 3.4rem;
}

input[type="text"]:focus {
  outline: none;
  border-color: #5c8aff;
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(92, 138, 255, 0.15);
}

small {
  color: #64748b;
  font-size: 0.8rem;
}

button {
  padding: 1rem;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #5c8aff, #3f6ee4);
  color: #f8fafc;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  font-size: 0.9rem;
}

button:hover,
button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(63, 110, 228, 0.28);
}

#result {
  margin-top: 1.5rem;
  text-align: left;
  min-height: 3rem;
  font-size: 0.95rem;
  color: #1f2937;
}

.loading {
  opacity: 0.7;
}

.error {
  color: #e11d48;
}

.success h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  color: #1d4ed8;
}

.result-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.result-item {
  padding: 1.1rem 1.5rem;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.result-heading {
  display: grid;
  grid-template-columns: minmax(110px, auto) 1fr;
  column-gap: 0.65rem;
  row-gap: 0.2rem;
  align-items: baseline;
}

.result-label {
  color: #1d4ed8;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  font-weight: 700;
}

.result-url {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
  word-break: break-word;
}

.result-categories {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.category-line {
  display: grid;
  grid-template-columns: minmax(110px, auto) 1fr;
  column-gap: 0.65rem;
  row-gap: 0.25rem;
  align-items: baseline;
}

.category-label {
  color: #1d4ed8;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  font-weight: 700;
}

.category-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
  word-break: break-word;
}

.category-line-empty .category-name {
  color: #475569;
  font-style: italic;
}

.category-description {
  margin: 0.35rem 0 0;
  color: #475569;
  font-size: 0.9rem;
  grid-column: 1 / -1;
}

.footer {
  margin-top: 2.3rem;
  font-size: 0.85rem;
  color: #475569;
}

.footer a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 600;
}

.footer a:hover,
.footer a:focus-visible {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
