/* The tester site's sign-in page (tester/README.md). Colours copied from src/theme.ts
   (tests/testerLogin.test.ts checks they still match, and their contrast). DESIGN.md: 48 dp
   targets (3.1), text 11 pt or more (3.2), 4.5:1 contrast (3.3), errors in words (3.4),
   adult, plain styling (3.15). System fonts only: no font downloads. */

:root {
  --background: #1c1f22;
  --panel: #25292d;
  --cell-stroke: #3c4248;
  --text-primary: #e4e0d8;
  --text-muted: #8d949b;
  --button-fill: #8fa89b;
  --button-text: #1c1f22;
  --invalid: #d29a9a;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text-primary);
  font: 400 1.0625rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: anywhere;
}

main {
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
  padding: max(2.5rem, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 2rem
    max(16px, env(safe-area-inset-left));
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.lead {
  margin: 0 0 2rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

/* 18 px text, so iOS Safari does not zoom in on focus (it does below 16 px). */
input {
  display: block;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.625rem 0.875rem;
  border: 2px solid var(--text-muted);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text-primary);
  font: inherit;
  font-size: 1.125rem;
}

input:focus-visible,
button:focus-visible {
  outline: 3px solid var(--text-primary);
  outline-offset: 3px;
}

input[aria-invalid="true"] {
  border-color: var(--invalid);
}

.error {
  margin: 0.75rem 0 0;
  color: var(--invalid);
  font-weight: 700;
}

.error:empty {
  display: none;
}

.fallback {
  display: none;
}

.fallback:target {
  display: block;
}

button {
  display: block;
  width: 100%;
  min-height: 3.25rem;
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 10px;
  background: var(--button-fill);
  color: var(--button-text);
  font: inherit;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  cursor: progress;
}

.privacy {
  margin: 2rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--cell-stroke);
  color: var(--text-muted);
  font-size: 0.9375rem;
}
