/* Tailwind (browser CDN) does the heavy lifting; this is only what's awkward to inline. */

:root {
  color-scheme: light dark;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

code {
  font-size: 0.9em;
}

.panel {
  border-radius: 1rem;
  border: 1px solid color-mix(in oklab, currentColor 15%, transparent);
  background: color-mix(in oklab, canvas 92%, transparent);
  padding: 1rem;
}

.btn {
  border-radius: 0.75rem;
  border: 1px solid color-mix(in oklab, currentColor 25%, transparent);
  padding: 0.5rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.btn:hover:not(:disabled) {
  background: color-mix(in oklab, currentColor 8%, transparent);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn:focus-visible,
.chip:focus-visible,
summary:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

.btn-primary {
  border-color: transparent;
  background: #4f46e5;
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: #4338ca;
}

.chip {
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, currentColor 25%, transparent);
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  cursor: pointer;
}

.chip[aria-pressed='true'] {
  border-color: #4f46e5;
  background: color-mix(in oklab, #4f46e5 15%, transparent);
}

/* Availability pill and verdict badges */
.pill,
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.125rem 0.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  background: color-mix(in oklab, currentColor 10%, transparent);
}

.pill[data-kind='available'],
.badge[data-kind='ok'] {
  background: #d1fae5;
  color: #065f46;
}

.pill[data-kind='downloadable'],
.pill[data-kind='downloading'],
.badge[data-kind='warn'] {
  background: #fef3c7;
  color: #78350f;
}

.pill[data-kind='unsupported'],
.pill[data-kind='unavailable'],
.badge[data-kind='error'] {
  background: #fee2e2;
  color: #7f1d1d;
}

.raw {
  white-space: pre-wrap;
  word-break: break-word;
}

.receipt {
  border-radius: 0.75rem;
  border: 1px dashed color-mix(in oklab, currentColor 30%, transparent);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

summary {
  cursor: pointer;
}
