/* The trial form's public pages (B3-3): Haldel's approved look, as the admin
   page's (teal accent, navy headings and links, Lora for headings and DM Sans
   for text, from Haldel's own font files, which /admin/fonts.css reads in
   place). The one stylesheet for these pages; they have no inline style and
   no script. */
:root {
  --teal: #2db89a; --teal-dark: #1d9a7e; --teal-light: #e4f7f3;
  --navy: #2d569a;
  --text: #2c3035; --muted: #5a6a7a;
  --border: #d0dde8; --bg: #f0f4f8; --white: #ffffff;
  --red: #c93b3b; --red-light: #fdecea;
  --radius: 10px; --radius-sm: 6px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.5 'DM Sans', system-ui, sans-serif;
}
h1, h2, .brand { font-family: 'Lora', Georgia, serif; font-weight: 600; color: var(--navy); }
h1 { font-size: 26px; line-height: 1.25; margin: 0 0 16px; }
h2 { font-size: 20px; margin: 28px 0 12px; }
main h1, main h2, main p, main li { overflow-wrap: anywhere; } /* a long unbroken name never pushes the page sideways */
a { color: var(--navy); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
p { margin: 0 0 12px; }

/* The header: white, with a teal rule under it. */
header.top { background: var(--white); border-bottom: 3px solid var(--teal); }
.bar { max-width: 640px; margin: 0 auto; padding: 12px 16px; }
.brand { font-size: 20px; margin: 0; }

main { max-width: 640px; margin: 0 auto; padding: 28px 16px 56px; }

/* The form, in a white card. */
form { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 22px 22px; margin: 0 0 20px; }
.field { margin: 0; }
label { display: block; font-weight: 600; margin: 16px 0 4px; }
.hint { margin: 0 0 6px; font-size: 14px; color: var(--muted); }
input[type="text"], input[type="email"], select {
  display: block; width: 100%; padding: 10px 12px; font: inherit; color: inherit;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
input:focus, select:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }
button {
  display: inline-block; margin-top: 20px; background: var(--teal-dark); color: #ffffff; border: 0;
  border-radius: var(--radius-sm); padding: 12px 22px; cursor: pointer;
  font: 600 16px/1.3 'DM Sans', system-ui, sans-serif;
}

/* What needs fixing: above the form, and beside each field. */
.problems { padding: 12px 16px; margin: 0 0 20px; border: 1px solid var(--red); border-radius: var(--radius-sm); background: var(--red-light); color: var(--red); }
.problems p { margin: 0 0 6px; font-weight: 600; }
.problems ul { margin: 0; padding-left: 20px; }
.problems a { color: var(--red); }
.field-error { margin: 0 0 6px; font-weight: 600; color: var(--red); }
.wrong input { border-color: var(--red); }

/* The hidden box no person sees: moved off-screen (its wrapper is hidden
   from screen readers too, and the box from the tab key). */
.website { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Readable at a phone's width. */
@media (max-width: 640px) {
  body { font-size: 15px; }
  main { padding: 18px 12px 40px; }
  form { padding: 4px 16px 16px; }
  h1 { font-size: 22px; }
}
