@font-face {
  font-family: Onest;
  src: url("onest-variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  font-family: Onest, system-ui, sans-serif;
  font-size: 100%;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --max-width: 75rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; text-underline-offset: 0.23em; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; }
img { display: block; max-width: 100%; object-fit: cover; }
h1, h2, h3, p, figure { margin: 0; }
section[id] { scroll-margin-block-start: 1rem; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }

.wrap {
  width: min(calc(100% - 2 * var(--gutter)), var(--max-width));
  margin-inline: auto;
}

.sr-only, .choice input, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip:focus {
  position: fixed;
  inset: 0.75rem auto auto 0.75rem;
  z-index: 5;
  padding: 0.65rem 0.9rem;
  background: var(--button);
  color: var(--button-ink);
}

.topbar {
  display: flex;
  min-height: 4.625rem;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.topbar nav, .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
}

.topbar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: 0.875rem;
  text-decoration: none;
}

.topbar nav a:hover { text-decoration: underline; }

.button {
  display: inline-flex;
  min-height: 2.875rem;
  padding: 0.72rem 1.12rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--button);
  border-radius: var(--button-radius, 0.25rem);
  background: var(--button);
  color: var(--button-ink);
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.button:hover:not(:disabled) { filter: brightness(var(--hover-brightness, 0.9)); }
.button:disabled { opacity: 0.6; }
.button.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.button.secondary:hover { background: var(--quiet); filter: none; }

.field { display: grid; gap: 0.375rem; min-width: 0; }
.field label, .field > span:first-child, legend { font-size: 0.9rem; font-weight: 650; }
.control {
  width: 100%;
  min-width: 0;
  min-height: 2.875rem;
  padding: 0.63rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--field-radius, 0.25rem);
  background: var(--field-bg, var(--paper));
  color: var(--ink);
}

textarea.control { display: block; resize: vertical; line-height: 1.45; }
select.control {
  appearance: none;
  padding-right: 2.25rem;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 51%, calc(100% - 13px) 51%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.control[aria-invalid="true"] { border-color: var(--error, #a12f21); box-shadow: 0 0 0 1px var(--error, #a12f21); }
.field-error { font-size: 0.875rem; color: var(--error, #a12f21); }
.note { color: var(--muted); font-size: 0.875rem; }
.copy-status { min-height: 1.35rem; margin-block-start: 0.45rem; }
.choice { position: relative; display: inline-flex; cursor: pointer; }
.choice input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; }

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
