/* Shared by every page in web/. The pages link it as /style.css?v=N: after a change, bump N in all
   of them, because Cloudflare keeps CSS cached for hours. */

:root {
  color-scheme: light dark;
  --brand: #1f4fd8;
  --bg: #ffffff;
  --panel: #f3f5f9;
  --text: #16181d;
  --muted: #5a6170;
  --border: #e1e5ec;
  --link: #1f4fd8;
  --icon-bg: #e8eefc;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 12px 32px rgba(16, 24, 40, 0.14);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318;
    --panel: #1a1d24;
    --text: #e7e9ee;
    --muted: #9aa1ae;
    --border: #2a2e37;
    --link: #8fa8ff;
    --icon-bg: #1f2a4d;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  overflow-wrap: break-word;
}

a {
  color: var(--link);
  text-underline-offset: 2px;
}

/* Side padding only: main and .header-row set their own top and bottom. */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-right: 20px;
  padding-left: 20px;
}

/* The reading column of the support and legal pages. */
.prose {
  max-width: 760px;
}

.site-header {
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  display: block;
  border-radius: 22.5%;
}

.site-nav {
  display: flex;
  gap: 20px;
}

.site-nav a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

main {
  padding-top: 40px;
  padding-bottom: 56px;
}

h1 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h2 {
  margin: 44px 0 10px;
  font-size: 23px;
  line-height: 1.3;
}

h3 {
  margin: 28px 0 6px;
  font-size: 18px;
  line-height: 1.4;
}

p,
ul,
ol {
  margin: 0 0 14px;
}

ul,
ol {
  padding-left: 22px;
}

li > ul {
  margin: 6px 0 0;
}

li {
  margin-bottom: 6px;
}

.updated,
.lede {
  color: var(--muted);
}

.updated {
  margin-bottom: 28px;
  font-size: 15px;
}

.lede {
  font-size: 19px;
}

.panel {
  margin: 28px 0 8px;
  padding: 18px 22px 6px;
  border-left: 4px solid var(--brand);
  border-radius: 0 12px 12px 0;
  background: var(--panel);
}

.panel h2 {
  margin-top: 0;
  font-size: 19px;
}

/* Help page: the list of sections in two columns, and a quieter aside. */

.toc ol {
  columns: 2 220px;
  column-gap: 32px;
}

.toc li {
  break-inside: avoid;
}

/* Room above a heading reached from the list. */
h2[id],
h3[id] {
  scroll-margin-top: 20px;
}

.note {
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--panel);
  font-size: 16px;
}

/* Home page */

main.home {
  padding-top: 0;
}

.hero {
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 56px;
}

.hero h1 {
  margin-bottom: 16px;
  font-size: 46px;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.hero .lede {
  margin-bottom: 24px;
  font-size: 20px;
}

/* The stores' official badges, unaltered (the Google one with its transparent margin trimmed), App
   Store first and both the same height, with a quarter of that height clear between them, as both
   stores' badge guidelines ask. */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store-badges a {
  display: block;
  border-radius: 8px;
}

.store-badges img {
  display: block;
  width: auto;
  height: 48px;
}

.store-note {
  align-self: center;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.hero-art img {
  display: block;
  width: 100%;
  max-width: 440px;
  height: auto;
  margin-left: auto;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.section {
  padding-top: 64px;
}

.section-title {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.section-lede {
  max-width: 640px;
  margin-bottom: 32px;
  color: var(--muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.feature h3 {
  margin: 14px 0 6px;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.feature-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  background: var(--icon-bg);
  color: var(--link);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.design-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.design-grid figure {
  margin: 0;
}

.design-grid img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.design-grid figcaption {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.home .panel {
  margin: 0;
}

.home-end {
  padding-bottom: 64px;
}

.site-footer {
  padding: 24px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 15px;
}

.site-footer p {
  margin: 0 0 6px;
}

@media (max-width: 860px) {
  .hero-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .hero-art img {
    max-width: 400px;
    margin: 0 auto;
  }

  .feature-grid,
  .design-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  .hero-row {
    padding-top: 32px;
    padding-bottom: 40px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .section {
    padding-top: 48px;
  }

  .section-title {
    font-size: 26px;
  }

  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .design-grid {
    gap: 16px;
  }

  .wrap {
    padding-right: 16px;
    padding-left: 16px;
  }

  main {
    padding-top: 28px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    margin-top: 36px;
    font-size: 21px;
  }

  .lede {
    font-size: 17px;
  }
}
