/* The colours are the app's, from packages/tokens (tokens.css). Change them
   there first, then here. */

@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('/fonts/AtkinsonHyperlegibleNext_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('/fonts/AtkinsonHyperlegibleNext_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'Atkinson Hyperlegible Mono';
  src: url('/fonts/AtkinsonHyperlegibleMono_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f5f2ea;
  --surface: #fffdf8;
  --ink: #1b1a17;
  --ink-muted: #4a463e;
  --line: #7d7668;
  --action: #0b5663;
  --on-action: #ffffff;
  --focus: #174ea6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111315;
    --surface: #1b1e21;
    --ink: #f2efe8;
    --ink-muted: #c9c4b9;
    --line: #8e959c;
    --action: #84d2dc;
    --on-action: #00262c;
    --focus: #9ec1ff;
  }
}

@media (prefers-contrast: more) {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --ink: #000000;
    --ink-muted: #1f1f1f;
    --line: #000000;
    --action: #00363f;
    --on-action: #ffffff;
    --focus: #0033cc;
  }
}

@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #000000;
    --ink: #ffffff;
    --ink-muted: #f0f0f0;
    --line: #ffffff;
    --action: #a8f0fa;
    --on-action: #000000;
    --focus: #ffe500;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Atkinson Hyperlegible Next', system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.5;
}

.page {
  max-width: 36rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

header {
  margin-bottom: 2rem;
}

.logo {
  display: block;
  height: 3rem;
  width: auto;
}

h1,
h2 {
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: 2rem;
  margin: 0 0 1rem;
}

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

p,
ol {
  margin: 0 0 1rem;
}

li + li {
  margin-top: 0.5rem;
}

a {
  color: var(--action);
  text-underline-offset: 0.15em;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
}

.card > :last-child {
  margin-bottom: 0;
}

.label {
  color: var(--ink-muted);
  margin: 0 0 0.25rem;
}

.code {
  font-family: 'Atkinson Hyperlegible Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: 2.25rem;
  letter-spacing: 0.08em;
  margin: 0 0 1rem;
  overflow-wrap: anywhere;
}

button {
  font: inherit;
  font-weight: 700;
  min-height: 3rem;
  padding: 0.5rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--action);
  color: var(--on-action);
  cursor: pointer;
}

.status {
  margin: 0.5rem 0 0;
}

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}
