/* Habitual public site. Tones come from the app's asset catalog:
   PaperBackground, PanelBackground and AccentColor, light and dark. */

:root {
  color-scheme: light dark;
  --paper: #cfd4cf;
  --panel: #e6e6df;
  --ink: #131a1a;
  --muted: #424d4c;
  --accent: #2f5557;
  --on-accent: #f1f3ee;
  --rule: rgba(19, 26, 26, 0.16);
  --chip: rgba(47, 85, 87, 0.14);
  --shadow: 0 18px 40px -24px rgba(19, 40, 41, 0.55);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161b1c;
    --panel: #232b2c;
    --ink: #e8ebe7;
    --muted: #aab5b3;
    --accent: #8fb6bc;
    --on-accent: #10191a;
    --rule: rgba(232, 235, 231, 0.16);
    --chip: rgba(143, 182, 188, 0.16);
    --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 9vw, 4.25rem);
}

h2 {
  font-size: clamp(1.6rem, 5vw, 2.25rem);
}

h3 {
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

p {
  margin: 0;
}

.wrap {
  width: min(100% - 2.5rem, 64rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
}

.skip:focus {
  top: 1rem;
}

/* The small capital labels the app puts over its cards. */
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Reading text is set in a serif: the page is about reading. */
.reading {
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.6;
  max-width: var(--measure);
}

/* Header */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
}

.masthead nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.masthead nav a {
  text-decoration: none;
  padding-block: 0.4rem;
}

.masthead nav a:hover,
.masthead nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* Hero */

.hero {
  padding-block: 2.5rem 2rem;
}

.hero h1 {
  margin-top: 0.75rem;
  max-width: 12ch;
}

.hero .reading {
  margin-top: 1.5rem;
}

.status {
  display: inline-block;
  margin-top: 1.75rem;
  padding: 0.5rem 1rem;
  border-radius: 1.25rem;
  background: var(--chip);
  color: var(--accent);
  font-size: 0.9375rem;
  font-weight: 600;
}

.year {
  margin: 2.5rem 0 0;
}

.year img {
  width: 100%;
}

.year figcaption {
  margin-top: 0.9rem;
  font-size: 0.9375rem;
  color: var(--muted);
  max-width: var(--measure);
}

/* Sections that pair words with a screen */

.pair {
  display: grid;
  gap: 2rem;
  padding-block: 3rem;
  border-top: 1px solid var(--rule);
}

.pair h2 {
  margin-top: 0.6rem;
}

.pair .reading {
  margin-top: 1.1rem;
}

.pair .reading + .reading {
  margin-top: 0.9rem;
}

.screen {
  margin: 0;
  justify-self: center;
  width: min(100%, 19rem);
}

.screen img {
  border-radius: 2rem;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}

/* The stops card mirrors the card on the app's Today screen. */
.card {
  background: var(--panel);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 0.5rem;
}

.stops {
  margin-top: 1.75rem;
  max-width: var(--measure);
}

.stops ol {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.stops li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
  border-top: 1px solid var(--rule);
}

.stops li:first-child {
  border-top: 0;
}

.stops strong {
  display: block;
  font-weight: 700;
}

.stops span {
  display: block;
  font-size: 0.9375rem;
  color: var(--muted);
}

.stops em {
  flex: none;
  font-style: normal;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--chip);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

/* The rest of what it does, as a plain list of short entries */

.more {
  padding-block: 3rem;
  border-top: 1px solid var(--rule);
}

.entries {
  display: grid;
  gap: 1.75rem 2.5rem;
  margin-top: 1.75rem;
}

.entries p {
  margin-top: 0.4rem;
  color: var(--muted);
}

/* Privacy */

.private {
  margin-block: 1rem 3.5rem;
  padding: 2rem 1.5rem;
  border-radius: 14px;
  background: var(--accent);
  color: var(--on-accent);
}

.private .eyebrow,
.private a {
  color: inherit;
}

.private .eyebrow {
  opacity: 0.8;
}

.private h2 {
  margin-top: 0.6rem;
}

.private .reading {
  margin-top: 1rem;
}

.private :focus-visible {
  outline-color: var(--on-accent);
}

/* Documents: privacy and support */

.doc {
  padding-block: 2rem 4rem;
}

.doc h1 {
  font-size: clamp(2.1rem, 7vw, 3.25rem);
  margin-top: 0.6rem;
}

.doc .reading {
  margin-top: 1.25rem;
}

.doc h2 {
  font-size: 1.4rem;
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
}

.doc .reading ul {
  margin: 0;
  padding-left: 1.2rem;
}

.doc .reading li + li {
  margin-top: 0.7rem;
}

.doc strong {
  font-family: var(--sans);
  font-size: 0.94em;
  font-weight: 700;
}

.contact {
  margin-top: 1.75rem;
  max-width: var(--measure);
  padding-bottom: 1.25rem;
}

.contact a {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 1.25rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.contact p + p {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.faq {
  max-width: var(--measure);
  margin-top: 1rem;
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  cursor: pointer;
  padding-block: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.faq summary:hover {
  color: var(--accent);
}

.faq details .reading {
  margin-top: 0;
  padding-bottom: 1.25rem;
  font-size: 1.0625rem;
}

.faq details .reading + .reading {
  margin-top: -0.5rem;
}

/* Footer */

.colophon {
  border-top: 1px solid var(--rule);
  padding-block: 1.75rem 2.5rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.colophon .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.colophon nav {
  display: flex;
  gap: 1.25rem;
}

@media (min-width: 48rem) {
  .hero {
    padding-block: 4.5rem 3rem;
  }

  .pair {
    grid-template-columns: minmax(0, 1fr) 19rem;
    align-items: center;
    gap: 4rem;
    padding-block: 4.5rem;
  }

  .pair.flip .screen {
    order: -1;
  }

  .pair.flip {
    grid-template-columns: 19rem minmax(0, 1fr);
  }

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

  .more {
    padding-block: 4.5rem;
  }

  .private {
    padding: 3rem;
  }
}

/* Code samples on the EPUB guide: scroll sideways inside the block, never the page. */
pre {
  overflow-x: auto;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--panel);
  font-size: 0.85rem;
  line-height: 1.45;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
}
