:root {
  color: #111;
  background: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background: #fff;
}

main {
  width: min(820px, calc(100% - 40px));
  margin: 0 auto;
  padding: 52px 0 120px;
}

.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;
}

.url-entry { display: flex; gap: 10px; }

input {
  min-width: 0;
  flex: 1;
  height: 50px;
  padding: 0 16px;
  border: 1px solid #d7d7d7;
  border-radius: 13px;
  outline: none;
  color: #111;
  background: #fff;
  font: inherit;
  transition: border-color .16s, box-shadow .16s;
}

input:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px #ededed;
}

form button {
  height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: #111;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

form button:hover { opacity: .84; }
form button:disabled { cursor: wait; opacity: .45; }

.summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 22px;
  color: #777;
  font-size: 13px;
}

.summary.error { color: #b72f2f; }
.summary strong { color: #111; }
.results { margin-top: 28px; }

.category {
  margin: 34px 0 12px;
  color: #929292;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 46px;
  padding: 7px 0;
}

.name {
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
}

.code {
  margin-right: 8px;
  color: #9a9a9a;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .03em;
}

.indicator, .help {
  position: relative;
  display: grid;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  background: #fff;
}

.indicator {
  width: 20px;
  height: 20px;
  border: 2px solid #dedede;
  cursor: default;
}

.indicator.loading {
  border-top-color: #111;
  animation: spin .75s linear infinite;
}

.indicator.pass {
  border-color: #25a55f;
  background: #25a55f;
}

.indicator.fail {
  border-color: #e05252;
  background: #e05252;
  cursor: help;
}

.help {
  width: 22px;
  height: 22px;
  border: 1px solid #d0d0d0;
  color: #707070;
  font-size: 12px;
  font-weight: 750;
  cursor: help;
}

.help:hover, .help:focus-visible {
  border-color: #111;
  color: #111;
}

.tooltip, .occurrences {
  position: absolute;
  z-index: 10;
  right: 0;
  bottom: calc(100% + 10px);
  display: none;
  width: min(410px, calc(100vw - 44px));
  padding: 15px 16px;
  border-radius: 13px;
  color: #f7f7f7;
  background: #171717;
  box-shadow: 0 12px 35px rgba(0,0,0,.18);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.48;
  text-align: left;
}

.tooltip strong {
  display: block;
  margin: 9px 0 3px;
  color: #fff;
}

.tooltip strong:first-child { margin-top: 0; }
.help:hover .tooltip, .help:focus-visible .tooltip, .indicator.fail:hover .occurrences, .indicator.fail:focus-visible .occurrences { display: block; }

.occurrences {
  max-height: 310px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

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

@media (max-width: 620px) {
  main { padding-top: 28px; }
  .url-entry { display: grid; }
  form button { width: 100%; }
  .row { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .indicator.loading { animation-duration: 1.5s; }
}
