:root {
  --navy: #000263;
  --royal: #0128af;
  --cobalt: #0041bd;
  --sky: #0076e7;
  --light: #52b1ff;
  --yellow: #ffef41;
  --bg: #fbfbfb;
  --surface: #ffffff;
  --text: #000263;
  --muted: #454b7e;
  --line: #dde4f3;
  --tile: #eef3fc;
  --chip: #e7eefb;
  --chip-text: #0128af;
  --link: #0041bd;
  --accent: #0076e7;
  --header: rgba(251, 251, 251, 0.9);
  --btn: #0128af;
  --btn-text: #fbfbfb;
  --field: #ffffff;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --gradient: linear-gradient(200deg, #000263 0%, #0128af 40%, #0041bd 60%, #0076e7 85%, #52b1ff 115%);
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #01022e;
    --surface: #060a45;
    --text: #fbfbfb;
    --muted: #b7c3ec;
    --line: #1c2468;
    --tile: #0b1257;
    --chip: #0e1760;
    --chip-text: #cfe3ff;
    --link: #7cc4ff;
    --accent: #52b1ff;
    --header: rgba(1, 2, 46, 0.9);
    --btn: #52b1ff;
    --btn-text: #000263;
    --field: #0b1257;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #01022e;
  --surface: #060a45;
  --text: #fbfbfb;
  --muted: #b7c3ec;
  --line: #1c2468;
  --tile: #0b1257;
  --chip: #0e1760;
  --chip-text: #cfe3ff;
  --link: #7cc4ff;
  --accent: #52b1ff;
  --header: rgba(1, 2, 46, 0.9);
  --btn: #52b1ff;
  --btn-text: #000263;
  --field: #0b1257;
  color-scheme: dark;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}
html {
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 76px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--link);
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid var(--light);
  outline-offset: 2px;
  border-radius: 8px;
}
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}
h1,
h2,
h3 {
  font-family: var(--font);
  color: inherit;
}
h2 {
  font-weight: 800;
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0;
}
h3 {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 9;
  background: var(--header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 8px;
}
.header-row .brand {
  margin-right: auto;
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}
/* Navy logo in light mode, white logo in dark mode (chosen by the <picture> element in the header) */
.brand picture {
  display: block;
}
.brand-logo {
  display: block;
  height: 42px;
  width: auto;
}
.nav {
  display: flex;
  gap: 4px;
}
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 14px;
  border-radius: 999px;
}
.nav a[aria-current="page"] {
  color: var(--text);
  background: var(--chip);
}
.site-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 7px 12px 7px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.site-link svg {
  width: 15px;
  height: 15px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 0;
  white-space: nowrap;
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.btn-yellow {
  background: var(--yellow);
  color: #000263;
}
.btn-main {
  background: var(--btn);
  color: var(--btn-text);
}
.btn-quiet {
  background: var(--chip);
  color: var(--chip-text);
}

/* Hero */
.hero {
  background: var(--gradient);
  color: #fbfbfb;
  overflow: hidden;
}
.hero .wrap {
  padding-top: 52px;
  padding-bottom: 60px;
  display: grid;
  gap: 40px;
  align-items: center;
}
.hero h1 {
  font-weight: 800;
  font-size: clamp(36px, 8.4vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0;
  max-width: 13ch;
}
.hero p {
  font-size: clamp(17px, 2.2vw, 19px);
  max-width: 38ch;
  margin: 18px 0 28px;
  color: #dcebff;
}
.hero-art {
  display: none;
}
@media (min-width: 860px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    padding-top: 72px;
    padding-bottom: 0;
  }
  .hero h1 {
    font-size: clamp(44px, 4.6vw, 60px);
  }
  .hero-text {
    padding-bottom: 80px;
  }
  /* The image runs to the right edge of the screen so the arm leaves the frame naturally */
  .hero-art {
    display: block;
    align-self: end;
    margin-right: calc(-1 * (max(0px, (100vw - 1080px) / 2) + 20px));
  }
  .hero-art img {
    width: 100%;
    display: block;
  }
}

/* Home sections */
.section {
  padding: 56px 0;
}
.section + .section {
  border-top: 1px solid var(--line);
}
.steps {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 28px;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 14px;
  align-content: start;
}
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--chip);
  color: var(--chip-text);
  font-weight: 800;
  font-size: 17px;
  display: grid;
  place-items: center;
  margin-top: -4px;
}
.steps p,
.benefits p {
  margin: 0;
  color: var(--muted);
  max-width: 52ch;
}
.steps-note {
  margin: 28px 0 0;
  color: var(--muted);
  max-width: 62ch;
}
.benefits {
  display: grid;
  gap: 24px;
  margin-top: 28px;
}
.benefit {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 14px;
  align-content: start;
}
.benefit svg {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  color: var(--accent);
}
.who p {
  margin: 12px 0 0;
  max-width: 52ch;
  font-size: 17px;
}
.support {
  margin: 0;
  color: var(--muted);
}
.support strong {
  color: var(--text);
}
@media (min-width: 760px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 56px;
  }
  .benefits {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
  .benefit {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .benefit svg {
    grid-row: auto;
  }
}

/* Page head and code box */
.page-head {
  padding: 40px 0 0;
}
.page-head h1 {
  font-weight: 800;
  font-size: clamp(34px, 7vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0;
}
.page-head p {
  color: var(--muted);
  max-width: 56ch;
  margin: 10px 0 0;
}
.kit {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
}
.kit label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}
.kit input {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--field);
  color: var(--text);
  padding: 10px 14px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.kit input:focus {
  outline: none;
  border-color: var(--accent);
}
.code-field {
  position: relative;
}
.code-field input {
  padding-right: 104px;
  text-transform: uppercase;
}
.code-field input::placeholder {
  text-transform: none;
  color: var(--muted);
  opacity: 0.6;
}
.code-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 600;
  font-size: 17px;
  pointer-events: none;
}
.kit .hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* My code */
.code-card {
  margin-top: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 24px 20px 26px;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
}
.cc-label {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}
.qr-tile {
  background: #ffffff;
  border-radius: 20px;
  padding: 16px;
  width: min(100%, 250px);
  box-shadow: 0 0 0 1px var(--line);
}
.qr-tile svg {
  display: block;
  width: 100%;
  height: auto;
}
.cc-divider {
  width: 100%;
  height: 1px;
  background: var(--line);
  margin: 10px 0 6px;
}
.cc-code {
  margin: 0;
  font-size: clamp(34px, 10vw, 44px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.cc-code .sfx {
  font-size: 0.62em;
  font-weight: 700;
}
.cc-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 34ch;
}
.cc-empty {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 30ch;
}
.code-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}
.doc .small-hint {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: 20px 0 0;
}
dialog.showcode {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
  background: var(--gradient);
  color: #fbfbfb;
}
dialog.showcode::backdrop {
  background: #000263;
}
.showcode-inner {
  min-height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
  padding: calc(env(safe-area-inset-top, 0px) + 64px) 20px calc(env(safe-area-inset-bottom, 0px) + 24px);
}
.showcode .qr-tile {
  width: min(78vw, 340px);
  width: min(78vw, 340px, 46dvh);
  padding: 18px;
  box-shadow: none;
}
.showcode .cc-label {
  color: #dcebff;
  font-size: 16px;
}
.showcode .cc-code {
  color: #fbfbfb;
  font-size: clamp(40px, 13vw, 58px);
}
.showcode .cc-note {
  color: #dcebff;
}
.showcode .close {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  right: 14px;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(251, 251, 251, 0.18);
  color: #fbfbfb;
  display: grid;
  place-items: center;
}
.showcode .close svg {
  width: 22px;
  height: 22px;
}
.code-open body {
  overflow: hidden;
  background: #000263;
}
.code-open .site-header,
.code-open main,
.code-open .site-footer {
  visibility: hidden;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  transform: translate(-50%, 20px);
  background: var(--text);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 20;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 40px;
  color: var(--muted);
  font-size: 14px;
}
.site-footer .wrap {
  display: grid;
  gap: 14px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.site-footer p {
  margin: 0;
}

/* Header on phones: logo, name and website link on the first row, page links on the second */
@media (max-width: 759px) {
  .header-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand link" "nav nav";
    height: auto;
    padding-top: 10px;
    padding-bottom: 6px;
    row-gap: 6px;
  }
  .header-row .brand {
    grid-area: brand;
    margin-right: 0;
  }
  .site-link {
    grid-area: link;
    margin-left: 0;
  }
  .nav {
    grid-area: nav;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }
  .nav a {
    text-align: center;
    padding: 8px 6px;
  }
  html {
    scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 116px);
  }
}

/* Shared layout for My code, Guide and Rules */
.doc {
  max-width: 720px;
  padding-bottom: 64px;
}
.doc .page-head p {
  max-width: 60ch;
}
.updated {
  color: var(--muted);
  font-size: 14px;
  margin: 12px 0 0;
}
.doc h2 {
  font-size: clamp(22px, 4vw, 26px);
  margin: 44px 0 14px;
}
.doc > p {
  color: var(--muted);
  margin: 0 0 14px;
}

/* Guide */
.pitch {
  background: var(--tile);
  border-radius: 18px;
  padding: 18px 20px;
  font-size: 17px;
  line-height: 1.55;
  margin: 0 0 14px;
  color: var(--text);
}
.points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.points li {
  color: var(--muted);
}
.points strong {
  color: var(--text);
}
.help-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}
.help-list li {
  display: grid;
  gap: 4px;
}
.help-list h3 {
  font-size: 17px;
}
.help-list p {
  margin: 0;
  color: var(--muted);
}

/* Rules */
.rule-group {
  margin-top: 32px;
}
.rule-group h2 {
  margin: 0 0 12px;
}
.rule-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rule-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.rule-list li:first-child {
  border-top: 0;
}
.rule-list svg {
  width: 24px;
  height: 24px;
  margin-top: 1px;
}
.rule-list.do svg {
  color: #12a15b;
}
.rule-list.dont svg {
  color: #e0414b;
}
.rules-end {
  margin-top: 32px;
  padding: 20px;
  border-radius: 18px;
  background: var(--tile);
}
.rules-end p {
  margin: 0 0 16px;
}

/* Guide: categories, walkthroughs */
.doc h3 {
  margin: 28px 0 10px;
}
.doc h2 + h3 {
  margin-top: 0;
}
.cats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.cats li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: start;
}
.cats svg {
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 12px;
  background: var(--chip);
  color: var(--chip-text);
}
.cats strong {
  display: block;
}
.cats span {
  color: var(--muted);
}
.walkthrough {
  display: grid;
  gap: 28px;
  margin-top: 8px;
}
.shot {
  position: relative;
  width: min(100%, 290px);
  margin: 0 auto;
}
.shot img {
  width: 100%;
  border-radius: 30px;
  box-shadow: 0 18px 40px rgba(0, 2, 60, 0.28);
}
.pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--yellow);
  color: #000263;
  font-weight: 800;
  font-size: 14px;
  display: grid;
  place-items: center;
  box-shadow:
    0 0 0 3px #000263,
    0 4px 10px rgba(0, 0, 0, 0.25);
}
.legend {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: pin;
  display: grid;
  gap: 16px;
}
.legend li {
  counter-increment: pin;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 2px 12px;
}
.legend li::before {
  content: counter(pin);
  grid-row: span 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--yellow);
  color: #000263;
  font-weight: 800;
  font-size: 14px;
  display: grid;
  place-items: center;
}
.legend strong {
  line-height: 28px;
}
.legend span {
  color: var(--muted);
}
.nw {
  white-space: nowrap;
}
.help-list h3 {
  margin: 0;
}
.mini-steps {
  margin: 0 0 16px;
  padding-left: 22px;
  display: grid;
  gap: 8px;
  color: var(--muted);
}
.mini-steps li::marker {
  color: var(--accent);
  font-weight: 800;
}
@media (min-width: 760px) {
  .walkthrough {
    grid-template-columns: 270px 1fr;
    gap: 36px;
    align-items: start;
  }
  .shot {
    width: 100%;
  }
}

[hidden] {
  display: none !important;
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
