/* Preorder and the legal pages. */

/* == preorder == */

.pre {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}
.pre__micro { font: var(--dm11); color: var(--ph-dim); letter-spacing: 1px; -webkit-font-smoothing: none; }

.pre__hero { padding: 66px 0 44px; display: flex; flex-direction: column; gap: 22px; max-width: 760px; }
.pre__eyebrow { font: var(--dm11); color: var(--ph-dim); letter-spacing: 2px; -webkit-font-smoothing: none; }
.pre__title { margin: 0; font: 400 33px/1.3 var(--face-pixel); color: var(--ph-bright); -webkit-font-smoothing: none; text-wrap: balance; }
.pre__lede { margin: 0; font: 400 16px/1.75 var(--face-mono); color: var(--ph-mute); max-width: 34em; text-wrap: pretty; }

.pre__body { padding-bottom: 66px; }
.pre__panels { display: flex; flex-wrap: wrap; gap: 1px; }

/* == the form, on a panel == */
.pre__form {
  flex: 1 1 420px;
  min-width: 0;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--ph-l2);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.pre__form input.input {
  height: 44px;
  min-height: 44px;
  padding: 0 13px;
  font: 400 14px/1 var(--face-mono);
}
.pre__form .field__error[hidden] { display: none; }

/* The count: radios drawn as chips, the input is the state and the label draws it. */
.pre__form .chips { min-height: 44px; }
.pre__radio {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.pre__radio:checked + .chip {
  background: var(--ph);
  border-color: var(--ph);
  color: var(--ink);
  text-shadow: var(--px-bold);
}
.pre__radio:focus-visible + .chip { box-shadow: 0 0 0 var(--focus-ring) var(--ph-l1); }

/* The opt-in. A real checkbox, because the form runs with no script: the
   input is the state and the label draws it. */
.pre__toggle { display: flex; align-items: center; min-height: var(--hit); }
.pre__box {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.pre__toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--hit);
  cursor: pointer;
  font: 400 13px/1.5 var(--face-mono);
  color: var(--ph-mute2);
}
.pre__track {
  width: 44px;
  height: 22px;
  flex: none;
  background: var(--ph-slot);
  display: inline-flex;
  align-items: center;
  padding: 3px;
  justify-content: flex-start;
}
.pre__knob { width: 16px; height: 16px; background: var(--ink); }
.pre__box:checked + .pre__toggle-label { color: var(--ph-text); }
.pre__box:checked + .pre__toggle-label .pre__track {
  background: var(--ph);
  justify-content: flex-end;
}
.pre__box:focus-visible + .pre__toggle-label .pre__track {
  box-shadow: 0 0 0 var(--focus-ring) var(--ph-l1);
}

.pre__act { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-top: 6px; }
.pre__fine { font: 400 12px/1.6 var(--face-mono); color: var(--ph-mute2); }

/* What the form becomes once a name is down: markup for an endpoint that doesn't exist yet. */
.pre__done { display: flex; align-items: center; gap: 18px; min-height: 200px; }
.pre__done[hidden] { display: none; }
.pre__done-text { display: flex; flex-direction: column; gap: 10px; }
.pre__done-title { font: 400 22px/1.3 var(--face-pixel); color: var(--ph-bright); -webkit-font-smoothing: none; }
.pre__done-say { font: 400 14px/1.6 var(--face-mono); color: var(--ph-mute); }

/* == the side panel: the render, then what happens next == */
.pre__side {
  flex: 1 1 320px;
  max-width: 440px;
  min-width: 0;
  background: var(--em);
  box-shadow: 0 0 0 1px var(--ph-l2);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.pre__render { position: relative; width: 270px; max-width: 100%; aspect-ratio: 360 / 287; align-self: center; }
.pre__outline {
  position: absolute;
  inset: 0;
  background: var(--ph);
  -webkit-mask-image: url('../img/device-outline.png');
  mask-image: url('../img/device-outline.png');
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.pre__render-img { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: auto; }
.pre__next { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; border-top: 1px solid var(--ph-l2); }
.pre__step { display: flex; gap: 12px; align-items: baseline; }
.pre__num { font: var(--dm11); color: var(--ph); -webkit-font-smoothing: none; }
.pre__step-say { font: 400 13px/1.5 var(--face-mono); color: var(--ph-text); }

/* == legal == */

/* The three legal pages are one grouped page: a tab strip is the first row. */
.lgl__bar { display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap; margin-bottom: var(--s5); }
.lgl__bar .tabs { flex: 1 1 240px; min-width: 0; }
.lgl__bar .pill { margin-bottom: 8px; }
.lgl__prose { margin-top: var(--s6); }


