:root {
  --background: #ffffff;
  --foreground: #0a0a0a;
  --muted: #5c5c5c;
  --border: #e5e5e5;
  --input: #8a8a8a;
  --primary: #171717;
  --primary-foreground: #fafafa;
  --surface: #f5f5f5;
  --destructive: #b91c1c;
  --notice: #8a4b00;
  --notice-surface: #fff7e6;
  --radius: 0.625rem;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 100%;
  line-height: 1.5;
  color: var(--foreground);
  background: var(--background);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
}

[hidden] {
  display: none !important;
}

.site-header,
main,
.site-footer {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 600;
  font-size: 1.125rem;
}

main {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

h1 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

h1:focus,
#confirm-intro:focus {
  outline: none;
}

h2 {
  font-size: 1.0625rem;
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

.lede,
.muted,
.hint {
  color: var(--muted);
}

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

fieldset {
  border: 0;
  margin: 0 0 1.5rem;
  padding: 0;
}

legend {
  font-weight: 600;
  font-size: 1.125rem;
  padding: 0;
  margin-bottom: 0.75rem;
}

.field {
  margin-bottom: 1rem;
}

.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1rem;
}

@media (min-width: 30rem) {
  .row {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.375rem;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

input,
select {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  color: inherit;
  background: var(--background);
  border: 1px solid var(--input);
  border-radius: calc(var(--radius) - 2px);
}

select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2.5rem;
  text-overflow: ellipsis;
}

.select {
  position: relative;
}

.select .chevron {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  width: 1rem;
  height: 1rem;
  margin-top: -0.5rem;
  color: var(--muted);
  pointer-events: none;
}

input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--destructive);
  border-width: 2px;
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible,
.error-summary:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
}

.check input {
  width: 1.375rem;
  min-height: 1.375rem;
  height: 1.375rem;
  margin: 0.125rem 0 0;
  accent-color: var(--primary);
}

.check label {
  font-weight: 400;
}

.consent {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--surface);
  border-radius: var(--radius);
}

.consent .hint {
  margin: 0.75rem 0 0;
}

/* Cloudflare Turnstile's widget: its height is held so the button doesn't jump
   (65px, or 140px at the compact size narrow screens get). */
.captcha {
  min-height: 65px;
  margin-bottom: 1.5rem;
}

.captcha.compact {
  min-height: 140px;
}

.draft-note,
.placeholder {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--notice);
  background: var(--notice-surface);
  border: 1px solid #f0c36d;
  border-radius: 0.375rem;
}

.draft-note {
  margin: 0 0 0.75rem;
}

a {
  color: var(--primary);
  text-underline-offset: 2px;
}

button {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.625rem 1rem;
  font: inherit;
  font-weight: 600;
  color: var(--primary-foreground);
  background: var(--primary);
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: #262626;
}

button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.view > button {
  margin-bottom: 1.5rem;
}

button.secondary {
  color: var(--primary);
  background: var(--background);
  border: 1px solid var(--primary);
}

button.secondary:hover:not(:disabled) {
  background: var(--surface);
}

.confirm-summary {
  margin: 0 0 1.5rem;
}

.notice {
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  color: var(--notice);
  background: var(--notice-surface);
  border: 1px solid #f0c36d;
  border-radius: 0.375rem;
}

.confirm-summary dt {
  font-weight: 600;
}

.confirm-summary dd {
  margin: 0 0 0.75rem;
}

.error-summary {
  margin: 0 0 1.5rem;
  padding: 1rem;
  border: 2px solid var(--destructive);
  border-radius: var(--radius);
}

.error-summary ul {
  margin: 0;
  padding-left: 1.25rem;
}

.error-summary a {
  color: var(--destructive);
  font-weight: 500;
}

.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.site-footer {
  padding-top: 1rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}
