/* Pages of the Cuenta Horizon.

   The look is the company website's (horizon/website/src/styles.css and its
   DESIGN.md): the same tokens, type scale, container, buttons, links, stripes
   and sun, written here by hand because this project shares no code with it.
   When the website's system changes, change this file to match.

   What the website does not have, and this file adds: form fields, notices,
   the navy band that carries each page's title, and the white sheet, centred
   under it, that carries the task.

   Colours are the five of the brand kit plus white. Greys are opacities of
   Horizon Navy, on navy opacities of Tech Cream; no other hue, no gradient.
   Nothing here needs a script: the one the pages load (password.js) only
   shows the buttons styled under "Show or hide a password". */

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/montserrat-latin-wght.woff2') format('woff2');
}

:root {
  --color-navy: #0b132b; /* Horizon Navy */
  --color-amaranth: #e83b57; /* Amaranth Red */
  --color-core: #f05d4c; /* Core Orange: the coral red */
  --color-sienna: #ee7642; /* Burnt Sienna: the orange */
  --color-cream: #fffcf2; /* Tech Cream */
  --color-white: #ffffff;

  --ink-soft: rgb(11 19 43 / 0.75); /* secondary text on light: 8.2 : 1 on white */
  --rule: rgb(11 19 43 / 0.15);
  --field-rule: rgb(11 19 43 / 0.6); /* the stroke of a field at rest: 4.9 : 1 on white */
  --cream-soft: rgb(255 252 242 / 0.8);
  --cream-rule: rgb(255 252 242 / 0.15);

  --font-sans: 'Montserrat', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  /* The slant of the logo lettering (20 degrees from vertical). Fills only, never text. */
  --slant: -20deg;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* The sheet: its width, its padding, and how far it rises into the band. */
  --sheet: 32rem;
  --sheet-pad: 2.5rem;
  --overlap: 5rem;
}

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

/* Fields that exist only for password managers stay hidden whatever their type. */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-white);
  color: var(--color-navy);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--color-navy);
  accent-color: var(--color-navy);
}

::selection {
  background-color: var(--color-navy);
  color: var(--color-cream);
}

.on-navy ::selection {
  background-color: var(--color-cream);
  color: var(--color-navy);
}

/* One focus style everywhere: a navy ring on light surfaces, cream on navy. */
:focus-visible {
  outline: 2px solid var(--color-navy);
  outline-offset: 3px;
  border-radius: 2px;
}

.on-navy :focus-visible {
  outline-color: var(--color-cream);
}

h1,
h2,
h3,
p,
dl,
dd,
ul {
  margin: 0;
}

/* No last line of one short word, where the browser can avoid it. */
p,
li,
dd,
label {
  text-wrap: pretty;
}

ul {
  padding: 0;
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ---- Width and gutters: the website's container ---- */

.container-site {
  width: 100%;
  max-width: 78rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 48rem) {
  .container-site {
    padding-inline: 2.5rem;
  }
}

/* ---- Type scale ---- */

.type-title {
  font-weight: 700;
  font-size: clamp(1.875rem, 1.3rem + 2.4vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.type-heading {
  font-weight: 700;
  font-size: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.type-lead {
  font-weight: 300;
  font-size: clamp(1.125rem, 1.04rem + 0.36vw, 1.3125rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.type-small,
.small {
  font-size: 0.875rem;
  line-height: 1.55;
}

.soft {
  color: var(--ink-soft);
}

/* ---- Header: the website's, without its navigation ---- */

.site-header {
  border-bottom: 1px solid rgb(11 19 43 / 0.1);
  background-color: var(--color-white);
}

.site-header > .container-site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* The logotype keeps a clear space of the height of its letter "o"
   (157/1913 of its width) on all four sides; the negative margin puts the
   artwork itself on the container's edge. */
.logo {
  display: block;
  flex: none;
  padding: 14px;
  margin-left: -14px;
}

.logo img {
  display: block;
  width: 164px;
  height: auto;
  max-width: none;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

/* The name of the account, beside the logotype and outside its clear space.
   Under 48rem the band's first sentence says it instead. */
.product-name {
  display: none;
  padding-left: 1.25rem;
  border-left: 1px solid var(--rule);
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

@media (min-width: 48rem) {
  .product-name {
    display: block;
    margin-left: 0.5rem;
  }
}

.lang-link {
  font-weight: 700;
  font-size: 0.875rem;
}

/* ---- The band: the website's navy hero, slim, carrying the page's title ---- */

.band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--color-navy);
  color: var(--color-cream);
}

/* Everything in the band is centred on the page's axis, as the sheet under
   it is. */
.band > .container-site {
  padding-block: 2.5rem 2.75rem;
  text-align: center;
}

.band .type-title {
  max-width: 22ch;
  margin-inline: auto;
}

/* The words of the band settle once on a first visit; a page that comes back
   with an answer is at rest. */
.band > .container-site > * {
  animation: rise 560ms var(--ease-out) both;
}

.band > .container-site > :nth-child(n + 2) {
  animation-delay: 70ms;
}

.is-answer .band > .container-site > * {
  animation: none;
}

.band .type-lead {
  max-width: 34rem;
  margin: 0.75rem auto 0;
  color: var(--cream-soft);
}

/* An address or a name the sentence above is about: on its own line, so that
   a long one wraps instead of pushing the page sideways. */
.value {
  margin-top: 0.375rem;
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* A part of an address that stays whole. */
.nb {
  white-space: nowrap;
}

/* Where the person is going, on every step of the way there. */
.band-dest {
  margin-top: 1.25rem;
  color: var(--cream-soft);
}

.band-dest strong {
  color: var(--color-cream);
}

.band-action,
.band-actions {
  margin-top: 1.75rem;
}

/* More than one thing to press in the band: side by side, wrapping on a
   narrow screen. */
.band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* A page without a sheet (a farewell, an error with nothing to press) has a
   band that ends where its words end. */
@media (min-width: 48rem) {
  main:has(> .page.is-closing) .band > .container-site,
  main:has(> .page.is-bare) .band > .container-site {
    min-height: 17.5rem;
    padding-bottom: 3.5rem;
  }
}

/* The triple stripe. Under 72rem it closes the band as three thin bars, as
   at the foot of the website's hero on a phone. */
.stripes {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stripes span {
  display: block;
  height: 5px;
}

.stripes span:nth-child(1) {
  background-color: var(--color-amaranth);
}

.stripes span:nth-child(2) {
  background-color: var(--color-core);
}

.stripes span:nth-child(3) {
  background-color: var(--color-sienna);
}

/* Orange first, as at the foot of the letterhead: above the footer. */
.stripes.reverse {
  flex-direction: column-reverse;
  padding-bottom: 5px;
}

/* From 72rem the band shows the stripe as three tall bars at the logo's
   slant on its right, where they cannot run under the title. */
.band-stripes {
  display: none;
}

/* From 48rem the band is taller by what the sheet covers of it, and never
   shorter than a title with two lines under it, so that it keeps its height
   from one step to the next. */
@media (min-width: 48rem) {
  .band > .container-site {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(17.5rem + var(--overlap));
    padding-block: 4rem calc(3.5rem + var(--overlap));
  }
}

@media (min-width: 72rem) {
  .band > .stripes {
    display: none;
  }

  .band-stripes {
    position: absolute;
    inset-block: -20%;
    right: max(2.5rem, (100% - 78rem) / 2 + 2.5rem);
    z-index: -1;
    display: flex;
    gap: clamp(1rem, 1.5vw, 1.5rem);
    transform: skewX(var(--slant));
  }

  .band-stripes span {
    width: clamp(2.5rem, 3.4vw, 3.25rem);
    animation: stripe-rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .band-stripes span:nth-child(1) {
    background-color: var(--color-amaranth);
  }

  .band-stripes span:nth-child(2) {
    background-color: var(--color-core);
    animation-delay: 90ms;
  }

  .band-stripes span:nth-child(3) {
    background-color: var(--color-sienna);
    animation-delay: 180ms;
  }

  /* A page that comes back with an answer (an error, a notice) does not
     replay the entrance: the person is reading the answer. */
  .is-answer .band-stripes span {
    animation: none;
  }
}

@keyframes stripe-rise {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

/* ---- The page under the band ---- */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page {
  flex: 1;
  padding-block: 2.5rem 4rem;
}

/* The sheet carries the task: one column, centred. On a phone it is the page
   itself. From 48rem it is a white sheet on a cream ground that rises into
   the band, with a cream mat around it: depth by tone, without a shadow. */
.sheet {
  width: 100%;
  max-width: var(--sheet);
  margin-inline: auto;
}

/* A sheet that holds one button and nothing else. */
.sheet > .actions:first-child {
  margin-top: 0;
}

/* A page with nothing under the band but the way out (an error without a
   next step) keeps a little of the ground. */
.page.is-bare {
  min-height: 6rem;
}

/* What stands under the sheet: the way back to the product. */
.below {
  max-width: var(--sheet);
  margin: 2rem auto 0;
  text-align: center;
}

@media (min-width: 48rem) {
  .page {
    padding-block: 0 6rem;
    background-color: var(--color-cream);
  }

  .sheet {
    position: relative;
    z-index: 1;
    max-width: calc(var(--sheet) + 1rem);
    margin-top: calc(-1 * var(--overlap));
    padding: var(--sheet-pad);
    border: 0.5rem solid var(--color-cream);
    outline: 1px solid var(--rule);
    background-color: var(--color-white);
    animation: rise 560ms var(--ease-out) 90ms both;
  }

  /* A page that comes back with an answer does not replay the entrance. */
  .is-answer .sheet {
    animation: none;
  }
}

/* The entrance moves what is already there: nothing waits hidden for it, so
   a page caught on its first frame shows everything it holds. */
@keyframes rise {
  from {
    transform: translateY(0.875rem);
  }

  to {
    transform: none;
  }
}

.sheet > p + p:not(.actions, .after),
.section-body > p + p:not(.actions, .after) {
  margin-top: 1rem;
}

.after,
.sheet > p + form,
.sheet > .codes + p,
.section-body > p + form {
  margin-top: 1.5rem;
}

/* More room above a step's heading than below it. */
.step {
  margin-block: 2.75rem 1rem;
}

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

main:focus {
  outline: none;
}

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

label {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.55;
}

.field {
  margin-bottom: 1.25rem;
}

/* ---- Show or hide a password ----
   The button follows its field in the page, so that Tab goes from the field
   to it, and is drawn at the right of the label's line. It is in the page
   hidden; password.js shows it. */
.field:has(> .reveal) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1rem;
}

.field:has(> .reveal) > :not(label, .reveal) {
  grid-column: 1 / -1;
}

.field:has(> .reveal) > label {
  grid-area: 1 / 1;
}

.field > .reveal {
  grid-area: 1 / 2;
  align-self: start;
  justify-self: end;
  /* A target 44 px tall on a line of text, without moving the line. */
  padding: 0.75rem 0;
  margin-block: -0.75rem;
  border: 0;
  background: none;
  color: var(--color-navy);
  font: inherit;
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.55;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
  text-decoration-color: var(--color-amaranth);
  cursor: pointer;
  transition: text-decoration-color 200ms var(--ease-out);
}

.reveal:hover {
  text-decoration-color: currentColor;
}

/* One way to show a password, not the browser's as well. */
input::-ms-reveal {
  display: none;
}

input[type='email'],
input[type='password'],
input[type='text'],
select {
  display: block;
  width: 100%;
  height: 3rem;
  padding: 0 0.875rem;
  border: 1px solid var(--field-rule);
  border-radius: 0;
  background-color: var(--color-white);
  color: inherit;
  font: inherit;
  appearance: none;
  transition: border-color 200ms var(--ease-out);
}

/* The stroke of a field at rest is softer than its text, and firms up under
   the pointer and while it is being filled in. */
input:hover,
select:hover,
input:focus,
select:focus {
  border-color: var(--color-navy);
}

/* The arrow of a select, drawn from two borders so that no image is needed. */
.select {
  position: relative;
}

.select::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 1.125rem;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--color-navy);
  border-bottom: 2px solid var(--color-navy);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.select select {
  padding-right: 2.75rem;
}

input[aria-invalid='true'] {
  border-color: var(--color-navy);
  border-width: 2px;
  padding-inline: calc(0.875rem - 1px);
}

input.code {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  font-variant-numeric: tabular-nums lining-nums;
}

.hint {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* The rules of a new password, one per line. A rule a refused password
   missed takes the square and the weight of an error. */
.rules {
  display: grid;
  gap: 0.125rem 1.25rem;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

@media (min-width: 30rem) {
  .rules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rules > li:first-child,
  .rules > li:last-child {
    grid-column: 1 / -1;
  }
}

.rules > li {
  display: flex;
  gap: 0.5rem;
}

.rules > li::before {
  content: '';
  flex: none;
  width: 0.375rem;
  height: 1px;
  margin-top: 0.75em;
  background-color: currentColor;
}

.rules > li.is-missed {
  color: var(--color-navy);
  font-weight: 700;
}

.rules > li.is-missed::before {
  width: 0.625rem;
  height: 0.625rem;
  margin-top: 0.4em;
  margin-left: -0.125rem;
  margin-right: -0.125rem;
  background-color: var(--color-amaranth);
}

/* What is wrong with a field: bold, under it, opened by the small square of
   the stationery. Told by its words and its mark, never by red text. */
.field-error {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.55;
}

.field-error::before,
.notice.is-error > strong::before {
  content: '';
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  background-color: var(--color-amaranth);
}

.field-error::before {
  margin-top: 0.4em;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0;
  font-weight: 400;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.check input {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
}

/* The browser's own ring on a checkbox is black; this is the page's. */
.check input:focus-visible {
  outline: 2px solid var(--color-navy);
  outline-offset: 3px;
}

.doc-links {
  margin-block: 0.5rem 1rem;
}

.doc-links li + li {
  margin-top: 0.5rem;
}

/* A form kept closed until the person asks for it. */
.disclosure {
  margin-top: 1.5rem;
}

.disclosure summary {
  display: inline-block;
  padding-block: 0.75rem;
  margin-block: -0.75rem;
  list-style: none;
  cursor: pointer;
}

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

.disclosure summary span {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
  text-decoration-color: var(--color-amaranth);
}

.disclosure[open] summary {
  margin-bottom: 1rem;
}

/* ---- Buttons: the website's. A slanted fill under an upright label. ---- */

.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  /* The slanted fill reaches half a rem past the box on each side. */
  margin-inline: 0.5rem;
  padding: 0.625rem 1.5rem;
  border: 0;
  background: none;
  color: var(--color-navy);
  font: inherit;
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--color-sienna);
  transform: skewX(var(--slant));
  transition:
    background-color 200ms var(--ease-out),
    box-shadow 200ms var(--ease-out);
}

.btn:hover::before {
  background-color: var(--color-core);
}

.btn-outline::before {
  background-color: transparent;
  box-shadow: inset 0 0 0 2px var(--color-navy);
}

.btn-outline:hover {
  color: var(--color-cream);
}

.btn-outline:hover::before {
  background-color: var(--color-navy);
}

.on-navy .btn-outline {
  color: var(--color-cream);
}

.on-navy .btn-outline::before {
  box-shadow: inset 0 0 0 2px var(--color-cream);
}

.on-navy .btn-outline:hover {
  color: var(--color-navy);
}

.on-navy .btn-outline:hover::before {
  background-color: var(--color-cream);
}

/* The focus ring follows the slant of the fill. */
.btn:focus-visible {
  outline: none;
}

.btn:focus-visible::before {
  outline: 2px solid var(--color-navy);
  outline-offset: 3px;
}

.on-navy .btn:focus-visible::before {
  outline-color: var(--color-cream);
}

/* Buttons answer a press by settling 1 px. */
.btn {
  transition: transform 120ms var(--ease-out);
}

.btn:active {
  transform: translateY(1px);
}

/* The one action of a sheet spans it, as tall as a field. */
.btn-block {
  display: flex;
  width: calc(100% - 1rem);
  min-height: 3rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 1.75rem;
}

.actions .btn {
  margin-right: 0.5rem;
}

/* Two answers to one question, one above the other. */
.actions.stack {
  flex-direction: column;
  align-items: stretch;
  gap: 0.875rem;
}

/* ---- Links: the website's "go" link ---- */

a,
button.link {
  color: var(--color-navy);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
  text-decoration-color: var(--color-amaranth);
  transition: text-decoration-color 200ms var(--ease-out);
}

a:hover,
button.link:hover {
  text-decoration-color: currentColor;
}

/* A link that stands on its own line gets a taller target than its text. */
.link-row a,
.link-row button.link,
.lang-link {
  display: inline-block;
  padding-block: 0.75rem;
  margin-block: -0.75rem;
}

button.link {
  padding-inline: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* Underlined only on hover, as the contact data in the website's footer. */
.lang-link {
  text-decoration-color: transparent;
}

.lang-link:hover {
  text-decoration-color: var(--color-amaranth);
}

.on-navy a {
  color: var(--color-cream);
}

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

.notice {
  margin-bottom: 1.75rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-navy);
  background-color: var(--color-cream);
}

/* The way on that an error offers, inside its sentence: a taller target
   than its text. */
.notice a {
  display: inline-block;
  padding-block: 0.375rem;
  margin-block: -0.375rem;
}

/* An error's text hangs beside its square, as under a field. */
.notice.is-error {
  position: relative;
  padding-left: 2.125rem;
}

.notice.is-error > strong::before {
  position: absolute;
  left: 1rem;
  top: calc(0.875rem + 0.5em);
}

/* ---- Rows and rules, as the website's lists ---- */

.rows {
  border-top: 2px solid var(--color-navy);
}

.rows > li,
.rows > div {
  padding-block: 1.125rem;
  border-bottom: 1px solid var(--rule);
}

.rows dt {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.rows dd {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.rows .link-row p + p,
.rows .link-row p + form,
.rows form.link-row {
  margin-top: 0.375rem;
}

.rows li > p + p {
  margin-top: 0.125rem;
}

/* What else the person may want, at the foot of the sheet: a question and
   its link on one line, each pair under a hairline. */
.links {
  margin-top: 2.25rem;
}

.links > li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.5rem;
  padding-block: 0.875rem;
  border-top: 1px solid var(--rule);
}

.links > li:last-child {
  padding-bottom: 0;
}

/* A list that has no line shows no rule either. */
.links:not(:has(li)) {
  display: none;
}

.or {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-block: 1.75rem;
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.or::before,
.or::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--rule);
}

/* ---- The account page: one sheet, a section per job ---- */

.section {
  display: grid;
  gap: 1.25rem;
  padding-block: 2.25rem;
  border-top: 1px solid var(--rule);
  /* A form posts back to its section's anchor: leave air above the heading. */
  scroll-margin-top: 1rem;
}

.section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.section:last-of-type {
  padding-bottom: 0;
}

.section-head p {
  margin-top: 0.375rem;
}

/* On a phone the sheet has no edge of its own: the first section opens with
   the navy rule of the website's lists. */
@media (max-width: 47.99rem) {
  .section:first-of-type {
    padding-top: 2.25rem;
    border-top: 2px solid var(--color-navy);
  }
}

/* ---- Two-step verification ---- */

/* The QR code is a functional image, black on white. It is drawn at twice
   the size it is shown at, so that its modules stay even. */
.qr {
  display: block;
  width: 240px;
  height: 240px;
  border: 1px solid var(--rule);
}

/* Two ways to add the account to the app. With a mouse the image comes
   first; on a touch screen, the link that opens the app on that phone. */
.ways {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.way > p + p {
  margin-top: 0.75rem;
}

.way > .key {
  margin-top: 0.125rem;
}

.way-open {
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

@media (hover: none) and (pointer: coarse) {
  .way-open {
    order: -1;
    padding-top: 0;
    border-top: 0;
  }

  .way-scan {
    padding-top: 2rem;
    border-top: 1px solid var(--rule);
  }
}

.way .actions {
  margin-top: 0.75rem;
}

/* Keys and codes are set in the brand's typeface, with even figures and a
   little air, and are selected whole with one tap, ready to copy. */
.copyable {
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0.04em;
  user-select: all;
}

.key {
  font-size: 1rem;
  word-spacing: 0.25em;
}

.codes {
  margin-block: 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--color-navy);
  background-color: var(--color-cream);
  list-style: none;
}

.codes li {
  padding-block: 0.3125rem;
  white-space: nowrap;
}

/* ---- Leaving: cream, with the sun of the logo pale at the foot ---- */

.page.is-closing {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--color-cream);
  padding-top: 2.5rem;
  /* Room for the sun under the text. */
  padding-bottom: clamp(12rem, 46vw, 20rem);
  text-align: center;
}

.sun-watermark {
  position: absolute;
  left: 50%;
  bottom: 0;
  translate: -50% 0;
  z-index: -1;
  width: min(90vw, 760px);
  max-width: none;
  height: auto;
  opacity: 0.16;
  pointer-events: none;
  user-select: none;
}

/* ---- Footer: the website's, without its link columns ---- */

.site-footer {
  background-color: var(--color-navy);
  color: var(--color-cream);
}

.site-footer > .container-site {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2.5rem;
  padding-block: 1.75rem;
}

.site-footer-text {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--cream-soft);
}

/* A link inside a line of text is told by its underline, not by its tone. */
.site-footer-text a {
  font-weight: 400;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--cream-soft);
}

.site-footer-text a:hover {
  text-decoration-color: var(--color-amaranth);
}

@media (min-width: 48rem) {
  .site-footer-text {
    align-items: flex-end;
    text-align: right;
  }
}

.skip {
  position: absolute;
  left: -999rem;
  top: 0.75rem;
  z-index: 10;
  padding: 0.625rem 1rem;
  background-color: var(--color-white);
}

.skip:focus {
  left: 0.75rem;
}

/* Recovery codes are meant to be printed: the page prints as a plain sheet. */
@media print {
  .site-header .lang-link,
  .band-stripes,
  .stripes,
  .site-footer,
  .no-print,
  .skip {
    display: none !important;
  }

  .band {
    background: none;
    color: #000;
  }

  .band .type-lead {
    color: #000;
  }

  .codes {
    columns: 1;
    background: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
