/* Buddy site. One living pixel world behind every page, with clear glass on top, the same as the app. */

:root {
  /* Spacing scale */
  --s-25: 2px;
  --s-50: 4px;
  --s-75: 8px;
  --s-100: 12px;
  --s-200: 16px;
  --s-300: 24px;
  --s-400: 32px;
  --s-500: 40px;
  --s-600: 48px;
  --s-700: 64px;
  --s-800: 80px;
  --s-900: 96px;

  /* Radius scale */
  --r-lg: 8px;
  --r-xl: 12px;
  --r-2xl: 16px;
  --r-3xl: 24px;
  --r-full: 9999px;

  /* App colors (Theme.swift) */
  --ink: #14202e;
  --pond: #1e8573;
  --glow: #ffd36b;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --px: 4px; /* one world pixel */

  /* Light look: day and dawn skies */
  --text: #14202e;
  --text-soft: rgba(20, 32, 46, 0.8);
  --text-faint: rgba(20, 32, 46, 0.62);
  --accent: #14614f;
  --star: #7a5200;
  --glass-tint: rgba(20, 32, 46, 0.16);
  --glass-rim: rgba(255, 255, 255, 0.5);
  --glass-edge: rgba(255, 255, 255, 0.24);
  --glass-shadow: rgba(20, 32, 46, 0.14);
  --sheet: rgba(246, 250, 248, 0.8);
  --row: rgba(20, 32, 46, 0.08);
  --meter-off: rgba(20, 32, 46, 0.2);
  --legible: 0 0 1.5px rgba(255, 255, 255, 0.35);
  --focus: #14202e;

  color-scheme: light;
}

/* Dark look: evening and night skies, the same switch the app makes after 5 p.m. */
:root[data-ui="dark"] {
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.86);
  --text-faint: rgba(255, 255, 255, 0.68);
  --accent: #6fdcc6;
  --star: #ffd36b;
  --glass-tint: rgba(10, 18, 40, 0.34);
  --glass-rim: rgba(255, 255, 255, 0.34);
  --glass-edge: rgba(255, 255, 255, 0.16);
  --glass-shadow: rgba(0, 0, 0, 0.28);
  --sheet: rgba(15, 28, 42, 0.8);
  --row: rgba(255, 255, 255, 0.1);
  --meter-off: rgba(255, 255, 255, 0.22);
  --legible: 0 1px 1.5px rgba(0, 0, 0, 0.3);
  --focus: #ffffff;
  color-scheme: dark;
}

:root[data-sky="dusk"] {
  /* White text crosses orange and gold bands at golden hour, so its shadow works harder. */
  --legible: 0 1px 2px rgba(48, 18, 56, 0.65), 0 0 10px rgba(48, 18, 56, 0.4);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--s-900);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: var(--text);
  background: #5ac0f5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

.pixel {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

p,
li,
dd {
  text-wrap: pretty;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r-lg);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

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

/* ---------- Text styles ---------- */

.heading-1 {
  font-size: 36px;
  line-height: 40px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.heading-2 {
  font-size: 30px;
  line-height: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.heading-3 {
  font-size: 30px;
  line-height: 36px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.heading-5 {
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.heading-6 {
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
}
.title-2 {
  font-size: 18px;
  line-height: 28px;
  font-weight: 500;
}
.title-3 {
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}
.title-4 {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}
.body-1 {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}
.body-2 {
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}
.body-3 {
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
}
.body-4 {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}
.body-6 {
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
}
.button-md {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}
.button-sm {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}
.caption-1 {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}
.caption-3 {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.caption-4 {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
}

@media (min-width: 768px) {
  .heading-1 {
    font-size: 60px;
    line-height: 60px;
  }
  .heading-2 {
    font-size: 48px;
    line-height: 48px;
  }
  .heading-3 {
    font-size: 36px;
    line-height: 40px;
  }
}

.soft {
  color: var(--text-soft);
}
.faint {
  color: var(--text-faint);
}

/* ---------- The world ---------- */

.world {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  /* Flat bands, shown until the canvas paints and when scripts are off. */
  background: linear-gradient(#2e9bf0 0 19%, #5ac0f5 0 37%, #a9e4f2 0 56%, #58c25c 0);
}

.world canvas {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
}

.buddy-spot {
  position: fixed;
  z-index: 1;
  left: 50%;
  top: 82vh;
  top: 82lvh;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-100);
  pointer-events: none;
  --scale: 3;
}

@media (min-width: 768px) {
  .buddy-spot {
    top: max(80vh, 568px);
    top: max(80lvh, 568px);
    --scale: 4;
  }
  /* Beside the buddy on wide screens, so it never sits on the hero text. */
  .buddy-spot .bubble {
    position: absolute;
    left: calc(100% + var(--s-100));
    bottom: 62%;
    width: max-content;
  }
}

.buddy {
  pointer-events: auto;
  appearance: none;
  border: 0;
  background: none;
  padding: var(--s-75);
  margin: calc(var(--s-75) * -1);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.buddy img {
  width: calc(var(--w, 40) * var(--scale) * 1px);
  height: auto;
  transform-origin: 50% 100%;
  animation: breathe 10s var(--ease) infinite;
}

.buddy.hop img {
  animation: hop 600ms var(--ease);
}

/* Four seconds in, six seconds out: the buddy breathes the way it asks you to. */
@keyframes breathe {
  0%,
  100% {
    transform: scale(1, 1);
  }
  40% {
    transform: scale(1.03, 1.07);
  }
}

@keyframes hop {
  0%,
  100% {
    transform: translateY(0) scale(1, 1);
  }
  20% {
    transform: translateY(0) scale(1.08, 0.9);
  }
  55% {
    transform: translateY(-28px) scale(0.96, 1.06);
  }
}

.bubble {
  max-width: 282px;
  padding: var(--s-75) var(--s-200);
  border-radius: 18px;
  text-align: center;
  text-shadow: var(--legible);
  min-height: 36px;
}

.bubble .unseen {
  color: transparent;
  text-shadow: none;
}

.burst {
  position: fixed;
  z-index: 60;
  width: 6px;
  height: 6px;
  pointer-events: none;
  animation: burst 700ms var(--ease) forwards;
}

@keyframes burst {
  from {
    transform: translate(0, 0);
    opacity: 1;
  }
  to {
    transform: translate(var(--dx), var(--dy));
    opacity: 0;
  }
}

/* ---------- Liquid glass ---------- */

/* Clear glass: the world shows through, bent a little and brighter, with a whisper of ink. */
.glass {
  position: relative;
  background: var(--glass-tint);
  -webkit-backdrop-filter: blur(12px) saturate(1.4) brightness(1.05);
  backdrop-filter: blur(12px) saturate(1.4) brightness(1.05);
  box-shadow:
    inset 0 1px 0 0 var(--glass-rim),
    inset 0 0 0 1px var(--glass-edge),
    inset 0 -6px 12px -8px var(--glass-rim),
    0 8px 24px -8px var(--glass-shadow);
}

/* Glass that carries reading text frosts more, so the world never fights the words. */
.card,
.panel,
.faq details,
.footer .bar {
  --lens-blur: 12px;
}

/* The tint for whatever is picked: pond teal, with white text. */
.glass.chosen,
.glass[aria-current="page"],
.glass[aria-pressed="true"] {
  background: rgba(30, 133, 115, 0.72);
  color: #fff;
  text-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.3);
}

/* Frosted glass for plain sheets that carry a lot of reading. */
.sheet {
  position: relative;
  background: var(--sheet);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  backdrop-filter: blur(28px) saturate(1.6);
  box-shadow:
    inset 0 1px 0 0 var(--glass-rim),
    inset 0 0 0 1px var(--glass-edge),
    0 16px 48px -16px var(--glass-shadow);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: rgba(120, 150, 170, 0.6);
  }
  .sheet {
    background: var(--sheet);
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-75);
  min-height: 56px;
  padding: var(--s-75) var(--s-300);
  border: 0;
  border-radius: var(--r-full);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  text-decoration: none;
  text-shadow: var(--legible);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    transform 500ms var(--ease),
    opacity 300ms var(--ease);
}

.btn.small {
  min-height: 44px;
  padding: var(--s-75) var(--s-200);
  font-size: 14px;
  line-height: 20px;
}

.btn:hover {
  transform: scale(1.03);
}
.btn:active {
  transform: scale(0.97);
}

.btn[aria-disabled="true"] {
  cursor: default;
}
.btn[aria-disabled="true"]:hover,
.btn[aria-disabled="true"]:active {
  transform: none;
}

.btn .apple {
  width: 18px;
  height: 18px;
  flex: none;
  fill: currentColor;
}

/* ---------- Navigation ---------- */

.skip {
  position: fixed;
  z-index: 100;
  left: var(--s-200);
  top: var(--s-200);
  padding: var(--s-100) var(--s-200);
  border-radius: var(--r-full);
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 500ms var(--ease);
}
.skip:focus {
  transform: translateY(0);
}

.nav {
  position: fixed;
  z-index: 50;
  top: max(var(--s-200), env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--s-50);
  padding: var(--s-50);
  border-radius: var(--r-full);
  max-width: calc(100vw - var(--s-400));
  /* Page text scrolls under the bar, so it frosts more than the rest. */
  --lens-blur: 14px;
  -webkit-backdrop-filter: blur(14px) saturate(1.4) brightness(1.05);
  backdrop-filter: blur(14px) saturate(1.4) brightness(1.05);
}

.nav a,
.nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-75);
  min-height: 44px;
  min-width: 44px;
  padding: 0 var(--s-200);
  border: 0;
  border-radius: var(--r-full);
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  text-decoration: none;
  text-shadow: var(--legible);
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    background-color 300ms var(--ease),
    transform 500ms var(--ease);
}

.nav a:hover,
.nav button:hover {
  background: var(--row);
}
.nav a:active,
.nav button:active {
  transform: scale(0.96);
}

.nav a[aria-current="page"] {
  background: rgba(30, 133, 115, 0.72);
  color: #fff;
  text-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.3);
}

.nav .brand {
  padding-left: var(--s-75);
  font-size: 16px;
  line-height: 24px;
}
.nav .brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.nav .links {
  display: none;
  align-items: center;
  gap: var(--s-50);
}

.nav .icon-btn {
  padding: 0;
}
.nav .icon-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  shape-rendering: crispEdges;
}

/* The menu button: two lines that fold into a cross. */
.menu-toggle span {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 500ms var(--ease);
}
.menu-toggle span::before {
  top: 1px;
}
.menu-toggle span::after {
  bottom: 1px;
}
.menu-open .menu-toggle span::before {
  transform: translateY(4px) rotate(45deg);
}
.menu-open .menu-toggle span::after {
  transform: translateY(-4px) rotate(-45deg);
}

.menu {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s-75);
  padding: var(--s-900) var(--s-300) max(var(--s-400), env(safe-area-inset-bottom));
  background: var(--sheet);
  -webkit-backdrop-filter: blur(32px) saturate(1.6);
  backdrop-filter: blur(32px) saturate(1.6);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 300ms var(--ease),
    visibility 0s 300ms;
}
.menu-open .menu {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 300ms var(--ease),
    visibility 0s;
}
.menu a {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 var(--s-200);
  border-radius: var(--r-2xl);
  font-size: 30px;
  line-height: 36px;
  font-weight: 600;
  text-decoration: none;
  opacity: 0;
  transform: translateY(var(--s-300));
  transition:
    opacity 500ms var(--ease),
    transform 500ms var(--ease);
}
.menu a[aria-current="page"] {
  color: var(--accent);
}
.menu-open .menu a {
  opacity: 1;
  transform: none;
}
.menu-open .menu a:nth-child(2) {
  transition-delay: 60ms;
}
.menu-open .menu a:nth-child(3) {
  transition-delay: 120ms;
}
.menu-open .menu a:nth-child(4) {
  transition-delay: 180ms;
}
.menu-open {
  overflow: hidden;
}

@media (min-width: 768px) {
  .nav .links {
    display: flex;
  }
  .menu-toggle,
  .menu {
    display: none !important;
  }
}

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

main,
.footer {
  position: relative;
  z-index: 2;
}

/* Only real content catches taps, so the buddy stays pettable between cards. */
main {
  pointer-events: none;
}
main > * > *,
main .wrap > * {
  pointer-events: auto;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(var(--s-200), env(safe-area-inset-left));
  padding-right: max(var(--s-200), env(safe-area-inset-right));
}

.section {
  padding: var(--s-700) 0;
}

@media (min-width: 768px) {
  .section {
    padding: var(--s-900) 0;
  }
}

.panel {
  border-radius: var(--r-3xl);
  padding: var(--s-300);
}

@media (min-width: 768px) {
  .panel {
    padding: var(--s-500);
  }
}

.section-head {
  max-width: 680px;
  margin-bottom: var(--s-400);
}
.section-head p {
  margin-top: var(--s-100);
}
.eyebrow {
  display: block;
  margin-bottom: var(--s-75);
  color: var(--text-soft);
}

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(var(--s-900) + var(--s-200));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero h1,
.hero .sub {
  max-width: 680px;
  text-shadow: var(--legible);
}

.hero .sub {
  margin-top: var(--s-200);
  color: var(--text-soft);
}

.hero .cta {
  margin-top: var(--s-300);
}

.hero .proof {
  margin-top: var(--s-200);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-75);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-75);
  min-height: 32px;
  padding: var(--s-50) var(--s-100);
  border-radius: var(--r-full);
  text-shadow: var(--legible);
}

.pill.plus {
  color: var(--star);
}

/* ---------- Pixel meter ---------- */

.meter {
  display: flex;
  gap: 2px;
  height: 8px;
}
.meter i {
  flex: 1;
  background: var(--meter-off);
}
.meter i.on {
  background: var(--glow);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55);
}

/* ---------- Screens ---------- */

.screens {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(72vw, 280px);
  gap: var(--s-200);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: var(--s-200);
  margin: 0 calc(var(--s-200) * -1);
  scrollbar-width: none;
}
.screens::-webkit-scrollbar {
  display: none;
}
.screens figure {
  scroll-snap-align: center;
}
.phone {
  padding: var(--s-75);
  border-radius: 44px;
}
.phone img {
  width: 100%;
  height: auto;
  aspect-ratio: 506 / 1100;
  border-radius: 36px;
  background: var(--row);
}
.screens figcaption {
  margin-top: var(--s-100);
  text-align: center;
  text-shadow: var(--legible);
}

@media (min-width: 900px) {
  .screens {
    grid-auto-columns: 280px;
    justify-content: center;
    gap: var(--s-400);
    overflow: visible;
  }
  .screens figure:nth-child(2) {
    transform: translateY(var(--s-400));
  }
}

/* ---------- Tagline reveal ---------- */

.tagline {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.tagline [data-words] {
  display: block;
}
.tagline .word {
  opacity: 0.3;
  transition: opacity 600ms var(--ease);
}
.tagline .word.lit {
  opacity: 1;
}

/* ---------- Cards ---------- */

.grid {
  display: grid;
  gap: var(--s-200);
}

@media (min-width: 768px) {
  .grid.two {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid.three {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid.six {
    grid-template-columns: repeat(6, 1fr);
  }
  .grid.six > * {
    grid-column: span 2;
  }
  .grid.six > .wide {
    grid-column: span 3;
  }
}

.card {
  border-radius: var(--r-3xl);
  padding: var(--s-300);
  display: flex;
  flex-direction: column;
  gap: var(--s-75);
  text-shadow: var(--legible);
}

.card .icon {
  height: 64px;
  display: flex;
  align-items: flex-end;
  margin-bottom: var(--s-100);
}
.card .icon img {
  height: 56px;
  width: auto;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  background: var(--glow);
  color: var(--ink);
  text-shadow: none;
}

.card .meter {
  margin-top: auto;
  padding-top: 0;
}
.card .meter-wrap {
  margin-top: auto;
  padding-top: var(--s-200);
}

/* ---------- Eggs ---------- */

.eggs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: var(--s-75);
}
.egg {
  appearance: none;
  border: 0;
  background: none;
  height: 88px;
  border-radius: var(--r-2xl);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--s-75);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    background-color 300ms var(--ease),
    transform 500ms var(--ease);
}
.egg:hover {
  background: var(--row);
  transform: translateY(-4px);
}
.egg:active {
  transform: scale(0.94);
}
.egg img {
  transform-origin: 50% 100%;
}
.egg.wobble img {
  animation: wobble 500ms var(--ease);
}
.egg.out img {
  animation: pop 500ms var(--ease);
}
@keyframes wobble {
  0%,
  100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-9deg);
  }
  50% {
    transform: rotate(8deg);
  }
  75% {
    transform: rotate(-5deg);
  }
}
@keyframes pop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.eggs-foot {
  margin-top: var(--s-300);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-200);
  text-shadow: var(--legible);
}
.eggs-foot .meter {
  flex: 1 1 160px;
  max-width: 320px;
}

/* ---------- Facts ---------- */

.facts {
  display: grid;
  gap: var(--s-200);
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
}
.facts .num {
  font-size: 48px;
  line-height: 48px;
  font-weight: 600;
  color: var(--star);
  text-shadow: var(--legible);
}
@media (min-width: 768px) {
  .facts .num {
    font-size: 72px;
    line-height: 72px;
  }
}

/* ---------- Plans ---------- */

.checks {
  display: grid;
  gap: var(--s-75);
  margin-top: var(--s-100);
}
.checks li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: var(--s-100);
  align-items: start;
}
.checks li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 8px;
  background: var(--glow);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55);
}

.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s-75);
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  gap: var(--s-75);
  max-width: 760px;
}
.faq details {
  border-radius: var(--r-3xl);
  text-shadow: var(--legible);
}
.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-200);
  min-height: 64px;
  padding: var(--s-200) var(--s-300);
  cursor: pointer;
  border-radius: var(--r-3xl);
  -webkit-tap-highlight-color: transparent;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  background:
    linear-gradient(currentColor, currentColor) center / 12px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 12px no-repeat;
  transition: transform 500ms var(--ease);
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq .answer {
  padding: 0 var(--s-300) var(--s-300);
  color: var(--text-soft);
}
.faq .answer a {
  color: var(--text);
}

/* ---------- Final call ---------- */

.final {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-200);
}
.final p {
  max-width: 560px;
}

/* ---------- Footer ---------- */

.footer {
  padding: var(--s-400) 0 max(var(--s-400), env(safe-area-inset-bottom));
}
.footer .bar {
  border-radius: var(--r-3xl);
  padding: var(--s-300);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-200);
  text-shadow: var(--legible);
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-50);
  margin: 0 calc(var(--s-100) * -1);
}
.footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s-100);
  border-radius: var(--r-full);
  text-decoration: none;
  transition: background-color 300ms var(--ease);
}
.footer nav a:hover {
  background: var(--row);
}
.footer nav a[aria-current="page"] {
  color: var(--accent);
}

/* ---------- Reading pages: privacy, terms, support ---------- */

.doc {
  padding-top: calc(var(--s-900) + var(--s-200));
  padding-bottom: var(--s-700);
}

.doc-head {
  max-width: 760px;
  margin: 0 auto var(--s-400);
  text-shadow: var(--legible);
}
.doc-head .meta {
  margin-top: var(--s-200);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-75);
}

.doc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-300);
  max-width: 760px;
  margin: 0 auto;
}

.toc {
  border-radius: var(--r-3xl);
  padding: var(--s-200);
  text-shadow: var(--legible);
}
.toc summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--s-75);
  border-radius: var(--r-xl);
}
.toc summary::-webkit-details-marker {
  display: none;
}
.toc summary::after {
  content: "";
  width: 12px;
  height: 12px;
  background:
    linear-gradient(currentColor, currentColor) center / 12px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 12px no-repeat;
  transition: transform 500ms var(--ease);
}
.toc[open] summary::after {
  transform: rotate(45deg);
}
.toc ol {
  list-style: none;
  margin-top: var(--s-75);
  display: grid;
  gap: var(--s-25);
  counter-reset: toc;
}
.toc a {
  display: flex;
  gap: var(--s-75);
  min-height: 36px;
  align-items: center;
  padding: var(--s-50) var(--s-75);
  border-radius: var(--r-xl);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 300ms var(--ease);
}
.toc a::before {
  counter-increment: toc;
  content: counter(toc);
  flex: none;
  width: 20px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.toc a:hover {
  background: var(--row);
}
.toc a.here {
  background: rgba(30, 133, 115, 0.72);
  color: #fff;
  text-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.3);
}
.toc a.here::before {
  color: rgba(255, 255, 255, 0.8);
}

@media (min-width: 1024px) {
  .doc-head,
  .doc-grid {
    max-width: 1040px;
  }
  .doc-grid {
    grid-template-columns: 256px minmax(0, 1fr);
    align-items: start;
  }
  .toc {
    position: sticky;
    top: var(--s-900);
    max-height: calc(100vh - var(--s-900) - var(--s-300));
    overflow-y: auto;
  }
  .toc summary {
    pointer-events: none;
  }
  .toc summary::after {
    display: none;
  }
}

.paper {
  border-radius: var(--r-3xl);
  padding: var(--s-300);
}
@media (min-width: 768px) {
  .paper {
    padding: var(--s-600);
  }
}

.paper section + section {
  margin-top: var(--s-500);
}
.paper h2 {
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--s-100);
}
.paper h2 .n {
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  margin-right: var(--s-75);
}
.paper h3 {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  margin: var(--s-300) 0 var(--s-75);
}
.paper p,
.paper li {
  color: var(--text-soft);
  max-width: 68ch;
}
.paper p + p,
.paper p + ul,
.paper ul + p,
.paper p + ol,
.paper ol + p,
.paper table + p,
.paper p + .table-scroll,
.paper .table-scroll + p {
  margin-top: var(--s-100);
}
.paper ul,
.paper ol {
  padding-left: var(--s-300);
  display: grid;
  gap: var(--s-75);
}
.paper strong {
  color: var(--text);
  font-weight: 600;
}
.paper a {
  color: var(--accent);
  font-weight: 500;
  text-underline-offset: 3px;
}
.paper .caps {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--text);
}

.callout {
  border-radius: var(--r-2xl);
  padding: var(--s-200);
  background: var(--row);
  box-shadow: inset 0 0 0 1px var(--glass-edge);
}
.callout + p,
p + .callout,
ul + .callout {
  margin-top: var(--s-200);
}
.callout p {
  color: var(--text);
}

.fill {
  padding: 0 var(--s-50);
  border-radius: var(--s-50);
  background: var(--glow);
  color: var(--ink);
  font-weight: 600;
}

.table-scroll {
  overflow-x: auto;
  margin: 0 calc(var(--s-75) * -1);
  padding: 0 var(--s-75);
}
.paper table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 20px;
}
.paper th,
.paper td {
  text-align: left;
  vertical-align: top;
  padding: var(--s-100) var(--s-100) var(--s-100) 0;
  box-shadow: inset 0 -1px 0 var(--row);
  color: var(--text-soft);
}
.paper th {
  color: var(--text);
  font-weight: 600;
}

.summary-cards {
  display: grid;
  gap: var(--s-100);
  margin-bottom: var(--s-500);
}
@media (min-width: 640px) {
  .summary-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}
.summary-cards > div {
  border-radius: var(--r-2xl);
  padding: var(--s-200);
  background: var(--row);
  box-shadow: inset 0 0 0 1px var(--glass-edge);
}
.summary-cards img {
  height: 40px;
  width: auto;
  margin-bottom: var(--s-100);
}
.summary-cards p {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 20px;
}
.summary-cards strong {
  display: block;
  font-size: 16px;
  line-height: 24px;
}

.doc-actions {
  margin-top: var(--s-300);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-100);
  justify-content: space-between;
  align-items: center;
}

/* ---------- Not found ---------- */

.lost {
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(var(--s-900) + var(--s-400));
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-200);
  text-shadow: var(--legible);
}

/* ---------- Scroll reveals ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(var(--s-400));
  transition:
    opacity 700ms var(--ease),
    transform 700ms var(--ease);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .buddy img,
  .buddy.hop img,
  .egg.wobble img {
    animation: none;
  }
  .js .reveal {
    transform: none;
    transition: opacity 600ms var(--ease);
  }
  .tagline [data-words] {
  display: block;
}
.tagline .word {
    opacity: 1;
    transition: none;
  }
  .btn:hover,
  .btn:active,
  .egg:hover,
  .egg:active {
    transform: none;
  }
  .menu a {
    transform: none;
  }
  .burst {
    display: none;
  }
}

/* ---------- Print: legal pages get printed ---------- */

@media print {
  .world,
  .buddy-spot,
  .nav,
  .menu,
  .footer,
  .toc,
  .skip,
  .doc-actions,
  .summary-cards img {
    display: none !important;
  }
  :root,
  :root[data-ui="dark"] {
    --text: #000;
    --text-soft: #111;
    --text-faint: #444;
    --accent: #000;
    --row: #eee;
    --glass-edge: #bbb;
  }
  body {
    background: #fff;
  }
  .doc {
    padding: 0;
  }
  .paper,
  .sheet,
  .glass {
    background: none;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    padding: 0;
  }
  .doc-grid {
    display: block;
    max-width: none;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
  .paper section {
    break-inside: avoid-page;
  }
}

/* ---------- Reading pages: the buddy waits in the margin, clear of the text ---------- */

.reading .buddy-spot {
  display: none;
}
@media (min-width: 1480px) {
  .reading .buddy-spot {
    display: flex;
    left: calc(50% + 640px);
  }
  .reading .buddy-spot .bubble {
    position: static;
    width: auto;
    max-width: 176px;
  }
}
.toc {
  scrollbar-width: thin;
}
