:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #1d2540;
  background: #f5f6fa;
  --muted: #505a73;
  --accent: #4434a6;
  --line: #dce0eb;
  --surface: #fff;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }

.shell {
  width: min(100% - 2rem, 52rem);
  margin-inline: auto;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--accent);
  font-weight: 750;
  text-decoration: none;
}

.brand span { color: #1d2540; }

.network, .source {
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
}

.network {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.network::before {
  content: "";
  width: .42rem;
  height: .42rem;
  border-radius: 50%;
  background: #237755;
}

main.shell {
  padding-block: clamp(2rem, 6vw, 4rem);
}

.intro { margin-bottom: 1.5rem; }

h1 {
  font-size: clamp(1.9rem, 5vw, 3rem);
  letter-spacing: -.035em;
  line-height: 1.12;
  margin: 0 0 .65rem;
}

.intro p {
  max-width: 38rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.search, .result {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .85rem;
  padding: clamp(1rem, 4vw, 1.5rem);
}

.search label {
  display: block;
  margin-bottom: .55rem;
  font-weight: 650;
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .65rem;
}

.search input, .submit {
  min-height: 2.8rem;
  padding: .55rem .9rem;
  border-radius: .48rem;
}

.search input {
  width: 100%;
  color: inherit;
  border: 1px solid #929cb6;
  background: var(--surface);
}

.search input::placeholder { color: var(--muted); }

.submit {
  color: white;
  border: 1px solid transparent;
  background: var(--accent);
  font-weight: 650;
  cursor: pointer;
}

.submit:hover:not(:disabled) { background: #342588; }

.search-hint {
  margin: .65rem 0 0;
  font-size: .875rem;
  line-height: 1.55;
  color: var(--muted);
}

.example {
  color: var(--accent);
  padding: 0;
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: .17em;
  cursor: pointer;
}

button:disabled {
  opacity: .64;
  cursor: wait;
}

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

.message {
  margin: 1rem 0 0;
  padding: .85rem 1rem;
  color: var(--muted);
  border: 1px dashed #b9c1d6;
  border-radius: .65rem;
}

.message.error {
  color: #822a34;
  background: #fff4f4;
  border: 1px solid #e5b9be;
}

.result { margin-top: 1rem; }

.result-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .4rem 1rem;
}

.result h2 {
  margin: 0;
  font-size: clamp(1.18rem, 4vw, 1.45rem);
  overflow-wrap: anywhere;
}

.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 1rem 0 0;
  column-gap: 1rem;
}

.detail {
  padding: .85rem 0;
  min-width: 0;
  border-top: 1px solid var(--line);
}

.detail.wide { grid-column: 1 / -1; }
.detail:last-child { padding-bottom: 0; }

.detail dt {
  color: var(--muted);
  font-size: .875rem;
  margin-bottom: .35rem;
}

.detail dd {
  margin: 0;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.detail code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: .85rem;
  font-weight: 400;
}

.secondary { color: var(--muted); }

.permalink {
  display: inline-block;
  margin-top: .85rem;
  color: var(--accent);
  font-size: .875rem;
  text-underline-offset: .17em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 34rem) {
  .search-controls, .details { grid-template-columns: minmax(0, 1fr); }
}
