:root {
  color: #f5f5f5;
  background: #0a0a0a;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  accent-color: #fff;
}

body {
  margin: 0;
  min-height: 100vh;
}

a {
  color: inherit;
}

header,
main {
  margin-inline: auto;
  max-width: 46rem;
  padding-inline: 1.25rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-block: 1rem;
}

header.focused {
  justify-content: center;
  padding-block: 2.5rem 0;
}

.mark {
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

nav a,
button.text {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  color: #d4d4d4;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

button.text {
  width: fit-content;
}

.who {
  color: #a3a3a3;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

main {
  padding-block: 2rem 4rem;
}

h1 {
  font-size: 2rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  text-align: center;
  margin: 0;
}

h2 {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.75rem;
}

.lede,
.note,
.meta,
.hint {
  color: #a3a3a3;
}

.lede {
  text-align: center;
}

.panel {
  margin-inline: auto;
  max-width: 28rem;
}

form,
.stack,
.field {
  display: grid;
  gap: 0.75rem;
}

.field {
  gap: 0.35rem;
}

fieldset {
  margin: 0;
  border: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

legend,
label {
  text-align: start;
}

label {
  font-weight: 600;
}

input,
textarea,
select {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  border: 1px solid #2a2a2a;
  border-radius: 0.75rem;
  background: #141414;
  color: inherit;
  font: inherit;
  font-size: 1rem;
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid #8eb6ff;
  outline-offset: 2px;
}

button.primary,
a.primary {
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

form button.primary,
.panel a.primary {
  width: 100%;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hint {
  margin: 0;
  font-size: 0.9rem;
}

.error,
#ask-error {
  color: #ffb4b4;
  text-align: center;
}

.mono,
.answer,
.raw {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.answer,
.raw {
  margin: 0;
  padding: 0.75rem;
  overflow: auto;
  white-space: pre-wrap;
  background: #141414;
  border-radius: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.45;
}

.apps,
.log {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  border: 1px solid #262626;
  border-radius: 1rem;
  overflow: hidden;
}

.apps li,
.log > li {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem 1rem;
  border-top: 1px solid #262626;
}

.apps li:first-child,
.log > li:first-child {
  border-top: 0;
}

.apps a {
  font-weight: 600;
}

.apps span,
.meta {
  color: #a3a3a3;
}

.card {
  text-align: start;
}

.stats {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 0.15rem 0.75rem;
  margin: 0.35rem 0 0;
}

.stats dt {
  color: #a3a3a3;
}

.stats dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.mono {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1;
  background: #0a0a0a;
  color: #f5f5f5;
  padding: 0.5rem 0.75rem;
}

@media (pointer: coarse) {
  input,
  textarea {
    min-height: 52px;
  }
}
