:root {
  color-scheme: light dark;
  --text: #1a1a1a;
  --background: #ffffff;
  --link: #0b4fb3;
  --focus: #b35c00;
  --border: #767676;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #ececec;
    --background: #161616;
    --link: #8fbaff;
    --focus: #ffb454;
    --border: #8c8c8c;
  }
}

body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

header,
main,
footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1rem;
}

footer {
  border-top: 1px solid var(--border);
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

.site-name {
  display: inline-block;
  min-height: 1.5rem;
  font-weight: bold;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

main:focus {
  outline: none;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  padding: 0.5rem 1rem;
  color: var(--text);
  background: var(--background);
  border: 2px solid var(--text);
}

.skip-link:focus {
  top: 0.5rem;
}

button,
input,
select,
textarea {
  min-height: 2.75rem;
  min-width: 2.75rem;
  font: inherit;
  color: var(--text);
  background: var(--background);
  border: 2px solid var(--border);
  padding: 0.25rem 0.75rem;
}

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

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  margin-bottom: 0.25rem;
}

.field input {
  box-sizing: border-box;
  width: 100%;
  max-width: 32rem;
}

.key-value {
  max-width: 100%;
  font-family: ui-monospace, monospace;
}

section {
  margin-top: 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

caption {
  text-align: left;
  font-weight: bold;
  padding-bottom: 0.5rem;
}

th,
td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
}

td a {
  display: inline-block;
  min-height: 1.5rem;
  min-width: 1.5rem;
  padding: 0.25rem 0;
}

pre {
  overflow-x: auto;
  padding: 1rem;
  border: 2px solid var(--border);
}

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

code {
  font-family: ui-monospace, monospace;
}

#key-error {
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--text);
  font-weight: bold;
}

#copy-slot {
  margin-bottom: 1rem;
}
