/* Pastefold landing page. Paper and ink, with the violet fold from the logo and the popup
   (src/Popup.module.css --accent). The folded corner is the one recurring motif.
   System font like the app (San Francisco on macOS, Segoe UI on Windows): it ships optical
   sizing and tracking tables. Tracking is set per size: tight on headings, 0 on body. */

:root {
  --paper: #eceef3;
  --sheet: #ffffff;
  --ink: #171b2c;
  --soft: #555c70;
  --crease: #d5d9e2;
  --fold: #6e56cf;
  --fold-ink: #ffffff;
  --fold-tint: color-mix(in srgb, var(--fold) 13%, transparent);
  --corner: 44px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161925;
    --sheet: #1f2331;
    --ink: #eef0f6;
    --soft: #a4aabb;
    --crease: #343a4c;
    --fold: #a594f9;
    --fold-ink: #171b2c;
    --fold-tint: color-mix(in srgb, var(--fold) 20%, transparent);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  font-optical-sizing: auto;
}

a { color: inherit; }

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

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.05em 0.4em;
  border: 1px solid var(--crease);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--sheet);
  font-family: inherit;
  font-size: 0.85em;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
}

/* Header and footer */
footer, main > section {
  width: min(70rem, 100% - 2rem);
  margin-inline: auto;
}

/* Translucent header: a floating layer the page scrolls under, with a soft scroll edge
   instead of a hard divider. */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem max(1rem, (100% - 70rem) / 2);
  /* No backdrop blur: it was recomputed every frame while the sky and the scenes moved under it. */
  background: color-mix(in srgb, var(--paper) 94%, transparent);
}
/* Scroll edge: a soft fade, shown only while content actually passes under the header. */
.top::after {
  content: "";
  position: absolute;
  inset: 100% 0 auto;
  height: 0.75rem;
  background: linear-gradient(color-mix(in srgb, var(--ink) 7%, transparent), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.top[data-scrolled]::after { opacity: 1; }
[id] { scroll-margin-top: 5rem; }
@media (prefers-reduced-transparency: reduce) {
  .top { background: var(--paper); }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.top nav { display: flex; gap: 1.5rem; }
.top nav a { text-decoration: none; color: var(--soft); font-weight: 500; transition: color 0.15s ease; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }
.top nav a:active { opacity: 0.6; transition: none; }

/* Type scale: 1.0625 body, ratio ~1.333. Leading and tracking shrink as size grows. */
h1, h2, h3 { margin: 0; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 700; line-height: 1.04; letter-spacing: -0.035em; max-width: 11ch; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.small, figcaption, footer p { letter-spacing: 0.01em; }

main > section { padding: 5.5rem 0; }

/* Buttons: flat and quiet. A slightly darker fill on hover, an instant press on :active. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.8em 1.4em;
  border: 1px solid var(--crease);
  border-radius: 999px;
  background: var(--sheet);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 150ms ease-out;
}
.button svg { flex: none; }
.button.primary { border-color: var(--fold); background: var(--fold); color: var(--fold-ink); }
.button:not(.primary):hover { background: color-mix(in srgb, var(--ink) 5%, var(--sheet)); }
.button.primary:hover { background: color-mix(in srgb, var(--fold) 90%, var(--ink)); }
/* Download button: the visitor's OS logo only (data-os is set by demo.js; macOS until then). */
:root[data-os="win"] [data-href-mac] .os-mac, :root:not([data-os="win"]) [data-href-mac] .os-win { display: none; }
.download .os-mac { margin-top: -0.15em; }
/* Feedback on press, instantly. */
.button:active, .chip:active { transform: scale(0.97); transition: transform 100ms ease-out; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 37.5rem);
  gap: 3.5rem;
  align-items: center;
}
main > .hero { padding-top: 3rem; }

.lede { font-size: 1.25rem; color: var(--soft); max-width: 34em; margin: 1.5rem 0 2rem; }
.lede kbd { color: var(--ink); }
.spin { display: inline-flex; gap: 0.25em; vertical-align: bottom; padding-bottom: 2px; overflow: hidden; }
.spin kbd.in { animation: key-in 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.spin kbd.out { animation: key-out 0.5s cubic-bezier(0.55, 0, 1, 0.45) both; }
@keyframes key-in { from { transform: translateY(-110%); opacity: 0; } }
@keyframes key-out { to { transform: translateY(110%); opacity: 0; } }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
/* Under the download button: the other OS's installer (swapped by demo.js like the button). */
.other-os-line { margin: 0.75rem 0 0; font-size: 0.9rem; }
.other-os { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 0.2em; }
.other-os:hover { text-decoration-color: currentColor; }
.price .other-os-line { text-align: center; color: var(--soft); }
.hero .other-os-line { color: var(--sky-ink); text-shadow: 0 0 12px rgb(255 255 255 / 0.7), 0 0 2px rgb(255 255 255 / 0.6); }
.small { color: var(--soft); font-size: 0.95rem; margin-top: 1.25rem; }

/* Folded sheet: the logo's corner, cut with clip-path and filled with the fold color. */
.sheet {
  position: relative;
  background: var(--sheet);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--corner)), calc(100% - var(--corner)) 100%, 0 100%);
}
.sheet::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: var(--corner);
  height: var(--corner);
  background: linear-gradient(to top left, transparent 50%, var(--fold) 50%);
}

/* Demo popup: tokens and sizes copied from src/index.css and src/Popup.module.css. */
.demo { margin: 0; }

/* Popup and "closed" card share one cell, so closing swaps them in place. */
.stage { display: grid; }
.stage > * { grid-area: 1 / 1; }

/* Open/close materializes: blur, scale and opacity together, along the same path both ways.
   macOS drops the popup from the menu bar (origin top); Windows raises it from the taskbar. */
.popup {
  transform-origin: 50% 0;
  transition: opacity 0.22s ease, transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.32s ease;
}
[data-os="win"] .popup { transform-origin: 50% 100%; }
.popup.closed { opacity: 0; transform: translateY(-10px) scale(0.96); filter: blur(8px); pointer-events: none; }
[data-os="win"] .popup.closed { transform: translateY(10px) scale(0.96); }

@media (prefers-reduced-motion: no-preference) {
  .popup { animation: materialize 0.5s 0.15s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
  @keyframes materialize {
    from { opacity: 0; transform: translateY(-10px) scale(0.96); filter: blur(8px); }
  }
}

.closed-card {
  align-self: center;
  justify-self: center;
  max-width: 24rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--soft);
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.22s ease, transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.closed-card.shown { opacity: 1; transform: none; transition-delay: 0.08s; }
.closed-card p { margin: 0 0 1rem; }
.closed-title { color: var(--ink); font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  .popup, .popup.closed, [data-os="win"] .popup.closed, .closed-card { transform: none; filter: none; }
}

.popup, .privacy-vis {
  --p-bg: #f6f6f6;
  --p-fg: #1d1d1f;
  --p-muted: rgba(0, 0, 0, 0.58);
  --p-separator: rgba(0, 0, 0, 0.12);
  --p-search: rgba(0, 0, 0, 0.06);
  --p-accent: #6e56cf;
  --p-danger: #c62828;
  --p-selection: color-mix(in srgb, var(--p-accent) 14%, transparent);
  --p-icon: color-mix(in srgb, var(--p-fg) 78%, transparent);
  display: flex;
  flex-direction: column;
  background: var(--p-bg);
  color: var(--p-fg);
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--p-separator), 0 28px 60px -20px rgb(0 0 0 / 0.4);
  font: 13px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  overflow: hidden;
}

@media (prefers-color-scheme: dark) {
  .popup, .privacy-vis {
    --p-bg: #1e1e20;
    --p-fg: #f2f2f7;
    --p-muted: rgba(255, 255, 255, 0.5);
    --p-separator: rgba(255, 255, 255, 0.12);
    --p-search: rgba(255, 255, 255, 0.08);
    --p-accent: #a594f9;
    --p-danger: #ff6b6b;
    --p-selection: color-mix(in srgb, var(--p-accent) 20%, transparent);
  }
}

/* Windows: Segoe UI, Windows 11 corner radius, near-opaque tint (src/index.css data-platform). */
[data-os="win"] .popup {
  --p-bg: #f6f6f6;
  border-radius: 8px;
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  [data-os="win"] .popup { --p-bg: #202022; }
}

.popup kbd {
  min-width: 0;
  padding: 0 4px;
  font-size: 10px;
  line-height: 15px;
  font-weight: 400;
  color: var(--p-muted);
  background: none;
  border: 1px solid var(--p-separator);
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}

.popup-head {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 8px 0 14px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--p-separator);
}
.popup .logo { flex: none; color: var(--p-muted); }

.search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 4px;
  color: var(--p-muted);
}
.search input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--p-fg);
  font: inherit;
}
.search input::placeholder { color: var(--p-muted); }
.search:focus-within { box-shadow: 0 2px 0 -1px var(--p-accent); }

.chip {
  flex: none;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--p-separator);
  border-radius: 11px;
  background: none;
  color: var(--p-muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.chip:hover { color: var(--p-fg); }
.chip.active {
  color: var(--p-accent);
  border-color: var(--p-accent);
  background: color-mix(in srgb, var(--p-accent) 12%, transparent);
}

.icon-btn { display: grid; place-items: center; width: 26px; height: 24px; color: var(--p-icon); }
.commands {
  display: flex;
  gap: 2px;
  padding-left: 6px;
  margin-left: 2px;
  border-left: 1px solid var(--p-separator);
}

.items-wrap { position: relative; height: calc(28px * 10); overflow: hidden; }
.items { position: relative; list-style: none; margin: 0; padding: 0; }
.highlight {
  position: absolute;
  top: 2px;
  left: 4px;
  right: 4px;
  height: 24px;
  border-radius: 6px;
  background: var(--p-selection);
  pointer-events: none;
}
.items li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  margin: 0 4px;
  padding: 0 10px;
  isolation: isolate;
  cursor: default;
}
.items li.separated::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8px;
  right: 8px;
  border-top: 1px solid var(--p-separator);
}
.items .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.items .pin { flex: none; color: var(--p-muted); }
.items .empty { justify-content: center; height: 56px; color: var(--p-muted); }
.swatch { width: 14px; height: 14px; flex: none; border-radius: 3px; box-shadow: inset 0 0 0 1px var(--p-separator); }

/* Source app icon (18 px, like .appIcon). */
.app { width: 18px; height: 18px; flex: none; }

.hints {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 32px;
  padding: 0 6px;
  flex-shrink: 0;
  border-top: 1px solid var(--p-separator);
  overflow: hidden;
}
.hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 6px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--p-muted);
  font: inherit;
  font-size: 11px;
  white-space: nowrap;
  cursor: default;
}
.hint .keys { gap: 2px; }
.hint:hover:not(:disabled) { color: var(--p-fg); background: color-mix(in srgb, var(--p-fg) 9%, transparent); }
.hint:active:not(:disabled) { background: color-mix(in srgb, var(--p-fg) 14%, transparent); }
.hint:disabled { opacity: 0.45; }
.hint.danger { color: var(--p-danger); }

.demo figcaption { margin-top: 1.125rem; color: var(--soft); font-size: 0.95rem; }
.try {
  padding: 0;
  border: 0;
  background: none;
  color: var(--fold);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Features: a list of features on the left, one stage on the right that plays the selected
   one. The stage reuses the popup styles, so the scenes look like the app. */
.section-lede { color: var(--soft); margin: 0.75rem 0 0; }
.how {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 3rem;
  align-items: start;
  margin-top: 2.5rem;
}
.how-tabs { display: grid; }
.how-tabs [role="tab"] {
  position: relative;
  display: grid;
  gap: 0.25rem;
  padding: 1rem 0 1rem 1.25rem;
  border: 0;
  border-left: 2px solid var(--crease);
  background: none;
  color: var(--soft);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.how-tabs strong { color: var(--ink); font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }
.how-tabs [role="tab"]:not([aria-selected="true"]) strong { color: var(--soft); }
.how-tabs [role="tab"]:hover strong { color: var(--ink); }
.how-tabs [role="tab"]:active { opacity: 0.6; }
/* Progress along the left edge of the selected feature. */
.how-tabs [role="tab"]::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--fold);
  transform: scaleY(0);
  transform-origin: top;
}
/* transform, not height: the bar runs for the whole scene and height relaid out every frame. */
.how-tabs [aria-selected="true"]::before { transform: none; }
.how-tabs .playing::before { animation: progress var(--dur, 7s) linear backwards; }
.how-tabs .done::before { animation: none; transform: none; }
.paused .playing::before { animation-play-state: paused; }
@keyframes progress { from { transform: scaleY(0); } }

.scene-wrap { position: relative; }
.replay {
  position: absolute;
  right: 0.75rem;
  top: calc(100% + 0.5rem);
  padding: 0.25rem 0.5rem;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--soft);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}
.replay:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.replay:active { opacity: 0.6; }

.scene {
  isolation: isolate; /* keep its keycaps, tips and cursor under the sticky header */
  --bar: 26px;
  position: relative;
  height: 22rem;
  border-radius: 14px;
  overflow: hidden;
  background: color-mix(in srgb, #3876ba 10%, var(--paper));
  box-shadow: inset 0 0 0 1px var(--crease);
  container-type: inline-size;
  font: 13px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
[data-os="win"] .scene { --bar: 40px; font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; }

.scene .bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--bar);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 12px;
  background: color-mix(in srgb, var(--sheet) 65%, transparent); /* no blur: only flat background behind */
}
[data-os="win"] .scene .bar { top: auto; bottom: 0; }
.scene .tray { display: grid; place-items: center; width: 26px; height: 22px; border-radius: 5px; color: var(--ink); }

.desk { position: absolute; inset: calc(var(--bar) + 16px) 16px 16px; display: flex; gap: 14px; align-items: flex-start; }
[data-os="win"] .desk { inset: 16px 16px calc(var(--bar) + 16px); }
.win {
  flex: 1;
  max-width: 62%;
  background: var(--sheet);
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--crease), 0 14px 30px -14px rgb(0 0 0 / 0.3);
  overflow: hidden;
}
.desk.two .win { max-width: none; }
.win-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-bottom: 1px solid var(--crease);
  color: var(--soft);
  font-size: 12px;
}
/* macOS traffic lights; Windows close glyph on the right. */
.win-bar::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; box-shadow: 14px 0 #febc2e, 28px 0 #28c840; margin-right: 34px; }
[data-os="win"] .win-bar::before { display: none; }
[data-os="win"] .win-bar::after { content: "✕"; margin-left: auto; font-size: 11px; }
.win-body { display: grid; gap: 6px; padding: 12px 14px; color: var(--ink); }
.win-body p { margin: 0; }
.doc-title { font-weight: 600; font-size: 14px; }
.muted { color: var(--soft); }
.pasted { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.pasted a { color: var(--fold); text-decoration: underline; }
.pasted .keys kbd { font-size: 10px; color: var(--soft); }
.code { margin: 0; font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; }
.shot {
  display: grid;
  gap: 5px;
  width: 9.5rem;
  padding: 10px;
  border-radius: 6px;
  background: #fff;
  color: #1d1d1f;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.12);
  font-size: 11px;
}
.shot i { display: block; height: 5px; border-radius: 3px; background: #e4e4e8; }
.shot i + i { width: 60%; }
.field-line .sel-text { background: color-mix(in srgb, var(--fold) 32%, transparent); border-radius: 2px; }
.field { display: grid; grid-template-columns: 3.5rem 1fr; align-items: center; gap: 8px; }
.input {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--crease);
  border-radius: 6px;
  overflow: hidden;
  white-space: nowrap;
}
.input.focus { border-color: var(--fold); box-shadow: 0 0 0 3px var(--fold-tint); }
.inserted { animation: inserted 0.9s ease; }
@keyframes inserted { from { background: var(--fold-tint); } }

/* Mini popup, anchored to the Pastefold icon: under the menu bar, or above the taskbar. */
.popup.mini { position: absolute; z-index: 3; right: 12px; top: calc(var(--bar) + 6px); width: min(300px, 72%); animation: none; }
/* The scenes open and close it over and over: animating blur() on it is too costly. */
.popup.mini, .popup.mini.closed { filter: none; transition: opacity 0.22s ease, transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); }
[data-os="win"] .popup.mini { top: auto; bottom: calc(var(--bar) + 6px); }
.popup.mini .items { padding: 2px 0 6px; }
.popup.mini .items li[aria-selected="true"] { background: var(--p-selection); border-radius: 6px; }
.popup.mini .logo { display: grid; color: var(--p-muted); }
.popup.mini .q { flex: 1; min-width: 0; color: var(--p-fg); white-space: nowrap; }
.popup.mini .q.placeholder { color: var(--p-muted); }
.popup.mini .q::after { content: ""; display: inline-block; width: 1px; height: 14px; margin-left: 1px; vertical-align: -2px; background: var(--p-accent); }
.popup.mini .q.placeholder::after { margin: 0 2px 0 0; order: -1; }

.cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.3, 0.7, 0.2, 1), opacity 0.2s ease;
}
.cursor.on { opacity: 1; }
.cursor svg { display: block; transition: transform 0.1s ease-out; transform-origin: 2px 2px; }
.cursor.down svg { transform: scale(0.85); }

.keystroke {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 11;
  padding: 6px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--ink) 90%, transparent); /* no backdrop blur: re-blurred every frame of its transition */
  opacity: 0;
  transform: translate(-50%, 8px) scale(0.96);
  transition: opacity 0.15s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.keystroke.on { opacity: 1; transform: translate(-50%, 0); }
/* Windows: the popup rises from the bottom right, so the keys sit bottom left. */
[data-os="win"] .keystroke { bottom: calc(var(--bar) + 18px); left: 16px; transform: translateY(8px) scale(0.96); }
[data-os="win"] .keystroke.on { transform: none; }
.keystroke .keys { gap: 4px; }
.keystroke kbd { min-width: 2.2rem; padding: 4px 10px; font-size: 15px; border-color: transparent; }

.tip {
  position: absolute;
  z-index: 9;
  max-width: 15rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12.5px;
  line-height: 1.35;
  box-shadow: 0 10px 24px -10px rgb(0 0 0 / 0.4);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tip.above { transform: translateY(4px); }
.tip.on { opacity: 1; transform: none; }

.menu {
  position: absolute;
  z-index: 8;
  min-width: 11rem;
  padding: 5px;
  border-radius: 8px;
  background: var(--sheet);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--crease), 0 12px 30px -10px rgb(0 0 0 / 0.35);
  opacity: 0;
  transform: scale(0.98);
  transform-origin: 0 0;
  transition: opacity 0.12s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.menu.on { opacity: 1; transform: none; }
.menu-item { display: flex; justify-content: space-between; gap: 1rem; padding: 2px 10px; border-radius: 5px; line-height: 20px; }
.menu-item.hot { background: var(--fold); color: var(--fold-ink); }
.menu-item.off { opacity: 0.4; }
.menu-sep { height: 1px; margin: 4px 6px; background: var(--crease); }

@container (max-width: 30rem) {
  .desk { flex-direction: column; }
  .win { max-width: none; width: 100%; }
  .popup.mini { width: calc(100% - 24px); }
}

@media (prefers-reduced-motion: reduce) {
  .cursor, .cursor svg, .keystroke, .tip, .menu { transition: none; }
  .inserted { animation: none; }
  .how-tabs .playing::before { animation: none; }
}

.also-title { margin-top: 5rem; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
/* No panel: the tiles sit right on the section's light, split by hairlines like a spec
   sheet. Each tile draws a line on its left and top as a shadow; the list is pulled left by
   one tile padding and clips its edges, so only the lines between tiles show and the text
   lines up with the title. Tiles can fade in without a grid showing. */
.also {
  --pad: 2rem;
  --hairline: color-mix(in srgb, var(--ink) 12%, transparent);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 1.5rem 0 0 calc(-1 * var(--pad));
  padding: 0;
  list-style: none;
  color: var(--soft);
  /* 1px inside the edge, not overflow: at a fractional position the outer line would still
     bleed in half a pixel. */
  clip-path: inset(1px 0 0 1px);
}
.also li {
  display: grid;
  align-content: start;
  gap: 0.3rem;
  padding: 1.75rem var(--pad) 1.9rem;
  box-shadow: -1px 0 0 var(--hairline), 0 -1px 0 var(--hairline);
}
.also-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.85rem;
  border-radius: 0.8rem;
  background: var(--fold);
  color: var(--fold-ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25), 0 6px 14px -6px color-mix(in srgb, var(--fold) 70%, transparent);
}
.also strong { color: var(--ink); font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.also li > span:last-child { font-size: 0.95rem; line-height: 1.45; }

/* Privacy: straight on the dark vault, no sheet. The band is dark in both themes (like the
   sky), so the section sets its own tokens and everything inside follows them. */
.private {
  --ink: #f5f5f7;
  --soft: rgb(235 235 245 / 0.66);
  --fold: #a594f9;
  --fold-ink: #171b2c;
  --fold-tint: rgb(165 148 249 / 0.16);
  color: var(--ink);
  padding-block: 7.5rem;
}
.private-head { display: grid; justify-items: center; text-align: center; }
.eyebrow { margin: 0 0 1rem; color: var(--fold); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.private h2 { max-width: 15ch; font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: 1.05; letter-spacing: -0.03em; }
.private-lede { max-width: 32em; color: var(--soft); font-size: 1.2rem; line-height: 1.5; margin: 1.25rem 0 0; text-wrap: balance; }
/* One centered stage: the loop, the title and detail of the fact it shows, and a tab per
   fact. The active tab fills over the loop's length, so you see when the next one comes. */
.private-stage { display: grid; justify-items: center; margin-top: 3rem; }
.private .privacy-vis { width: min(40rem, 100%); }
.pv-caption { display: grid; width: min(34rem, 100%); margin-top: 2rem; text-align: center; }
.pv-text {
  grid-area: 1 / 1; /* stacked: the caption is as tall as the longest one, nothing jumps */
  opacity: 0;
  visibility: hidden; /* hidden ones leave the accessibility tree */
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s 0.3s;
}
.pv-text.on { opacity: 1; visibility: visible; transform: none; transition-delay: 0.1s, 0.1s, 0s; }
.pv-text h3 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.pv-text p { margin: 0.5rem 0 0; color: var(--soft); font-size: 1.05rem; line-height: 1.5; text-wrap: balance; }
/* Light text on the dark band: grayscale smoothing, or macOS renders it too bold. */
.pv-text p, .private-lede { -webkit-font-smoothing: antialiased; }

.pv-tabs { display: flex; gap: 0.75rem; margin-top: 1.75rem; }
.fact {
  position: relative;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.08);
  color: var(--soft);
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.1s ease;
}
.fact:hover { background: rgb(255 255 255 / 0.14); color: var(--ink); }
.fact:active { transform: scale(0.94); }
.fact[aria-pressed="true"] { background: var(--fold); color: var(--fold-ink); }
/* Progress under the active tab. */
.fact::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: -0.625rem;
  height: 2px;
  border-radius: 1px;
  background: var(--fold);
  transform: scaleX(0);
  transform-origin: left;
}
.fact[aria-pressed="true"]::after { transform: none; }
.private.tick .fact[aria-pressed="true"]::after { animation: fact-progress var(--d, 5s) linear both; }
@keyframes fact-progress { from { transform: scaleX(0); } }

/* Loops: one rail for all four (copied item, Pastefold, what is kept), so only the content
   changes between facts. Each step is a short animation placed with a delay; base styles are
   the end state, which is also what reduced motion shows. Transform and opacity only. */
.private .privacy-vis {
  --p-bg: #1b2232;
  --p-fg: #f2f2f7;
  --p-muted: rgb(255 255 255 / 0.55);
  --p-separator: rgb(255 255 255 / 0.16);
  --p-search: rgb(255 255 255 / 0.08);
  --p-accent: #a594f9;
  --p-danger: #ff6b6b;
  --p-selection: rgb(165 148 249 / 0.24);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  display: grid;
  height: 21rem;
  border-radius: 1.5rem;
  /* Glow behind Pastefold's tile, on a slightly lighter material than the band. */
  background:
    radial-gradient(40% 35% at 50% 37%, rgb(165 148 249 / 0.22), transparent 70%),
    linear-gradient(rgb(255 255 255 / 0.06), rgb(255 255 255 / 0.02)),
    var(--p-bg);
  color: var(--p-fg);
  /* Bright top edge: light catching the panel. */
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12), inset 0 0 0 1px rgb(255 255 255 / 0.08), 0 30px 60px -30px rgb(0 0 0 / 0.6);
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  overflow: hidden;
}

/* Loops share one cell and cross-fade, settling in from slightly smaller. */
.pv {
  grid-area: 1 / 1;
  position: relative;
  margin: 2rem 1.5rem;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.4s ease, transform 0.5s var(--ease);
  pointer-events: none;
}
.pv.on { opacity: 1; transform: none; }
.pv p { margin: 0; }
.pv > * { position: absolute; left: 0; right: 0; margin-inline: auto; }

/* The rail: copied item at the top, Pastefold in the middle, the result below. */
.pv-in, .pv-out { width: fit-content; max-width: 100%; }
.pv-in { top: 0; display: grid; justify-items: center; }
.pv-in > * { grid-area: 1 / 1; }
.pv-track { top: 2.75rem; width: 0; height: 9rem; border-left: 1.5px dashed var(--p-separator); }
.pv-core {
  top: 5.5rem;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.875rem;
  background: var(--p-accent);
  color: var(--p-bg);
  box-shadow: 0 8px 20px -8px var(--p-accent);
}
.pv-core > * { grid-area: 1 / 1; }
.pv-out { top: 11.75rem; }
.pv-dot { --dist: 2.25rem; top: 2.75rem; width: 8px; height: 8px; border-radius: 50%; background: var(--p-accent); opacity: 0; }
.pv-dot2, .pv-dot4 { top: 8.875rem; }
.pv-cap { color: var(--p-muted); font-size: 11px; letter-spacing: 0.01em; text-align: center; }
.pv-chip {
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 9px;
  background: var(--p-search);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pv-chip small { margin-right: 7px; color: var(--p-muted); font-size: 11px; }

/* Steps, reused by every loop. */
@keyframes pv-flash { from { background: var(--p-selection); } }
@keyframes pv-travel {
  0% { opacity: 0; transform: none; }
  15% { opacity: 1; }
  55% { transform: translateY(calc(var(--dist) * 0.55)) scaleY(1.7); } /* stretches with speed */
  85% { opacity: 1; }
  100% { opacity: 0; transform: translateY(var(--dist)); }
}
@keyframes pv-pulse { 0%, 100% { transform: none; } 40% { transform: scale(1.1); } }
@keyframes pv-reveal { from { opacity: 0; transform: translateY(-6px); } }
@keyframes pv-leave { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-6px); } }
@keyframes pv-enter { from { opacity: 0; transform: translateY(6px); } }
@keyframes pv-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
@keyframes pv-pop { from { opacity: 0; transform: scale(0.4); } }

/* Every loop opens the same way: the item is copied, a dot carries it to Pastefold. */
.run .pv-in > :only-child, .run .pv-a { animation: pv-flash 0.8s ease both; }
.run .pv-dot1 { animation: pv-travel 0.7s 0.45s ease-in-out both; }
.run .pv-core { animation: pv-pulse 0.45s 1.1s var(--ease) both; }
.run .pv-dot2 { animation: pv-travel 0.6s 1.45s ease-in-out both; }

/* 1. Encrypted: the logo turns into a lock, bytes land on disk. */
.pv-logo { transition: none; }
.pv-enc .pv-logo { opacity: 0; }
.run.pv-enc .pv-logo { animation: pv-leave 0.25s 1.15s ease both; }
.run.pv-enc .pv-lock { animation: pv-pop 0.35s 1.15s var(--ease) both; }
.pv-disk { display: grid; gap: 4px; justify-items: center; }
.pv-disk code { color: var(--p-accent); font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-align: center; }
.run .pv-disk { animation: pv-reveal 0.5s 2s var(--ease) both; }

/* 2. Passwords: a note goes into the history, then a password is stopped at Pastefold. */
.pv-a { opacity: 0; }
.run .pv-a { animation: pv-flash 0.8s ease both, pv-leave 0.3s 3s ease both; }
.run .pv-b { animation: pv-enter 0.35s 3.2s var(--ease) both; }
.run .pv-dot3 { animation: pv-travel 0.7s 3.65s ease-in-out both; }
.pv-history { display: grid; gap: 2px; width: 15rem; margin-block: 0; padding: 5px; border-radius: 9px; list-style: none; box-shadow: inset 0 0 0 1px var(--p-separator); }
.pv-history li { height: 1.6rem; padding: 0 8px; border-radius: 5px; line-height: 1.6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-new { background: var(--p-selection); }
@keyframes pv-push { from { transform: translateY(calc(-1.6rem - 2px)); } }
.run .pv-history li { animation: pv-push 0.5s 2s var(--ease) both; }
.run .pv-history .pv-new { animation: pv-reveal 0.5s 2s var(--ease) both; }
.pv-stop { display: grid; place-items: center; width: 100%; height: 100%; border-radius: inherit; background: var(--p-danger); color: #fff; }
.run.pv-pw .pv-core { animation: pv-pulse 0.45s 1.1s var(--ease) both, pv-shake 0.45s 4.35s ease both; }
.run .pv-stop { animation: pv-pop 0.3s 4.3s var(--ease) both; }
.pv-side { top: 6.6rem; left: calc(50% + 2.4rem); right: auto; margin: 0; color: var(--p-danger); font-weight: 600; }
.run .pv-side { animation: pv-enter 0.35s 4.45s var(--ease) both; }

/* 3. Trackers and codes: the link comes out clean, the code runs out and is deleted. */
.pv-tidy .pv-chip { font-size: 13px; }
.pv-bad { color: var(--p-danger); }
.pv-kept { display: grid; gap: 8px; justify-items: center; }
.pv-clean small { margin: 0 0 0 8px; color: var(--p-danger); }
.pv-clean s { text-decoration-color: var(--p-danger); }
.run .pv-clean { animation: pv-reveal 0.5s 2s var(--ease) both; }
.run.pv-tidy .pv-core { animation: pv-pulse 0.45s 1.1s var(--ease) both, pv-pulse 0.45s 4.3s var(--ease) both; }
.run .pv-dot4 { animation: pv-travel 0.6s 4.65s ease-in-out both; }
.pv-code { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; opacity: 0.45; }
.pv-code > span { text-decoration: line-through; text-decoration-color: var(--p-danger); }
.pv-code small { margin: 0; }
/* Appears, stays while the ring runs out, then dims and is struck through. */
@keyframes pv-code { 0% { opacity: 0; transform: translateY(-6px); } 22%, 72% { opacity: 1; transform: none; } }
@keyframes pv-strike { from { text-decoration-color: transparent; } }
.run .pv-code { animation: pv-code 1.8s 5.2s var(--ease) both; }
.run .pv-code > span { animation: pv-strike 0.3s 6.5s ease both; }
.pv-ring { transform: rotate(-90deg); }
.pv-ring circle { fill: none; stroke: var(--p-danger); stroke-width: 2.5; stroke-dasharray: 100; stroke-dashoffset: 100; }
@keyframes pv-count { from { stroke-dashoffset: 0; } }
.run .pv-ring circle { animation: pv-count 1.1s 5.4s linear both; } /* ten minutes, sped up */

/* 4. Network: the dot is stopped at the wall; account, sync and analytics are crossed out. */
.pv-net .pv-dot2 { --dist: 1.9rem; }
.pv-net .pv-track { height: 8.5rem; } /* stops at the wall */
@keyframes pv-blocked {
  0% { opacity: 0; transform: none; }
  15% { opacity: 1; }
  55% { transform: translateY(var(--dist)); }
  75% { opacity: 1; transform: translateY(calc(var(--dist) - 8px)); }
  100% { opacity: 0; transform: translateY(calc(var(--dist) - 8px)); }
}
.run.pv-net .pv-dot2 { animation: pv-blocked 0.8s 1.45s ease-out both; }
.pv-wall { top: 11.25rem; width: 9rem; height: 2px; border-radius: 1px; background: var(--p-separator); }
@keyframes pv-hit { from { background: var(--p-danger); transform: scaleX(1.15); } }
.run .pv-wall { animation: pv-hit 0.6s 1.9s ease-out both; }
.pv-routes { top: 12.25rem; display: flex; gap: 6px; }
.pv-routes span { display: flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; background: var(--p-search); color: var(--p-muted); font-size: 12px; white-space: nowrap; }
.pv-routes b { color: var(--p-danger); font-size: 10px; }
.run .pv-routes b { animation: pv-pop 0.3s 2.1s var(--ease) both; }
.run .pv-routes span:nth-child(2) b { animation-delay: 2.22s; }
.run .pv-routes span:nth-child(3) b { animation-delay: 2.34s; }
.pv-note { top: 14.75rem; }
.run .pv-note { animation: pv-reveal 0.5s 2.8s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  .pv *, .fact::after { animation: none !important; }
  .pv { transform: none; transition: opacity 0.2s ease; }
}

/* Compare: Pastefold's column sits on a sheet tinted with the fold color. */
.compare-scroll { overflow-x: auto; margin-top: 2.5rem; border-radius: 1rem; background: var(--sheet); }
.compare table { width: 100%; min-width: 54rem; border-collapse: collapse; font-size: 0.95rem; }
.compare th, .compare td { padding: 0.85rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--crease); }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare thead th { font-weight: 600; vertical-align: bottom; }
.compare thead small { display: block; color: var(--soft); font-weight: 400; }
.compare tbody th { font-weight: 500; }
.compare td { color: var(--soft); }
.compare .us { background: var(--fold-tint); color: var(--ink); font-weight: 600; }
.compare thead .us { color: var(--fold); font-size: 1.05rem; }
.compare .yes { color: var(--fold); margin-right: 0.4em; }
.compare .no { color: var(--soft); opacity: 0.7; }
/* Feature names stay in view while the table scrolls sideways on phones. */
.compare tbody th, .compare thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--sheet); }
@media (max-width: 600px) { .compare tbody th { width: 7rem; padding-right: 0.5rem; font-size: 0.85rem; } }

/* Pricing: heading on the left edge like every section, the card centered under it.
   Depth: bigger surface, deeper shadow. clip-path cuts box-shadow, so the shadow is a
   drop-shadow on an empty copy of the sheet, stacked under it in the same grid cell. */
.pricing { text-align: center; }
.pricing .section-lede { margin-inline: auto; }
.price-wrap { display: grid; justify-items: center; margin-top: 2.5rem; }
.price-wrap > .sheet, .price-wrap::before { grid-area: 1 / 1; width: min(27rem, 100%); }
.price-wrap::before {
  content: "";
  /* Corner cut by the gradient, not clip-path (clip-path would also cut the shadow). */
  background: linear-gradient(315deg, transparent calc(var(--corner) / 1.4142), var(--sheet) 0);
  border-radius: 1.25rem 1.25rem 0 1.25rem;
  filter: drop-shadow(0 1.5rem 3rem rgb(23 60 45 / 0.18)) drop-shadow(0 2px 4px rgb(23 27 44 / 0.06));
  /* Own layer: otherwise animations nearby re-raster tiles it shares and re-run the filter. */
  will-change: transform;
}
.price { padding: 2.5rem 2.5rem 3rem; border-radius: 1.25rem 1.25rem 0 1.25rem; text-align: left; }
/* Light catching the top edge of the sheet. */
.price { box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.9); }
.price-name { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
.price-name span { margin-left: 0.4rem; padding: 0.15rem 0.55rem; border-radius: 99px; background: var(--fold-tint); color: var(--fold); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.01em; }
.amount { font-size: 4.5rem; font-weight: 700; line-height: 1; margin: 1.25rem 0 0; letter-spacing: -0.045em; }
.amount span { font-size: 1.1rem; font-weight: 500; color: var(--soft); letter-spacing: 0; }
.price-anchor { margin: 0.6rem 0 0; color: var(--soft); font-size: 0.95rem; }
.checks { list-style: none; padding: 1.5rem 0 0; margin: 1.5rem 0 1.75rem; border-top: 1px solid var(--crease); display: grid; gap: 0.7rem; }
.checks li { display: flex; gap: 0.6rem; align-items: flex-start; line-height: 1.35; }
.checks svg { flex: none; margin-top: 0.05rem; color: var(--fold); }
.price .button { display: flex; justify-content: center; width: 100%; padding-block: 0.95rem; font-size: 1.05rem; }
.price-trust { margin: 1rem 0 0; text-align: center; color: var(--soft); font-size: 0.88rem; }
.price-trust a { color: inherit; text-decoration-color: var(--crease); text-underline-offset: 0.2em; }
.price-trust a:hover { color: var(--ink); }
/* Hovering lifts the folded corner a little more, like a page you're about to turn:
   --corner is registered so it can be transitioned. */
@property --corner { syntax: "<length>"; inherits: true; initial-value: 44px; }
.price-wrap { transition: --corner 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
.price-wrap:hover { --corner: 54px; }
/* The checks cascade in after the card, each tick drawn like a pen stroke. */
.reveal .checks > li[data-reveal].in { animation-name: reveal-check; animation-duration: 0.6s; }
/* Tiles of the "Also included" panel: the hairlines stay put and only the content rises, a row
   at a time (the script gives a whole row one delay); icon, title and text follow 50ms apart. */
.reveal .also > li[data-reveal] { opacity: 1; animation: none; }
.reveal .also > li[data-reveal]:not(.in) > * { opacity: 0; }
.reveal .also > li[data-reveal].in > * { animation: reveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms) backwards; }
.reveal .also > li[data-reveal].in > :nth-child(2) { animation-delay: calc(var(--reveal-delay, 0ms) + 50ms); }
.reveal .also > li[data-reveal].in > :nth-child(3) { animation-delay: calc(var(--reveal-delay, 0ms) + 100ms); }
@keyframes reveal-check { from { opacity: 0; translate: 0 0.5rem; } }
.checks path { stroke-dasharray: 16; }
.reveal .checks > li[data-reveal]:not(.in) path { stroke-dashoffset: 16; }
.reveal .checks > li[data-reveal].in path { animation: tick 0.5s cubic-bezier(0.65, 0, 0.35, 1) calc(var(--reveal-delay, 0ms) + 150ms) backwards; }
@keyframes tick { from { stroke-dashoffset: 16; } }
@media (prefers-reduced-motion: reduce) {
  .price-wrap { transition: none; }
  .price-wrap:hover { --corner: 44px; }
  .reveal .checks > li[data-reveal].in path { animation: none; }
}
@media (prefers-color-scheme: dark) {
  .price-wrap::before { filter: drop-shadow(0 1.5rem 3rem rgb(0 0 0 / 0.5)); }
  .price { box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08); }
}

/* Pricing */

/* FAQ. On the home page: title and a pointer to the help on the left, staying in view
   while the answers scroll by on the right. Other pages reuse the list on its own.
   A plain list with hairlines: no cards, no blur, so opening only animates one height. */
.faq > * { max-width: 47.5rem; }
section.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); gap: 2rem 4rem; align-items: start; }
section.faq > * { max-width: none; }
.faq-intro { position: sticky; top: 6rem; padding-top: 0.75rem; }
.faq-intro h2 { margin: 0; }
.faq-intro a { color: var(--ink); text-decoration-color: var(--crease); text-underline-offset: 0.2em; }
.faq-intro a:hover { text-decoration-color: currentColor; }
section .faq-list { border-top: 1px solid var(--crease); }
.faq h2 { margin-bottom: 1.5rem; }
section.faq h2 { margin-bottom: 0; }
.faq details { border-bottom: 1px solid var(--crease); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 0;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease;
}
.faq summary:hover, .faq details[open] summary { color: var(--fold); }
.faq summary::-webkit-details-marker { display: none; }
/* A thin plus that turns into a cross, critically damped (no overshoot). */
.faq summary::after {
  content: "";
  flex: none;
  width: 0.85rem;
  height: 0.85rem;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
  color: var(--soft);
  transition: rotate 0.4s cubic-bezier(0.25, 1, 0.5, 1), color 0.15s ease;
}
.faq summary:hover::after, .faq details[open] summary::after { color: var(--fold); }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { margin: -0.4rem 2.5rem 1.4rem 0; color: var(--soft); max-width: 40em; line-height: 1.55; }
.faq details p a { color: inherit; text-underline-offset: 0.2em; }
@media (max-width: 860px) {
  section.faq { grid-template-columns: 1fr; }
  .faq-intro { position: static; }
}

/* Height and opacity together on one curve; without support the answer just appears. */
@supports (interpolate-size: allow-keywords) {
  .faq { interpolate-size: allow-keywords; }
  .faq details::details-content {
    block-size: 0;
    overflow: clip;
    opacity: 0;
    transition: block-size 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease, content-visibility 0.4s allow-discrete;
  }
  .faq details[open]::details-content { block-size: auto; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .faq details::details-content { transition: opacity 0.2s ease, content-visibility 0.2s allow-discrete; }
  .faq summary::after { transition: none; }
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--crease);
  color: var(--soft);
}
footer p { margin: 0; font-size: 0.9rem; }

/* Mobile */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 2.5rem; }
  .how { grid-template-columns: 1fr; gap: 1.5rem; }
  .how-tabs [role="tab"]:not([aria-selected="true"]) > span { display: none; }
  .also { grid-template-columns: repeat(2, 1fr); }
  .private { padding-block: 6.5rem; }
  .private-stage { margin-top: 2.5rem; }
  main > section { padding: 4rem 0; }
}

@media (max-width: 520px) {
  .also { grid-template-columns: 1fr; }
  .also { --pad: 0px; }
  .also li { grid-template-columns: auto 1fr; column-gap: 1rem; row-gap: 0.15rem; padding: 1.25rem 0; }
  .also-icon { grid-row: span 2; margin-bottom: 0; }
  .top nav { gap: 0.875rem; font-size: 0.95rem; }
  .top nav a:first-child { display: none; }
  /* French and Spanish labels are too long for 4 links on a phone: Compare is a scroll away. */
  .top nav a[href="#compare"] { display: none; }
  .price { padding: 2rem 1.5rem; }
  .hints .wide, .commands { display: none; }
}

/* Dev only: OS switch (localhost). */
.os-switch {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.25);
}
.os-switch button {
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--paper);
  font: 500 0.875rem/1 system-ui, sans-serif;
  cursor: pointer;
}
.os-switch button[aria-pressed="true"] { background: var(--fold); color: var(--fold-ink); }

@media (prefers-contrast: more) {
  :root { --crease: var(--soft); }
  .sheet, .popup { outline: 1px solid var(--ink); }
}

/* Footer links (all pages). */
footer { flex-wrap: wrap; gap: 1rem 2rem; }
footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: 0.9rem; }
footer nav a { color: var(--soft); text-decoration: none; }
footer nav a:hover, footer nav a[aria-current] { color: var(--ink); }

/* Secondary pages (help, legal, changelog, OS pages): one readable column. */
.doc { width: min(44rem, 100% - 2rem); margin-inline: auto; padding: 3rem 0 5rem; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); max-width: none; }
.doc .lede { margin: 1.25rem 0 2.5rem; }
.doc h2 { font-size: 1.6rem; margin: 3rem 0 0.75rem; }
.doc h3 { margin: 2rem 0 0.5rem; }
.doc p, .doc li { color: var(--soft); }
.doc strong, .doc b { color: var(--ink); }
.doc ul, .doc ol { padding-left: 1.25rem; }
.doc li + li { margin-top: 0.35rem; }
.doc .updated { color: var(--soft); font-size: 0.95rem; margin: 0.75rem 0 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.975rem; }
.doc th, .doc td { padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--crease); text-align: left; vertical-align: top; }
.doc th { font-weight: 600; }
.doc td:first-child { white-space: nowrap; width: 1%; padding-right: 1.5rem; }
.doc .keys { display: inline-flex; gap: 0.25em; }
.nowrap { white-space: nowrap; }
.doc .sheet { padding: 2rem; border-radius: 1rem 1rem 0 1rem; margin: 2.5rem 0; }
.doc .sheet h2 { margin-top: 0; }
.doc .sheet p { margin: 0.5rem 0 1.5rem; }
.doc .faq { padding: 0; width: auto; }
.doc .faq summary { color: var(--ink); }
.toc { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; padding: 0; list-style: none; }
.toc li + li { margin-top: 0; }
.release { border-top: 1px solid var(--crease); margin-top: 2.5rem; }
.release h2 { margin-top: 2rem; display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.release time { color: var(--soft); font-size: 1rem; font-weight: 500; letter-spacing: 0; }
.tag { display: inline-block; padding: 0.1em 0.55em; border-radius: 999px; background: var(--fold-tint); color: var(--ink); font-size: 0.8rem; font-weight: 600; }
@media (max-width: 520px) {
  .doc td:first-child { white-space: normal; }
  .doc .sheet { padding: 1.5rem; }
}

/* Hero sky: full-width canvas behind the hero and under the header, fading into the paper. */
html { overflow-x: clip; }
.hero { position: relative; isolation: isolate; }
.sky {
  position: absolute;
  z-index: -1;
  top: -7rem; /* under the sticky header */
  left: calc(50% - 50vw);
  width: 100vw;
  height: calc(100% + 7rem);
  background: linear-gradient(#3876ba, #8cbfe8); /* no-WebGL fallback */
  -webkit-mask-image: linear-gradient(#000 78%, transparent);
  mask-image: linear-gradient(#000 78%, transparent);
  pointer-events: none;
}
/* The sky is the same in light and dark mode, so hero colors are fixed, not theme tokens.
   Title in white over the deep top of the sky; smaller text in ink, which reads on both
   the pale lower sky and the clouds that drift behind it. */
.hero { --sky-ink: #12233f; }
.hero h1 { color: #fff; text-shadow: 0 1px 2px rgb(10 30 60 / 0.3), 0 0 24px rgb(25 65 125 / 0.45); }
.hero .lede, .hero .small, .demo figcaption, .closed-card {
  color: var(--sky-ink);
  text-shadow: 0 0 12px rgb(255 255 255 / 0.7), 0 0 2px rgb(255 255 255 / 0.6);
}
.hero kbd { text-shadow: none; color: var(--sky-ink); background: #fff; border-color: rgb(18 35 63 / 0.18); }
.closed-title { color: var(--sky-ink); }
.demo .try { color: #5a43c0; }
/* Over the sky: frosted glass for the secondary button, a deeper shadow for the primary. */
.hero .button:not(.primary) {
  border-color: rgb(255 255 255 / 0.85);
  background: rgb(255 255 255 / 0.6);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  color: var(--sky-ink);
}
.hero .button:not(.primary):hover { background: rgb(255 255 255 / 0.8); }
/* Header over the sky: clear and white until the page scrolls. */
.top.on-sky:not([data-scrolled]) { background: transparent; color: #fff; }
.top.on-sky:not([data-scrolled]) nav a { color: rgb(255 255 255 / 0.85); }
.top.on-sky:not([data-scrolled]) nav a:hover, .top.on-sky:not([data-scrolled]) nav a[aria-current] { color: #fff; }
.top.on-sky { transition: background-color 0.2s ease, color 0.2s ease; }

/* Section backgrounds: one full-width band per section, each a different light, fading into
   the paper at the top and bottom. Static on purpose: painted once, nothing runs per frame;
   the sky is the only moving background. */
main > section:not(.hero) { position: relative; isolation: isolate; }
main .bg {
  position: absolute;
  z-index: -1;
  inset-block: 0;
  left: calc(50% - 50vw);
  width: 100vw;
  max-width: none;
  overflow: hidden;
  pointer-events: none;
  /* Own layer, rastered once: otherwise the scenes and privacy animations on top re-raster
     these masked gradients under them every frame. */
  will-change: transform;
  -webkit-mask-image: linear-gradient(transparent, #000 5rem, #000 calc(100% - 5rem), transparent);
  mask-image: linear-gradient(transparent, #000 5rem, #000 calc(100% - 5rem), transparent);
}
.bg::before, .bg::after { content: ""; position: absolute; }

/* Features: aurora of the fold violet and sky blues. */
.bg-aurora::before, .bg-aurora::after { inset: 0; }
.bg-aurora::before {
  background:
    radial-gradient(38% 45% at 20% 35%, rgb(30 122 80 / 0.14), transparent 70%),
    radial-gradient(35% 40% at 80% 60%, rgb(56 118 186 / 0.3), transparent 70%);
}
.bg-aurora::after { background: radial-gradient(30% 35% at 55% 75%, rgb(130 200 220 / 0.2), transparent 70%); }

/* Privacy: deep ink with the rings of a safe dial; the section's content sits right on it. */
.bg-vault { background: radial-gradient(70% 90% at 50% 50%, #233047, #10151f 75%); }
/* Clean edges, no fade: dark fading into the light paper turns into a muddy gray strip.
   A faint highlight on each edge, like light catching the rim of a surface. */
main .bg-vault {
  -webkit-mask-image: none;
  mask-image: none;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.07), inset 0 -1px 0 rgb(255 255 255 / 0.07);
}
.bg-vault::before {
  inset: 0;
  background: repeating-radial-gradient(circle at 50% 50%, rgb(165 148 249 / 0.10) 0 1px, transparent 1px 3.5rem);
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent);
  mask-image: radial-gradient(closest-side, #000 30%, transparent);
}

/* Compare: graph paper, like a spec sheet. */
.bg-grid {
  background:
    linear-gradient(var(--crease) 1px, transparent 1px) 0 0 / 2rem 2rem,
    linear-gradient(90deg, var(--crease) 1px, transparent 1px) 0 0 / 2rem 2rem;
  opacity: 0.6;
}

/* Pricing: soft light behind the card, the fold violet and the hero's sky blue. No rays:
   on the paper they read as gray stripes. */
.bg-glow {
  background:
    radial-gradient(30% 45% at 36% 60%, rgb(165 148 249 / 0.55), transparent 72%),
    radial-gradient(32% 48% at 66% 55%, rgb(86 150 230 / 0.5), transparent 72%),
    radial-gradient(60% 50% at 50% 70%, rgb(255 255 255 / 0.7), transparent 75%);
}

/* FAQ: two quiet lights, the fold violet behind the answers and the sky blue under the title,
   over a faint dot texture that fades out toward the edges. */
.bg-folds {
  background:
    radial-gradient(55% 70% at 70% 45%, rgb(165 148 249 / 0.16), transparent 75%),
    radial-gradient(45% 60% at 15% 30%, rgb(86 150 230 / 0.12), transparent 75%);
}
.bg-folds::before {
  inset: 0;
  background: radial-gradient(circle, color-mix(in srgb, var(--ink) 14%, transparent) 1px, transparent 1.5px) 0 0 / 1.5rem 1.5rem;
  -webkit-mask-image: radial-gradient(60% 70% at 60% 50%, #000, transparent);
  mask-image: radial-gradient(60% 70% at 60% 50%, #000, transparent);
}

@media (prefers-color-scheme: dark) {
  .bg-vault { background: radial-gradient(70% 90% at 50% 50%, #1a2333, #0a0d14 75%); }
  .bg-glow { background:
    radial-gradient(30% 45% at 36% 60%, rgb(165 148 249 / 0.22), transparent 72%),
    radial-gradient(32% 48% at 66% 55%, rgb(86 150 230 / 0.22), transparent 72%); }
  .bg-folds { background:
    radial-gradient(35% 55% at 70% 40%, rgb(165 148 249 / 0.12), transparent 70%),
    radial-gradient(30% 45% at 18% 30%, rgb(86 150 230 / 0.1), transparent 70%); }
}
}


/* Scroll reveal (the script marks the blocks): rise 2rem and fade in on a long ease-out with
   no overshoot, like a critically damped spring. Hidden only while html.reveal is set by JS,
   and the end state is the element's own style (fill backwards), so hover and :active stay. */
.reveal [data-reveal]:not(.in) { opacity: 0; }
.reveal [data-reveal].in {
  animation: reveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms) backwards;
}
@keyframes reveal { from { opacity: 0; translate: 0 2rem; } }
@media (prefers-reduced-motion: reduce) {
  @keyframes reveal { from { opacity: 0; } }
  .reveal [data-reveal].in, .reveal .also > li.in > * { animation-duration: 0.4s; }
}
