/* Tokens: see DESIGN.md. No brand color. Color shows status only.
   Light only: the site is a public register on paper (DESIGN.md). */
:root {
  color-scheme: light;
  --paper: #FAF8F3;
  --surface: #FFFFFF;
  --panel: #EFECE3;
  --ink: #1C1B18;
  --muted: #57554D;
  --rule: #D8D4C8;
  --control: #7A776C;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 2px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
}

h1, h2, h3, p, ul, ol, dl, dd, fieldset, legend, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { min-width: 0; padding: 0; border: 0; }
legend { padding: 0; }
h1, h2, h3 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }

a { color: var(--ink); text-underline-offset: 0.15em; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
}
.skip:focus { top: 0.5rem; z-index: 2; }

.wrap { max-width: 62rem; margin: 0 auto; padding: 0 1rem; }
.narrow { max-width: 40rem; }

/* Header: the wordmark is text in the serif. There is no logo yet. */
.top { border-bottom: 1px solid var(--rule); }
.top .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  min-height: 3.75rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
}
.top nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

main { padding-bottom: 3rem; }

/* Identity motif: the double rule of a ledger opens each section (DESIGN.md). */
.section {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 3px double var(--ink);
}

h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  line-height: 1.1;
}
h2 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
h3 { font-size: 1.0625rem; line-height: 1.3; }
.muted { color: var(--muted); }
.small { font-size: 0.9375rem; }

/* Hero: the claim, then the one thing a certificate produces, a seal. */
.hero {
  display: grid;
  gap: 2rem;
  padding-top: 2.5rem;
}
.hero .lead { margin-top: 1rem; font-size: 1.1875rem; }
.hero .state { margin-top: 1rem; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.sample img { display: block; width: 100%; max-width: 300px; height: auto; }
.sample figcaption { margin-top: 0.5rem; max-width: 300px; }
@media (min-width: 52rem) {
  .hero { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3rem; }
}

/* Buttons: one primary action per screen has the ink fill. */
.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--control);
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
}
.button:hover, button:hover { border-color: var(--ink); }
.button:active, button:active { background: var(--panel); }
.primary { color: var(--surface); background: var(--ink); border-color: var(--ink); }
.primary:hover, .primary:active { color: var(--ink); background: var(--surface); }
button[aria-disabled="true"], button[aria-disabled="true"]:hover {
  cursor: progress;
  color: var(--ink);
  background: var(--panel);
  border-color: var(--control);
}

/* Label and value rows, as on a record. */
.rows > div {
  display: grid;
  gap: 0.15rem 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.rows > div:first-child { border-top: 1px solid var(--rule); }
.rows dt { font-family: var(--serif); font-weight: 700; font-size: 1.125rem; }
@media (min-width: 40rem) {
  .rows > div { grid-template-columns: 14rem minmax(0, 1fr); }
}

/* The process is an ordered list with its real number of steps. */
.steps { counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}
.steps li::before {
  content: counter(step);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}
.steps h3 { margin-bottom: 0.2rem; }

.audience { display: grid; gap: 1.25rem; }
.audience h3 { font-family: var(--serif); font-size: 1.25rem; margin-bottom: 0.25rem; }
@media (min-width: 46rem) {
  .audience { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
}

.nots { display: grid; gap: 0.5rem; }
.nots li { padding-left: 1.5rem; position: relative; }
.nots li::before { content: "\2715"; position: absolute; left: 0; font-weight: 700; }

/* The waitlist is the one place where the visitor acts, so it sits on the panel fill (DESIGN.md). */
.act {
  margin-top: 1rem;
  padding: 1.25rem;
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
}
@media (min-width: 40rem) { .act { padding: 1.75rem; } }

.form > * + * { margin-top: 1.25rem; }
.field > label, legend { display: block; margin-bottom: 0.35rem; font-weight: 600; }
.opt { font-weight: 400; color: var(--muted); }
input[type="email"], input[type="text"] {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--control);
  border-radius: var(--radius);
}
.hint { margin-bottom: 0.35rem; color: var(--muted); font-size: 0.9375rem; }
.choice {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  min-height: 44px;
  padding: 0.55rem 0;
  cursor: pointer;
}
.choice input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.15rem 0 0;
  accent-color: var(--ink);
}
/* An error uses ink, not red: color is for certificate status only (DESIGN.md). */
.error { margin-top: 0.35rem; font-weight: 700; }
.error:empty { display: none; }
input[aria-invalid="true"] { border: 2px solid var(--ink); }
.trap { position: absolute; left: -100vw; width: 1px; height: 1px; overflow: hidden; }

.result {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
}
.result:empty { display: none; }
.form[hidden] + .result { margin-top: 0; }
.result h3 { font-family: var(--serif); font-size: 1.25rem; margin-bottom: 0.25rem; }

.prose { padding-top: 2.5rem; }
.prose > * + * { margin-top: 0.75rem; }
.prose h2 { margin-top: 2rem; }
.prose ul { list-style: disc; padding-left: 1.25rem; }
.prose li + li { margin-top: 0.35rem; }

.foot { border-top: 1px solid var(--rule); padding: 1.25rem 0 2rem; }
.foot ul { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; }
