:root { color-scheme: light dark; }
* { box-sizing: border-box; }
body {
  font: 16px/1.5 system-ui, -apple-system, sans-serif;
  margin: 0 auto; padding: 1.25rem 1.5rem 2rem; max-width: 38rem;
  background: #fbfbfd; color: #1d1d1f;
}
.brand { padding: .25rem 0 1rem; border-bottom: 1px solid #ececf0; }
/* The logo artwork is a JPEG on solid white, so on a dark page it sits there
   as a white brick. Rather than re-key the artwork, dark mode gives it a tile
   that looks deliberate. */
.brand img { width: 120px; height: auto; display: block; }
@media (prefers-color-scheme: dark) {
  .brand img {
    background: #fff; padding: .4rem .55rem;
    border-radius: .55rem; width: 128px;
  }
}
main { margin-top: 1.25rem; }
h1 { font-size: 1.4rem; margin: 0 0 .5rem; text-align: center; }
h2 { font-size: 1.05rem; margin: 2.5rem 0 .75rem; }
h2.step { margin: 1.5rem 0 .5rem; }
.lede { color: #515154; margin: 0 0 1.5rem; }
label { display: block; font-weight: 600; margin: 1rem 0 .25rem; }
input {
  width: 100%; padding: .7rem .8rem; font-size: 1rem;
  border: 1px solid #d2d2d7; border-radius: .6rem; background: #fff;
}
input:focus { outline: 2px solid #0a6cff; outline-offset: 1px; }
button {
  width: 100%; margin-top: 1.5rem; padding: .8rem;
  font-size: 1rem; font-weight: 600; color: #fff;
  background: #28a745; border: 0; border-radius: .6rem;
}
button:active { transform: translateY(1px); }
.error {
  padding: .8rem 1rem; margin: 0 0 1rem; border-radius: .6rem;
  background: #fdecec; color: #8a1212; border: 1px solid #f5c2c2;
}
.switch { margin-top: 1.25rem; color: #515154; font-size: .95rem; }
a { color: #0a6cff; }

/* The instructions. Both devices are always on the page; the one the browser
   looks like is the one opened, because an iPad in Safari reports itself as a
   Mac and a wrong guess should cost a tap, not the right answer. */
.device {
  border: 1px solid #e3e3e8; border-radius: .6rem; background: #fff;
  margin-bottom: .75rem; padding: 0 1rem;
}
.device[open] { border-color: #cfcfd6; }
/* Safari puts the default disclosure triangle at the container's edge, which
   reads as detached from the label. Draw our own so it sits with the text and
   turns when opened. */
.device summary {
  cursor: pointer; font-weight: 600; padding: .8rem 0;
  display: flex; align-items: baseline; gap: .5rem; list-style: none;
}
.device summary::-webkit-details-marker { display: none; }
.device summary::before {
  content: ''; flex: none; width: .42rem; height: .42rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); translate: 0 -.1em;
  transition: transform .15s ease;
}
.device[open] summary::before { transform: rotate(45deg); }
.device summary .tag { align-self: center; }
.device ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.device li { margin-bottom: .6rem; }
.device code { font-size: .9em; background: #f1f1f4; padding: .05em .3em; border-radius: .3em; }
.alt { color: #515154; font-size: .9rem; margin: .3rem 0 .8rem; display: block; }
.footnote { color: #86868b; font-size: .85rem; margin-top: 1rem; }
.tag {
  font-size: .72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .03em; color: #1d1d1f; background: #e8f0fe;
  border-radius: .5rem; padding: .1rem .4rem; margin-left: .5rem;
}
.policy { margin-top: 2rem; color: #515154; }
.policy summary { cursor: pointer; font-weight: 600; }
footer { margin-top: 3rem; font-size: .85rem; color: #86868b; }

@media (prefers-color-scheme: dark) {
  body { background: #16161a; color: #f2f2f5; }
  .brand { border-color: #2a2a30; }
  .lede, .switch, .alt, .policy, footer, .footnote { color: #a1a1a6; }
  input { background: #232329; border-color: #3a3a42; color: inherit; }
  .error { background: #2b1517; color: #ffb3b3; border-color: #4d2226; }
  .device { background: #1d1d22; border-color: #2e2e35; }
  .device code { background: #2a2a31; }
  .tag { background: #23324d; color: #cfe0ff; }
}
