:root {
  color-scheme: light dark;

  --bg:           light-dark(#fee2e2, #7f1d1d);
  --fg:           light-dark(#991b1b, #fee2e2);
  --surface:      light-dark(#fecaca, #991b1b);
  --button-bg:    light-dark(#7f1d1d, #fee2e2);
  --button-fg:    light-dark(#fef2f2, #7f1d1d);

  --font-sans:    -apple-system, BlinkMacSystemFont, "SF Pro Text",
                  "Segoe UI", Roboto, system-ui, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
}

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

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

body {
  margin: 1rem;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:where(h1, h2, h3) {
  margin-block: 0 1rem;
  line-height: 1.15;
  text-wrap: balance;
  color: inherit;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 700;
}

p {
  margin-block: 0 1rem;
  max-width: 60ch;
}

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;

  &:hover { text-decoration-thickness: 2px; }
}

strong { font-weight: 700; }

header { margin-block-end: 2rem; }

/* Centred narrow page used by /rn/install and /rn/udid/:token */
.page-narrow {
  max-width: 28rem;
  margin-inline: auto;
  padding-block: 3rem;
  padding-inline: 1.5rem;
  text-align: center;
}

.page-narrow p { margin-inline: auto; }

.button {
  display: inline-block;
  background: var(--button-bg);
  color: var(--button-fg);
  font: 700 1.125rem/1 var(--font-sans);
  padding: 1rem 2rem;
  border-radius: 9999px;
  text-decoration: none;
  margin-block: 1rem;

  &:hover { opacity: 0.92; }
}

.steps {
  text-align: left;
  margin-block: 2.5rem 0;
  padding-inline-start: 1.5rem;
  font-size: 0.9375rem;
  opacity: 0.85;

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

.udid {
  background: var(--surface);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-block: 1.5rem 2rem;
  word-break: break-all;
  font: 0.875rem/1.4 var(--font-mono);
  user-select: all;
}

.muted {
  opacity: 0.7;
  font-size: 0.875rem;
}
