/*
 * Peppol onboarding.
 *
 * The palette is the agreement's own: the navy its text is set in, the blue
 * of its headings, the sky blue of its title and the two blues its tables are
 * shaded with. Headings are set in Montserrat, after the Peppol wordmark; the
 * body in Arial, which is what the agreement itself is set in, so the forms
 * and the document they fill read as one thing.
 *
 * One element is allowed to be loud: the paper preview beside the wizard,
 * which fills in as the Service Provider types. Everything around it is kept
 * quiet.
 */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("/static/fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("/static/fonts/montserrat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --navy: #002060;
  --blue: #0070c0;
  --azure: #2e7bc4;
  --sky: #56b6e8;
  --tint: #e4eef8;
  --tint-strong: #c5dcf0;
  --ground: #f3f6fa;
  --paper: #ffffff;
  --line: #c3d1e0;
  --muted: #4b5d78;
  --danger: #b42318;
  --danger-tint: #fdeceb;
  --ok: #17734a;
  --ok-tint: #e6f4ec;

  --display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --text: Arial, "Liberation Sans", Helvetica, sans-serif;

  --radius: 6px;
  --focus: 0 0 0 3px rgba(0, 112, 192, 0.35);
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--navy);
  font: 1rem/1.55 var(--text);
}

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--navy);
}

h1 {
  font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.2rem;
  font-weight: 650;
}

h3 {
  font-size: 1.02rem;
  font-weight: 650;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--blue);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--navy);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 3px;
}

code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.9em;
}

.lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 38rem;
}

.quiet {
  color: var(--muted);
  font-size: 0.92rem;
}

.line {
  display: block;
}

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

.code {
  font-family: var(--display);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.code--large {
  font-size: 1.05rem;
  color: var(--blue);
  margin: 0 0 0.25rem;
}

/* The bar at the top ------------------------------------------------------ */

.masthead {
  display: flex;
  align-items: center;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  padding: 0.9rem clamp(1rem, 3vw, 2.5rem);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: inline-flex;
  line-height: 0;
}

.logo img {
  height: 30px;
  width: auto;
}

.masthead__title {
  font-family: var(--display);
  font-weight: 600;
  color: var(--muted);
  padding-left: 1.5rem;
  border-left: 1px solid var(--line);
}

/* Buttons ----------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.25rem;
  border: 1.5px solid var(--blue);
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  font: 600 0.98rem/1.2 var(--display);
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.button--strong {
  background: var(--navy);
  border-color: var(--navy);
}

.button--strong:hover {
  background: var(--blue);
  border-color: var(--blue);
}

.button--quiet {
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}

.button--quiet:hover {
  background: var(--tint);
  color: var(--navy);
  border-color: var(--azure);
}

.button--danger {
  background: var(--danger);
  border-color: var(--danger);
}

.button--danger:hover {
  background: #8c1b12;
  border-color: #8c1b12;
}

.button--small {
  min-height: 2.25rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  margin-top: 0.6rem;
}

.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--blue);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.link:hover {
  color: var(--navy);
}

/* Fields ------------------------------------------------------------------ */

.field {
  margin: 0 0 1.35rem;
}

.field label,
.field__label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.field__optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.88rem;
  margin-left: 0.4rem;
}

.field__hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin: -0.1rem 0 0.45rem;
}

.field__error {
  color: var(--danger);
  font-weight: 700;
  font-size: 0.92rem;
  margin: 0 0 0.4rem;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="search"],
select,
textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--navy);
  font: 1rem/1.4 var(--text);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: var(--focus);
}

.field--invalid input,
.field--invalid textarea,
.field--invalid select {
  border-color: var(--danger);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0 1.25rem;
}

.group {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0 0 1.25rem;
  padding: 1.25rem 0 0;
}

.group legend {
  font-family: var(--display);
  font-weight: 650;
  font-size: 1.08rem;
  padding: 0 0.6rem 0 0;
}

.group__intro {
  color: var(--muted);
  font-size: 0.95rem;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0 0 0.75rem;
  cursor: pointer;
}

.check input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.15rem 0 0;
  accent-color: var(--blue);
  flex: none;
}

/* The wizard -------------------------------------------------------------- */

.wizard {
  display: grid;
  grid-template-columns: 14rem minmax(0, 38rem) minmax(17rem, 23rem);
  gap: 2.5rem;
  align-items: start;
  max-width: 86rem;
  margin: 0 auto;
  padding: 2.5rem clamp(1rem, 3vw, 2.5rem) 3rem;
}

.wizard__form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(1.25rem, 3vw, 2.25rem);
}

.wizard__count {
  display: none;
  font-family: var(--display);
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 0.4rem;
}

.wizard__actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.wizard__actions .button:last-child {
  margin-left: auto;
}

/* The rail is a sequence, so it is numbered. The line through the numbers is
   the path between them. */
.rail {
  position: sticky;
  top: 1.5rem;
}

.rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.rail ol::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 1rem;
  bottom: 1rem;
  width: 2px;
  background: var(--line);
}

.rail__step {
  position: relative;
  margin: 0 0 0.5rem;
}

.rail__step button,
.rail__item {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0 0.8rem;
  align-items: center;
  width: 100%;
  padding: 0.35rem 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  text-align: left;
}

.rail__step button {
  cursor: pointer;
  color: var(--navy);
}

.rail__step button:hover .rail__title {
  text-decoration: underline;
}

.rail__number {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--ground);
  font: 700 0.9rem var(--display);
  position: relative;
}

.rail__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.93rem;
  line-height: 1.25;
}

.rail__summary {
  grid-column: 2;
  font-size: 0.82rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail__step--done .rail__number {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.rail__step--current .rail__number {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 0 0 5px var(--tint-strong);
}

.rail__step--current .rail__title {
  color: var(--navy);
}

/* Choosing an authority: each one is a card, and the chosen card says so. */
.choices {
  border: 0;
  margin: 0;
  padding: 0;
}

.choices legend {
  font-weight: 700;
  margin-bottom: 0.5rem;
  padding: 0;
}

.choice {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  margin: 0 0 0.75rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--paper);
}

.choice:hover {
  border-color: var(--azure);
}

.choice:has(input:checked) {
  border-color: var(--blue);
  background: var(--tint);
}

.choice:has(input:focus-visible) {
  box-shadow: var(--focus);
}

.choice input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.15rem 0 0;
  accent-color: var(--blue);
}

.choice__name {
  display: block;
  font-family: var(--display);
  font-weight: 650;
}

.choice__detail {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.fixed {
  background: var(--ground);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}

.notice {
  background: var(--tint);
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.85rem 1.1rem;
  margin: 0 0 1.5rem;
}

.notice p:last-child {
  margin: 0;
}

.errors {
  border: 2px solid var(--danger);
  border-radius: var(--radius);
  background: var(--danger-tint);
  padding: 1rem 1.25rem;
  margin: 0 0 1.75rem;
}

.errors h2 {
  font-size: 1.02rem;
  color: var(--danger);
}

.errors ul {
  margin: 0;
  padding-left: 1.2rem;
}

.errors a {
  color: var(--danger);
  font-weight: 700;
}

.review {
  border-top: 1px solid var(--line);
  padding: 1.1rem 0 0.4rem;
}

.review__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.review__head h2 {
  font-size: 1.02rem;
  margin: 0 0 0.6rem;
}

dl {
  display: grid;
  grid-template-columns: minmax(8rem, 11rem) 1fr;
  gap: 0.45rem 1.25rem;
  margin: 0 0 1rem;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.confirm {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

/* The paper preview --------------------------------------------------------
   A page of the agreement at a small scale, set the way the document is:
   Arial in the agreement's navy, Peppol blue for its headings. A value that
   has been typed sits on a band of the table blue; one still missing shows
   the template's own placeholder in sky blue, so the gaps are plain to see. */

.preview {
  position: sticky;
  top: 1.5rem;
}

.preview__toggle summary {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  cursor: pointer;
  list-style: none;
}

.preview__toggle summary::-webkit-details-marker {
  display: none;
}

.paper {
  position: relative;
  aspect-ratio: 210 / 297;
  padding: 9% 9% 8%;
  background: var(--paper);
  color: var(--navy);
  font: 0.62rem/1.45 var(--text);
  border: 1px solid var(--line);
  box-shadow: 6px 6px 0 -1px var(--paper), 6px 6px 0 0 var(--line), 12px 12px 0 -1px var(--paper),
    12px 12px 0 0 var(--line);
  overflow: hidden;
}

.paper p {
  margin: 0 0 0.75em;
}

.paper__logo {
  width: 42%;
  height: auto;
  margin-bottom: 14%;
}

.paper__title {
  font-size: 1.55em;
  color: var(--blue);
  line-height: 1.15;
  margin-bottom: 0.2em !important;
}

.paper__version {
  color: var(--sky);
  margin-bottom: 2.2em !important;
}

.paper__party {
  font-weight: 700;
  margin: 1.4em 0 0.1em !important;
}

.paper__legal {
  font-style: italic;
}

.paper__heading {
  font-weight: 700;
  font-style: italic;
  font-size: 1.1em;
  margin-top: 0.4em;
}

.paper table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1em;
}

.paper th,
.paper td {
  border: 1px solid var(--navy);
  padding: 0.35em 0.5em;
  text-align: left;
  vertical-align: top;
  font-weight: 400;
}

.paper th {
  width: 32%;
}

.paper__sign th,
.paper__sign td {
  border: 2px solid var(--paper);
  background: var(--tint);
}

.paper__sign tr:first-child th,
.paper__sign th {
  background: #5b9bd5;
  color: #fff;
  font-weight: 700;
}

.paper__blank td {
  height: 2.6em;
}

.paper__list {
  margin: 0;
  padding-left: 1.1em;
}

.slot {
  background: var(--tint-strong);
  box-shadow: 0 0 0 1px var(--tint-strong);
  border-radius: 2px;
  white-space: pre-line;
  transition: background-color 0.4s ease;
}

.slot--empty {
  background: transparent;
  box-shadow: none;
  color: var(--sky);
}

.slot.is-fresh {
  background: #9cc8ec;
}

/* The front page ---------------------------------------------------------- */

.welcome {
  display: grid;
  grid-template-columns: minmax(0, 36rem) minmax(16rem, 26rem);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 3vw, 2.5rem);
}

.welcome h1 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.welcome form {
  margin: 1.75rem 0 2.5rem;
}

.welcome .button--strong {
  min-width: 10rem;
  min-height: 3.1rem;
  font-size: 1.05rem;
}

.welcome h2 {
  font-size: 1.02rem;
}

.checklist {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.6rem;
  border-bottom: 1px solid var(--line);
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.95rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  border: 2px solid var(--blue);
}

.welcome__paper {
  transform: rotate(2deg);
}

.paper--large {
  font-size: 0.7rem;
}

/* After generating -------------------------------------------------------- */

.done {
  max-width: 50rem;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 3vw, 2.5rem);
}

/* The code is what the Service Provider carries away, so it is drawn like a
   ticket stub: the one thing on the page meant to be read out and copied. */
.done__ticket {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 2.5rem;
}

.done__label {
  font-family: var(--display);
  font-weight: 600;
  color: var(--blue);
  margin: 0 0 0.2rem;
}

.done__code {
  display: inline-block;
  font: 750 clamp(1.8rem, 1.2rem + 3vw, 3rem) / 1.1 var(--display);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: var(--navy);
  padding: 0.5rem 0 1.25rem;
  margin: 0 0 1.5rem;
  border-bottom: 2px dashed var(--line);
  user-select: all;
}

.next {
  list-style: none;
  counter-reset: next;
  margin: 0;
  padding: 0;
}

.next li {
  counter-increment: next;
  position: relative;
  padding: 0 0 1.25rem 3rem;
}

.next li::before {
  content: counter(next);
  position: absolute;
  left: 0;
  top: -0.1rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font: 700 0.9rem var(--display);
}

.next h3 {
  margin-bottom: 0.25rem;
}

.message {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 3vw, 2.5rem);
}

.colophon {
  max-width: 86rem;
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* The admin --------------------------------------------------------------- */

.masthead--admin {
  gap: 0.75rem 1.5rem;
}

.adminnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.adminnav a {
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius);
  color: var(--navy);
  text-decoration: none;
  font: 600 0.92rem var(--display);
}

.adminnav a:hover {
  background: var(--tint);
}

.adminnav a[aria-current="true"] {
  background: var(--navy);
  color: #fff;
}

.masthead__user {
  margin-left: auto;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 3vw, 2.5rem) 3rem;
}

.admin__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin__head h1 {
  margin: 0;
}

.admin__actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.admin__actions form {
  margin: 0;
}

.flash {
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-weight: 700;
}

.flash--success {
  background: var(--ok-tint);
  color: var(--ok);
}

.flash--failure {
  background: var(--danger-tint);
  color: var(--danger);
}

.lookup {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: 2rem;
}

.lookup label {
  display: block;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.lookup__row {
  display: flex;
  gap: 0.75rem;
  max-width: 34rem;
}

.lookup input {
  font: 650 1.25rem var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lookup input::placeholder {
  color: var(--tint-strong);
}

.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
  margin: 0 0 1.25rem;
}

.figures div {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.figures dt {
  font-size: 0.9rem;
}

.figures dd {
  font: 700 1.8rem/1.2 var(--display);
}

.figures dd .quiet {
  font: 400 0.95rem var(--text);
}

.search {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1.25rem;
}

.search label {
  width: 100%;
  font-weight: 700;
}

.search input {
  flex: 1 1 18rem;
  max-width: 30rem;
}

.table-wrap {
  overflow-x: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table thead th {
  background: var(--tint);
  font: 600 0.85rem var(--display);
  white-space: nowrap;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table__actions {
  white-space: nowrap;
  text-align: right;
}

.table__actions > * + * {
  margin-left: 0.9rem;
}

.tag {
  display: inline-block;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--ground);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  margin-left: 0.3rem;
}

.tag--on {
  background: var(--ok-tint);
  border-color: transparent;
  color: var(--ok);
}

.empty {
  background: var(--paper);
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1rem 0;
}

.empty p {
  margin: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
}

.card dl {
  grid-template-columns: 1fr;
  gap: 0;
}

.card dt {
  font-size: 0.85rem;
  margin-top: 0.6rem;
}

.adminform {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(1.25rem, 3vw, 2rem);
  max-width: 48rem;
}

.adminform .group:first-child {
  border-top: 0;
  padding-top: 0;
}

.adminform__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.admin .confirm {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(1.25rem, 3vw, 2rem);
  max-width: 40rem;
}

.admin .confirm form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.copy {
  display: flex;
  gap: 0.6rem;
  margin: 1rem 0 1.5rem;
}

.copy input {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.9rem;
}

.pager {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 1.25rem 0;
}

/* Narrow screens ---------------------------------------------------------- */

@media (max-width: 72rem) {
  .wizard {
    grid-template-columns: 13rem minmax(0, 1fr);
  }

  .preview {
    grid-column: 2;
    position: static;
    max-width: 24rem;
  }
}

@media (max-width: 52rem) {
  .wizard {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    padding-top: 1.25rem;
  }

  .wizard__count {
    display: block;
  }

  /* The rail shrinks to a row of numbers; the heading names the step. */
  .rail {
    position: static;
  }

  .rail ol {
    display: inline-flex;
    gap: 0.5rem;
  }

  .rail ol::before {
    top: 1rem;
    bottom: auto;
    left: 1rem;
    right: 1rem;
    width: auto;
    height: 2px;
  }

  .rail__step {
    margin: 0;
  }

  .rail__step button,
  .rail__item {
    grid-template-columns: 2rem;
    padding: 0;
  }

  .rail__title,
  .rail__summary {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .preview {
    grid-column: 1;
    max-width: none;
  }

  .paper {
    font-size: 0.6rem;
  }

  .welcome {
    grid-template-columns: minmax(0, 1fr);
  }

  .welcome__paper {
    max-width: 22rem;
  }

  .masthead__title {
    padding-left: 0;
    border-left: 0;
  }

  .masthead__user {
    margin-left: 0;
  }

  dl {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  dd {
    margin-bottom: 0.6rem;
  }

  .lookup__row {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slot {
    transition: none;
  }

  .welcome__paper {
    transform: none;
  }
}
