@font-face {
  font-family: "DM Sans";
  src: url(/assets/body.woff2) format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url(/assets/currency-symbols.woff2) format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+20B9, U+2192-2193, U+2197;
}

:root {
  color-scheme: dark;
  --page: #0e151d;
  --mast: #101820;
  --surface: #17222f;
  --raised: #1d2a3a;
  --line: #344357;
  --ink: #f4f7fb;
  --body-ink: #dae3eb;
  --muted: #b8c7d6;
  --link: #bce5fd;
  --mint: #c0ebdd;
  --accent: #d9fa76;
  --accent-hover: #e9ffab;
  --accent-ink: #142008;
  --contest: #292944;
  --contest-hover: #353455;
  --contest-edge: #686488;
  --contest-ink: #eee6ff;
  --body: "DM Sans", system-ui, sans-serif;
  background: var(--page);
  color: var(--ink);
  font: 112.5%/1.65 var(--body);
}

*, ::before, ::after { box-sizing: border-box; }
body { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.18; }
a { color: var(--link); text-underline-offset: .19em; }
a:hover { text-decoration-thickness: 2px; }
a, summary, button { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
section[id], h2[id], details[id] { scroll-margin-block-start: 20px; }

code {
  font: .93em/1.55 ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
}

.wrap {
  width: min(1160px, calc(100% - clamp(36px, 8vw, 112px)));
  margin-inline: auto;
}

.skip {
  position: absolute;
  z-index: 12;
  top: -8rem;
  left: 1rem;
  padding: .6rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
}

.skip:focus { top: .5rem; }

.mast {
  background: var(--mast);
  border-bottom: 1px solid var(--line);
}

.mast-row, .mast-links, .brand, .footer-row, .footer-links {
  display: flex;
  align-items: center;
}

.mast-row {
  min-height: 76px;
  justify-content: space-between;
  flex-wrap: wrap;
  column-gap: 1.3rem;
}

.brand {
  gap: .58rem;
  min-height: 44px;
  color: var(--ink);
  font-size: 1.23rem;
  font-weight: 700;
  line-height: 1.12;
  text-decoration: none;
}

.brand img {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.mast-links { gap: clamp(.7rem, 3vw, 2.1rem); }

.mast-links a, .footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
}

.mast-links a:hover, .footer-links a:hover { color: var(--ink); text-decoration: underline; }

.mast-links .nav-tool {
  gap: .45rem;
  padding-inline: .9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}

.nav-tool span { color: var(--mint); }

.hero-band {
  background:
    radial-gradient(ellipse at 86% 8%, #233945 0%, transparent 56%),
    linear-gradient(150deg, #14212c, var(--page) 73%);
  border-bottom: 1px solid var(--line);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5.2vw, 75px);
  padding-block: clamp(2.8rem, 6.1vw, 5.1rem);
}

.hero h1 {
  margin-bottom: .24em;
  font-size: clamp(2.75rem, 6.25vw, 4.9rem);
  line-height: 1.04;
  letter-spacing: -.04em;
}

.hero h1 em { color: var(--mint); font-style: normal; }

.lead {
  max-width: 38ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.65vw, 1.16rem);
  line-height: 1.55;
}

.meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .2rem .75rem;
  margin-top: .9rem;
  color: var(--muted);
  font-size: .81rem;
  font-weight: 600;
}

.meta-line span + span {
  border-inline-start: 1px solid #526474;
  padding-inline-start: .75rem;
}

.action-group { margin-top: 1.05rem; }

.actions {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: .55rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .44rem;
  min-width: 0;
  min-height: 50px;
  padding: .7rem 1.02rem;
  border: 1px solid transparent;
  border-radius: 11px;
  font: 700 .92rem/1.22 var(--body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button.primary { background: var(--accent); color: var(--accent-ink); }
.button.primary:hover { background: var(--accent-hover); }

.button.partner {
  border-color: var(--contest-edge);
  background: var(--contest);
  color: var(--contest-ink);
}

.button.partner:not(:disabled):hover { background: var(--contest-hover); border-color: #aaa0d5; }

.button.partner:disabled {
  border-color: var(--line);
  background: var(--raised);
  color: var(--muted);
  cursor: default;
}

.download-icon {
  position: relative;
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  border-bottom: 1.7px solid currentColor;
  border-radius: 0 0 2px 2px;
}

.download-icon::before, .download-icon::after {
  position: absolute;
  left: 50%;
  content: "";
}

.download-icon::before {
  top: 0;
  width: 1.7px;
  height: 11px;
  background: currentColor;
  transform: translateX(-50%);
}

.download-icon::after {
  top: 6px;
  width: 7px;
  height: 7px;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: translateX(-50%) rotate(45deg);
}

.disclosure {
  display: block;
  margin-top: .42rem;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.44;
}

.hero-card {
  overflow: hidden;
  border: 1px solid #42556a;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 18px 45px #070b124d;
}

.photo {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  aspect-ratio: 1.9;
  padding-inline: clamp(1rem, 4vw, 2.4rem);
  background: #152635;
}

.hero-backdrop {
  position: absolute;
  inset: 0 0 0 auto;
  width: 82%;
  height: 100%;
  object-fit: cover;
  object-position: center 51%;
  filter: brightness(.83) saturate(.82);
}

.photo::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(90deg, #152635 7%, #152635 18%, #15263580 46%, transparent 79%),
              linear-gradient(0deg, #0f17264d, transparent 58%);
  content: "";
}

.app-mark {
  position: relative;
  z-index: 1;
  width: clamp(95px, 12vw, 156px);
  height: auto;
  border-radius: 22%;
  box-shadow: 0 12px 32px #070b14a6;
}

.hero-card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  min-height: 70px;
  padding: .5rem 1.15rem;
  border-top: 1px solid #42556a;
}

.file-meta {
  display: grid;
  gap: .12rem;
  line-height: 1.24;
  min-width: 0;
  overflow-wrap: anywhere;
}

.file-meta strong { font-size: 1.12rem; }
.file-meta small { color: var(--muted); font-size: .83rem; }

.file-link {
  display: inline-flex;
  align-items: center;
  gap: .36rem;
  min-height: 44px;
  color: var(--link);
  font-size: .86rem;
  font-weight: 650;
  text-decoration: none;
}

.file-link:hover { text-decoration: underline; }

.chapter-bar { display: none; }

.reading {
  display: grid;
  grid-template-columns: minmax(11rem, .62fr) minmax(0, 2fr);
  align-items: start;
  gap: clamp(36px, 6vw, 94px);
  padding-block: clamp(2rem, 5vw, 3.8rem) 4rem;
}

.side-nav > div { position: sticky; top: 24px; max-width: 230px; }
.side-nav { height: 100%; }
.side-nav nav { margin-top: .55rem; }

.side-nav a, .chapters a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
}

.side-nav nav a { border-bottom: 1px solid var(--line); }
.side-nav a:hover, .chapters a:hover { color: var(--ink); text-decoration: underline; }

.kicker, .side-note {
  color: var(--mint);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .065em;
  line-height: 1.45;
  text-transform: uppercase;
}

.side-note { margin-top: 1.4rem; }
.story { min-width: 0; max-width: 70ch; }

.guide-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}

.guide-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }

.story h2, .guide-content h2 {
  margin: 0 0 .46em;
  font-size: clamp(1.6rem, 2.7vw, 2.25rem);
  letter-spacing: -.024em;
}

.story h3, .guide-content h3 { font-size: 1.17rem; }
.story .kicker { margin-bottom: .45rem; }
.story p + p, .guide-content p + p { margin-top: .8rem; }
.story p:not(.kicker), .guide-content p, .guide-section li { color: var(--body-ink); }

.specs {
  margin: 1.24rem 0;
  padding: 0 1.05rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.specs div {
  display: grid;
  grid-template-columns: minmax(6.5rem, .65fr) minmax(0, 1.5fr);
  gap: .65rem;
  padding-block: .65rem;
}

.specs div + div { border-top: 1px solid var(--line); }
.specs dt { color: var(--muted); font-size: .9rem; }
.specs dd { min-width: 0; font-weight: 650; }
.specs small { color: var(--muted); font-weight: 400; }

.steps, .decision-list { padding-inline-start: 1.35rem; }
.steps { margin: 1.2rem 0; }
.steps > li, .decision-list > li { padding-inline-start: .28rem; margin-bottom: .9rem; }
.steps > li::marker { color: var(--mint); font-weight: 700; }
.steps h3 { margin-bottom: .26rem; color: var(--ink); }

.file-proof {
  padding-inline: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.file-proof summary { min-height: 48px; padding-block: .62rem; font-weight: 650; cursor: pointer; }
.file-proof summary::marker { color: var(--mint); }
.file-proof[open] { padding-bottom: 1rem; }
.file-proof code { display: block; margin: .65rem 0; padding: .62rem; border-radius: 8px; background: var(--page); }

.story .action-group {
  padding: .9rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.decision {
  margin-top: 1.18rem;
  padding-inline-start: .95rem;
  border-inline-start: 2px solid #769a91;
}

.decision h3 { margin: .85em 0 .32em; }

.subhead {
  padding-block: clamp(1.4rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(110deg, var(--surface), var(--page));
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
  color: var(--muted);
  font-size: .84rem;
}

.crumb a { display: inline-flex; align-items: center; min-height: 44px; }

.subhead h1 {
  max-width: 25ch;
  font-size: clamp(1.98rem, 4.4vw, 3.45rem);
  letter-spacing: -.026em;
  overflow-wrap: break-word;
}

.subhead .lead { margin-top: .73rem; max-width: 63ch; }
.guide-content { max-width: min(770px, calc(100% - 36px)); margin: 2.7rem auto 4rem; }
.guide-content li { margin-bottom: .65rem; }
.guide-content .field { margin: .9rem 0; }
.field label { color: var(--ink); font-weight: 650; }
.field small { display: block; color: var(--muted); }

.field input, .field select {
  width: min(100%, 32rem);
  min-height: 48px;
  padding: .5rem .73rem;
  border: 1px solid #6f8095;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.fact-note:not(:empty) {
  margin: 1rem 0;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--mint);
  border-radius: 9px;
  background: var(--surface);
}

.site-map { padding-inline-start: 1.25rem; }
.site-map a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; }

.foot { background: #101923; border-top: 1px solid var(--line); }

.footer-row {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .55rem 1.25rem;
  padding-block: 1.45rem;
}

.footer-links { flex-wrap: wrap; gap: .12rem 1.05rem; }
.photo-credit { padding-bottom: 1.2rem; color: var(--muted); font-size: .82rem; line-height: 1.55; }

.dock {
  padding: 7px max(8px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
}

.dock-dynamic { scroll-padding-bottom: calc(var(--dock-space) + .55rem); }
.dock-dynamic body { padding-bottom: var(--dock-space); }

.dock-dynamic .dock {
  position: fixed;
  z-index: 10;
  inset: auto 0 0;
  pointer-events: none;
}

.dock-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100%, 710px);
  margin-inline: auto;
  padding: 8px 12px 8px 17px;
  border: 1px solid #4b5d73;
  border-radius: 17px;
  background: #172231f5;
  box-shadow: 0 7px 28px #05090e80;
  backdrop-filter: blur(12px);
  pointer-events: auto;
}

.dock-title { font-size: 1.05rem; font-weight: 700; }
.dock .action-group { margin: 0; }
.dock .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.dock .button { min-height: 44px; padding: .48rem .68rem; }
.dock .disclosure { margin-top: .24rem; text-align: center; }

@media (max-width: 900px) {
  .reading { display: block; }
  .side-nav { display: none; }
  .story { margin-inline: auto; }
  .chapter-bar { display: block; background: var(--surface); border-bottom: 1px solid var(--line); }
  .chapters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 .95rem;
    padding-block: 3px;
  }
  .chapters a { justify-content: space-between; gap: .4rem; line-height: 1.22; }
  .chapters a span { color: var(--mint); }
}

@media (max-width: 760px) {
  .mast-row { min-height: 64px; column-gap: .6rem; }
  .brand { font-size: 1.13rem; gap: .47rem; }
  .brand img { width: 36px; height: 36px; border-radius: 9px; }
  .mast-links .header-middle { display: none; }
  .mast-links .nav-tool { padding-inline: .65rem; font-size: .83rem; }

  .hero { grid-template-columns: 1fr; gap: 22px; padding-block: 1.6rem 1.4rem; }
  .hero h1 { font-size: clamp(2.08rem, 11.6vw, 3.64rem); }
  .hero .lead { max-width: 44ch; }
  .meta-line { margin-top: .72rem; }
  .hero .action-group { margin-top: .9rem; }
  .hero-card { max-width: 570px; width: 100%; border-radius: 19px; }
  .photo { aspect-ratio: 2.5; padding-inline: .95rem; }
  .app-mark { width: clamp(88px, 24vw, 133px); }
  .hero-card figcaption { min-height: 61px; padding: .36rem .86rem; }
  .file-meta strong { font-size: 1.02rem; }

  .guide-content { margin-top: 1.85rem; }
  .guide-section { margin-bottom: 1.85rem; padding-bottom: 1.85rem; }
  .footer-row { align-items: flex-start; }
  .foot .brand { width: 100%; }
  .dock-title { display: none; }
  .dock .action-group { width: 100%; }
  .dock-inner { max-width: 600px; padding: 7px; border-radius: 14px; }
  .dock .button { padding-inline: .3rem; border-radius: 9px; font-size: .88rem; }
}

@media (max-width: 580px) {
  .chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-block: 4px; }
  .hero .actions, .story .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .hero .button, .story .button { padding-inline: .35rem; font-size: .9rem; }
  .specs div:first-child { grid-template-columns: minmax(0, 1fr); gap: .05rem; }
}

@media (max-width: 360px) {
  .brand { font-size: 1.04rem; }
  .brand img { width: 33px; height: 33px; }
  .mast-links .nav-tool { padding-inline: .48rem; font-size: .79rem; }
  .mast-links .nav-tool span { display: none; }
  .meta-line { gap: .15rem .46rem; }
  .meta-line span + span { padding-inline-start: .46rem; }
  .actions .download-icon { display: none; }
}

@media (min-width: 550px) and (max-height: 480px) and (orientation: landscape) {
  .mast-row { min-height: 54px; }
  .mast .brand img { width: 32px; height: 32px; }
  .hero { grid-template-columns: minmax(0, 1.34fr) minmax(0, 1fr); gap: 16px; padding-block: 12px; }
  .hero-copy { display: flex; flex-direction: column; }
  .hero h1 { font-size: clamp(1.85rem, 5.5vw, 2.72rem); margin-bottom: .13em; }
  .hero .lead { font-size: 1rem; line-height: 1.35; }
  .hero .meta-line { margin-top: .5rem; order: 1; }
  .hero .action-group { margin-top: .56rem; }
  .hero .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .hero .button { min-height: 44px; padding: .42rem .47rem; font-size: .89rem; }
  .hero-card { align-self: start; margin-top: .85rem; }
  .hero-card figcaption { min-height: 56px; padding: .28rem .59rem; }
  .file-meta small, .file-link { font-size: .78rem; }
  .photo { aspect-ratio: 1.95; padding-inline: .85rem; }
  .app-mark { width: clamp(75px, 14vw, 112px); }
}

@media (prefers-reduced-motion: no-preference) {
  .button { transition: background-color .16s ease, border-color .16s ease; }
}
