/* ScreenAnnotator — site styles. No framework, no web fonts: the system
   stack is SF Pro on Apple devices, which is what the apps themselves use. */

@view-transition { navigation: auto; }

:root {
  --bg: #fbfbfd;
  --bg-2: #f5f5f7;
  --fg: #1d1d1f;
  --fg-2: #424245;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, .1);
  --card: #ffffff;
  --dark: #0a0a0c;
  --dark-2: #161618;
  --on-dark: #f5f5f7;
  --on-dark-muted: #a1a1a6;

  /* The app's ink. Red is the one accent; the rest only appear as drawing. */
  --red: #ff3b30;            /* recording only — and the red pen in drawings */

  /* Brand, from the app icon: its sky-blue glass, deepened for contrast
     (#1677b8 is 4.8:1 with white text), into the icon's teal. */
  --accent: #1677b8;
  --accent-text: #1677b8;
  --accent-2: #0b7a6c;
  --accent-grad: linear-gradient(135deg, #1677b8 0%, #0e7f8f 55%, #0b7a6c 100%);
  --accent-glow: rgba(22, 119, 184, .45);
  --blue: #0a84ff;
  --green: #30d158;
  --yellow: #ffd60a;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 40px rgba(0,0,0,.08);
  --shadow-lg: 0 30px 80px -20px rgba(0,0,0,.35);
  --max: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-2: #0d0d0f;
    --fg: #f5f5f7;
    --fg-2: #d2d2d7;
    --muted: #a1a1a6;
    --line: rgba(255, 255, 255, .14);
    --card: #161618;
    --red: #ff453a;
    --accent: #3a9fdc;
    --accent-text: #7cc8f0;   /* the icon's sky blue: 11:1 on black */
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 40px rgba(0,0,0,.5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -.022em;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--accent) 26%, transparent); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 999px; background: var(--fg); color: var(--bg);
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 52px; gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 17px; text-decoration: none; letter-spacing: -.01em;
}
.brand img { width: 28px; height: 28px; border-radius: 6px; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  font-size: 13px; color: var(--fg-2); text-decoration: none; opacity: .85;
  transition: opacity .2s;
}
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; color: var(--fg); }
.nav .pill { opacity: 1; }
/* Over dark sections the bar turns to dark glass, as on apple.com. */
.site-header { transition: background-color .35s, border-color .35s; }
.site-header.on-dark {
  background: rgba(22, 22, 24, .72); border-bottom-color: rgba(255,255,255,.1);
  --fg: #f5f5f7; --fg-2: #d2d2d7; color: #f5f5f7;
}
@media (max-width: 760px) { .nav a:not(.pill) { display: none; } }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font: 500 17px/1 var(--font); letter-spacing: -.01em;
  text-decoration: none; cursor: pointer; border: 0;
  transition: transform .25s var(--ease), background-color .25s, box-shadow .25s;
  will-change: transform;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent-grad); color: #fff; box-shadow: 0 8px 24px -8px var(--accent-glow); }
.btn-primary:hover { filter: brightness(1.08) saturate(1.05); }
.btn-ghost { background: transparent; color: var(--accent-text); padding-inline: 10px; }
.btn-ghost:hover { text-decoration: underline; }
.btn-ghost::after { content: "›"; font-size: 1.15em; transform: translateY(-1px); }
.btn[aria-disabled="true"] { background: var(--bg-2); color: var(--muted); box-shadow: none; cursor: default; }
.pill {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 14px;
  border-radius: 999px; background: var(--accent-grad); color: #fff !important;
  font-size: 12px; font-weight: 600; text-decoration: none;
}

/* ---------- Type ---------- */

.eyebrow {
  display: inline-block; font-size: 17px; font-weight: 600; color: var(--accent-text);
  letter-spacing: -.01em; margin: 0 0 14px;
}
.h-xl, .h-lg, .h-md { margin: 0; font-weight: 700; letter-spacing: -.035em; line-height: 1.04; text-wrap: balance; }
.h-xl { font-size: clamp(44px, 8.2vw, 96px); }
.h-lg { font-size: clamp(36px, 5.8vw, 68px); }
.h-md { font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -.028em; line-height: 1.1; }
.lede {
  font-size: clamp(19px, 2.1vw, 24px); line-height: 1.38; color: var(--muted);
  font-weight: 500; letter-spacing: -.018em; margin: 22px 0 0; text-wrap: pretty;
}
.lede strong { color: var(--fg); font-weight: 600; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .lede { margin-inline: auto; max-width: 760px; }

kbd, .key {
  display: inline-grid; place-items: center; min-width: 1.7em; height: 1.7em; padding: 0 .4em;
  border-radius: .32em; font: 600 .82em/1 var(--font); color: var(--fg);
  background: linear-gradient(var(--card), var(--bg-2));
  border: 1px solid var(--line); box-shadow: 0 1px 0 var(--line), 0 2px 0 rgba(0,0,0,.08);
  vertical-align: .08em;
}

/* ---------- Sections ---------- */

section { position: relative; }
.anchor { display: block; position: relative; top: -60px; height: 0; }
.section { padding: clamp(96px, 14vw, 168px) 0; }
.section.tight { padding: clamp(72px, 10vw, 120px) 0; }
.alt { background: var(--bg-2); }
.dark {
  background: var(--dark); color: var(--on-dark);
  --fg: var(--on-dark); --muted: var(--on-dark-muted); --line: rgba(255,255,255,.14);
  --card: var(--dark-2); --bg-2: #1c1c1e;
}

/* Hand-drawn annotation marks used across the page. They draw themselves
   when their parent scrolls into view (class .in set by site.js). */
.mark { position: relative; white-space: nowrap; display: inline-block; }
.mark svg {
  position: absolute; pointer-events: none; overflow: visible;
  left: -6%; width: 112%; height: auto;
}
.mark .underline { bottom: -.12em; height: .3em; }
.mark .circle { top: -22%; height: 144%; left: -9%; width: 118%; }
.mark path {
  fill: none; stroke: url(#g-mark) var(--accent); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.1s var(--ease) .25s;
}
.mark.hl path { stroke: var(--yellow); stroke-width: 18; opacity: .55; }
.in .mark path, .mark.in path { stroke-dashoffset: 0; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }
.no-js .reveal { opacity: 1; transform: none; }
.no-js .mark path { stroke-dashoffset: 0; }

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

.hero { padding: clamp(56px, 8vw, 104px) 0 0; overflow: hidden; }
.hero .copy { text-align: center; }
.hero .h-xl .line { display: block; }
.hero .lede { max-width: 720px; margin-inline: auto; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px 22px; justify-content: center; align-items: center; margin-top: 36px; }
.hotkey { margin-top: 26px; font-size: 15px; color: var(--muted); display: flex; gap: 8px; justify-content: center; align-items: center; }
.hotkey .key { font-size: 15px; transition: transform .12s, box-shadow .12s, background .12s; }
.hotkey .key.down { transform: translateY(2px); box-shadow: 0 0 0 var(--line); background: var(--bg-2); }

.stage {
  position: relative; margin: clamp(48px, 7vw, 84px) auto 0;
  width: min(1180px, 100% - 2 * var(--gutter));
  aspect-ratio: 1180 / 640;
}
.stage .mac { position: absolute; left: 0; bottom: 0; width: 78%; }
.stage .ipad { position: absolute; right: 0; bottom: -2%; width: 40%; filter: drop-shadow(0 30px 40px rgba(0,0,0,.28)); }
.stage::after {
  content: ""; position: absolute; inset: auto 6% -6% 6%; height: 18%;
  background: radial-gradient(closest-side, rgba(0,0,0,.18), transparent);
  filter: blur(18px); z-index: -1;
}
@media (max-width: 640px) {
  .stage { aspect-ratio: 1 / .78; }
  .stage .mac { width: 100%; top: 0; bottom: auto; }
  .stage .ipad { width: 56%; right: 0; bottom: 0; }
}

/* Ink that draws itself inside the device scenes. --len is set per path. */
.ink { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.loop-ipad, .loop-mac { stroke-dasharray: 1; stroke-dashoffset: 1; }
.playing .loop-ipad { animation: drawLoop 6s var(--ease) infinite; }
.playing .loop-mac  { animation: drawLoop 6s var(--ease) infinite .45s; }
@keyframes drawLoop {
  0%   { stroke-dashoffset: 1; opacity: 1; }
  38%  { stroke-dashoffset: 0; opacity: 1; }
  80%  { stroke-dashoffset: 0; opacity: 1; }
  92%  { stroke-dashoffset: 0; opacity: 0; }
  100% { stroke-dashoffset: 1; opacity: 0; }
}
.pencil-tip { offset-rotate: 0deg; }
.playing .pencil-tip { animation: tipLoop 6s var(--ease) infinite; }
@keyframes tipLoop {
  0%   { offset-distance: 0%; opacity: 0; }
  4%   { opacity: 1; }
  38%  { offset-distance: 100%; opacity: 1; }
  48%  { offset-distance: 100%; opacity: 0; }
  100% { offset-distance: 100%; opacity: 0; }
}
.sync-dot { opacity: 0; }
.playing .sync-dot { animation: syncPulse 6s ease-out infinite .2s; }
@keyframes syncPulse {
  0%, 6% { opacity: 0; transform: scale(.6); }
  12% { opacity: 1; }
  40% { opacity: 0; transform: scale(1.8); }
  100% { opacity: 0; }
}

/* ---------- Keystroke section ---------- */

.keystroke .bigkeys { display: flex; gap: clamp(10px, 2vw, 18px); justify-content: center; margin: 48px 0 0; }
.bigkey {
  width: clamp(76px, 11vw, 120px); aspect-ratio: 1; border-radius: 22%;
  display: grid; place-items: center; font-size: clamp(32px, 5vw, 52px); font-weight: 500;
  background: linear-gradient(180deg, #2c2c2e, #1c1c1e); color: #f5f5f7;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 6px 0 #0b0b0c, 0 18px 30px rgba(0,0,0,.45);
  transition: transform .14s var(--ease), box-shadow .14s var(--ease);
}
.bigkey.down { transform: translateY(5px); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 1px 0 #0b0b0c, 0 6px 14px rgba(0,0,0,.4); }
.overlay-demo { margin: 64px auto 0; max-width: 980px; }
.overlay-demo .glass { transition: opacity .8s var(--ease) .2s; opacity: 0; }
.overlay-demo .tb { transition: transform .8s var(--ease) .45s, opacity .8s var(--ease) .45s; transform: translateY(-30px); opacity: 0; }
.overlay-demo.on .glass, .overlay-demo.on .tb { opacity: 1; transform: none; }
.overlay-demo .scribble { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease) 1s; }
.overlay-demo.on .scribble { stroke-dashoffset: 0; }

/* ---------- Toolkit ---------- */

.toolkit-grid { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 56px; }
.tools {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  padding: 8px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow);
  width: fit-content; margin-inline: auto;
}
.tool {
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  width: 84px; padding: 12px 6px 10px; border-radius: 14px; border: 0; cursor: pointer;
  background: transparent; color: var(--fg-2); font: 500 11.5px/1.2 var(--font);
  transition: background .2s, color .2s, transform .2s var(--ease);
}
.tool svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tool:hover { background: var(--bg-2); color: var(--fg); }
.tool[aria-pressed="true"] { background: var(--fg); color: var(--bg); transform: translateY(-2px); }
.canvas-card {
  position: relative; border-radius: var(--radius); background: var(--card);
  box-shadow: var(--shadow); overflow: hidden; aspect-ratio: 16 / 7;
}
.canvas-card canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.canvas-card .slide {
  position: absolute; inset: 0; padding: clamp(18px, 4vw, 44px);
  display: grid; align-content: start; gap: 10px; pointer-events: none;
}
.canvas-card .slide h3 { margin: 0; font-size: clamp(20px, 3vw, 34px); letter-spacing: -.03em; }
.canvas-card .slide p { margin: 0; color: var(--muted); max-width: 46ch; font-size: clamp(14px, 1.6vw, 17px); }
.tool-caption { text-align: center; color: var(--muted); min-height: 1.5em; margin: 0; }
.tool-caption b { color: var(--fg); }
@media (max-width: 640px) { .canvas-card { aspect-ratio: 4 / 3; } .tool { width: 70px; } }

/* ---------- Feature split ---------- */

.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split.rev { grid-template-columns: 1.15fr 1fr; }
.split.rev .art { order: -1; }
@media (max-width: 860px) { .split, .split.rev { grid-template-columns: 1fr; } .split.rev .art { order: 0; } }
.art { border-radius: var(--radius); overflow: hidden; }
.bullets { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.bullets li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; color: var(--muted); }
.bullets li b { color: var(--fg); font-weight: 600; }
.bullets svg { width: 22px; height: 22px; margin-top: 2px; stroke: var(--accent-text); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Click-through demo */
.through .cursor { offset-path: path("M 60 250 C 160 200, 230 170, 300 152"); offset-rotate: 0deg; }
.through.in .cursor { animation: cursorMove 4.5s var(--ease) infinite; }
@keyframes cursorMove {
  0% { offset-distance: 0%; } 45%, 100% { offset-distance: 100%; }
}
.through .click-ring { transform-origin: 300px 152px; transform-box: view-box; opacity: 0; }
.through.in .click-ring { animation: clickRing 4.5s ease-out infinite; }
@keyframes clickRing { 0%, 46% { opacity: 0; transform: scale(.4); } 50% { opacity: .9; } 66%, 100% { opacity: 0; transform: scale(1.6); } }
.through .btn-press { transform-origin: 300px 152px; transform-box: view-box; }
.through.in .btn-press { animation: btnPress 4.5s ease-out infinite; }
@keyframes btnPress { 0%, 46% { transform: none; } 50% { transform: scale(.94); } 56%, 100% { transform: none; } }

/* ---------- iPad Companion: pinned scroll story ---------- */

.story { background: var(--dark); color: var(--on-dark); --muted: var(--on-dark-muted); }
.story .intro { padding: clamp(96px, 14vw, 160px) 0 40px; }
.js .story .track { height: 320vh; }
.story .pin {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(24px, 5vw, 72px);
  align-items: center; min-height: 100vh; padding: 60px 0;
}
.js .story .pin { position: sticky; top: 0; height: 100vh; min-height: 0; }
@media (max-width: 860px) {
  .story .pin, .js .story .pin { grid-template-columns: 1fr; align-content: center; gap: 28px; }
}
.steps { position: relative; display: grid; }
/* Steps share one cell so they cross-fade — only when the script drives them. */
.step { transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js .step { grid-area: 1 / 1; opacity: 0; transform: translateY(18px); }
.js .step.active { opacity: 1; transform: none; }
.no-js .steps { gap: 40px; }
.step .num { font-family: var(--mono); font-size: 14px; color: #7cc8f0; letter-spacing: 0; }
.step h3 { margin: 8px 0 12px; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.03em; line-height: 1.06; }
.step p { margin: 0; color: var(--on-dark-muted); font-size: 19px; max-width: 34ch; }
.progress { display: flex; gap: 8px; margin-top: 36px; }
.progress i { width: 34px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); overflow: hidden; position: relative; }
.progress i::after { content: ""; position: absolute; inset: 0; background: var(--on-dark); transform: scaleX(var(--fill, 0)); transform-origin: left; }
.no-js .progress { display: none; }
.story-devices { position: relative; }
.story-devices .mini-mac {
  position: absolute; left: -6%; bottom: -4%; width: 46%;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  filter: drop-shadow(0 20px 30px rgba(0,0,0,.6));
}
.js .story-devices .mini-mac { opacity: var(--mac-o, 0); transform: translateY(calc((1 - var(--mac-o, 0)) * 24px)); }
.story .mirror-mask { transition: none; }
.story .scan { opacity: var(--scan-o, 0); }
.story .story-stroke { stroke-dasharray: 1; stroke-dashoffset: var(--draw, 1); }
.no-js .story .story-stroke { stroke-dashoffset: 0; }
.story .mac-stroke { stroke-dasharray: 1; stroke-dashoffset: var(--sync, 1); }
.no-js .story .mac-stroke { stroke-dashoffset: 0; }
.story .story-tip { offset-distance: calc((1 - var(--draw, 1)) * 100%); opacity: var(--tip-o, 0); }

/* ---------- Connect ---------- */

.connect-art { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; }
.connect-art svg { width: 100%; }
.connect-art .ring { transform-box: fill-box; transform-origin: center; opacity: 0; }
.connect-art.in .ring { animation: ring 3.2s ease-out infinite; }
.connect-art.in .ring.r2 { animation-delay: 1.05s; }
.connect-art.in .ring.r3 { animation-delay: 2.1s; }
@keyframes ring { 0% { opacity: .55; transform: scale(.35); } 100% { opacity: 0; transform: scale(1.5); } }
.connect-art .link { stroke-dasharray: 6 9; stroke-dashoffset: 0; opacity: .25; transition: opacity .6s .6s; }
.connect-art.in .link { opacity: 1; animation: dash 1.1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -30; } }
.connect-art .badge { opacity: 0; transform: translateY(8px); transition: opacity .6s 1.4s, transform .6s var(--ease) 1.4s; }
.connect-art.in .badge { opacity: 1; transform: none; }

/* ---------- Record ---------- */

.rec-art { display: grid; gap: 18px; }
.rec-bar {
  display: flex; align-items: center; gap: 14px; justify-content: center;
  width: fit-content; margin-inline: auto; padding: 10px 12px 10px 16px;
  border-radius: 999px; background: #1c1c1e; color: #f5f5f7;
  box-shadow: 0 20px 40px -14px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.08);
}
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(255,59,48,.6); }
.recording .rec-dot { animation: recPulse 1.4s ease-out infinite; }
@keyframes recPulse { 0% { box-shadow: 0 0 0 0 rgba(255,59,48,.55); } 100% { box-shadow: 0 0 0 12px rgba(255,59,48,0); } }
.paused .rec-dot { background: #8e8e93; }
.rec-time { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 17px; min-width: 5ch; letter-spacing: 0; }
.wave { display: flex; align-items: center; gap: 3px; height: 26px; }
.wave i { width: 3px; border-radius: 3px; background: #f5f5f7; height: 30%; opacity: .85; }
.recording .wave i { animation: wave 1s ease-in-out infinite alternate; }
.wave i:nth-child(2n) { animation-delay: -.3s !important; } .wave i:nth-child(3n) { animation-delay: -.55s !important; }
.wave i:nth-child(5n) { animation-delay: -.8s !important; }
@keyframes wave { from { height: 18%; } to { height: 100%; } }
.rec-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer;
}
.rec-btn:hover { background: rgba(255,255,255,.2); }
.rec-btn svg { width: 16px; height: 16px; fill: currentColor; }
.library {
  border-radius: 16px; background: var(--card); box-shadow: var(--shadow);
  display: grid; grid-template-columns: 170px 1fr; overflow: hidden; font-size: 13px;
}
.library .side { background: var(--bg-2); padding: 14px 10px; display: grid; gap: 2px; align-content: start; }
.library .side span { padding: 6px 10px; border-radius: 8px; display: flex; gap: 8px; align-items: center; color: var(--fg-2); }
.library .side span.sel { background: color-mix(in srgb, var(--blue) 18%, transparent); color: var(--fg); }
.library .side svg { width: 15px; height: 15px; stroke: var(--blue); fill: none; stroke-width: 1.8; }
.library .list { padding: 10px; display: grid; gap: 6px; align-content: start; }
.library .row { display: grid; grid-template-columns: 74px 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; }
.library .row:first-child { background: color-mix(in srgb, var(--blue) 12%, transparent); }
.library .thumb { aspect-ratio: 16/10; border-radius: 6px; background: linear-gradient(135deg, #2c3e50, #1c1c1e); position: relative; overflow: hidden; }
.library .thumb::after { content: ""; position: absolute; left: 18%; top: 30%; width: 50%; height: 34%; border: 2px solid var(--red); border-radius: 50%; transform: rotate(-8deg); }
.library .row:nth-child(2) .thumb::after { border-color: var(--yellow); border-radius: 4px; }
.library .row:nth-child(3) .thumb::after { border-color: var(--blue); }
.library .meta b { display: block; font-weight: 600; color: var(--fg); }
.library .meta small { color: var(--muted); font-size: 11.5px; }
.library .play { font-size: 11.5px; padding: 4px 10px; border-radius: 999px; background: var(--bg-2); color: var(--fg-2); }
@media (max-width: 520px) { .library { grid-template-columns: 1fr; } .library .side { display: none; } }

/* ---------- Use cases ---------- */

.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
@media (max-width: 860px) { .cases { grid-template-columns: 1fr; } }
.case {
  border-radius: var(--radius); background: var(--card); padding: 30px 28px 32px;
  box-shadow: var(--shadow); display: grid; gap: 14px; align-content: start;
  transition: transform .4s var(--ease), box-shadow .4s;
}
.case:hover { transform: translateY(-4px); }
.case .vis { aspect-ratio: 16 / 9; border-radius: 14px; background: var(--bg-2); overflow: hidden; }
.case h3 { margin: 6px 0 0; font-size: 24px; letter-spacing: -.025em; }
.case p { margin: 0; color: var(--muted); }
.case .vis path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease) .2s; }
.case.in .vis path { stroke-dashoffset: 0; }

/* ---------- Privacy band ---------- */

.privacy-band { text-align: center; }
.privacy-band .lock { width: 64px; height: 64px; margin: 0 auto 28px; stroke: var(--on-dark); fill: none; stroke-width: 1.6; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; text-align: left; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; } }
.fact { border-top: 1px solid var(--line); padding-top: 18px; }
.fact b { display: block; font-size: 19px; margin-bottom: 6px; }
.fact span { color: var(--muted); }

/* ---------- Pricing ---------- */

.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 56px; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }
.plan {
  border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow);
  padding: 36px 32px; display: grid; gap: 12px; align-content: start; position: relative; overflow: hidden;
}
.plan.featured { outline: 2px solid var(--accent); outline-offset: -2px; }
.plan .tag { font-size: 13px; font-weight: 600; color: var(--muted); }
.plan h3 { margin: 0; font-size: 30px; letter-spacing: -.03em; }
.plan .price { font-size: 52px; font-weight: 700; letter-spacing: -.04em; line-height: 1; margin: 6px 0 2px; }
.plan .price small { font-size: 17px; font-weight: 500; color: var(--muted); letter-spacing: -.01em; }
.plan ul { margin: 10px 0 18px; padding: 0; list-style: none; display: grid; gap: 9px; }
.plan li { padding-left: 26px; position: relative; color: var(--fg-2); }
.plan li::before {
  content: ""; position: absolute; left: 2px; top: .42em; width: 12px; height: 7px;
  border-left: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text); transform: rotate(-45deg);
}
.plan .btn { justify-self: start; }
.reqs { margin-top: 28px; text-align: center; color: var(--muted); font-size: 15px; }

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

.faq { max-width: 820px; margin: 48px auto 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative;
  font-size: 19px; font-weight: 600; letter-spacing: -.02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details p, .faq details ul { margin: -6px 0 22px; color: var(--muted); max-width: 70ch; }
.faq details li { margin: 4px 0; }

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

.site-footer { background: var(--bg-2); color: var(--muted); font-size: 12.5px; padding: 40px 0 48px; border-top: 1px solid var(--line); }
.js .site-footer { padding-bottom: 104px; } /* clear the "Draw on this page" button */
.site-footer .wrap { display: grid; gap: 18px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.foot-links a { text-decoration: none; color: var(--fg-2); }
.foot-links a:hover { text-decoration: underline; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 18px; }

/* ---------- Draw-on-this-page ---------- */

.draw-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px;
  border-radius: 999px; border: 0; cursor: pointer;
  background: var(--fg); color: var(--bg); font: 600 14px/1 var(--font);
  box-shadow: 0 14px 34px -10px rgba(0,0,0,.45);
  transition: transform .3s var(--ease), opacity .3s;
}
.draw-fab:hover { transform: translateY(-2px); }
.draw-fab svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.draw-fab kbd { background: transparent; color: inherit; border-color: color-mix(in srgb, var(--bg) 35%, transparent); box-shadow: none; font-size: 11px; }
.drawing .draw-fab { opacity: 0; pointer-events: none; }
/* Touch screens: no keyboard shortcut to show. Small screens: icon only. */
@media (hover: none) { .draw-fab kbd { display: none; } }
@media (max-width: 640px) {
  .draw-fab { padding: 0; width: 52px; height: 52px; justify-content: center; right: 16px; bottom: 16px; }
  .draw-fab .fab-label, .draw-fab kbd { display: none; }
  .draw-fab svg { width: 22px; height: 22px; }
}
.no-js .draw-fab { display: none; }

.draw-layer { position: fixed; inset: 0; z-index: 70; pointer-events: none; touch-action: none; }
.drawing .draw-layer { pointer-events: auto; cursor: crosshair; }
.draw-toolbar {
  position: fixed; left: 50%; bottom: 22px; z-index: 80; transform: translate(-50%, 140%);
  display: flex; align-items: center; gap: 4px; padding: 6px;
  border-radius: 18px; background: rgba(28,28,30,.86); color: #f5f5f7;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px -12px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.1);
  transition: transform .45s var(--ease);
}
.drawing .draw-toolbar { transform: translate(-50%, 0); }
.draw-toolbar button {
  width: 40px; height: 40px; border-radius: 12px; border: 0; cursor: pointer;
  display: grid; place-items: center; background: transparent; color: inherit;
}
.draw-toolbar button:hover { background: rgba(255,255,255,.1); }
.draw-toolbar button[aria-pressed="true"] { background: rgba(255,255,255,.2); }
.draw-toolbar svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.draw-toolbar .swatch { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.draw-toolbar .sep { width: 1px; height: 24px; background: rgba(255,255,255,.18); margin: 0 4px; }
.draw-hint {
  position: fixed; left: 50%; top: 70px; z-index: 80; transform: translate(-50%, -20px);
  padding: 8px 14px; border-radius: 999px; font-size: 13px; opacity: 0; pointer-events: none;
  background: rgba(28,28,30,.86); color: #f5f5f7; transition: opacity .4s, transform .4s var(--ease);
}
.drawing .draw-hint { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Document pages (support / privacy / terms) ---------- */

.doc-hero { padding: clamp(64px, 9vw, 112px) 0 clamp(32px, 5vw, 56px); }
.doc-hero .h-lg { max-width: 18ch; }
.doc { display: grid; grid-template-columns: 220px 1fr; gap: clamp(32px, 6vw, 80px); padding-bottom: clamp(80px, 10vw, 140px); }
@media (max-width: 860px) { .doc { grid-template-columns: 1fr; } .toc { display: none; } }
.toc { position: sticky; top: 84px; align-self: start; font-size: 14px; }
.toc b { display: block; margin-bottom: 10px; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.toc a { display: block; padding: 5px 0; color: var(--fg-2); text-decoration: none; }
.toc a:hover { color: var(--accent-text); }
.prose { max-width: 70ch; }
.prose h2 { font-size: 30px; letter-spacing: -.028em; line-height: 1.15; margin: 56px 0 14px; scroll-margin-top: 80px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 20px; letter-spacing: -.02em; margin: 30px 0 8px; }
.prose p, .prose li { color: var(--fg-2); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose a { color: var(--accent-text); text-decoration: none; }
.prose a:hover { text-decoration: underline; }
.prose code { font-family: var(--mono); font-size: .88em; padding: .1em .35em; border-radius: 6px; background: var(--bg-2); }
.prose .callout {
  border-radius: var(--radius-sm); background: var(--bg-2); padding: 18px 20px; margin: 22px 0;
  border-left: 4px solid var(--accent);
}
.prose .callout p { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--muted); font-weight: 600; font-size: 13px; }
.contact-card {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center;
  border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); padding: 24px 26px; margin: 8px 0 30px;
}
.contact-card svg { width: 44px; height: 44px; stroke: var(--accent-text); fill: none; stroke-width: 1.6; }
.contact-card p { margin: 4px 0 0; color: var(--muted); }
.contact-card a { font-size: 21px; font-weight: 600; color: var(--fg); text-decoration: none; }
.contact-card a:hover { color: var(--accent-text); }

.notfound { min-height: 72vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .mark path, .loop-ipad, .loop-mac, .overlay-demo .scribble, .case .vis path { stroke-dashoffset: 0 !important; }
  .loop-ipad, .loop-mac { opacity: 1 !important; }
}
