/* The user guide's pages (site/guide/). The spacing tokens come from site.css; the colors are the privacy page's,
   in oklch. */
:root {
  color-scheme: light dark;
  --bg: oklch(97.5% 0.004 121.6);
  --surface: oklch(100% 0 none);
  --text: oklch(22.7% 0.025 168.3);
  --muted: oklch(51.4% 0.020 164.1);
  --line: oklch(92.4% 0.008 139.4);
  --green: oklch(57.3% 0.135 156);
  --tint: oklch(95.9% 0.021 158.6);
  --display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(16.7% 0.009 169); --surface: oklch(21.8% 0.012 167.4); --text: oklch(96.2% 0.008 157.1);
    --muted: oklch(74.1% 0.023 162.8); --line: oklch(29.8% 0.016 163.6); --green: oklch(64.5% 0.154 155.4);
    --tint: oklch(24% 0.033 160.8);
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased;
}
a { color: var(--green); }
a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 760px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.03em; line-height: 1.05; text-wrap: balance; }
p, li { text-wrap: pretty; }

/* The green header, as on the privacy page. */
.top { background: linear-gradient(165deg, oklch(64.5% 0.154 155.4) 0%, oklch(57.3% 0.135 156) 50%, oklch(46.9% 0.109 156.4) 100%); color: oklch(100% 0 none); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; max-width: 1160px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.brand img { width: 40px; height: 40px; border-radius: 22.37%; box-shadow: 0 4px 12px oklch(0% 0 none / 0.2); }
.back { display: inline-block; margin-block-end: 14px; color: oklch(100% 0 none / 0.9); text-decoration: none; font-weight: 600; font-size: 15px; }
@media (hover: hover) and (pointer: fine) { .back:hover { color: oklch(100% 0 none); } }
.masthead { padding-block: 24px var(--band-pad); }
.masthead h1 { font-size: clamp(2.6rem, 7vw, 4.2rem); font-weight: 800; margin: 0; }

main { padding-block-start: calc(var(--section-gap) / 2); }

/* A topic page: the guide's pages in a sidebar beside the article. Below 860 px the sidebar becomes a row of chips
   above it. */
/* The title lines up with the sidebar. */
.topic .masthead, .topic .nav { max-width: 1060px; }
.layout { max-width: 1060px; display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 64px; align-items: start; }
.layout article { max-inline-size: 712px; min-inline-size: 0; }
.guide-nav { position: sticky; inset-block-start: 24px; font-size: 14.5px; }
.guide-nav p { margin: 0 0 8px; padding-inline: 10px; font-size: 12.5px; font-weight: 650; }
.guide-nav p a { color: var(--muted); text-decoration: none; }
.guide-nav ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.guide-nav li a, .guide-nav li span { display: block; padding: 6px 10px; border-radius: 8px; font-weight: 550; text-decoration: none; }
.guide-nav li a { color: var(--text); }
.guide-nav li span { color: var(--muted); opacity: 0.7; }
.guide-nav [aria-current="page"] { background: var(--tint); color: var(--green); }
@media (hover: hover) and (pointer: fine) { .guide-nav li a:hover { background: var(--tint); } }
.guide-nav li a:active { background: color-mix(in oklch, var(--tint), var(--green) 12%); }
/* The topic picker shows only on phones, and only where guide.js runs (the .js class). */
.nav-select { display: none; }
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .guide-nav { position: static; }
  .guide-nav ol { display: flex; flex-wrap: wrap; gap: 6px; }
  .guide-nav li a, .guide-nav li span { padding: 5px 10px; background: var(--surface); border: 1px solid var(--line); }
  .js .guide-nav ol, .js .guide-nav p { display: none; }
  .js .nav-select { display: block; position: relative; }
  .nav-select span { display: block; margin-block-end: 6px; padding-inline: 2px; font-size: 12.5px; font-weight: 650; color: var(--muted); }
  .nav-select select { appearance: none; inline-size: 100%; min-block-size: 48px; padding: 12px 44px 12px 16px; border-radius: 14px;
    border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 600 17px/1.2 var(--display);
    letter-spacing: -0.01em; cursor: pointer; }
  /* The chevron, drawn in the text color. */
  .nav-select::after { content: ""; position: absolute; inset-inline-end: 18px; inset-block-end: 20px; inline-size: 8px; block-size: 8px;
    border-inline-end: 2px solid var(--muted); border-block-end: 2px solid var(--muted); rotate: 45deg; pointer-events: none; }
  .nav-select select:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
  @media (hover: hover) and (pointer: fine) { .nav-select select:hover { border-color: var(--green); } }
  .nav-select select:active { background: var(--tint); }
}

/* Previous and next at the end of a topic. A topic that isn't written yet shows without a link. */
.pager { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 12px; padding-block-start: 26px; border-block-start: 1px solid var(--line); }
.pager > * { flex: 1 1 220px; display: block; padding: 14px 18px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.015em; }
.pager small { display: block; font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-weight: 550; font-size: 13px; letter-spacing: 0; color: var(--muted); }
.pager .next { text-align: end; margin-inline-start: auto; }
.pager span { background: transparent; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .pager a:hover { border-color: var(--green); } }
.pager a:active { background: var(--tint); }
.pager a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* Before launch, a placeholder where the App Store badge goes. At launch, swap .soon for the commented-out badge. */
.store { margin: 18px 0 4px; }
.soon { display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 14px; background: oklch(0% 0 none);
  color: oklch(100% 0 none); font-weight: 600; font-size: 17px; line-height: 1; }
.soon .icon { inline-size: 18px; block-size: 18px; color: oklch(80% 0.12 158); }
.lede { font-size: 1.22rem; margin: 0 0 30px; }
section { padding-block: 26px; border-block-start: 1px solid var(--line); }
section h2 { font-size: 1.7rem; margin: 0 0 12px; }
section p { margin: 0 0 12px; }
section ol, section ul { margin: 0 0 12px; padding-inline-start: 22px; }
section li { margin-block-end: 6px; }
.muted { color: var(--muted); }

/* A section's text beside its screenshot; the screenshot drops below the text where the two don't fit side by side. */
.with-shot { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 18px 32px; }
.with-shot > div { flex: 1 1 320px; min-inline-size: 0; }
.shot { flex: 0 1 220px; margin: 0; }
.shot img { display: block; inline-size: 100%; block-size: auto; border-radius: 9.49% / 4.376%;
  box-shadow: 0 0 0 1px oklch(22.7% 0.025 168.3 / 0.1), 0 18px 40px -16px oklch(25% 0.08 160 / 0.35); }
.shot figcaption { margin-block-start: 8px; font-size: 14px; color: var(--muted); text-align: center; }

/* The start page's list of topics. A topic that isn't written yet has no link. */
.topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.topics li { margin: 0; }
.topics a, .topics .later { display: block; padding: 16px 20px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--line); color: inherit; text-decoration: none; }
.topics b { display: block; font-family: var(--display); font-size: 1.2rem; letter-spacing: -0.015em; }
.topics span { color: var(--muted); }
.topics .later { background: transparent; }
.topics .later b { color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .topics a:hover { border-color: var(--green); } }
.topics a:active { background: var(--tint); }
.topics a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-block: 36px 48px; color: var(--muted); font-size: 0.92rem; max-width: 1160px; }
footer a { color: inherit; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { footer a:hover { color: var(--text); } }

/* Screens that crossfade (guide.js), as on the landing page: all stacked in one screen-shaped box, the one showing
   at full opacity, with a dot for each below. Without the script the first screen shows. */
.slides-track { position: relative; aspect-ratio: 1206 / 2622; }
.slides-track img { position: absolute; inset: 0; block-size: 100%; opacity: 0; }
.slides-track img:first-child, .slides-track img.on { opacity: 1; }
.slides-track:has(img.on) img:not(.on) { opacity: 0; }
@media (prefers-reduced-motion: no-preference) { .slides-track img { transition: opacity 0.5s ease-out; } }
.dots { display: flex; justify-content: center; gap: 4px; margin-block-start: 10px; }
.dots button { inline-size: 24px; block-size: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.dots button::before { content: ""; inline-size: 8px; block-size: 8px; border-radius: 99px; background: var(--line); }
.dots button[aria-current="true"]::before { inline-size: 20px; background: var(--green); }
@media (prefers-reduced-motion: no-preference) { .dots button::before { transition: inline-size 0.25s ease-out, background-color 0.25s ease-out; } }
.dots button:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; border-radius: 99px; }
.dots button:active::before { background: color-mix(in oklch, var(--green), var(--text) 20%); }

/* A celebration video over its first frame (guide.js). */
.clip-screen { position: relative; aspect-ratio: 600 / 1304; border-radius: 9.49% / 4.376%; overflow: clip;
  box-shadow: 0 0 0 1px oklch(22.7% 0.025 168.3 / 0.1), 0 18px 40px -16px oklch(25% 0.08 160 / 0.35); }
.clip-screen img, .clip-screen video { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
.shot .clip-screen img { border-radius: 0; box-shadow: none; }
.clip-screen video { opacity: 0; }
.clip-screen video.live { opacity: 1; }
.replay { position: absolute; inset-inline-start: 50%; inset-block-end: 7%; translate: -50% 0; display: inline-flex; align-items: center;
  gap: 6px; padding: 8px 14px; border: 0; border-radius: 999px; cursor: pointer; font: 600 13px/1 -apple-system, BlinkMacSystemFont, sans-serif;
  color: oklch(100% 0 none); background: oklch(20% 0.005 285 / 0.72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.replay[hidden] { display: none; }
.replay:focus-visible { outline: 2px solid oklch(100% 0 none); outline-offset: 2px; }
.replay:active { background: oklch(20% 0.005 285 / 0.85); }

/* Getting started ends by pointing to the next page. */
.next-up { margin-block: 26px 0; padding-block-start: 26px; border-block-start: 1px solid var(--line); }

/* A drawn figure (notifications, a Siri answer; their styles are in drawn.css). */
.drawn { flex: 0 1 300px; margin: 0; }
.drawn figcaption { margin-block-start: 10px; font-size: 14px; color: var(--muted); text-align: center; }
