/* Signing in, links and the second step (/account/, /app/). Built on tokens.css and
   base.css with the same rule: every colour and size is a token or a base.css measure.
   Phone first; the picture beside the form appears from 641 px. */

/* --- Bar and foot ---------------------------------------------------------------- */

.account-bar {
  border-block-end: var(--line-width) solid var(--line);
}

.account-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: calc(var(--space-12) + var(--space-6));
}

.account-bar__logo img {
  height: calc(var(--space-6) + var(--space-1) + var(--space-1));
  width: auto;
}

.account-foot {
  border-block-start: var(--line-width) solid var(--line);
}

.account-foot__inner {
  padding-block: var(--space-6);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* --- Layout ---------------------------------------------------------------------- */

.account-layout {
  display: grid;
  gap: var(--space-12);
  padding-block: var(--space-8) var(--space-12);
}

.account-form {
  display: grid;
  gap: var(--space-6);
  max-width: calc(var(--space-12) * 9);
}

.account-form--wide {
  max-width: calc(var(--space-18) * 11);
}

.account-head {
  display: grid;
  gap: var(--space-3);
}

.account-link {
  color: var(--clay);
  font-size: var(--label-size);
  font-weight: var(--label-weight);
}

.account-note {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.icon {
  width: var(--icon-size);
  height: var(--icon-size);
  flex: none;
}

.account-note .icon {
  width: calc(var(--icon-size) - var(--space-1) - var(--space-1));
  height: calc(var(--icon-size) - var(--space-1) - var(--space-1));
}

.account-badge {
  display: inline-grid;
  place-items: center;
  width: calc(var(--space-12) + var(--space-2));
  height: calc(var(--space-12) + var(--space-2));
  background: var(--white);
  border-radius: var(--radius-l);
  box-shadow: inset 0 0 0 var(--line-width) var(--line);
}

.account-badge .icon {
  width: var(--icon-spot);
  height: var(--icon-spot);
}

.field__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.button--wide {
  width: 100%;
}

.field__input--code {
  font-size: var(--h3-size);
  font-weight: var(--h3-weight);
  letter-spacing: calc(var(--space-1) / 2);
  font-variant-numeric: tabular-nums;
  color: var(--night);
}

/* --- Notices --------------------------------------------------------------------- */

.notices {
  display: grid;
  gap: var(--space-3);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-6);
}

.notice {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-3) var(--space-4);
  background: var(--white);
  border-radius: var(--radius-l);
  box-shadow: inset 0 0 0 var(--line-width) var(--line);
  font-size: var(--body-size);
  line-height: var(--small-line);
}

.notice--dawn {
  background: var(--dawn);
  box-shadow: none;
}

.notice--error {
  box-shadow: inset 0 0 0 var(--focus-width) var(--danger);
}

/* --- The tick -------------------------------------------------------------------- */

.tick {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--white);
  border-radius: var(--radius-l);
  box-shadow: inset 0 0 0 var(--line-width) var(--line);
}

.tick--error {
  box-shadow: inset 0 0 0 var(--focus-width) var(--danger);
}

/* The box and its sentence side by side; the sentence is the box's label, so a
   click on it ticks the box and a screen reader reads it. */
.tick__row {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.tick__label {
  font-weight: var(--label-weight);
  color: var(--ink);
  cursor: pointer;
}

.tick__box {
  width: calc(var(--space-6) - var(--space-1) / 2);
  height: calc(var(--space-6) - var(--space-1) / 2);
  margin: 0;
  flex: none;
  accent-color: var(--night);
}

.tick__versions {
  padding-inline-start: calc(var(--space-6) + var(--space-3));
}

/* --- Steps and the set-up -------------------------------------------------------- */

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  list-style: none;
  padding: 0;
}

.steps__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--label-size);
  color: var(--ink-soft);
}

.steps__item.is-current {
  color: var(--night);
  font-weight: var(--label-weight);
}

.steps__mark {
  display: inline-grid;
  place-items: center;
  width: calc(var(--space-6) + var(--space-1));
  height: calc(var(--space-6) + var(--space-1));
  border-radius: var(--radius-pill);
  background: var(--line);
  color: var(--night);
  font-size: var(--small-size);
  font-weight: var(--label-weight);
}

.steps__item.is-current .steps__mark {
  background: var(--night);
  color: var(--white);
}

.steps__item.is-done .steps__mark {
  background: var(--dawn);
}

.steps__mark img {
  width: var(--space-4);
  height: var(--space-4);
}

.setup {
  display: grid;
  gap: var(--space-4);
  list-style: none;
  padding: 0;
}

.setup__step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--white);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
}

.setup__number {
  display: inline-grid;
  place-items: center;
  width: var(--space-8);
  height: var(--space-8);
  border-radius: var(--radius-pill);
  background: var(--dawn);
  color: var(--night);
  font-weight: var(--h3-weight);
}

.setup__scan svg {
  width: calc(var(--space-18) * 2 + var(--space-6));
  height: auto;
}

.setup__key {
  font-size: var(--lead-size);
  font-weight: var(--label-weight);
  letter-spacing: calc(var(--space-1) / 2);
  color: var(--night);
  overflow-wrap: anywhere;
}

/* --- Recovery codes -------------------------------------------------------------- */

.panel--card {
  box-shadow: var(--shadow-card);
  padding: var(--space-4);
}

/* As many columns as fit with every code whole: one on a narrow phone, up to five
   on a laptop. A tile never gets narrower than a code. */
.codes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(calc(var(--space-18) * 2 + var(--space-6)), 1fr));
  gap: var(--space-3);
  list-style: none;
  padding: 0;
}

.codes li {
  padding: var(--space-3) var(--space-2);
  background: var(--paper);
  border-radius: var(--radius-m);
  white-space: nowrap;
  font-size: var(--body-size);
  font-weight: var(--label-weight);
  letter-spacing: calc(var(--space-1) / 2);
  font-variant-numeric: tabular-nums;
  color: var(--night);
  text-align: center;
}

.policy-text {
  max-width: var(--text-width);
}

.policy-text > * + * {
  margin-block-start: var(--space-4);
}

/* --- The picture beside the form ---------------------------------------------------- */
/* The shapes of the mark, as on the design system's cover: the clay head, the sun
   arrow and the U, here a dawn U with a row of heads. Laptops only. */

.account-art {
  display: none;
}

@media (min-width: 641px) {
  .account-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: var(--space-18);
    padding-block: var(--space-12) var(--space-18);
  }

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

  .account-art {
    display: block;
    position: relative;
    padding-block-start: calc(var(--space-18) + var(--space-8));
  }

  .account-art__head {
    position: absolute;
    inset-inline-start: 22%;
    inset-block-start: 0;
    width: 20%;
    aspect-ratio: 1;
    border-radius: var(--radius-pill);
    background: var(--clay);
  }

  .account-art__arrow {
    position: absolute;
    inset-inline-end: 2%;
    inset-block-start: 1%;
    width: 30%;
    fill: var(--sun);
  }

  .account-art__u {
    width: 88%;
    aspect-ratio: 1;
    border-radius: 0 0 var(--radius-u) var(--radius-u);
    background: var(--dawn);
    display: grid;
    place-items: center;
  }

  .account-art__dots {
    width: 60%;
    fill: var(--night);
  }
}

/* --- Widths, as the sign-in page design has them ----------------------------------- */
/* The bar and the foot hold 1240 px of content with 24 px padding (the line of the
   public pages); the form and its picture sit in 1240 px including that padding, as
   the design draws them. */

.account-bar__inner,
.account-foot__inner {
  max-width: calc(1240px + 2 * var(--space-6));
  padding-inline: var(--space-6);
}

.account-layout {
  max-width: 1240px;
  padding-inline: var(--space-6);
}
