/* One stylesheet, one path. Served from this host only. */

html {
  /* -apple-system-body follows the reader's Dynamic Type size in Safari on iPhone, iPad and Mac. */
  font: -apple-system-body;
  font-family: -apple-system, system-ui, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: light dark;
  background: #ffffff;
  color: #111111;
}

@media (prefers-color-scheme: dark) {
  html {
    background: #0b0b0d;
    color: #f2f2f2;
  }
}

body {
  margin: 0;
  padding: 0 1rem 3rem;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

/* Skip link: first thing a keyboard or switch user meets. */
.skip {
  position: absolute;
  left: -200vw;
  top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #111111;
  color: #ffffff;
}
.skip:focus {
  left: 1rem;
  z-index: 10;
}

header[role="banner"] {
  padding: 1.5rem 0 0.5rem;
}

main {
  padding-top: 0.5rem;
}

h1 {
  font-size: 1.75em;
  line-height: 1.2;
  margin: 1rem 0 0.75rem;
}

h2 {
  font-size: 1.25em;
  line-height: 1.3;
  margin: 2rem 0 0.5rem;
}

p, li {
  margin: 0 0 1rem;
  max-width: 36rem;
}

ul {
  padding-left: 1.25rem;
}

a {
  color: #0a4fb3;
  text-underline-offset: 0.15em;
}
@media (prefers-color-scheme: dark) {
  a { color: #8fbaff; }
}

/* One focus style, visible everywhere, never colour alone: a thick outline plus an offset. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex="-1"]:focus-visible,
[tabindex="-1"]:focus {
  outline: 3px solid #0a4fb3;
  outline-offset: 3px;
}
@media (prefers-color-scheme: dark) {
  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  [tabindex="-1"]:focus-visible,
  [tabindex="-1"]:focus {
    outline-color: #8fbaff;
  }
}

/* Forms */
.field {
  margin: 0 0 1.5rem;
}

label,
.label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.hint {
  display: block;
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"] {
  font: inherit;
  width: 100%;
  box-sizing: border-box;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid #555555;
  border-radius: 0.375rem;
  background: transparent;
  color: inherit;
}

input[aria-invalid="true"] {
  border-color: #b00020;
  border-width: 3px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.check input[type="checkbox"] {
  width: 1.75rem;
  height: 1.75rem;
  min-width: 1.75rem;
  margin: 0;
  flex: none;
}
.check label {
  font-weight: 600;
  margin: 0;
  padding-top: 0.15rem;
}

button {
  font: inherit;
  font-weight: 600;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0.6rem 1.25rem;
  border: 2px solid #0a4fb3;
  border-radius: 0.5rem;
  background: #0a4fb3;
  color: #ffffff;
  cursor: pointer;
}
@media (prefers-color-scheme: dark) {
  button {
    background: #8fbaff;
    border-color: #8fbaff;
    color: #0b0b0d;
  }
}

/* Errors: text first, never colour only. The error sits between the label and the field,
   so after hearing the error one swipe right reaches the field that needs fixing. */
.error {
  display: block;
  margin: 0 0 0.5rem;
  padding: 0.5rem 0.75rem;
  border-left: 0.375rem solid #b00020;
  background: rgba(176, 0, 32, 0.08);
  font-weight: 600;
}
.error:empty {
  display: none;
}
.error::before {
  content: "Error: ";
}

.notice {
  margin: 1.5rem 0;
  padding: 0.75rem 1rem;
  border-left: 0.375rem solid #0a4fb3;
  background: rgba(10, 79, 179, 0.08);
}

.value {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 1.1em;
  letter-spacing: 0.05em;
  word-break: break-all;
}

.nda {
  margin: 1rem 0 2rem;
}
.nda h2 {
  margin-top: 1.5rem;
}

footer[role="contentinfo"] {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #888888;
}

/* Spoken-only text: present to assistive technology, not drawn. Used sparingly, never for meaning the page withholds visually. */
.vo {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

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