/* jiaxuli.com section pages: Apple product-page layout on the homepage's night sky (loads after site.css) */

:root {
  --localnav-h: 52px;
  --accent: #2997ff;
  --accent-2: #a259ff;
  --surface: #101013;
  --surface-2: #17171b;
  --tile-r: 28px;
  --content: 980px;
  --wide: 1200px;
}
body[data-section="apps"] { --accent: #2997ff; --accent-2: #a259ff; }
body[data-section="swift"] { --accent: #ff8a3d; --accent-2: #ff375f; }
body[data-section="recognition"] { --accent: #ffd60a; --accent-2: #ff9f0a; }
body[data-section="community"] { --accent: #30d158; --accent-2: #64d2ff; }
body[data-section="security"] { --accent: #64d2ff; --accent-2: #5e5ce6; }
body[data-section="open-source"] { --accent: #5ac8fa; --accent-2: #7d7aff; }
body[data-accent="swiftdelta"] { --accent: #ff7a59; --accent-2: #ff375f; }
body[data-section="legal"], body[data-section="services"] { --accent: #ff375f; --accent-2: #bf5af2; }

body { background: #000; }

/* Continuous (squircle) corners where the browser supports them */
@supports (corner-shape: squircle) {
  .bento-item, .card, .shot img, .doc-panel, .code, .media, .mesh { corner-shape: superellipse(1.6); }
}

/* ---------------- Local nav: the page's own bar under the global nav ---------------- */

.localnav {
  position: sticky; top: var(--nav-h); z-index: 90;
  height: var(--localnav-h); margin-top: var(--nav-h);
  background: rgba(10, 10, 12, 0.62);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  transition: background 0.4s var(--ease);
}
.localnav::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: rgba(255, 255, 255, 0.1); }
.localnav-content {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  max-width: 1024px; height: 100%; margin: 0 auto; padding: 0 var(--gutter);
}
.localnav-title {
  flex: none; color: var(--text); font-family: var(--font-display);
  font-size: 21px; font-weight: 600; letter-spacing: 0.011em; white-space: nowrap;
}
.localnav-title:hover { text-decoration: none; }
.localnav-title small { margin-left: 8px; color: var(--text-3); font-size: 14px; font-weight: 400; letter-spacing: -0.01em; }
.localnav-menu { display: flex; align-items: center; gap: 22px; min-width: 0; }
.localnav-links { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.localnav-links::-webkit-scrollbar { display: none; }
.localnav-links a { color: rgba(255, 255, 255, 0.78); font-size: 12px; letter-spacing: -0.01em; white-space: nowrap; transition: color 0.3s; }
.localnav-links a:hover, .localnav-links a[aria-current] { color: #fff; text-decoration: none; }
.localnav-links a[aria-current="page"] { color: var(--text-3); cursor: default; }

/* ---------------- Hero: the section's patch of sky ---------------- */

.page-hero {
  position: relative; overflow: hidden;
  min-height: 560px; height: var(--hero-h, 100vh); height: var(--hero-h, 100svh);
  margin-top: calc(-1 * (var(--nav-h) + var(--localnav-h)));
  background: #000104;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.page-hero .sky {
  position: absolute; left: 0; top: 0; width: 100%; height: var(--hero-h, 100vh);
  display: block; background: #000104;
}
.page-hero.no-sky .sky { display: none; }
.page-hero .veil { --veil-h: 50%; }

/* Like apple.com product heroes: the name and headline sit bottom left, the actions bottom right */
.page-hero-copy {
  position: relative; z-index: 3;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 48px;
  width: 100%; max-width: calc(var(--wide) + 2 * var(--gutter));
  margin: 0 auto; padding: 0 var(--gutter) calc(64px + var(--safe-bottom));
}
.page-hero-text { max-width: 760px; }
.page-hero-name { color: var(--text); font-size: 24px; line-height: 1.16667; font-weight: 600; letter-spacing: 0.009em; }
.page-hero-title {
  margin-top: 6px;
  font-family: var(--font-display); font-size: clamp(40px, 5vw, 64px);
  line-height: 1.0625; font-weight: 600; letter-spacing: -0.009em; text-wrap: balance;
}
.page-hero-sub { margin-top: 14px; color: var(--text); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.24; font-weight: 600; letter-spacing: 0.011em; }
.page-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; flex: none; }
.page-hero-actions .link { font-size: 17px; }

/* App pages: plain stars, the icon in the middle */
.page-hero.is-app { justify-content: center; }
.page-hero.is-app .page-hero-copy {
  flex-direction: column; align-items: center; text-align: center; gap: 0;
  max-width: calc(880px + 2 * var(--gutter));
  padding-top: calc(var(--nav-h) + var(--localnav-h) + 24px); padding-bottom: calc(40px + var(--safe-bottom));
}
.page-hero.is-app .page-hero-text { max-width: none; }
.page-hero.is-app .page-hero-title { font-size: clamp(44px, 6vw, 80px); line-height: 1.05; margin-top: 10px; }
.page-hero.is-app .page-hero-sub { max-width: 640px; margin-left: auto; margin-right: auto; color: var(--text-2); }
.page-hero.is-app .page-hero-actions { justify-content: center; margin-top: 30px; }
.page-hero.is-app .veil { --veil-h: 30%; }

.app-icon {
  display: block; width: 128px; height: 128px; margin: 0 auto; border-radius: 22.5%;
  filter: drop-shadow(0 18px 44px rgba(0, 0, 0, 0.6));
}
.app-icon.is-round { border-radius: 50%; }
.page-hero .app-icon { width: clamp(104px, 11vw, 140px); height: clamp(104px, 11vw, 140px); margin-bottom: 22px; }

/* hero copy rises in once, staggered */
.js [data-hero] { opacity: 0; transform: translate3d(0, 22px, 0); filter: blur(8px); }
.js .is-shown [data-hero] {
  opacity: 1; transform: none; filter: none;
  transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out), filter 1s var(--ease-out);
  transition-delay: calc(200ms + var(--i, 0) * 90ms);
}

/* ---------------- Scroll reveals ----------------
   site.js adds .is-in once a block is a little way into view. A block made of
   several things (a heading, cards, a row of pictures) does not move as one
   slab: site.js marks its parts .rv and they arrive one after another. */

.js [data-reveal] {
  opacity: 0; transform: translate3d(0, 32px, 0);
  transition: opacity 0.8s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .has-parts, .js [data-reveal].has-parts { opacity: 1; transform: none; transition: none; }
.js .has-parts .rv {
  opacity: 0; transform: translate3d(0, 28px, 0);
  transition: opacity 0.8s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: calc(min(var(--i, 0), 6) * 90ms);
}
.js .has-parts .rv.is-side { transform: translate3d(80px, 0, 0); }
.js .has-parts.is-in .rv { opacity: 1; transform: none; }

/* large pictures settle as they scroll in, tied to the scroll position */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .stage > img, .switch-panels { animation: settle linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    .fullbleed img { animation: settle-in linear both; animation-timeline: view(); animation-range: entry 0% exit 0%; }
  }
}
@keyframes settle { from { opacity: 0.35; transform: scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes settle-in { from { transform: scale(1.14); } to { transform: none; } }

/* ---------------- Sections and type (apple.com type scale) ---------------- */

.section { position: relative; padding: 120px 0; }
.section + .section { padding-top: 20px; }
.section.is-separated { padding-top: 120px; }
.section.is-separated::before { content: ""; position: absolute; top: 0; left: 50%; width: min(var(--wide), calc(100% - 2 * var(--gutter))); height: 1px; transform: translateX(-50%); background: rgba(255, 255, 255, 0.14); }
.section-inner { max-width: calc(var(--content) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section-wide { max-width: calc(var(--wide) + 2 * var(--gutter)); }
.section-head { max-width: 760px; margin-bottom: 52px; }
.section-head.is-center { margin-left: auto; margin-right: auto; text-align: center; }

/* 21px white label above a section, as on apple.com ("Performance", "Entertainment") */
.eyebrow { margin-bottom: 10px; color: var(--text); font-size: clamp(19px, 1.7vw, 21px); line-height: 1.19; font-weight: 600; letter-spacing: 0.011em; }
.headline {
  font-family: var(--font-display); font-size: clamp(40px, 5vw, 64px);
  line-height: 1.0625; font-weight: 600; letter-spacing: -0.009em; text-wrap: balance;
}
.headline-sm { font-size: clamp(32px, 3.8vw, 48px); line-height: 1.0834; letter-spacing: -0.003em; }
/* intro copy: semibold grey with white highlights */
.lede {
  margin-top: 20px; color: var(--text-2);
  font-size: clamp(19px, 1.7vw, 21px); line-height: 1.24; font-weight: 600; letter-spacing: 0.011em; text-wrap: pretty;
}
.lede strong, .copy strong { color: var(--text); font-weight: 600; }
.copy { color: var(--text-2); font-size: 17px; line-height: 1.47; }
.copy p + p { margin-top: 1em; }
.hl {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* centred opening paragraph after the hero (apple.com/apple-vision-pro) */
.statement {
  max-width: 820px; margin: 0 auto; text-align: center;
  font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 48px); line-height: 1.0834; font-weight: 600; letter-spacing: -0.003em;
  color: var(--text); text-wrap: balance;
}
.statement + .statement { margin-top: 0.8em; }
.statement .dim { color: #6e6e73; }

/* ---------------- Bento tiles: one sentence each, as on apple.com ---------------- */

.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.bento-item {
  grid-column: span 3; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 20px;
  min-height: 300px; padding: 40px; border-radius: var(--tile-r);
  background: #1d1d1f; color: var(--text);
}
.bento-item.span-2 { grid-column: span 2; }
.bento-item.span-4 { grid-column: span 4; }
.bento-item.span-6 { grid-column: span 6; }
.bento-item.is-tall { grid-row: span 2; }
.bento-item.is-top { justify-content: flex-start; }
.bento-item.is-center { justify-content: center; }
.bento-copy { font-family: var(--font-display); font-size: clamp(24px, 2.4vw, 32px); line-height: 1.125; font-weight: 600; letter-spacing: 0.004em; text-wrap: pretty; }
.bento-copy.is-small { font-size: clamp(21px, 1.9vw, 24px); line-height: 1.17; }
.bento-copy .dim { color: var(--text-2); }
.bento-label { color: var(--text-2); font-size: 17px; line-height: 1.24; font-weight: 600; letter-spacing: -0.022em; }
.bento-big { font-family: var(--font-display); font-size: clamp(56px, 7vw, 96px); line-height: 1; font-weight: 600; letter-spacing: -0.015em; }
.bento-item .bento-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 17px; }
.bento-media { margin: -40px -40px 0; }
.bento-media img { width: 100%; height: auto; }
.bento-item p.copy { margin-top: -6px; }

/* the homepage's small star drawings, as dotted gradient outlines (filled in by page.js) */
.glyph { display: block; flex: none; width: 64px; height: 64px; }
.glyph svg { display: block; width: 100%; height: 100%; overflow: visible; }
.glyph path {
  fill: none; stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 0 12;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

/* ---------------- Highlights: "Lead. Continuation." in one paragraph ---------------- */

.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 40px; }
.points.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.points p { color: var(--text-2); font-size: 19px; line-height: 1.21; font-weight: 600; letter-spacing: 0.012em; }
.points p strong { color: var(--text); font-weight: 600; }
.points .glyph { width: 44px; height: 44px; margin-bottom: 16px; }

/* ---------------- Cards (overview pages) ---------------- */

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 44px 40px 40px; border-radius: var(--tile-r);
  background: #1d1d1f;
}
.card.is-wide { grid-column: 1 / -1; }
.card .app-icon { width: 96px; height: 96px; margin: 0 0 26px; }
.card h3 { font-family: var(--font-display); font-size: clamp(28px, 2.6vw, 40px); line-height: 1.1; font-weight: 600; letter-spacing: 0; }
.card p { margin-top: 10px; color: var(--text-2); font-size: clamp(19px, 1.6vw, 21px); line-height: 1.24; font-weight: 600; letter-spacing: 0.011em; }
.card p strong { color: var(--text); font-weight: 600; }
.card .platforms { margin-top: 16px; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: auto; padding-top: 28px; }

.platforms { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text-3); font-size: 14px; letter-spacing: -0.016em; }
.platforms li + li::before { content: "·"; margin-right: 14px; color: #48484a; }

/* ---------------- Gallery ---------------- */

.gallery {
  display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 8px max(var(--gutter), calc((100% - var(--wide)) / 2)) 28px;
  scroll-padding: 0 max(var(--gutter), calc((100% - var(--wide)) / 2));
  -webkit-overflow-scrolling: touch;
}
.gallery::-webkit-scrollbar { display: none; }
.shot { flex: none; scroll-snap-align: start; margin: 0; }
.shot img {
  height: clamp(360px, 52vw, 560px); width: auto; border-radius: 26px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 30px 60px rgba(0, 0, 0, 0.5);
  background: var(--surface);
}
.shot.is-phone img { height: clamp(420px, 56vw, 620px); border-radius: 44px; }
.shot.is-wide img { height: clamp(220px, 34vw, 480px); border-radius: 22px; }
.shot figcaption { max-width: 440px; margin-top: 18px; color: var(--text-2); font-size: clamp(17px, 1.5vw, 19px); line-height: 1.21; font-weight: 600; letter-spacing: 0.012em; }
.shot figcaption strong { color: var(--text); font-weight: 600; }
.gallery-controls { display: flex; justify-content: flex-end; gap: 12px; max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.gallery-controls button {
  width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: var(--text);
  cursor: pointer; font: inherit; font-size: 18px; line-height: 1; transition: background 0.3s, opacity 0.3s;
}
.gallery-controls button:hover { background: rgba(255, 255, 255, 0.2); }
.gallery-controls button:disabled { opacity: 0.35; cursor: default; }

.media { margin: 0; border-radius: var(--tile-r); overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }
.media img { width: 100%; height: auto; }

/* ---------------- DarkSight mesh illustration ---------------- */

.mesh {
  position: relative; margin: 0; overflow: hidden; border-radius: var(--tile-r);
  aspect-ratio: 16 / 9; background: radial-gradient(120% 90% at 50% 100%, #06101c 0%, #000 70%);
  cursor: crosshair;
}
.mesh canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.mesh-readout { position: absolute; left: 32px; top: 26px; pointer-events: none; }
.mesh-readout .hud-state { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 14px; font-weight: 600; }
.mesh-readout .hud-state::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #30d158; }
.mesh-readout output {
  display: block; margin-top: 6px;
  font-family: var(--font-display); font-size: clamp(40px, 5vw, 72px); line-height: 1; font-weight: 600;
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em; color: #fff;
}
.mesh-readout .hud-status { display: block; margin-top: 6px; color: var(--text-2); font-size: 17px; font-weight: 600; }
.section-head + .mesh { margin-top: 8px; }
.mesh figcaption { position: absolute; left: 32px; bottom: 24px; right: 32px; color: var(--text-2); font-size: 14px; letter-spacing: -0.016em; }

/* ---------------- Specs (Apple "tech specs" rows) ---------------- */

.specs { border-top: 1px solid rgba(255, 255, 255, 0.14); }
.specs-row { display: grid; grid-template-columns: minmax(160px, 1fr) 3fr; gap: 24px; padding: 26px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.specs-row dt { font-size: 17px; font-weight: 600; }
.specs-row dd { margin: 0; color: var(--text-2); font-size: 17px; line-height: 1.47; }
.specs-row dd ul li + li { margin-top: 4px; }

/* ---------------- Records (recognition, security) ---------------- */

.records { border-top: 1px solid rgba(255, 255, 255, 0.14); }
.record {
  display: grid; grid-template-columns: 120px 1fr; gap: 28px; padding: 30px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.record-date { color: var(--text-3); font-size: 17px; font-variant-numeric: tabular-nums; padding-top: 3px; }
.record h3 { font-family: var(--font-display); font-size: clamp(21px, 2vw, 28px); line-height: 1.14; font-weight: 600; letter-spacing: 0.007em; }
.record p { margin-top: 8px; color: var(--text-2); font-size: 17px; line-height: 1.47; }
.record p.lead { font-size: 19px; line-height: 1.21; font-weight: 600; letter-spacing: 0.012em; }
.record .tile-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; }

/* ---------------- Call to action band ---------------- */

.cta { text-align: center; padding: 120px 0 140px; }
.cta .app-icon { margin-bottom: 28px; }
.cta .headline { max-width: 760px; margin: 0 auto; }
.cta .lede { max-width: 640px; margin-left: auto; margin-right: auto; }
.cta .page-hero-actions { justify-content: center; margin-top: 30px; }

/* ---------------- Long-form documents (tutorial, privacy) ---------------- */

.doc-layout {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 64px;
  max-width: calc(1100px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter);
}
.doc-toc { position: sticky; top: calc(var(--nav-h) + var(--localnav-h) + 28px); align-self: start; max-height: calc(100vh - var(--nav-h) - var(--localnav-h) - 56px); overflow-y: auto; scrollbar-width: thin; padding-bottom: 20px; }
.doc-toc h2 { margin-bottom: 12px; color: var(--text); font-size: 14px; font-weight: 600; letter-spacing: -0.016em; }
.doc-toc ol { list-style: none; counter-reset: toc; }
.doc-toc li { margin: 0; }
.doc-toc a {
  display: block; padding: 5px 0 5px 12px; border-left: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-2); font-size: 13px; line-height: 1.38; letter-spacing: -0.008em;
  transition: color 0.3s, border-color 0.3s;
}
.doc-toc a:hover { color: var(--text); text-decoration: none; }
.doc-toc a[aria-current="true"] { color: var(--text); border-left-color: var(--accent); }

.doc { min-width: 0; max-width: 720px; color: var(--text-2); font-size: 17px; line-height: 1.53; }
.doc > section { scroll-margin-top: calc(var(--nav-h) + var(--localnav-h) + 24px); padding-top: 8px; }
.doc > section + section { margin-top: 64px; }
.doc h2 { color: var(--text); font-family: var(--font-display); font-size: clamp(26px, 2.6vw, 32px); line-height: 1.125; font-weight: 600; letter-spacing: 0.004em; margin-bottom: 18px; }
.doc h3 { color: var(--text); font-size: 19px; line-height: 1.32; font-weight: 600; margin: 28px 0 8px; }
.doc p + p, .doc p + ul, .doc p + ol, .doc ul + p, .doc ol + p, .doc .note + p, .doc p + .note { margin-top: 14px; }
.doc ul, .doc ol { margin-top: 10px; }
.doc ul li, .doc ol.steps li { position: relative; padding-left: 22px; margin-top: 6px; }
.doc ul li::before { content: ""; position: absolute; left: 4px; top: 0.66em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.doc ol.steps { counter-reset: step; }
.doc ol.steps li { counter-increment: step; padding-left: 30px; }
.doc ol.steps li::before { content: counter(step); position: absolute; left: 0; top: 0.15em; width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: var(--text); font-size: 12px; line-height: 20px; text-align: center; font-weight: 600; }
.doc strong { color: var(--text); font-weight: 600; }
.doc code { color: #e8e8ed; background: rgba(255, 255, 255, 0.08); padding: 1px 6px; border-radius: 6px; }
.doc .note {
  padding: 18px 22px; border-radius: 18px; background: var(--surface-2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.doc .note strong { display: block; margin-bottom: 4px; }
.doc .defs { margin-top: 14px; }
.doc .defs div { padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.doc .defs dt { color: var(--text); font-weight: 600; }
.doc .defs dd { margin: 4px 0 0; }
.doc .step-num { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 15px; font-weight: 600; }
.doc-panel { padding: 30px 32px; border-radius: var(--tile-r); background: linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.doc-panel + .doc-panel { margin-top: 16px; }

.code {
  margin-top: 18px; padding: 22px 24px; overflow-x: auto; border-radius: 18px;
  background: #0c0c0f; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 14px; line-height: 1.6; letter-spacing: 0; color: #e8e8ed;
}
.code .k { color: #ff7ab2; } .code .t { color: #dabaff; } .code .c { color: #7f8c98; } .code .s { color: #ff8170; } .code .n { color: #d9c97c; }

/* privacy policy keeps its own numbering */
.policy { max-width: 760px; }
.policy .policy-meta { color: var(--text-2); }
.policy .toc { margin-top: 32px; padding: 26px 28px; border-radius: 22px; background: var(--surface-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.policy .toc h2 { font-size: 17px; margin-bottom: 10px; }
.policy .toc ol { list-style: decimal; padding-left: 1.5em; columns: 2 280px; column-gap: 32px; }
.policy .toc li { margin: 0 0 6px; padding: 0; break-inside: avoid; font-size: 14px; }
.policy .toc li::before { content: none; }
.policy section, .policy .annex-title { scroll-margin-top: calc(var(--nav-h) + var(--localnav-h) + 24px); }
.policy section { margin-top: 48px; }
.policy .annex-title { margin-top: 56px; }
.policy ol.clauses { list-style: decimal; padding-left: 1.5em; margin-top: 10px; }
.policy ol.clauses li { margin-top: 8px; padding: 0; }
.policy ol.clauses li::before { content: none; }
.policy .foot { margin-top: 56px; color: var(--text-3); font-size: 14px; }
.policy h1 { color: var(--text); font-family: var(--font-display); font-size: clamp(40px, 5vw, 64px); line-height: 1.06; font-weight: 600; letter-spacing: -0.009em; margin-bottom: 24px; }

/* simple title block for pages without a sky hero */
.page-title { padding: calc(var(--nav-h) + 72px) 0 56px; }
.localnav + main .page-title { padding-top: 72px; }

/* ---------------- Responsive ---------------- */

@media (max-width: 1068px) {
  .bento-item.span-2 { grid-column: span 3; }
  .bento-item.span-4, .bento-item.md-full { grid-column: span 6; }
  .bento-item.span-2.md-keep { grid-column: span 2; }
  .points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
}
@media (max-width: 833px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-toc { position: static; max-height: none; padding: 22px 24px; border-radius: 20px; background: var(--surface-2); }
  .doc-toc ol { columns: 2 200px; column-gap: 24px; }
  .doc-toc a { border-left: 0; padding-left: 0; break-inside: avoid; }
  .localnav-links { display: none; }
  .localnav-menu { gap: 0; }
}
@media (max-width: 734px) {
  :root { --localnav-h: 48px; --tile-r: 24px; }
  .localnav-title { font-size: 19px; }
  .localnav-title small { display: none; }
  .section { padding: 80px 0; }
  .section.is-separated { padding-top: 80px; }
  .section-head { margin-bottom: 36px; }
  .bento { grid-template-columns: 1fr; gap: 14px; }
  .bento-item, .bento-item.span-2, .bento-item.span-4, .bento-item.span-6, .bento-item.span-2.md-keep, .bento-item.md-full { grid-column: 1 / -1; min-height: 0; padding: 32px 28px; }
  .bento-item.is-tall { grid-row: auto; }
  .bento-media { margin: -32px -28px 0; }
  .points, .points.is-two { grid-template-columns: 1fr; gap: 28px; }
  .cards { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 34px 28px 30px; }
  .card .app-icon { width: 80px; height: 80px; }
  .specs-row { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
  .record { grid-template-columns: 1fr; gap: 6px; padding: 24px 0; }
  .page-hero-copy { flex-direction: column; align-items: flex-start; padding-bottom: calc(44px + var(--safe-bottom)); }
  .page-hero-name { font-size: 19px; }
  .cta { padding: 80px 0 100px; }
  .shot.is-phone img { border-radius: 36px; }
  .mesh { aspect-ratio: 1 / 1; }
  .mesh-readout { left: 22px; top: 20px; }
  .mesh figcaption { left: 22px; bottom: 18px; }
  .veil i:nth-child(2) { display: none; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .page-hero { min-height: 420px; }
  .page-hero-copy { padding-bottom: 24px; }
  .page-hero-title { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .js [data-hero], .js [data-reveal], .js .rv, .js .hero-set > img { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  .page-hero.is-stage .page-hero-copy, .page-hero.is-stage .hero-set { opacity: 1; transform: none; }
}
.no-js .page-hero .sky, .no-js .page-hero .veil { display: none; }
.card .glyph { margin-bottom: 24px; }

/* anchors land below the global and local nav bars */
main [id] { scroll-margin-top: calc(var(--nav-h) + var(--localnav-h) + 16px); }

/* each app page carries the colours of its icon */
body[data-accent="openreality"] { --accent: #3d9bff; --accent-2: #7ab8ff; }
body[data-accent="darksight"] { --accent: #0096ff; --accent-2: #64d2ff; }
body[data-accent="podcastintelligent"] { --accent: #bf5af2; --accent-2: #ff6fd8; }
body[data-accent="memorycard"] { --accent: #a3ee58; --accent-2: #64d2ff; }
body[data-accent="gardenlab"] { --accent: #6fd27a; --accent-2: #d8c27a; }

/* ---------------- Tutorial and demo extras ---------------- */
.page-title .headline { margin-top: 6px; }
.page-title .lede { max-width: 720px; }
.doc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 22px; }
.doc .doc-actions { margin-top: 16px; }
.doc-intro { padding-bottom: 8px; }
.doc-intro > h3:first-of-type { margin-top: 0; color: var(--text-2); font-size: 21px; line-height: 1.24; }
.doc ol:not(.steps) { list-style: decimal; padding-left: 1.4em; }
.doc ol:not(.steps) li { padding-left: 4px; margin-top: 6px; }
.doc ol:not(.steps) li::marker { color: var(--text-3); }
.doc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.doc-grid .doc-panel + .doc-panel { margin-top: 0; }
.doc-panel h4 { color: var(--text); font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.doc .note { margin-top: 22px; }
.doc .note h3 { margin-top: 0; }
.doc .step-num { margin-bottom: 12px; }
@media (max-width: 734px) { .doc-grid { grid-template-columns: 1fr; } }

/* ---------------- Feature headers and the book ---------------- */
.feature-head { display: flex; align-items: flex-end; gap: 28px; margin-bottom: 24px; }
.feature-head .app-icon { width: 112px; height: 112px; margin: 0; flex: none; }
.section-lede { max-width: 760px; margin: 0 0 48px; }
.book { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: center; }
.book-cover { width: 100%; max-width: 420px; height: auto; justify-self: center; border-radius: 6px 14px 14px 6px; box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08); }
.book-points { margin-top: 32px; }
@media (max-width: 734px) {
  .feature-head { flex-direction: column; align-items: flex-start; gap: 20px; }
  .feature-head .app-icon { width: 88px; height: 88px; }
  .section-lede { margin-bottom: 32px; }
  .book { grid-template-columns: 1fr; gap: 40px; }
  .book-cover { max-width: 280px; }
}
.bento-link { color: inherit; transition: background 0.4s var(--ease); }
.bento-link:hover { text-decoration: none; background: #242427; }
.bento-link .link { font-size: 17px; }
.player { min-height: 450px; }
.player iframe { display: block; width: 100%; max-width: 660px; height: 450px; border: 0; border-radius: 18px; background: #1d1d1f; }
.localnav-title small { font-weight: 400; }
/* pages without a local nav (404) */
.no-localnav .page-hero { margin-top: 0; }
@media (max-width: 734px) {
  .code { padding: 16px 16px; font-size: 11.5px; line-height: 1.55; border-radius: 14px; }
  .bento-item .code { margin-left: -8px; margin-right: -8px; }
}
.card .card-art { display: block; width: 88px; height: auto; margin: 0 0 26px; }
.page-hero .hero-art { display: block; width: clamp(110px, 12vw, 150px); height: auto; margin: 0 auto 24px; }
.figure-wide { margin: 0; }
.figure-wide img { display: block; width: 100%; height: auto; }
.figure-wide figcaption { margin-top: 14px; color: var(--text-3); font-size: 14px; letter-spacing: -0.016em; }
.figure-wide + .points { margin-top: 48px; }
.cta .hero-art { display: block; width: 120px; height: auto; margin: 0 auto 28px; }

/* ---------------- Compare table (apple.com "compare models") ---------------- */
.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
.compare { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 17px; line-height: 1.41; }
.compare th, .compare td { padding: 20px 16px 20px 0; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.compare thead th { padding-top: 0; color: var(--text); font-size: 21px; font-weight: 600; border-bottom-color: rgba(255, 255, 255, 0.3); }
.compare thead th img { display: block; width: 56px; height: 56px; margin-bottom: 14px; border-radius: 22.5%; }
.compare thead th img.is-round { border-radius: 50%; }
.compare tbody th { color: var(--text-2); font-size: 14px; font-weight: 600; letter-spacing: -0.016em; width: 140px; }
.compare td { color: var(--text-2); }
.compare td strong { color: var(--text); font-weight: 600; }

/* plain notes and inline facts */
.note-line { max-width: 760px; color: var(--text-2); font-size: 17px; line-height: 1.47; }
.note-line strong { color: var(--text); font-weight: 600; }
.copy-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 48px; max-width: 980px; color: var(--text-2); font-size: 17px; line-height: 1.53; }
.copy-cols strong { color: var(--text); font-weight: 600; }
@media (max-width: 734px) { .copy-cols { grid-template-columns: 1fr; } }
.mesh-after { margin-top: 48px; }
.compare thead th img.is-art { border-radius: 0; object-fit: contain; }
.code-wide { margin-top: 36px; }
.specs-after { margin-top: 48px; }
@media (max-width: 734px) {
  .compare { min-width: 640px; font-size: 15px; }
  .compare thead th { font-size: 17px; }
  .compare thead th img { width: 44px; height: 44px; }
  .compare tbody th { width: 96px; font-size: 13px; }
}

/* category heroes: a short title, then a quieter line */
.page-hero:not(.is-app) .page-hero-sub { max-width: 640px; color: var(--text-2); }

/* ---------------- Feature rows: a picture beside its explanation ---------------- */
.feature-rows { display: grid; gap: 96px; }
.feature-row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; }
.feature-row.is-flipped { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.feature-row.is-flipped .feature-media { order: 2; }
.feature-row.is-phone { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); }
.feature-row.is-phone.is-flipped { grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); }
.feature-media { margin: 0; }
.feature-media img {
  display: block; width: 100%; height: auto; border-radius: 22px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 30px 60px rgba(0, 0, 0, 0.45);
}
.feature-row.is-phone .feature-media img { max-width: 320px; margin: 0 auto; border-radius: 40px; }
.feature-text h3 { font-family: var(--font-display); font-size: clamp(24px, 2.4vw, 32px); line-height: 1.125; font-weight: 600; }
.feature-text p { margin-top: 12px; color: var(--text-2); font-size: clamp(17px, 1.5vw, 19px); line-height: 1.42; font-weight: 600; letter-spacing: 0.012em; }
.feature-text p strong { color: var(--text); font-weight: 600; }
@media (max-width: 734px) {
  .feature-rows { gap: 64px; }
  .feature-row, .feature-row.is-flipped, .feature-row.is-phone, .feature-row.is-phone.is-flipped { grid-template-columns: 1fr; gap: 24px; }
  .feature-row.is-flipped .feature-media { order: 0; }
  .feature-row.is-phone .feature-media img { max-width: 240px; border-radius: 32px; }
}
.shot.is-tablet img { height: clamp(380px, 50vw, 560px); border-radius: 24px; }

/* screenshots shown inside Apple product bezels: the bezel is the frame */
.shot.is-framed img, .feature-media.is-framed img { border-radius: 0; box-shadow: none; background: none; }
.shot.is-framed.is-phone img { height: clamp(440px, 58vw, 640px); }
.shot.is-framed.is-tablet img { height: clamp(400px, 52vw, 600px); }
.shot.is-framed.is-wide img { height: clamp(240px, 36vw, 500px); }
.feature-row.is-phone .feature-media.is-framed img { max-width: 300px; border-radius: 0; }

/* ================================================================
   Product page components, after apple.com pro app pages
   (Final Cut Pro, Apple Intelligence, Apple Vision Pro, Accessibility)
   ================================================================ */

/* ---- app heroes: the words at the top, the devices below, always shown whole ---- */
.page-hero.is-stage {
  display: grid; grid-template-rows: auto minmax(0, 1fr); justify-content: stretch;
  height: max(var(--hero-h, 100svh), 680px);
}
.page-hero.is-stage .page-hero-copy {
  flex-direction: column; align-items: center; text-align: center; gap: 0;
  max-width: calc(860px + 2 * var(--gutter));
  padding-top: calc(var(--nav-h) + var(--localnav-h) + clamp(24px, 5vh, 60px)); padding-bottom: 0;
}
.page-hero.is-stage .page-hero-text { max-width: none; }
.page-hero.is-stage .app-icon { width: clamp(64px, 6vw, 84px); height: clamp(64px, 6vw, 84px); margin: 0 auto 14px; }
.page-hero.is-stage .page-hero-name { font-size: 21px; }
.page-hero.is-stage .page-hero-title { margin-top: 4px; font-size: clamp(40px, 4.6vw, 64px); }
.page-hero.is-stage .page-hero-sub { max-width: 600px; margin: 12px auto 0; color: var(--text-2); font-weight: 400; line-height: 1.381; text-wrap: balance; }
.page-hero.is-stage .page-hero-actions { justify-content: center; margin-top: 22px; }
.hero-stage { position: relative; z-index: 2; display: flex; min-height: 0; padding: clamp(24px, 4vh, 48px) var(--gutter) clamp(28px, 6vh, 72px); pointer-events: none; }
/* the set keeps its own proportions and shrinks to whichever of the width or height runs out first */
.hero-fit { flex: 1; min-width: 0; min-height: 0; container-type: size; display: grid; place-items: end center; }
.hero-set { position: relative; width: min(100cqw, 100cqh * var(--r, 2)); max-width: 1180px; aspect-ratio: var(--r, 2); }
.hero-set > img { position: absolute; bottom: 0; left: var(--x, 0); width: var(--w, 100%); height: auto; filter: drop-shadow(0 28px 40px rgba(0, 0, 0, 0.55)); }
.hero-set > img.is-window { border-radius: clamp(16px, 2vw, 30px); filter: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 40px 90px rgba(0, 0, 0, 0.6); }
/* the devices rise in one after another, after the words */
.js .hero-set > img { opacity: 0; transform: translate3d(0, 56px, 0); }
.js .is-shown .hero-set > img {
  opacity: 1; transform: none;
  transition: opacity 1.1s var(--ease-out), transform 1.5s var(--ease-out);
  transition-delay: calc(420ms + var(--d, 0) * 150ms);
}
/* scrolling away: the words lift and fade, the devices settle back (page.js sets --p from 0 to 1) */
.page-hero.is-stage .page-hero-copy { opacity: calc(1 - var(--p, 0) * 1.4); transform: translate3d(0, calc(var(--p, 0) * -48px), 0); }
.page-hero.is-stage .hero-set { transform: translate3d(0, calc(var(--p, 0) * -36px), 0) scale(calc(1 - var(--p, 0) * 0.05)); transform-origin: 50% 100%; }

/* DarkSight: the live mesh is the hero's sky */
.page-hero .hero-mesh { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; }
.page-hero.has-mesh { background: radial-gradient(120% 80% at 50% 100%, #04101e 0%, #000 65%); }
.page-hero.has-mesh::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.6) 38%, rgba(0, 0, 0, 0.1) 62%, rgba(0, 0, 0, 0.25) 86%, #000 100%); }

@media (max-width: 734px) {
  .page-hero.is-stage { height: auto; min-height: 0; }
  .hero-stage { padding: 36px calc(var(--gutter) / 2) 44px; }
  .hero-fit { container-type: normal; }
  .hero-set { width: 100%; }
}

/* ---- one large picture of the product ---- */
.stage { margin: 0 auto; max-width: var(--wide); }
.stage img { display: block; width: 100%; height: auto; }
.stage.is-tile { padding: clamp(28px, 5vw, 72px); border-radius: var(--tile-r); background: #1d1d1f; }
.stage.is-rounded img { border-radius: var(--tile-r); }
.stage figcaption, .fig-note { max-width: 680px; margin: 22px auto 0; color: var(--text-2); font-size: 17px; line-height: 1.42; font-weight: 600; text-align: center; }
.stage figcaption strong, .fig-note strong { color: var(--text); font-weight: 600; }

/* ---- media cards: a row of pictures, each with its caption (Final Cut Pro) ---- */
.mcards {
  --h: clamp(340px, 40vw, 540px);
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 0 max(var(--gutter), calc((100% - var(--wide)) / 2)) 8px;
  scroll-padding: 0 max(var(--gutter), calc((100% - var(--wide)) / 2));
}
.mcards::-webkit-scrollbar { display: none; }
.mcard { flex: none; width: min(86vw, calc(var(--h) * 1.5)); margin: 0; scroll-snap-align: start; }
.mcard.is-phone { width: min(78vw, calc(var(--h) * 0.68)); }
.mcard.is-tablet { width: min(86vw, calc(var(--h) * 1.18)); }
.mcard.is-wide { width: min(86vw, calc(var(--h) * 1.78)); }
.mcard-media { display: flex; align-items: center; justify-content: center; height: var(--h); padding: 28px; overflow: hidden; border-radius: var(--tile-r); background: #1d1d1f; }
.mcard-media img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.mcard-media.is-bleed { padding: 0; }
.mcard-media.is-bleed img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.mcard figcaption, .caption { margin-top: 20px; padding: 0 14px; color: var(--text-2); font-size: 17px; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; }
.mcard figcaption strong, .caption strong { color: var(--text); font-weight: 600; }

/* ---- feature list: titles on the left, the open one's picture on the right (Apple Intelligence) ---- */
.flist { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; align-items: center; }
.flist-items { display: grid; gap: 10px; }
.flist-item { border-radius: 22px; background: #1d1d1f; transition: background 0.4s var(--ease); }
.flist-item:not(.is-open):hover { background: #242427; }
.flist-item h3 { margin: 0; }
.flist-item button {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
  padding: 18px 22px; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer;
  font: inherit; font-size: 17px; line-height: 1.24; font-weight: 600; letter-spacing: -0.02em;
}
.flist-item button::after { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M11 6v10M6 11h10' stroke='%23f5f5f7' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center/22px no-repeat; transition: transform 0.5s var(--ease-out), background-color 0.3s; }
.flist-item button:hover::after { background-color: rgba(255,255,255,.2); }
.flist-item.is-open button::after { transform: rotate(135deg); }
.flist-body { padding: 0 22px 22px; color: var(--text-2); font-size: 17px; line-height: 1.42; }
.flist-body strong { color: var(--text); font-weight: 600; }
/* open and close by animating the row height (page.js wraps the body in .flist-inner) */
.js .flist-body { display: grid; grid-template-rows: 0fr; padding: 0; transition: grid-template-rows 0.55s var(--ease); }
.js .flist-item.is-open .flist-body { grid-template-rows: 1fr; }
.flist-inner { min-height: 0; overflow: hidden; }
.flist-inner > * { margin-left: 22px; margin-right: 22px; }
.flist-inner::after { content: ""; display: block; height: 22px; }
.js .flist-inner { visibility: hidden; opacity: 0; transform: translate3d(0, -8px, 0); transition: opacity 0.25s var(--ease), transform 0.4s var(--ease), visibility 0s 0.55s; }
.js .flist-item.is-open .flist-inner { visibility: visible; opacity: 1; transform: none; transition: opacity 0.5s var(--ease) 0.12s, transform 0.6s var(--ease-out) 0.08s; }
.flist-media { margin: 16px 0 0; }
.flist-media img { display: block; width: 100%; height: auto; }
.flist-stage { display: none; }
@media (min-width: 835px) {
  .flist.is-staged .flist-media { display: none; }
  .flist.is-staged .flist-stage { display: grid; align-items: center; justify-items: center; min-height: clamp(420px, 44vw, 620px); padding: 32px; border-radius: var(--tile-r); background: #0d0d0f; }
  .flist-stage img { grid-area: 1 / 1; display: block; max-width: 100%; max-height: clamp(380px, 40vw, 560px); width: auto; height: auto; opacity: 0; transform: scale(0.94) translate3d(0, 16px, 0); transition: opacity 0.5s var(--ease), transform 0.8s var(--ease-out); }
  .flist-stage img.is-active { opacity: 1; transform: none; transition: opacity 0.7s var(--ease) 0.1s, transform 1s var(--ease-out) 0.1s; }
  .flist.is-flipped .flist-items { order: 2; }
  .flist.is-flipped { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
}

/* ---- switcher: segmented control or colour swatches under one picture ---- */
.switcher { display: grid; gap: 28px; }
.switch-panels { display: grid; }
.switch-panel { grid-area: 1 / 1; margin: 0; }
.js .switch-panel { opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility 0s .6s; }
.js .switch-panel.is-active { opacity: 1; visibility: visible; transition: opacity .6s var(--ease); }
.switch-panel img { display: block; width: 100%; height: auto; border-radius: var(--tile-r); }
.switch-panel img.no-radius { border-radius: 0; }
.switch-panel figcaption { max-width: 640px; margin: 22px auto 0; text-align: center; color: var(--text-2); font-size: 17px; line-height: 1.42; font-weight: 600; }
.switch-panel figcaption strong { color: var(--text); font-weight: 600; }
.no-js .switch-panel + .switch-panel { margin-top: 40px; }
.no-js .switch-tabs { display: none; }
.switch-tabs { display: flex; justify-content: center; align-items: center; gap: 18px; }
.segmented { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.1); }
.segmented button { border: 0; padding: 8px 20px; border-radius: 999px; background: none; color: var(--text-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .3s, color .3s; }
.segmented button[aria-selected="true"] { background: #f5f5f7; color: #1d1d1f; }
.swatches { display: flex; gap: 16px; }
.swatches button { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); outline-offset: 4px; }
.swatches button[aria-selected="true"] { box-shadow: 0 0 0 2px #000, 0 0 0 4px #86868b; }
.swatch-name { min-width: 5em; color: var(--text-2); font-size: 14px; font-weight: 600; }

/* ---- a centred feature inside a section (Final Cut Pro "Find any shot in a snap.") ---- */
.center-feature { margin-top: 120px; text-align: center; }
.center-feature > h3 { font-family: var(--font-display); font-size: clamp(28px, 3vw, 40px); line-height: 1.1; font-weight: 600; }
.center-feature > p { max-width: 680px; margin: 14px auto 0; color: var(--text-2); font-size: 17px; line-height: 1.42; font-weight: 600; }
.center-feature > p strong { color: var(--text); font-weight: 600; }
.center-feature > .stage, .center-feature > .switcher, .center-feature > figure { margin-top: 44px; }

/* ---- feature cards: a symbol, a short heading, one paragraph (Apple Vision Pro, Accessibility) ---- */
.statements { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.statements.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.statement-item { padding: 36px 34px 38px; border-radius: var(--tile-r); background: #1d1d1f; }
.statement-item h3 { font-family: var(--font-display); font-size: clamp(21px, 2vw, 24px); line-height: 1.17; font-weight: 600; letter-spacing: 0.009em; }
.statement-item p { margin-top: 12px; color: var(--text-2); font-size: 17px; line-height: 1.47; }
.statement-item p strong { color: var(--text); font-weight: 600; }
.statement-item a { white-space: normal; }
.sym { display: block; width: 40px; height: 40px; margin-bottom: 22px; color: var(--accent); }
.sym svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }

/* ---- edge-to-edge picture with words over it (Apple Vision Pro) ---- */
.fullbleed { position: relative; margin: 0; overflow: hidden; }
.fullbleed img { display: block; width: 100%; height: min(100vh, 56.25vw); min-height: 420px; object-fit: cover; }
.fullbleed::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #000 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 55%, rgba(0,0,0,.9) 100%); pointer-events: none; }
.fullbleed figcaption { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter) clamp(32px, 6vw, 72px); }
.fullbleed figcaption h3 { font-family: var(--font-display); font-size: clamp(28px, 3vw, 40px); line-height: 1.1; font-weight: 600; }
.fullbleed figcaption p { max-width: 600px; margin-top: 12px; color: var(--text-2); font-size: 17px; line-height: 1.42; font-weight: 600; }
.fullbleed figcaption p strong { color: var(--text); font-weight: 600; }

/* ---- Questions? Answers. ---- */
.faq { border-top: 1px solid rgba(255,255,255,.14); }
.faq details { border-bottom: 1px solid rgba(255,255,255,.14); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0; cursor: pointer; list-style: none; font-size: 19px; line-height: 1.3; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 1.6px solid var(--text-2); border-bottom: 1.6px solid var(--text-2); transform: translateY(-3px) rotate(45deg); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq details > div { padding: 0 0 26px; max-width: 760px; color: var(--text-2); font-size: 17px; line-height: 1.47; }
.faq details > div p + p { margin-top: .8em; }
.faq details > div strong { color: var(--text); font-weight: 600; }

.quote { max-width: 860px; margin: 0 auto; text-align: center; }
.quote blockquote { margin: 0; font-family: var(--font-display); font-size: clamp(24px, 2.8vw, 32px); line-height: 1.25; font-weight: 600; color: var(--text); text-wrap: balance; }
.quote figcaption { margin-top: 20px; color: var(--text-2); font-size: 17px; }


.space-top { margin-top: 64px; }
.section-head.is-center .lede { margin-left: auto; margin-right: auto; }
.trio .is-phone img { max-width: 250px; margin: 0 auto; }

@media (max-width: 1068px) {
  .statements.is-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 834px) {
  .flist, .flist.is-flipped { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 734px) {
  .mcards { --h: 420px; gap: 14px; }
  .mcard-media { padding: 20px; }
  .statements, .statements.is-three { grid-template-columns: 1fr; gap: 14px; }
  .statement-item { padding: 30px 28px 32px; }
  .sym { width: 34px; height: 34px; margin-bottom: 18px; }
  .center-feature { margin-top: 80px; }
  .fullbleed img { min-height: 560px; height: 80vh; }
  .faq summary { font-size: 17px; }
}
.switch-panel img.is-phone-shot { max-width: 300px; margin: 0 auto; }
.center-feature .switch-panel img { width: auto; max-width: 100%; max-height: 620px; margin: 0 auto; }
@media (max-width: 734px) { .center-feature .switch-panel img { max-height: 520px; } }
@media (max-width: 734px) {
  .mcard.is-wide .mcard-media, .mcard.is-tablet .mcard-media { height: auto; aspect-ratio: 4 / 3; }
  .mcard.is-wide .mcard-media.is-bleed { aspect-ratio: 16 / 10; }
}

.page-title .app-icon { width: 72px; height: 72px; margin: 0 0 18px; }

/* ---------------- Swift Evolution: one card per proposal, each opening its own page ---------------- */
.pcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pcard {
  position: relative; display: flex; flex-direction: column; min-height: 360px; padding: 38px 36px 36px;
  border-radius: var(--tile-r); background: #1d1d1f; color: var(--text);
}
.pcard.is-live { background: linear-gradient(180deg, #ff9f0a 0%, #ff7a1a 34%, #6b2a07 78%, #2a1407 100%); transition: transform 0.5s var(--ease-out); }
.pcard.is-live:hover { text-decoration: none; transform: scale(1.012); }
.pcard .sym { width: 52px; height: 52px; margin-bottom: 0; color: #fff; }
.pcard.is-next .sym { color: var(--text-3); }
.pcard-id { margin-top: auto; padding-top: 40px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, 0.82); }
.pcard-title { margin-top: 8px; font-family: var(--font-display); font-size: clamp(28px, 2.8vw, 40px); line-height: 1.1; font-weight: 600; text-wrap: balance; }
.pcard.is-next .pcard-title { color: var(--text-2); }
.pcard-sub { margin-top: 12px; color: rgba(255, 255, 255, 0.8); font-size: 17px; line-height: 1.42; font-weight: 600; }
.pcard.is-next .pcard-sub, .pcard.is-next .pcard-id { color: var(--text-3); }
.pcard-sub code { color: #fff; }
.pcard-more { margin-top: 20px; font-size: 17px; font-weight: 600; color: #fff; }
.pcard-more::after { content: " ›"; }
@media (max-width: 734px) {
  .pcards { grid-template-columns: 1fr; gap: 14px; }
  .pcard { min-height: 300px; padding: 32px 28px 30px; }
}

/* ---------------- A proposal's own page: an orange top fading down, everything in one centred column ---------------- */
.se-page { background: linear-gradient(180deg, #ff9f0a 0, #ff7a1a 380px, #8a3409 760px, #1a0b03 1180px, #000 1500px); }
.se-hero { margin-top: calc(-1 * (var(--nav-h) + var(--localnav-h))); padding: calc(var(--nav-h) + var(--localnav-h) + clamp(56px, 10vh, 120px)) var(--gutter) 100px; }
.se-stack { display: flex; flex-direction: column; align-items: center; max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); text-align: center; }
.se-stack.se-wide { max-width: calc(var(--wide) + 2 * var(--gutter)); }
.se-hero .se-stack { padding: 0; }
.se-sym { width: clamp(84px, 9vw, 112px); height: clamp(84px, 9vw, 112px); margin: 0 0 26px; color: #fff; }
.se-sym svg { stroke-width: 1.3; }
.se-id { display: inline-block; padding: 5px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.18); color: #fff; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 15px; font-weight: 600; }
.se-title { margin-top: 18px; font-family: var(--font-display); font-size: clamp(40px, 5vw, 64px); line-height: 1.0625; font-weight: 600; letter-spacing: -0.009em; text-wrap: balance; color: #fff; }
.se-sub { max-width: 620px; margin-top: 18px; color: rgba(255, 255, 255, 0.88); font-size: clamp(19px, 1.7vw, 21px); line-height: 1.38; font-weight: 600; text-wrap: balance; }
.se-sub code, .se-copy code { padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.22); color: #fff; font-size: 0.86em; }
.se-actions { justify-content: center; margin-top: 30px; }
.se-hero .button { background: #fff; color: #1d1d1f; }
.se-hero .button.button-secondary { background: rgba(0, 0, 0, 0.2); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6); }
.se-section { padding: 40px 0 80px; }
.se-copy { max-width: 640px; margin-top: 18px; color: var(--text-2); font-size: 19px; line-height: 1.47; }
.se-copy strong { color: var(--text); font-weight: 600; }
.se-section .headline { margin-bottom: 6px; }
.se-code { width: 100%; margin-top: 30px; text-align: left; }
.se-steps { width: 100%; margin-top: 36px; text-align: left; }
.se-facts { width: 100%; margin-top: 26px; }
.se-facts div { padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.se-facts div:first-child { border-top: 0; }
.se-facts dt { color: var(--text-2); font-size: 14px; font-weight: 600; }
.se-facts dd { margin: 6px 0 0; color: var(--text); font-size: 19px; line-height: 1.42; }
.se-back { margin-top: 36px; font-size: 17px; }
@media (max-width: 734px) {
  .se-hero { padding-bottom: 72px; }
  .se-copy { font-size: 17px; }
}
.page-hero.is-stage .hero-art { width: clamp(72px, 7vw, 96px); height: auto; margin: 0 auto 14px; }
/* screenshots with their own dark corners: no shadow, or a plain window edge */
.hero-set > img.is-flat { filter: none; }
.hero-set > img.is-shot { width: 100%; border-radius: 12px; filter: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 40px 90px rgba(0, 0, 0, 0.6); }

/* lists draw lines only between their rows: the section above already has its own separator */
.specs, .faq, .records { border-top: 0; }
.specs > .specs-row:first-child, .records > .record:first-child { padding-top: 0; }
.faq > details:first-child > summary { padding-top: 0; }
.specs > .specs-row:last-child, .faq > details:last-child, .records > .record:last-child { border-bottom: 0; }

/* ---- app showcase, after the apps section of apple.com/apple-tv-4k ----
   One screen stays in place on the right. Each app is a band of its own colour that scrolls up
   behind it; every band clips its own fixed copy of the screen, so as a band's edge passes, its
   picture wipes in over the last one. Each band is a flat, bright colour on the hue of its own screenshot. */
.showcase {
  --scr-w: min(56vw, 800px); --scr-ratio: 1.5;
  --scr-top: calc((100vh + var(--nav-h) + var(--localnav-h)) / 2);
  --scr-right: max(var(--gutter), calc((100vw - var(--wide)) / 2));
  position: relative; margin-top: 24px; clip-path: inset(0);
}
.showcase-item {
  position: relative; display: flex; align-items: center; min-height: 140vh;
  padding: 0 var(--scr-right); background: var(--bg); clip-path: inset(0);
}
.showcase-copy { width: min(34%, 380px); padding: 80px 0; }
.showcase-copy .app-icon { width: 72px; height: 72px; margin: 0 0 22px; }
.showcase-copy h3 { font-family: var(--font-display); font-size: clamp(32px, 3.4vw, 40px); line-height: 1.1; font-weight: 600; }
.showcase-copy .tagline { margin-top: 8px; color: #fff; font-size: 21px; line-height: 1.24; font-weight: 600; }
.showcase-copy .desc { margin-top: 12px; color: rgba(255, 255, 255, 0.82); font-size: 17px; line-height: 1.45; }
.showcase-copy .platforms { margin-top: 16px; color: rgba(255, 255, 255, 0.7); }
.showcase-copy .platforms li + li::before { color: rgba(255, 255, 255, 0.4); }
.showcase-copy .note { margin-top: 14px; color: rgba(255, 255, 255, 0.82); font-size: 14px; font-weight: 600; }
.showcase-copy .card-actions { margin-top: 0; padding-top: 26px; }
.showcase-copy .button { background: #fff; color: #1d1d1f; }
.showcase-copy .button:hover { background: rgba(255, 255, 255, 0.86); }
.showcase-copy .link { color: #fff; }
.showcase-screen {
  position: fixed; top: var(--scr-top); right: var(--scr-right);
  width: var(--scr-w); aspect-ratio: var(--scr-ratio); margin: 0;
  transform: translateY(-50%);
}
/* real device bezels (the *-framed images), shown whole; Apple Vision Pro has no bezel, so its picture is a window */
.showcase-screen { z-index: 1; display: flex; align-items: center; justify-content: center; gap: 4%; }
.showcase-screen img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.35)); }
.showcase-screen.is-row img { width: auto; min-width: 0; height: 92%; }
.showcase-screen.is-window img { height: auto; border-radius: 22px; filter: none; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); }
.section:has(> .showcase) { padding-bottom: 0; }
.section:has(> .showcase) + .section { padding-top: 120px; }
/* narrow screens: no pinning, each app's picture sits under its words */
@media (max-width: 834px) {
  .showcase-item { display: block; min-height: 0; padding: 64px var(--gutter) 72px; }
  .showcase-copy { width: auto; padding: 0; }
  .showcase-screen { position: static; width: 100%; height: auto; margin-top: 36px; transform: none; }
  .showcase-screen.is-row img { width: 30%; height: auto; }
  .section:has(> .showcase) + .section { padding-top: 80px; }
}

/* tighter rhythm between sections: 80px above and below a separator line, not 120 + 120 */
.section { padding-bottom: 80px; }
.section.is-separated { padding-top: 80px; }
.cta { padding-top: 80px; }
@media (max-width: 734px) {
  .section { padding-bottom: 56px; }
  .section.is-separated { padding-top: 56px; }
  .cta { padding-top: 56px; }
}
.records > .record:last-child, .specs > .specs-row:last-child { padding-bottom: 0; }

/* ---------------- Recognition cards: symbol, year, gradient title; the + turns a card over ---------------- */
.rcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.rcards.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rcard { perspective: 1800px; }
.rcard-inner { display: grid; height: 100%; transform-style: preserve-3d; transition: transform 0.9s var(--ease-out); }
.rcard.is-flipped .rcard-inner { transform: rotateY(180deg); }
.rcard-face, .rcard-back {
  grid-area: 1 / 1; position: relative; display: flex; flex-direction: column;
  min-height: 340px; padding: 36px 34px 34px; border-radius: var(--tile-r); background: #1d1d1f;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.rcard-back { transform: rotateY(180deg); justify-content: center; background: linear-gradient(160deg, #26262a, #1d1d1f); }
.rcard .sym { width: 44px; height: 44px; margin-bottom: 0; color: var(--g1, var(--accent)); }
.rcard-year { margin-top: auto; padding-top: 36px; color: var(--text-2); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rcard-title {
  margin-top: 4px; padding-bottom: 0.06em;
  font-family: var(--font-display); font-size: clamp(28px, 2.8vw, 40px); line-height: 1.1; font-weight: 600; letter-spacing: -0.003em; text-wrap: balance;
  background: linear-gradient(90deg, var(--g1, var(--accent)), var(--g2, var(--accent-2)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rcard-sub { margin-top: 10px; color: var(--text-2); font-size: 17px; line-height: 1.42; font-weight: 600; }
.rcard.has-back .rcard-sub { padding-right: 48px; }
.rcard-label { color: var(--text-2); font-size: 14px; font-weight: 600; }
.rcard-back p + p { margin-top: 12px; color: var(--text); font-size: clamp(19px, 1.7vw, 21px); line-height: 1.33; font-weight: 600; letter-spacing: 0.011em; }
.rcard-back p strong { color: var(--text); font-weight: 600; }
.rcard-back p + p { color: var(--text-2); }
.rcard-flip {
  position: absolute; right: 22px; bottom: 22px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, 0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Cpath d='M18 11v14M11 18h14' stroke='%23f5f5f7' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 36px no-repeat;
  transition: background-color 0.3s, transform 0.5s var(--ease-out);
}
.rcard-flip:hover { background-color: rgba(255, 255, 255, 0.24); }
.rcard-flip:hover:not(.is-close) { transform: rotate(90deg); }
.rcard-flip.is-close { transform: rotate(45deg); }
.no-js .rcard-flip { display: none; }
.no-js .rcard-inner { display: block; }
.no-js .rcard-back { transform: none; min-height: 0; margin-top: 2px; }
@media (max-width: 1068px) { .rcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 734px) {
  .rcards, .rcards.is-two { grid-template-columns: 1fr; gap: 14px; }
  .rcard-face, .rcard-back { min-height: 280px; padding: 30px 28px 28px; }
}
@media (prefers-reduced-motion: reduce) { .rcard-inner { transition: none; } }

/* DarkSight's dated U.S. App Store chart milestone. */
.app-store-ranking { padding-bottom: 80px; }
.app-store-ranking::after { content: ""; position: absolute; bottom: 0; left: 50%; width: min(var(--wide), calc(100% - 2 * var(--gutter))); height: 1px; transform: translateX(-50%); background: rgba(255, 255, 255, 0.14); }
.app-store-ranking .section-head { margin-bottom: 0; }
.ranking-heading { display: flex; flex-direction: column; align-items: center; }
.ranking-number { display: block; margin: 20px 0 24px; font-family: var(--font-display); font-size: clamp(140px, 20vw, 240px); font-weight: 600; line-height: .9; letter-spacing: -.065em; color: #e3bd69; }
.ranking-category { font-size: clamp(24px, 3vw, 36px); font-weight: 600; line-height: 1.2; letter-spacing: -.025em; }
@media (max-width: 734px) { .app-store-ranking { padding-bottom: 56px; } }

/* Visual alignment pass: shared edges and resilient narrow-screen content. */
main:has(.doc-layout) .page-title .section-inner {
  max-width: calc(1100px + 2 * var(--gutter));
}
.record > *, .rcard, .rcard-face, .rcard-back { min-width: 0; }
.rcard-inner { grid-template-columns: minmax(0, 1fr); }
.rcard-title { overflow-wrap: anywhere; }
.pcard-sub code { overflow-wrap: anywhere; }
.rcard-back { padding-bottom: 76px; }
@media (max-width: 734px) {
  .rcard-back { padding-bottom: 72px; }
}
@media (max-width: 374px) {
  .headline-sm { font-size: clamp(28px, 8.6vw, 32px); }
  .rcard-face, .rcard-back { padding-left: 24px; padding-right: 24px; }
  .rcard-title { font-size: 24px; }
}
