:root {
  color-scheme: dark;
  --ink: #e8f3ff;
  --muted: #a9bfd8;
  --paper: #09182b;
  --panel: #10243c;
  --panel-raised: #142b46;
  --line: #294563;
  --blue: #78b9f5;
  --blue-bright: #a8d5ff;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  font-family: var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

html { min-width: 320px; scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 82% 13%, rgba(47, 105, 157, .23), transparent 31rem),
    radial-gradient(ellipse at 12% 58%, rgba(68, 50, 106, .16), transparent 28rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  transition: background-color .2s ease, color .2s ease;
}

body.theme-sky {
  color-scheme: light;
  --ink: #192e45;
  --muted: #5d7187;
  --paper: #eaf4ff;
  --panel: #fff;
  --panel-raised: #f4f9ff;
  --line: #ccdeef;
  --blue: #397db7;
  --blue-bright: #255f94;
  background:
    radial-gradient(ellipse at 82% 13%, rgba(144, 198, 243, .35), transparent 31rem),
    radial-gradient(ellipse at 12% 58%, rgba(202, 188, 238, .28), transparent 28rem),
    var(--paper);
}

button, a { font: inherit; }
a { color: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid #ffca8c; outline-offset: 4px; }

.download-header {
  width: min(1160px, calc(100% - 48px));
  min-height: 80px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.download-brand {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.045em;
  text-decoration: none;
  white-space: nowrap;
}

.download-brand > span:first-child { color: var(--blue); font-size: 22px; }
.brand-dot { color: var(--blue); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.back-link { color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; }
.back-link:hover, .text-action:hover { color: var(--blue-bright); }

.theme-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
}

.download-main { width: min(1080px, calc(100% - 48px)); margin: 0 auto; }

.download-hero {
  min-height: 390px;
  padding: 62px 0 52px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(250px, .82fr);
  align-items: center;
  gap: 48px;
}

.hero-copy { max-width: 650px; }
.eyebrow { margin: 0 0 15px; color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .18em; }
.hero-copy > .eyebrow { letter-spacing: .09em; font-size: 12px; }
.hero-copy > .eyebrow span { margin-right: 7px; }

h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { margin-top: 0; }

h1 {
  max-width: 660px;
  margin-bottom: 19px;
  font-family: var(--serif);
  font-size: clamp(40px, 5.5vw, 64px);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1.08;
}

h1 > span { display: inline-block; font-family: var(--sans); font-size: .68em; vertical-align: .08em; }
.hero-subtitle { max-width: 535px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.75; }
.hero-note { margin-top: 26px; color: var(--muted); font-size: 13px; }
.hero-note span { margin-right: 7px; color: var(--blue); font-size: 16px; }

.icon-stage {
  min-height: 280px;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.icon-stage::before {
  width: min(260px, 76%);
  aspect-ratio: 1;
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 162, 222, .23), rgba(91, 162, 222, 0) 70%);
  content: "";
}

.app-icon {
  display: block;
  width: clamp(172px, 22vw, 224px);
  height: auto;
  border: 1px solid rgba(196, 224, 249, .25);
  border-radius: 28%;
  box-shadow: 0 26px 68px rgba(0, 0, 0, .35), 0 0 0 10px rgba(168, 213, 255, .045);
}

.icon-sparkle { position: absolute; color: var(--blue-bright); }
.sparkle-one { top: 26px; right: 22%; font-size: 27px; }
.sparkle-two { bottom: 30px; left: 17%; font-size: 30px; }
.icon-caption { position: absolute; right: 0; bottom: 4px; left: 0; color: var(--muted); font-size: 11px; letter-spacing: .04em; text-align: center; }

.about-ani {
  margin: 0 0 10px;
  padding: 22px 25px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, var(--panel-raised), var(--panel) 60%);
}

.about-ani h2 {
  margin: 0 0 12px;
  color: var(--blue-bright);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.about-ani-copy {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: stretch;
  gap: 12px 26px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.about-ani-copy p { margin: 0 0 10px; }
.about-ani-copy p:last-child { margin-bottom: 0; }
.about-ani-copy strong { color: var(--ink); }
.about-ani-copy em { color: var(--blue-bright); }
.about-ani-greeting { margin-bottom: 8px !important; font-family: var(--serif); font-size: 17px; }
.about-ani-type {
  padding: 17px 19px;
  align-self: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(120, 185, 245, .07);
}

.about-ani-type .about-ani-label { margin-bottom: 5px; color: var(--blue-bright); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.about-ani-type .about-ani-label strong { color: inherit; }
.about-ani-closer { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid var(--line); color: var(--blue-bright); }

.platform-section { padding: 32px 0 54px; }
.section-heading { margin-bottom: 26px; text-align: center; }
.section-heading .eyebrow { margin-bottom: 10px; }
.section-heading h2, .instructions-copy h2 { margin-bottom: 9px; font-family: var(--serif); font-size: clamp(28px, 4vw, 38px); font-weight: 600; letter-spacing: -.025em; }
.section-heading > p:last-child { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }

.platform-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.platform-card {
  min-width: 0;
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, var(--panel-raised), var(--panel) 60%);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .12);
}

.platform-card.is-recommended { border-color: rgba(120, 185, 245, .8); box-shadow: 0 0 0 1px rgba(120, 185, 245, .2), 0 20px 50px rgba(15, 65, 108, .2); }
.platform-card-top { width: 100%; min-height: 42px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.platform-symbol { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; background: rgba(120, 185, 245, .13); color: var(--blue-bright); font-size: 21px; }
.ios-symbol { font-size: 25px; }
.recommendation { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--blue-bright); font-size: 10px; font-weight: 700; }
.platform-label { margin: 21px 0 7px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .16em; }
.platform-card h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 25px; font-weight: 600; letter-spacing: -.02em; }
.card-description { min-height: 48px; margin: 0 0 15px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.availability { margin: 0 0 18px; color: var(--blue-bright); font-size: 13px; font-weight: 700; }

.download-button {
  min-height: 48px;
  width: 100%;
  padding: 13px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}

.download-button:hover { transform: translateY(-1px); }
.primary-button { background: linear-gradient(105deg, #73b8f4, #a8d5ff); color: #10243c; }
.primary-button:hover { background: #c0e1ff; }
.secondary-button { border-color: var(--line); background: transparent; color: var(--ink); }
.secondary-button:hover { border-color: var(--blue); background: rgba(120, 185, 245, .08); }
.download-button[hidden] { display: none; }
.card-footnote { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.text-action { margin-top: 16px; color: var(--blue-bright); font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.page-signoff { margin: 0 0 44px; color: var(--muted); font-family: var(--serif); font-size: 16px; text-align: center; }

.download-footer {
  min-height: 76px;
  padding: 18px max(24px, calc((100vw - 1080px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.download-footer .footer-brand { color: var(--ink); font-weight: 700; }

@media (max-width: 720px) {
  .download-header { width: min(100% - 36px, 560px); min-height: 68px; }
  .download-main { width: min(100% - 36px, 560px); }
  .download-hero { min-height: auto; padding: 48px 0 35px; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hero-copy { text-align: center; }
  .hero-subtitle { margin: 0 auto; font-size: 15px; }
  .hero-note { margin-top: 18px; }
  .icon-stage { min-height: 240px; }
  .app-icon { width: clamp(156px, 42vw, 196px); }
  .sparkle-one { top: 12px; right: 25%; }
  .sparkle-two { bottom: 29px; left: 22%; }
  .about-ani { padding: 20px; }
  .about-ani-copy { grid-template-columns: minmax(0, 1fr); gap: 12px; font-size: 14px; }
  .about-ani-type { padding: 15px 16px; }
  .about-ani-closer { grid-column: auto; }
  .platform-section { padding: 22px 0 39px; }
  .platform-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .platform-card { padding: 22px; }
  .card-description { min-height: 0; }
  .download-footer { padding: 20px 18px; flex-wrap: wrap; justify-content: center; text-align: center; }
}

@media (max-width: 420px) {
  .download-header { width: calc(100% - 28px); gap: 10px; }
  .download-main { width: calc(100% - 28px); }
  .download-brand { font-size: 15px; }
  .header-actions { gap: 9px; }
  .back-link { max-width: 116px; font-size: 11px; text-align: right; }
  h1 { font-size: clamp(36px, 10vw, 43px); }
  .section-heading h2 { font-size: 29px; }
  .recommendation { padding: 6px 8px; font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
