/* Sortloft's palette: the one source for the site's colours (and, later, the app's). scripts/build.mjs puts this file
   at the top of site.css.

   Each library colour has two forms:
   - vivid (--teal, --blue, …): where colour carries meaning or motion: folder tabs and their top edge, counts, file
     badges, the storage bar, step numbers, active states, the upload ring, a folder flashing as a file lands.
     Text on a vivid colour is always --on-colour (dark), never white.
   - pale: the quiet fill of large surfaces, mixed from the vivid colour at --fill-1 (top) and --fill-2 (bottom) over
     the card colour. Pale is never used for small details.
   Contrast (checked): body text on every pale fill is 7:1 or more in light and 4.9:1 or more in dark; --on-colour on
   every vivid colour is 4.7:1 or more. */

:root {
  /* Light: vivid */
  --teal: #0fb39c;
  --blue: #2f7bf6;
  --orange: #ff7a2e;
  --pink: #ee3f84;
  --violet: #8a6cff;
  --amber: #f2a30f;
  --brand: #ff7436;      /* the icon's orange tab */
  --on-colour: #16110d;  /* text on any vivid colour */

  /* Light: pale fills (share of the vivid colour over the card) and edges */
  --fill-1: 15%;
  --fill-2: 8%;
  --edge-mix: 38%;
  --glow-mix: 0%;
}

:root[data-theme="dark"] {
  /* Dark: vivid, lighter and brighter so they glow on graphite */
  --teal: #2ddbc4;
  --blue: #5c9dff;
  --orange: #ff9452;
  --pink: #ff6fa8;
  --violet: #9f87ff;
  --amber: #ffc43d;
  --brand: #ff8a4c;
  --on-colour: #16110d;

  /* Dark: richer fills, brighter edges, a soft light of the card's own colour */
  --fill-1: 24%;
  --fill-2: 12%;
  --edge-mix: 62%;
  --glow-mix: 34%;
}


/* Sortloft's site. The look comes from the app: its warm paper ground with soft washes of the library colours, the
   pastel folder cards with a tab on the top left, the orange of the icon, glass for what floats (the bar at the top,
   the switcher), and rounded headings. The site opens light; dark is the visitor's choice with the switch. No fonts are
   downloaded: the Mac's own. */

:root {
  color-scheme: light;

  --paper: #f8f7f5;
  --paper-2: #f2efea;
  --card: #ffffff;
  --ink: #1c1a18;
  --ink-2: #4f4a44;
  --ink-3: #615b54;
  --line: rgb(28 26 24 / 0.1);
  --line-strong: rgb(28 26 24 / 0.16);
  --accent: #ff8048;
  --accent-ink: #a8410e;
  --good: #1d7a45;
  --btn-a: #ffb65e;
  --btn-b: #ff8048;
  --btn-ink: #2a1306;
  --glass: rgb(252 251 249 / 0.6);
  --glass-strong: rgb(252 251 249 / 0.82);
  --glass-edge: rgb(255 255 255 / 0.7);
  --glass-shade: rgb(60 40 20 / 0.1);
  --shadow-shot: 0 1px 1px rgb(40 30 20 / 0.05), 0 12px 28px -8px rgb(70 45 25 / 0.18), 0 40px 90px -30px rgb(70 45 25 / 0.32);
  --wash-strength: 1;

  /* The library colours live in palette.css (vivid and pale, light and dark). */

  --font: system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: clamp(20px, 4.2vw, 44px);
  --wrap: 1200px;
  --radius: 22px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  /* One motion language. The same three springs drive the CSS (sampled into linear()) and the script (site.js,
     SPRINGS): stiffness 170 / damping 19 for most things, 260 / 16 for the playful ones (buttons, tabs, counts),
     170 / 26 for big pictures. Light always comes from the top left. */
  --spring: linear(0, 0.033, 0.102, 0.195, 0.299, 0.406, 0.511, 0.607, 0.702, 0.777, 0.84, 0.893, 0.935, 0.967, 0.992, 1.011, 1.022, 1.029, 1.033, 1.033, 1.032, 1.03, 1.027, 1.023, 1.02, 1.016, 1.013, 1.01, 1.008, 1.005, 1.003, 1.002, 1.001, 1, 1, 0.999, 1);
  --spring-t: 668ms;
  --spring-bounce: linear(0, 0.076, 0.236, 0.436, 0.64, 0.833, 0.976, 1.077, 1.137, 1.162, 1.159, 1.137, 1.107, 1.073, 1.039, 1.013, 0.994, 0.981, 0.974, 0.973, 0.976, 0.98, 0.986, 0.991, 0.996, 1, 1.002, 1.004, 1.004, 1.004, 1.004, 1.003, 1.002, 1.001, 1, 1, 1);
  --spring-bounce-t: 853ms;
  --spring-calm: linear(0.0005, 0.0269, 0.0883, 0.1679, 0.2551, 0.3429, 0.4271, 0.5052, 0.5759, 0.6389, 0.6942, 0.7422, 0.7836, 0.819, 0.849, 0.8744, 0.8958, 0.9138, 0.9287, 0.9412, 0.9516, 0.9595, 0.9667, 0.9727, 0.9776, 0.9817, 0.985, 0.9878, 0.99, 0.9918, 0.9933, 0.9946, 0.9956, 0.9964, 0.9971, 0.9976, 0.9981, 0.9984, 0.9987, 0.999, 1);
  --spring-calm-t: 730ms;
  --rise: 26px;
}

/* Dark: chosen with the switch (data-theme, set before the first paint by theme.js). Without the script, light. */
:root[data-theme="dark"] {
  --paper: #151518;
  --paper-2: #1a1a1e;
  --card: #1f1f24;
  --ink: #f4f1ec;
  --ink-2: #c4beb6;
  --ink-3: #aea79f;
  --line: rgb(255 255 255 / 0.1);
  --line-strong: rgb(255 255 255 / 0.16);
  --accent-ink: #ffa173;
  --good: #5fd08e;
  --btn-a: #ffb65e;
  --btn-b: #ff8048;
  --glass: rgb(34 33 38 / 0.58);
  --glass-strong: rgb(34 33 38 / 0.82);
  --glass-edge: rgb(255 255 255 / 0.12);
  --glass-shade: rgb(0 0 0 / 0.4);
  --shadow-shot: 0 1px 1px rgb(0 0 0 / 0.3), 0 12px 28px -8px rgb(0 0 0 / 0.5), 0 40px 90px -30px rgb(0 0 0 / 0.7);
  --wash-strength: 0.55;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 96px;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* The app's backdrop: the paper with washes of the library colours at the edges. */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1400px;
  z-index: -1;
  pointer-events: none;
  opacity: var(--wash-strength);
  background:
    radial-gradient(60% 50% at 0% 0%, rgb(250 107 158 / 0.16), transparent 70%),
    radial-gradient(55% 55% at 100% 4%, rgb(140 115 250 / 0.16), transparent 70%),
    radial-gradient(40% 40% at 50% 46%, rgb(255 143 71 / 0.1), transparent 70%);
}

img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
picture { display: contents; }
/* A picture's sources are never boxes of their own (with the picture as contents they would become grid rows). */
picture > source { display: none; }

a { color: inherit; }
a:not([class]) {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: text-decoration-thickness 0.15s, text-underline-offset 0.15s;
}
a:not([class]):hover { text-decoration-thickness: 2px; text-underline-offset: 0.22em; }

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

h1, h2, h3 {
  font-family: var(--font-round);
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 1.25rem + 4.3vw, 4.35rem); line-height: 1.05; letter-spacing: -0.022em; font-weight: 700; }
h2 { font-size: clamp(1.85rem, 1.2rem + 2.6vw, 3rem); line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.012em; font-weight: 650; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }

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

.lede { font-size: clamp(1.1rem, 1rem + 0.45vw, 1.3rem); line-height: 1.5; color: var(--ink-2); max-width: 40em; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--font-mono); font-size: 0.82em; letter-spacing: 0; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--paper); text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Glass ---------- */

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(1.7);
  backdrop-filter: blur(22px) saturate(1.7);
  box-shadow: inset 0 0 0 1px var(--glass-edge), inset 0 1px 0 var(--glass-edge), 0 8px 30px -10px var(--glass-shade);
}

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

.btn {
  --lift: 0px;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 48px; padding: 0 1.35em;
  border: 0; border-radius: 999px;
  font: 600 1.02rem/1 var(--font); letter-spacing: -0.005em; text-decoration: none;
  cursor: pointer; white-space: nowrap;
  transform: translateY(var(--lift));
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background-color 0.18s, color 0.18s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { --lift: -2px; }
.btn:active { transform: translateY(0) scale(0.97); transition-duration: 0.06s; }

.btn--primary {
  color: var(--btn-ink);
  background: linear-gradient(180deg, var(--btn-a), var(--btn-b));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.45), inset 0 -1px 0 rgb(160 60 10 / 0.25), 0 6px 18px -6px rgb(255 110 50 / 0.55);
}
.btn--primary:hover { box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.5), inset 0 -1px 0 rgb(160 60 10 / 0.25), 0 12px 26px -8px rgb(255 110 50 / 0.65); }

.btn--glass { color: var(--ink); }
.btn--glass:hover { box-shadow: inset 0 0 0 1px var(--glass-edge), inset 0 1px 0 var(--glass-edge), 0 14px 30px -12px var(--glass-shade); }

.btn--small { min-height: 38px; padding: 0 1.05em; font-size: 0.94rem; }

/* "Opens soon": a status, not a button: no fill, no lift, a quiet outline. */
.status {
  display: inline-flex; align-items: center; gap: 0.6em;
  min-height: 48px; padding: 0 1.2em; border-radius: 999px;
  font-weight: 600; color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  cursor: default;
}
.status--small { min-height: 38px; font-size: 0.94rem; padding: 0 1em; }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none;
  box-shadow: 0 0 0 0 rgb(255 128 72 / 0.5);
  animation: pulse 2.4s var(--ease-soft) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgb(255 128 72 / 0.5); }
  70%, 100% { box-shadow: 0 0 0 9px rgb(255 128 72 / 0); }
}

/* ---------- The bar at the top ---------- */

.nav {
  position: fixed; z-index: 50; top: 10px; left: 0; right: 0;
  display: flex; justify-content: center;
  pointer-events: none;
}
.nav-bar {
  pointer-events: auto;
  width: min(var(--wrap) + 28px, 100% - 2 * var(--gutter) + 28px);
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 14px;
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 1px transparent;
  transition: width 0.5s var(--ease), background-color 0.35s, box-shadow 0.35s, -webkit-backdrop-filter 0.35s, backdrop-filter 0.35s;
}
.nav.is-scrolled .nav-bar {
  width: min(900px, 100% - 2 * var(--gutter) + 16px);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  backdrop-filter: blur(28px) saturate(1.6);
  box-shadow: inset 0 0 0 1px var(--glass-edge), inset 0 1px 0 var(--glass-edge), 0 10px 34px -12px var(--glass-shade);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 4px 8px 4px 4px; border-radius: 999px;
  text-decoration: none; font: 700 1.12rem/1 var(--font-round); letter-spacing: -0.02em;
}
.brand img { width: 32px; height: 32px; transition: transform 0.4s var(--ease); }
.brand:hover img { transform: rotate(-6deg) scale(1.06); }
.nav-links { display: flex; gap: 2px; margin-left: auto; }
.nav-links a {
  padding: 9px 13px; border-radius: 999px;
  font-size: 0.93rem; font-weight: 500; color: var(--ink-2); text-decoration: none;
  transition: background-color 0.18s, color 0.18s;
}
.nav-links a:hover { color: var(--ink); background: var(--line); }
.nav-links a[aria-current="true"] { color: var(--ink); }
.nav-cta { margin-left: 6px; }

.nav-menu { display: none; margin-left: auto; position: relative; }
.nav-menu summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px; color: var(--ink);
  transition: background-color 0.18s;
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary:hover { background: var(--line); }
.nav-menu summary svg { width: 20px; height: 20px; }
.nav-menu[open] summary .i-open, .nav-menu:not([open]) summary .i-close { display: none; }
.nav-sheet {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: min(300px, 100vw - 2 * var(--gutter));
  padding: 8px; border-radius: 24px;
  /* Nearly opaque: the page's headline must not show through the links. */
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 24px 48px -16px rgb(40 25 10 / 0.35);
  display: grid;
  animation: sheet-in 0.32s var(--ease);
}
.nav-sheet a {
  padding: 13px 16px; border-radius: 16px; text-decoration: none; font-weight: 550;
  transition: background-color 0.15s;
}
.nav-sheet a:hover { background: var(--line); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-menu { display: block; }
  .nav-cta { margin-left: 0; }
}
@media (max-width: 380px) {
  .nav-cta { display: none; }
}

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

main { display: block; }
.section { padding-block: clamp(68px, 8vw, 116px); position: relative; }
.section--band { background: var(--paper-2); }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 60px); max-width: 820px; }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }
.kicker {
  /* A folder's tab, with the section's name on it. */
  justify-self: start;
  display: inline-flex; align-items: center;
  padding: 8px 18px 7px 14px;
  border-radius: 12px 20px 3px 3px / 12px 14px 3px 3px;
  font: 600 0.8rem/1 var(--font-mono); letter-spacing: 0.01em; color: var(--accent-ink);
  background: color-mix(in srgb, var(--orange) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--orange) 26%, transparent);
}
.section-head--center .kicker { justify-self: center; }

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

.hero { padding-top: clamp(116px, 12.5vw, 150px); padding-bottom: clamp(56px, 8vw, 96px); text-align: center; }
.hero h1 { max-width: 15.5em; margin-inline: auto; }
.hero .lede { margin: 26px auto 0; max-width: 38em; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-top: 34px; }
.hero-meta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px;
  margin-top: 22px; font-size: 0.92rem; color: var(--ink-3);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta span + span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); margin-right: 11px; }
@media (max-width: 640px) {
  .hero-meta { gap: 8px; }
  .hero-meta span { padding: 5px 11px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); font-size: 0.86rem; }
  .hero-meta span + span::before { display: none; }
}

.hero-text > * { animation: rise-in 0.9s var(--ease) both; }
.hero-text > :nth-child(2) { animation-delay: 0.06s; }
.hero-text > :nth-child(3) { animation-delay: 0.12s; }
.hero-text > :nth-child(4) { animation-delay: 0.18s; }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } }

.hero-stage {
  --edge: clamp(10px, 2.4vw, 34px);
  --stage: rgb(255 143 71 / 0.24);
  position: relative;
  width: min(1220px, 100% - 2 * var(--gutter));
  margin: clamp(44px, 5vw, 64px) auto 0;
  perspective: 1800px;
}
/* ---------- Pictures of the app ---------- */

.shot { margin: 0; position: relative; }
.shot img {
  width: 100%;
  border-radius: 1.15% / 1.8%;
  box-shadow: var(--shadow-shot);
  background: transparent;
}
.shot--960 img { border-radius: 1.7% / 2.5%; }
.shot--crop img { border-radius: 18px; box-shadow: var(--shadow-shot); }
.shot--panel img { border-radius: 7% / 4%; }
/* On a narrow screen the picture is a closer crop of the same capture: a card, not a window. */
@media (max-width: 640px) {
  .shot--narrow img { border-radius: 14px; outline: 1px solid var(--line); outline-offset: -1px; }
  .compare-frame { border-radius: 14px; }
}
.shot figcaption { margin-top: 14px; font-size: 0.9rem; color: var(--ink-3); }

/* Reserved slots (only in a preview built with SLOTS=1): where a capture that doesn't exist yet will go. */
.slot {
  display: grid; place-content: center; gap: 8px; text-align: center;
  min-height: 260px; padding: 28px; border-radius: 22px;
  border: 2px dashed var(--line-strong);
  background: repeating-linear-gradient(135deg, transparent 0 14px, var(--line) 14px 15px);
  color: var(--ink-2);
}
.slot strong { font: 600 0.85rem/1.3 var(--font-mono); color: var(--accent-ink); }
.slot span { max-width: 46ch; font-size: 0.9rem; }
.slot--wide { aspect-ratio: 16 / 10; }

/* ---------- Promises under the hero ---------- */

.promises {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-block: 1px solid var(--line);
}
.promise { padding: 30px clamp(16px, 2.4vw, 34px); display: grid; gap: 8px; align-content: start; }
.promise + .promise { border-left: 1px solid var(--line); }
.promise .mono { color: var(--accent-ink); font-weight: 600; }
.promise p { color: var(--ink-2); }
.promise strong { color: var(--ink); font-weight: 600; }
@media (max-width: 820px) {
  .promises { grid-template-columns: 1fr; }
  .promise + .promise { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- Folder cards (the app's pastel folders) ---------- */

.folder {
  --tint: var(--orange);
  position: relative;
  margin-top: 16px;
  padding: clamp(24px, 3vw, 36px);
  border-radius: 6px var(--radius) var(--radius) var(--radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--tint) var(--fill-1), var(--card)), color-mix(in srgb, var(--tint) var(--fill-2), var(--card)));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--tint) var(--edge-mix), transparent),
    inset 0 2px 0 color-mix(in srgb, var(--tint) 70%, transparent),
    0 2px 6px -2px color-mix(in srgb, var(--tint) 22%, transparent),
    0 18px 44px -22px color-mix(in srgb, var(--tint) var(--glow-mix), transparent);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.folder::before {
  /* The tab, top left, with the slope the app draws: the card's colour at full strength. */
  content: "";
  position: absolute; left: 0; bottom: calc(100% - 2px);
  width: max(110px, 34%); height: 16px;
  border-radius: 14px 26px 0 0 / 14px 16px 0 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 88%, white), var(--tint));
  transition: transform 0.35s var(--ease);
  transform-origin: 0 100%;
}
/* A file just landed: the folder flashes its own colour. */
.folder.is-flash { animation: folder-flash 0.9s var(--ease-soft); }
@keyframes folder-flash {
  25% { box-shadow: inset 0 0 0 2px var(--tint), 0 0 0 4px color-mix(in srgb, var(--tint) 30%, transparent), 0 18px 44px -10px color-mix(in srgb, var(--tint) 70%, transparent); }
}
.folder--pink { --tint: var(--pink); }
.folder--violet { --tint: var(--violet); }
.folder--orange { --tint: var(--orange); }
.folder--blue { --tint: var(--blue); }
.folder--amber { --tint: var(--amber); }
.folder--teal { --tint: var(--teal); }
a.folder, .folder--lift { text-decoration: none; color: inherit; display: block; }
a.folder:hover, .folder--lift:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 55%, transparent), 0 18px 40px -16px color-mix(in srgb, var(--tint) 45%, transparent);
}
a.folder:hover::before, .folder--lift:hover::before { transform: translateY(-2px); }
a.folder:active { transform: translateY(-1px) scale(0.99); }
.folder-label {
  font: 600 0.84rem/1.2 var(--font-mono); color: var(--ink);
  padding-bottom: 12px; margin-bottom: 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--tint) 45%, transparent);
}

.offload-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: clamp(32px, 5vw, 56px); }
.note { padding: 22px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 8px; align-content: start; }
.note h3 { font-size: 1.05rem; }
.note p { color: var(--ink-2); font-size: 0.97rem; }
@media (max-width: 900px) { .offload-notes { grid-template-columns: 1fr; } }

/* ---------- Sort (Tidy) ---------- */

.sort-media { display: grid; gap: clamp(28px, 4vw, 44px); margin-top: clamp(40px, 6vw, 72px); }
.sort-media .shot, .sort-media .clip, .sort-media .compare, .sort-media .slot { max-width: 1080px; width: 100%; margin-inline: auto; }
.sort-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 2.4vw, 30px); max-width: 1080px; width: 100%; margin-inline: auto; }
@media (max-width: 760px) { .sort-pair { grid-template-columns: 1fr; } }

.shelves-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 24px; margin: clamp(64px, 9vw, 110px) 0 28px; }
.shelves-head h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); letter-spacing: -0.02em; }
.shelves-head p { color: var(--ink-2); max-width: 36em; }
.shelves { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px 18px; }
.shelf { padding: 18px 18px 20px; }
.shelf .folder-label { margin-bottom: 10px; padding-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.shelf .folder-label svg { width: 16px; height: 16px; color: color-mix(in srgb, var(--tint) 70%, var(--ink)); flex: none; }
.shelf p { font-size: 0.92rem; color: var(--ink-2); line-height: 1.45; }
.shelf::before { width: max(76px, 40%); height: 12px; }
@media (max-width: 1000px) { .shelves { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .shelves { grid-template-columns: repeat(2, 1fr); gap: 26px 12px; } }
@media (max-width: 420px) { .shelf { padding: 14px 14px 16px; } .shelf p { font-size: 0.88rem; } }

/* Before and after (Tidy), a wipe you can drag. */
.compare { margin: 0; display: grid; gap: 14px; }
.compare-frame { position: relative; cursor: ew-resize; touch-action: pan-y; user-select: none; border-radius: 1.7% / 2.5%; box-shadow: var(--shadow-shot); overflow: hidden; --pos: 50%; }
.compare-frame img { width: 100%; }
.compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.22), 0 0 14px rgb(0 0 0 / 0.18); pointer-events: none; }
.compare-knob {
  position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink);
}
.compare-knob svg { width: 20px; height: 20px; }
.compare-tag { position: absolute; bottom: 14px; padding: 6px 12px; border-radius: 999px; font: 600 0.8rem/1 var(--font-mono); color: var(--ink); pointer-events: none; }
.compare-tag--before { left: 14px; }
.compare-tag--after { right: 14px; }
.compare input[type="range"] { width: min(420px, 100%); justify-self: center; accent-color: var(--accent); }

/* A clip of the app (Tidy's sort). */
.clip { margin: 0; position: relative; }
.clip video { width: 100%; border-radius: 1.7% / 2.5%; box-shadow: var(--shadow-shot); background: var(--paper-2); }
.clip-toggle { position: absolute; right: 14px; bottom: 14px; }

/* ---------- Find and browse ---------- */

.find { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: clamp(28px, 4vw, 56px); align-items: center; }
.find--single { grid-template-columns: minmax(0, 1fr); }
.find .shot--panel { width: 100%; max-width: 300px; justify-self: center; }
.find-detail { max-width: 900px; margin: clamp(36px, 5vw, 56px) auto 0; }
.find-list { display: grid; gap: 18px; margin-top: clamp(40px, 6vw, 64px); grid-template-columns: repeat(4, 1fr); }
.find-list li { display: grid; gap: 6px; align-content: start; padding-top: 16px; border-top: 2px solid var(--line); }
.find-list li strong { font-weight: 650; }
.find-list li span { color: var(--ink-2); font-size: 0.97rem; }
kbd { font: 600 0.82em/1 var(--font-mono); padding: 3px 6px; border-radius: 6px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 0 var(--line-strong); white-space: nowrap; }
@media (max-width: 960px) { .find { grid-template-columns: 1fr; } .find .shot--panel { max-width: 280px; } .find-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .find-list { grid-template-columns: 1fr; } }

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

.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 2.4vw, 30px); }
.ledger .folder { display: grid; gap: 6px; align-content: start; }
.ledger h3 { font-size: 1.3rem; }
.ledger ul { display: grid; gap: 14px; margin-top: 10px; }
.ledger li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; color: var(--ink-2); }
.ledger li svg { width: 20px; height: 20px; margin-top: 3px; color: color-mix(in srgb, var(--tint) 75%, var(--ink)); }
.ledger li strong { color: var(--ink); font-weight: 600; }
@media (max-width: 820px) { .ledger { grid-template-columns: 1fr; } }

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

.price-top {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px 40px;
  padding: clamp(28px, 4vw, 44px); border-radius: 28px; margin-bottom: clamp(36px, 5vw, 56px);
  background: var(--glass-strong);
}
.price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price-figure { font: 700 clamp(3.4rem, 2.4rem + 3vw, 5rem)/0.95 var(--font-round); letter-spacing: -0.04em; }
.price-terms { font-size: 1.15rem; color: var(--ink-2); }
.price-top p { color: var(--ink-2); margin-top: 10px; max-width: 34em; }
.price-actions { display: grid; gap: 10px; justify-items: center; }
.price-actions small { color: var(--ink-3); font-size: 0.85rem; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px clamp(16px, 2vw, 24px); }
.tier { display: grid; gap: 4px; align-content: start; }
.tier h3 { font-size: 1.2rem; }
.tier > p { color: var(--ink-2); font-size: 0.95rem; }
.tier ul { display: grid; gap: 11px; margin-top: 14px; }
.tier li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; color: var(--ink); font-size: 0.98rem; line-height: 1.45; }
.tier li svg { width: 18px; height: 18px; margin-top: 2px; color: color-mix(in srgb, var(--tint) 75%, var(--ink)); }
.price-fine { margin-top: 30px; color: var(--ink-3); font-size: 0.93rem; text-align: center; }
@media (max-width: 960px) { .tiers { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .price-top { grid-template-columns: 1fr; } .price-actions { justify-items: start; } }

/* ---------- Requirements ---------- */

.reqs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(24px, 4vw, 56px); }
.req { display: grid; grid-template-columns: 180px 1fr; gap: 6px 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.req dt { font: 600 0.86rem/1.5 var(--font-mono); color: var(--ink); }
.req dd { margin: 0; color: var(--ink-2); }
@media (max-width: 900px) { .reqs { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .req { grid-template-columns: 1fr; } }

/* ---------- Questions ---------- */

.faq { display: grid; gap: 10px; }
.qa { border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.25s; }
.qa:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.qa summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px; border-radius: 18px;
  font: 650 1.06rem/1.35 var(--font-round); letter-spacing: -0.01em;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary svg { width: 18px; height: 18px; flex: none; color: var(--ink-3); transition: transform 0.35s var(--ease); }
.qa[open] summary svg { transform: rotate(45deg); }
.qa-body { padding: 0 22px 22px; color: var(--ink-2); display: grid; gap: 10px; max-width: 46em; }
/* ---------- Last call ---------- */

.final { text-align: center; padding-block: clamp(96px, 12vw, 160px); position: relative; overflow: clip; }
.final::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: var(--wash-strength);
  background:
    radial-gradient(40% 60% at 20% 100%, rgb(41 184 168 / 0.14), transparent 70%),
    radial-gradient(40% 60% at 80% 100%, rgb(66 140 250 / 0.14), transparent 70%),
    radial-gradient(50% 50% at 50% 0%, rgb(255 143 71 / 0.14), transparent 70%);
}
.final .lede { margin: 20px auto 0; }
.final .hero-actions { margin-top: 32px; }

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

.footer { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 0.92rem; color: var(--ink-3); }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; }
.footer nav ul { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer a { color: var(--ink-2); text-decoration: none; }
.footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; }
.footer .brand { font-size: 1rem; color: var(--ink); }
.footer .brand img { width: 24px; height: 24px; }

/* ---------- Plain pages (privacy, terms, refunds) ---------- */

.doc { padding-top: clamp(124px, 14vw, 168px); padding-bottom: clamp(72px, 10vw, 120px); }
.doc h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.4rem); }
.doc .lede { margin-top: 18px; }
.doc-updated { margin-top: 14px; font-size: 0.9rem; color: var(--ink-3); }
.doc-body { margin-top: 48px; display: grid; gap: 18px; }
.doc-body h2 { font-size: 1.45rem; letter-spacing: -0.015em; margin-top: 26px; }
.doc-body p, .doc-body li { color: var(--ink-2); }
.doc-body ul { display: grid; gap: 10px; padding-left: 1.2em; list-style: disc; }
.doc-body li::marker { color: var(--accent); }
.doc-body strong { color: var(--ink); font-weight: 600; }

/* ---------- 404 ---------- */

.lost { padding-top: clamp(140px, 18vw, 200px); padding-bottom: clamp(96px, 12vw, 140px); text-align: center; }
.lost .folder { max-width: 460px; margin: 0 auto 44px; text-align: left; padding-bottom: 46px; }
.lost-empty { display: grid; place-items: center; gap: 10px; padding-top: 18px; color: var(--ink-3); text-align: center; }
.lost-empty svg { width: 40px; height: 40px; }
.lost .lede { margin: 18px auto 0; }
.lost .hero-actions { margin-top: 30px; }

/* ---------- Entering as you scroll ---------- */

.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.9s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal-group] > * { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.8s var(--ease); }
.js [data-reveal-group].is-in > * { opacity: 1; transform: none; }
.js [data-reveal-group].is-in > :nth-child(2) { transition-delay: 0.07s; }
.js [data-reveal-group].is-in > :nth-child(3) { transition-delay: 0.14s; }
.js [data-reveal-group].is-in > :nth-child(4) { transition-delay: 0.21s; }
.js [data-reveal-group].is-in > :nth-child(5) { transition-delay: 0.28s; }
.js [data-reveal-group].is-in > :nth-child(6) { transition-delay: 0.35s; }
.js [data-reveal-group].is-in > :nth-child(7) { transition-delay: 0.42s; }
.js [data-reveal-group].is-in > :nth-child(8) { transition-delay: 0.49s; }
.js [data-reveal-group].is-in > :nth-child(n + 9) { transition-delay: 0.56s; }

/* A big picture rises a little more slowly, and straightens. */
.js .shot[data-reveal]:not(.is-in) { transform: translateY(48px) scale(0.97); }
.js .shot[data-reveal] { transition: opacity 0.9s var(--ease), transform 1.2s var(--ease); }


/* =====================================================================================================================
   Motion and delight. One language: the springs in :root, rises of --rise, light from the top left.
   ===================================================================================================================== */

/* ---------- Appearance switch, and its circular reveal ---------- */

.theme-switch {
  flex: none; width: 40px; height: 40px; margin-left: 4px; border: 0; border-radius: 999px;
  display: grid; place-items: center; background: transparent; color: var(--ink); cursor: pointer;
  transition: background-color 0.2s, transform var(--spring-bounce-t) var(--spring-bounce);
}
.theme-switch:hover { background: var(--line); }
.theme-switch:active { transform: scale(0.88); transition-duration: 90ms; }
.theme-icons { position: relative; width: 20px; height: 20px; }
.theme-icons svg { position: absolute; inset: 0; width: 20px; height: 20px; transition: transform var(--spring-bounce-t) var(--spring-bounce), opacity 0.25s; }
.i-moon { opacity: 0; transform: rotate(80deg) scale(0.4); }
:root[data-theme="dark"] .i-sun { opacity: 0; transform: rotate(-80deg) scale(0.4); }
:root[data-theme="dark"] .i-moon { opacity: 1; transform: none; }
html:not(.js) .theme-switch { display: none; }
@media (max-width: 900px) { .theme-switch { margin-left: 0; } }

html.vt-theme::view-transition-old(root), html.vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.vt-theme::view-transition-new(root) { z-index: 2; }

/* ---------- Glass that catches the light ---------- */

.nav-bar, .steprow { position: relative; isolation: isolate; }
.nav-bar > :not(.glint), .steprow > :not(.glint) { position: relative; z-index: 1; }
.glint {
  position: absolute; z-index: 0; top: 1px; left: 0; width: 30%; height: 70%;
  border-radius: 999px; pointer-events: none; opacity: 0.5;
  background: radial-gradient(60% 100% at 50% 0%, rgb(255 255 255 / 0.75), rgb(255 255 255 / 0) 72%);
  mix-blend-mode: soft-light; transform-origin: 50% 0;
}
:root[data-theme="dark"] .glint { mix-blend-mode: screen; background: radial-gradient(60% 100% at 50% 0%, rgb(255 255 255 / 0.16), rgb(255 255 255 / 0) 72%); }
.nav:not(.is-scrolled) .glint { visibility: hidden; }
/* The rim: a thin bright edge at the top left, darker at the bottom right, like a real pane. */
.nav.is-scrolled .nav-bar, .steprow.glass {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.75), inset 1px 0 0 rgb(255 255 255 / 0.35), inset 0 -1px 0 rgb(0 0 0 / 0.05),
    inset 0 0 0 1px var(--glass-edge), 0 10px 34px -12px var(--glass-shade);
}
:root[data-theme="dark"] .nav.is-scrolled .nav-bar, :root[data-theme="dark"] .steprow.glass {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.16), inset 0 -1px 0 rgb(0 0 0 / 0.3), inset 0 0 0 1px var(--glass-edge), 0 10px 34px -12px var(--glass-shade);
}

/* ---------- Buttons with a real pressed state ---------- */

.btn { transition: transform var(--spring-bounce-t) var(--spring-bounce), box-shadow 0.25s var(--ease), background-color 0.2s, color 0.2s, opacity 0.2s; }
.btn:active { transform: translateY(1px) scale(0.95); transition: transform 90ms var(--ease-soft), box-shadow 90ms; }
.btn--primary:active { box-shadow: inset 0 2px 6px rgb(150 50 0 / 0.38), inset 0 -1px 0 rgb(255 255 255 / 0.2); }
.btn--glass:active { box-shadow: inset 0 2px 7px var(--glass-shade), inset 0 0 0 1px var(--glass-edge); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; box-shadow: none; }
.btn svg { transition: transform var(--spring-bounce-t) var(--spring-bounce); }
.btn:hover:not(:disabled) svg { transform: rotate(-8deg) scale(1.08); }

/* ---------- Links whose underline draws ---------- */

main a:not([class]) {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(color-mix(in srgb, currentColor 40%, transparent), color-mix(in srgb, currentColor 40%, transparent));
  background-size: 0% 2px, 100% 1px; background-position: 0 100%, 0 100%; background-repeat: no-repeat;
  padding-bottom: 1px;
  transition: background-size 0.5s var(--spring);
}
main a:not([class]):hover, main a:not([class]):focus-visible { background-size: 100% 2px, 100% 1px; }
.footer a { background-image: linear-gradient(currentColor, currentColor); background-size: 0% 1px; background-position: 0 100%; background-repeat: no-repeat; padding-bottom: 1px; transition: background-size 0.45s var(--spring), color 0.2s; }
.footer a:hover { text-decoration: none; background-size: 100% 1px; }

/* ---------- Folder cards: papers peek out on hover ---------- */

.peek { position: absolute; right: 14%; bottom: calc(100% - 1px); width: 104px; height: 38px; overflow: hidden; pointer-events: none; z-index: 0; }
.peek i {
  position: absolute; bottom: 0; width: 36px; height: 44px; border-radius: 6px 6px 0 0;
  background:
    linear-gradient(color-mix(in srgb, var(--tint) 55%, var(--ink-3)) 0 0) 7px 9px / 55% 2px no-repeat,
    linear-gradient(var(--line-strong) 0 0) 7px 15px / 70% 2px no-repeat,
    linear-gradient(var(--line-strong) 0 0) 7px 21px / 48% 2px no-repeat,
    var(--card);
  box-shadow: 0 0 0 1px var(--line-strong);
  transform: translateY(100%) rotate(var(--r, 0deg));
  transition: transform var(--spring-bounce-t) var(--spring-bounce);
}
.peek i:nth-child(1) { left: 8px; --r: -9deg; }
.peek i:nth-child(2) { left: 36px; --r: 2deg; transition-delay: 40ms; }
.peek i:nth-child(3) { left: 63px; --r: 11deg; transition-delay: 80ms; }
.folder:hover .peek i:nth-child(1), .folder:focus-within .peek i:nth-child(1) { transform: translateY(18px) rotate(var(--r)); }
.folder:hover .peek i:nth-child(2), .folder:focus-within .peek i:nth-child(2) { transform: translateY(10px) rotate(var(--r)); }
.folder:hover .peek i:nth-child(3), .folder:focus-within .peek i:nth-child(3) { transform: translateY(20px) rotate(var(--r)); }
.folder::before { transition: transform var(--spring-bounce-t) var(--spring-bounce); }
.folder:hover::before { transform: translateY(-3px) rotate(-1.5deg); }
.shelf .peek { width: 80px; right: 10%; }
.shelf .peek i { width: 28px; height: 36px; }
.shelf .peek i:nth-child(2) { left: 30px; } .shelf .peek i:nth-child(3) { left: 50px; }

/* ---------- Headings that set themselves line by line ---------- */

.js .hero-text > h1 { animation: none; }
.line { display: block; overflow: clip; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.line-in { display: inline-block; transform: translate3d(0, 108%, 0); transition: transform 1s var(--spring-calm); transition-delay: calc(var(--i, 0) * 90ms + 60ms); }
.is-in .is-split .line-in, .is-split.is-in .line-in { transform: none; }
.hero h1.is-split .line-in, .doc h1.is-split .line-in, .lost h1.is-split .line-in {
  transform: none; transition: none;
  animation: line-up 1.05s var(--spring-calm) both; animation-delay: calc(var(--i, 0) * 95ms + 40ms);
}
@keyframes line-up { from { transform: translate3d(0, 108%, 0); } }

/* ---------- The hero: a folder that opens, a window that rises out of it ---------- */

.hero-stage { perspective: none; }
.hero-card { position: absolute; z-index: 0; top: calc(-1 * var(--edge)); left: calc(-1 * var(--edge)); right: calc(-1 * var(--edge)); bottom: 28%; animation: card-in 1.1s var(--spring-calm) backwards; }
.hero-card-in {
  position: absolute; inset: 0; border-radius: 6px clamp(20px, 3vw, 40px) 0 0;
  background: linear-gradient(180deg, var(--stage), rgb(250 107 158 / 0.08) 55%, transparent);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35);
}
.hero-tab {
  position: absolute; left: 0; bottom: calc(100% - 1px); width: 28%; height: clamp(18px, 2.2vw, 30px);
  border-radius: clamp(14px, 2vw, 24px) clamp(22px, 3vw, 40px) 0 0 / clamp(14px, 2vw, 24px) clamp(18px, 2.2vw, 30px) 0 0;
  background: var(--stage); transform-origin: 0 100%;
  animation: tab-open 1.25s 0.2s var(--ease) backwards;
}
.hero-window { position: relative; z-index: 1; transform-origin: 50% 85%; animation: window-rise 1.6s 0.42s var(--spring-calm) backwards; }
.hero-tilt { position: relative; transform-origin: 50% 50%; will-change: transform; }
.hero-shot { margin: 0; }
.hero-shot img { box-shadow: 0 1px 1px rgb(40 30 20 / 0.06), 0 10px 24px -12px rgb(60 40 20 / 0.3); }
.hero-shadow {
  position: absolute; z-index: -1; left: 5%; right: 5%; top: 12%; bottom: -3%; border-radius: 4%;
  background: rgb(70 40 20 / 0.34); filter: blur(38px);
  animation: shadow-in 1.7s 0.5s var(--ease) backwards;
}
:root[data-theme="dark"] .hero-shadow { background: rgb(0 0 0 / 0.7); }
.hero-glare { position: absolute; inset: 0; z-index: 2; overflow: hidden; border-radius: 1.15% / 1.8%; pointer-events: none; }
.hero-glare span {
  position: absolute; top: -10%; bottom: -10%; left: 0; width: 38%;
  background: linear-gradient(105deg, rgb(255 255 255 / 0) 10%, rgb(255 255 255 / 0.34) 46%, rgb(255 255 255 / 0.08) 58%, rgb(255 255 255 / 0) 80%);
  mix-blend-mode: soft-light; opacity: 0.9;
  transform: translate3d(-120%, 0, 0);
  animation: glare-pass 1.5s 1.05s var(--ease-soft) backwards;
}
.hero-stage.is-open .hero-glare span { opacity: 0.55; transition: opacity 0.6s; }
@keyframes card-in { from { opacity: 0; transform: translate3d(0, 46px, 0) scale(0.97); } }
@keyframes tab-open {
  0% { opacity: 0; transform: translate3d(0, 12px, 0); }
  35% { opacity: 1; transform: none; }
  62% { transform: translate3d(0, -10px, 0) rotate(-5deg); }
  100% { transform: none; }
}
@keyframes window-rise { from { opacity: 0; transform: perspective(1600px) translate3d(0, 18%, -60px) rotateX(24deg) scale(0.86); } 30% { opacity: 1; } }
@keyframes shadow-in { from { opacity: 0; transform: scale(0.8) translate3d(0, -8%, 0); } }
@keyframes glare-pass { from { transform: translate3d(-120%, 0, 0); } to { transform: translate3d(290%, 0, 0); } }
@supports (animation-timeline: view()) {
  .hero-stage { animation: hero-away linear both; animation-timeline: view(); animation-range: exit -5% exit 85%; }
  @keyframes hero-away { to { transform: translate3d(0, 50px, 0) scale(0.93); opacity: 0.5; } }
}

/* ---------- Free up space: the storage spine, and pictures that slide between tabs ---------- */

.spine { max-width: 1080px; width: 100%; margin-inline: auto; }
.spine-bar { display: flex; gap: 4px; height: 16px; padding: 3px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line), 0 6px 18px -12px rgb(60 40 20 / 0.3); }
.seg {
  position: relative; height: 100%; border-radius: 999px; overflow: hidden; cursor: pointer;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--good) 30%, transparent) 0 3px, transparent 3px 7px);
  transition: box-shadow 0.3s;
}
.seg:nth-child(1) { flex: 27; } .seg:nth-child(2) { flex: 12; } .seg:nth-child(3) { flex: 22; } .seg:nth-child(4) { flex: 26; } .seg:nth-child(5) { flex: 11; }
.seg--orange { --tint: var(--orange); } .seg--pink { --tint: var(--pink); } .seg--violet { --tint: var(--violet); } .seg--blue { --tint: var(--blue); } .seg--teal { --tint: var(--teal); }
.seg-used {
  position: absolute; inset: 0; border-radius: inherit; transform-origin: 0 50%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 75%, white), var(--tint));
  transition: transform 1.2s var(--spring-calm), filter 0.3s;
}
.seg.is-drained .seg-used { transform: scaleX(0.2); }
.seg.is-active { box-shadow: 0 0 0 2px color-mix(in srgb, var(--tint) 55%, transparent); }
.seg.is-active .seg-used { filter: brightness(1.08) saturate(1.15); }
.seg-used::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.55), transparent) 0 0 / 40% 100% no-repeat;
  transform: translate3d(-100%, 0, 0); opacity: 0;
}
.seg.is-active .seg-used::after { opacity: 1; animation: seg-sheen 1.1s 0.1s var(--ease-soft) both; }
@keyframes seg-sheen { from { transform: translate3d(-100%, 0, 0); } to { transform: translate3d(260%, 0, 0); } }
html:not(.js) .spine { display: none; }

/* ---------- Sort: the messy folder that sorts itself ---------- */

.sorter { margin-top: clamp(28px, 4vw, 48px); }
.js .sorter-track { height: calc(636px + 260vh); }
.sorter-stage-wrap { position: sticky; top: max(84px, calc(50vh - 318px)); }
.sorter-stage {
  position: relative; height: 560px; max-width: 1180px; margin-inline: auto; border-radius: 30px;
  background:
    radial-gradient(70% 60% at 0% 0%, color-mix(in srgb, var(--pink) 8%, transparent), transparent 70%),
    radial-gradient(60% 60% at 100% 100%, color-mix(in srgb, var(--blue) 8%, transparent), transparent 70%),
    color-mix(in srgb, var(--card) 72%, transparent);
  box-shadow: inset 0 0 0 1px var(--line), 0 40px 80px -50px rgb(60 40 20 / 0.45);
}
.sorter-pile { position: absolute; left: 22px; right: 22px; top: 20px; height: 252px; border-radius: 22px; border: 1.5px dashed var(--line-strong); }
.sorter-pile-label { position: absolute; top: 11px; left: 15px; font-size: 0.76rem; color: var(--ink-3); }
.sorter-folders { position: absolute; left: 22px; right: 22px; bottom: 22px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.sfolder { margin: 0; padding: 12px 12px 10px; }
.sfolder .folder-label { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; padding-bottom: 8px; font-size: 0.8rem; }
.sfolder .folder-label svg { width: 15px; height: 15px; flex: none; color: color-mix(in srgb, var(--tint) 70%, var(--ink)); }
.sfolder .folder-label span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sfolder-count {
  margin-left: auto; min-width: 24px; padding: 3px 7px; border-radius: 999px; text-align: center;
  font: 700 0.74rem/1 var(--font-mono); color: var(--ink); background: color-mix(in srgb, var(--tint) 22%, transparent);
  transition: background-color 0.3s, color 0.3s;
}
.sfolder.has-files .sfolder-count, .sfolder-count:not(:empty):not(.is-zero) { background: var(--tint); color: var(--on-colour); }
.sfolder-count.pop { animation: count-pop 0.7s var(--spring-bounce); }
@keyframes count-pop { 30% { transform: scale(1.45); } }
.sfolder-slot { position: relative; height: 128px; }
.sfolder.is-catching::before { transform: translate3d(0, -7px, 0) rotate(-4deg); }
.sfolder.is-catching { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 60%, transparent), 0 16px 34px -16px color-mix(in srgb, var(--tint) 60%, transparent); }
.sfolder.is-over { box-shadow: inset 0 0 0 2px var(--tint), 0 18px 36px -16px color-mix(in srgb, var(--tint) 70%, transparent); transform: translate3d(0, -4px, 0); }
.sfolder { transition: box-shadow 0.35s var(--ease), transform var(--spring-bounce-t) var(--spring-bounce); }
.sorter-chips { position: absolute; inset: 0; pointer-events: none; }
.chip {
  position: absolute; left: 0; top: 0; width: 236px; height: 66px; display: flex; align-items: center; gap: 10px;
  padding: 9px 12px 9px 10px; border-radius: 14px; overflow: hidden;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 3px 8px -4px rgb(40 25 10 / 0.25), 0 12px 24px -18px rgb(40 25 10 / 0.35);
  pointer-events: auto; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-y;
  transform-origin: 50% 50%; will-change: transform;
  transition: box-shadow 0.35s var(--ease);
}
.chip.is-flying { box-shadow: inset 0 0 0 1px var(--line-strong), 0 10px 18px -8px rgb(40 25 10 / 0.3), 0 30px 46px -22px rgb(40 25 10 / 0.45); }
.chip.is-held { cursor: grabbing; }
:root[data-theme="dark"] .chip { background: #26262c; }
.chip-kind { position: relative; flex: none; width: 32px; height: 42px; border-radius: 6px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.chip-kind::before { content: ""; position: absolute; left: 6px; right: 6px; top: 8px; height: 10px; border-radius: 2px; background: linear-gradient(var(--line-strong) 0 0) 0 0 / 100% 2px no-repeat, linear-gradient(var(--line-strong) 0 0) 0 4px / 70% 2px no-repeat, linear-gradient(var(--line-strong) 0 0) 0 8px / 85% 2px no-repeat; }
.chip-kind b { position: absolute; left: 3px; right: 3px; bottom: 4px; padding: 2px 0; border-radius: 3px; font: 700 0.5rem/1 var(--font-mono); text-align: center; color: var(--on-colour); background: var(--kind, var(--pink)); }
.chip--img .chip-kind { background: linear-gradient(165deg, #ffcf8a, #ff8f47 55%, #c4507a); }
.chip--img .chip-kind::before { display: none; }
.chip--img, .chip--heic { --kind: var(--orange); }
.chip--shot { --kind: var(--blue); }
.chip--shot .chip-kind { background: linear-gradient(180deg, #dfe9fb, #c5d7f6); }
.chip--doc, .chip--mov { --kind: var(--violet); }
.chip--zip, .chip--csv { --kind: var(--amber); }
.chip--dmg, .chip--pkg { --kind: var(--teal); }
.chip--m4a { --kind: var(--orange); }
.chip-names { position: relative; flex: 1; min-width: 0; align-self: stretch; }
.chip-old {
  position: absolute; left: 0; right: 0; top: 50%; margin-top: -0.65em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 500 0.78rem/1.3 var(--font-mono); color: var(--ink-2);
  transition: opacity 0.22s var(--ease-soft), transform 0.5s var(--spring);
}
.chip.is-renamed .chip-old { opacity: 0; transform: translate3d(0, -160%, 0); }
.chip-new { position: absolute; inset: 0; display: flex; flex-wrap: wrap; align-content: center; gap: 3px 3px; font: 600 0.72rem/1.15 var(--font); }
.tok { --tint: var(--ink-3); padding: 2px 5px; border-radius: 5px; white-space: nowrap; background: color-mix(in srgb, var(--tint) 18%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 32%, transparent); opacity: 0; transform: translate3d(0, 7px, 0) scale(0.88); transition: opacity 0.3s var(--ease-soft), transform 0.6s var(--spring-bounce); }
.tok.is-on { opacity: 1; transform: none; }
.tok--who { --tint: var(--blue); } .tok--what { --tint: var(--violet); } .tok--much { --tint: var(--teal); } .tok--when { --tint: var(--orange); }
.tok--ext { background: none; box-shadow: none; padding-inline: 0; margin-left: -3px; color: var(--ink-3); }
.chip-scan { position: absolute; top: 0; bottom: 0; left: 0; width: 46%; pointer-events: none; opacity: 0; transform: translate3d(-110%, 0, 0); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 30%, transparent) 60%, transparent); }
.chip.is-reading:not(.is-renamed) .chip-scan { opacity: 1; }
/* The still (less motion): each file shows its old name, struck through, over its new one. */
.sorter.is-still .chip-old { top: 2px; margin-top: 0; font-size: 0.66rem; text-decoration: line-through; color: var(--ink-3); opacity: 1; transform: none; }
.sorter.is-still .chip-new { top: 18px; align-content: start; }
.sorter.is-still .chip { height: 88px; }
.sorter.is-still .sorter-stage { height: 664px; }
.sorter.is-still .sorter-pile { height: 340px; }
@media (max-width: 900px) { .sorter.is-still .sorter-stage { height: 880px; } .sorter.is-still .sorter-pile { height: 520px; } }
@media (max-width: 640px) {
  .sorter.is-still .sorter-stage { height: 724px; }
  .sorter.is-still .sorter-pile { height: 376px; }
  .sorter.is-still .chip { width: calc(50vw - 48px); height: 106px; padding: 8px 7px; gap: 6px; }
  .sorter.is-still .chip-kind { width: 22px; height: 30px; }
}
.sorter-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 12px; margin-top: 16px; }
.sorter-hint { width: 100%; text-align: center; font-size: 0.86rem; color: var(--ink-3); }
.sorter-list { list-style: none; margin: 0 auto; padding: 0; max-width: 820px; display: grid; gap: 8px; }
.sorter-list li { padding: 12px 16px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }
.sl-old { font-family: var(--font-mono); font-size: 0.88em; color: var(--ink-3); text-decoration: line-through; }
.sl-new { font-weight: 600; color: var(--ink); }
.js .sorter.is-live .sorter-list { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html:not(.js) .sorter-track { display: none; }
.sorter .renames-note { margin-top: 18px; text-align: center; font-size: 0.9rem; color: var(--ink-3); }
.sort-media-lead { text-align: center; font: 650 1.2rem/1.3 var(--font-round); color: var(--ink); }

@media (max-width: 900px) {
  .sorter-folders { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 10px; }
  .js .sorter-track { height: calc(760px + 220vh); }
  .sorter-stage { height: 676px; }
  .sorter-stage-wrap { top: max(72px, calc(50vh - 380px)); }
  .sfolder-slot { height: 74px; }
}
@media (max-width: 640px) {
  .sorter-stage { height: 600px; border-radius: 24px; }
  .js .sorter-track { height: calc(690px + 200vh); }
  .sorter-stage-wrap { top: 64px; }
  .sorter-pile { left: 10px; right: 10px; top: 10px; height: 278px; }
  .sorter-folders { left: 10px; right: 10px; bottom: 12px; gap: 18px 8px; }
  .sfolder { padding: 10px 8px 8px; }
  .sfolder .folder-label { font-size: 0.68rem; gap: 4px; }
  .sfolder .folder-label svg { display: none; }
  .sfolder-count { min-width: 20px; padding: 2px 5px; font-size: 0.66rem; }
  .sfolder-slot { height: 70px; }
  .chip { width: calc(50vw - 46px); height: 62px; gap: 7px; padding: 8px 8px 8px 7px; }
  .chip-kind { width: 26px; height: 36px; }
  .chip-old { font-size: 0.7rem; }
  .chip-new { font-size: 0.66rem; }
  .sorter-hint { font-size: 0.8rem; }
}

/* ---------- The closing motif: the pile, sorted ---------- */

.motif { display: flex; justify-content: center; align-items: flex-end; gap: clamp(10px, 2vw, 18px); margin: 0 auto 40px; }
.mfolder { --d: 0s; position: relative; width: clamp(56px, 9vw, 100px); height: clamp(48px, 7.4vw, 78px); }
.mfolder:nth-child(2) { --d: 0.1s; } .mfolder:nth-child(3) { --d: 0.2s; } .mfolder:nth-child(4) { --d: 0.3s; } .mfolder:nth-child(5) { --d: 0.4s; }
.mfolder-tab { position: absolute; z-index: 0; left: 0; top: 0; width: 44%; height: 14px; border-radius: 8px 12px 0 0; background: color-mix(in srgb, var(--tint) 42%, var(--card)); transform-origin: 0 100%; }
.mfolder-front {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; top: 12px; border-radius: 4px 12px 12px 12px;
  display: grid; place-items: end center; padding-bottom: 7px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 30%, var(--card)), color-mix(in srgb, var(--tint) 16%, var(--card)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 42%, transparent), 0 10px 22px -14px color-mix(in srgb, var(--tint) 70%, transparent);
}
.mfolder-front .mono { font-size: 0.62rem; color: var(--ink-2); }
.mchip {
  --e: 0s; --r: -6deg; position: absolute; z-index: 1; left: 20%; top: -6%; width: 54%; height: 64%; border-radius: 5px;
  background: linear-gradient(var(--line-strong) 0 0) 6px 7px / 55% 2px no-repeat, linear-gradient(var(--line-strong) 0 0) 6px 12px / 40% 2px no-repeat, var(--card);
  box-shadow: 0 0 0 1px var(--line-strong);
  opacity: 0; transform: translate3d(0, -150%, 0) rotate(calc(var(--r) * 3));
  transition: transform 1s var(--spring-bounce), opacity 0.3s; transition-delay: calc(var(--d) + var(--e));
}
.mchip:nth-of-type(2) { --e: 0.12s; --r: 5deg; left: 32%; top: -14%; }
.mchip:nth-of-type(3) { --e: 0.24s; --r: -2deg; left: 12%; top: -18%; }
.is-in .mchip { opacity: 1; transform: rotate(var(--r)); }
.is-in .mfolder-tab { animation: tab-catch 0.8s calc(var(--d) + 0.45s) var(--ease) both; }
@keyframes tab-catch { 40% { transform: translate3d(0, -5px, 0) rotate(-7deg); } }
@media (max-width: 640px) { .mfolder-front .mono { display: none; } }

/* ---------- Questions: the body opens on a spring (site.js) ---------- */

.qa-body { overflow: clip; }

/* ---------- Less motion: every piece has a still or a cross-fade, never a jump ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  /* Only fades remain: colour and opacity changes cross-fade, nothing travels. */
  *, *::before, *::after { transition-property: opacity, color, background-color, border-color, box-shadow, filter !important; transition-duration: 0.25s !important; transition-delay: 0s !important; }
  .js [data-reveal], .js [data-reveal-group] > *, .js .offload-shots .shot:not(.is-current),
  .line-in, .tok, .mchip, .chip-old { transform: none !important; }
  .js .shot[data-reveal]:not(.is-in) { transform: none !important; }
  .peek, .hero-glare, .chip-scan, .glint { display: none; }
  .status-dot { animation: none; }
  .hero-stage { animation: none !important; }
  .btn:hover, .btn:active, a.folder:hover, .folder--lift:hover, .card:hover, .folder:hover::before, .theme-switch:active { transform: none; }
  .js .sorter-track { height: auto; }
  .sorter-stage-wrap { position: static; }
  .offload-stage { position: static; }
}

@media (prefers-reduced-transparency: reduce) {
  .glass, .nav.is-scrolled .nav-bar, .nav-sheet { background: var(--glass-strong); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .glint { display: none; }
}




/* =====================================================================================================================
   Pass three: scroll scenes and illustrated panels, all in the sorter's language.
   ===================================================================================================================== */

/* ---------- The bar: what passes under it is blurred and dimmed, never readable ---------- */

.nav::before {
  content: ""; position: fixed; left: 0; right: 0; top: 0; height: 96px; pointer-events: none; opacity: 0;
  /* Nearly opaque paper behind the bar, fading out below it: no blur needed (a full-width blur cost frames). */
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper) 66%, transparent 100%);
  transition: opacity 0.35s var(--ease-soft);
}
.nav.is-scrolled::before { opacity: 1; }
:root { --glass-strong: rgb(252 251 249 / 0.86); }
:root[data-theme="dark"] { --glass-strong: rgb(30 30 35 / 0.9); }

/* ---------- Pinned scenes (Free up space, Offload) ---------- */

.pin { position: relative; }
.pin-track { position: relative; }
.pin-steps { position: relative; }
.pstep { min-width: 0; }
.pstep-n { font-size: 0.74rem; color: var(--accent-ink); margin-bottom: 6px; }
.pstep h3 { font-size: clamp(1.3rem, 1.05rem + 0.8vw, 1.7rem); letter-spacing: -0.02em; }
.pstep-text > p:not(.pstep-n):not(.fate) { margin-top: 8px; color: var(--ink-2); }
.pstep .fate { margin-top: 12px; }

/* The row of five: a progress line and a shortcut, never the only way in. */
.pin-head { display: grid; gap: 12px; justify-items: center; }
.steprow { display: flex; gap: 2px; padding: 5px; border-radius: 999px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.steprow::-webkit-scrollbar { display: none; }
.steprow-item {
  flex: none; padding: 10px 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2);
  font: 550 0.92rem/1 var(--font); cursor: pointer; white-space: nowrap;
  transition: color 0.25s, background-color 0.25s, box-shadow 0.25s, transform var(--spring-bounce-t) var(--spring-bounce);
}
.steprow-item:hover { color: var(--ink); background: var(--line); }
.steprow-item.is-on { color: var(--on-colour); background: var(--brand); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--brand) 80%, transparent); }
.spine { width: min(1080px, 100%); }
.seg.is-active { box-shadow: 0 0 0 2px var(--tint), 0 0 14px color-mix(in srgb, var(--tint) 55%, transparent); }
.seg-used { background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 80%, white), var(--tint)); }

@media (min-width: 900px) and (min-height: 600px) {
  .js .pin--space .pin-track { height: calc(100vh - 100px + 5 * 90vh); }
  .js .pin--space .pin-stage {
    position: sticky; top: 88px; height: calc(100vh - 104px);
    display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 18px;
  }
  .js .pin--space .pin-steps { display: grid; min-height: 0; }
  .js .pin--space .pstep {
    grid-area: 1 / 1; min-height: 0;
    display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); grid-template-rows: auto minmax(0, 1fr);
    gap: 14px clamp(24px, 3vw, 44px);
  }
  .js .pin--space .pstep-text { grid-column: 1; grid-row: 1; }
  .js .pin--space .pstep-panel { grid-column: 1; grid-row: 2; min-height: 0; }
  /* The capture's top lines up with the step's heading; it is never pushed down into empty space or cut at the bottom. */
  .js .pin--space .pstep-shot { grid-column: 2; grid-row: 1 / 3; min-height: 0; display: grid; place-items: start center; }
  .js .pin--space .pstep--shot .pstep-text { grid-row: 1 / 3; align-self: center; }
  .js .pin--space .pstep-text > p:not(.pstep-n):not(.fate) { font-size: 0.98rem; }
  .js .pin--space .pstep .fate { font-size: 0.9rem; padding: 12px 14px; }
  .js .pin--space .pstep-shot .shot { width: 100%; height: 100%; min-height: 0; display: grid; place-items: start center; }
  .js .pin--space .pstep-shot .shot img { width: auto; height: auto; max-width: 100%; max-height: var(--fit-h, 100%); }

  /* Each step takes its turn: the leaving one lifts away, the next rises in, from the direction you scroll. */
  .js .pin--space .pstep { opacity: 0; pointer-events: none; transition: opacity 0.45s var(--ease-soft); }
  .js .pin--space .pstep.is-current { opacity: 1; pointer-events: auto; }
  .js .pin--space .pstep > * { transition: transform 0.75s var(--spring-calm), opacity 0.45s var(--ease-soft); }
  .js .pin--space .pstep.is-future > * { transform: translate3d(0, 34px, 0); }
  .js .pin--space .pstep.is-past > * { transform: translate3d(0, -34px, 0); }
  .js .pin--space .pstep.is-future .pstep-shot { transform: translate3d(0, 60px, 0) scale(0.96); }
  .js .pin--space .pstep.is-past .pstep-shot { transform: translate3d(0, -50px, 0) scale(0.97); }
  .js .pin--space .pstep.is-current .pstep-text { transition-delay: 0.05s; }
  .js .pin--space .pstep.is-current .pstep-panel { transition-delay: 0.12s; }
}
@media (max-width: 899px) and (max-height: 639px), (min-width: 900px) and (max-height: 599px) {
  /* Too short to pin: a plain vertical run, each step after the other, each panel playing as it comes into view. */
  .pin--space .steprow { display: none; }
  .pin--space .spine { display: none; }
  .pin--space .pin-steps { display: grid; gap: clamp(56px, 9vw, 84px); }
  .pin--space .pstep { display: grid; gap: 18px; }
}

/* Offload: the step list and texts on the left, the panel and the step's capture on the right, all pinned together. */
.ostep-marks { display: grid; gap: 4px; }
.omark {
  display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; width: 100%; padding: 8px 10px; border: 0; border-radius: 14px;
  background: transparent; color: var(--ink-2); font: 600 0.98rem/1.3 var(--font-round); text-align: left; cursor: pointer;
  transition: background-color 0.25s, color 0.25s;
}
.omark:hover { background: var(--line); color: var(--ink); }
.omark.is-on { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.step-n {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; flex: none;
  font: 700 0.92rem/1 var(--font-round); color: var(--ink-2); background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform var(--spring-bounce-t) var(--spring-bounce), background 0.3s, color 0.3s;
}
.omark.is-on .step-n, .ostep.is-current .step-n { color: var(--on-colour); background: var(--brand); box-shadow: none; transform: scale(1.06); }
.ostep h3 { display: flex; align-items: center; gap: 12px; }
.ostep h3 .step-n { display: none; }
.offload-shots { display: grid; min-height: 0; }
.js .pin.is-pinned .offload-shots, .js .pin.is-pinned .offload-shots .shot { height: 100%; min-height: 0; }
.offload-shots .shot { grid-area: 1 / 1; display: grid; place-items: center; transition: opacity 0.5s var(--ease-soft), transform 0.8s var(--spring-calm); }
.js .offload-shots .shot:not(.is-current) { opacity: 0; transform: translate3d(0, 16px, 0) scale(0.985); }
html:not(.js) .offload-shots .shot:not(:first-child) { display: none; }

@media (min-width: 900px) and (min-height: 600px) {
  .js .pin--offload .pin-track { height: calc(100vh - 100px + 4 * 85vh); }
  .js .pin--offload .pin-stage {
    position: sticky; top: 88px; height: calc(100vh - 104px);
    display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); grid-template-rows: auto minmax(0, 1fr);
    gap: 18px clamp(28px, 4vw, 56px);
  }
  .js .pin--offload .ostep-marks { grid-column: 1; grid-row: 1; }
  .js .pin--offload .ostep-texts { grid-column: 1; grid-row: 2; display: grid; min-height: 0; align-content: start; }
  .js .pin--offload .offload-panel { grid-column: 2; grid-row: 1; }
  .js .pin--offload .offload-shots { grid-column: 2; grid-row: 2; }
  .js .pin--offload .offload-shots .shot img { width: auto; height: auto; max-width: 100%; max-height: var(--fit-h, 100%); }
}
@media (max-width: 899px) and (min-height: 700px) {
  .js .pin--offload .pin-track { height: calc(100vh - 88px + 4 * 90vh); }
  .js .pin--offload .pin-stage {
    position: sticky; top: 76px; height: calc(100vh - 84px);
    display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 12px;
  }
  .js .pin--offload .ostep-marks { display: none; }
  .js .pin--offload .offload-panel { grid-row: 1; }
  .js .pin--offload .ostep-texts { grid-row: 2; display: grid; }
  .js .pin--offload .offload-shots { grid-row: 3; }
  .js .pin--offload .offload-shots .shot img { width: auto; height: auto; max-width: 100%; max-height: var(--fit-h, 100%); }
  .js .pin--offload .ostep h3 .step-n { display: inline-grid; }
  .js .pin--offload .ostep p { font-size: 0.92rem; }
  .js .pin--offload .ostep .fate { font-size: 0.86rem; padding: 10px 12px; }
}
@media (min-width: 900px) and (min-height: 600px), (max-width: 899px) and (min-height: 700px) {
  .js .pin--offload .ostep { grid-area: 1 / 1; opacity: 0; pointer-events: none; transform: translate3d(0, 22px, 0); transition: opacity 0.4s var(--ease-soft), transform 0.7s var(--spring-calm); }
  .js .pin--offload .ostep.is-past { transform: translate3d(0, -22px, 0); }
  .js .pin--offload .ostep.is-current { opacity: 1; pointer-events: auto; transform: none; }
}
@media (max-width: 899px) and (max-height: 699px) {
  .pin--offload .ostep-marks { display: none; }
  .pin--offload .pin-stage { display: grid; gap: 22px; }
  .pin--offload .ostep h3 .step-n { display: inline-grid; }
  .pin--offload .ostep-texts { display: grid; gap: 28px; }
}

/* ---------- Panels: the shell ---------- */

.pcase { display: grid; gap: 14px; }
.pfit { position: relative; width: 100%; }
.pstage {
  position: relative; width: 560px; height: 360px; transform-origin: 0 0; border-radius: 26px;
  background:
    radial-gradient(70% 60% at 0% 0%, color-mix(in srgb, var(--pink) 9%, transparent), transparent 70%),
    radial-gradient(60% 60% at 100% 100%, color-mix(in srgb, var(--blue) 9%, transparent), transparent 70%),
    color-mix(in srgb, var(--card) 74%, transparent);
  box-shadow: inset 0 0 0 1px var(--line), 0 34px 70px -46px rgb(60 40 20 / 0.45);
}
:root[data-theme="dark"] .pstage, :root[data-theme="dark"] .sorter-stage {
  background:
    radial-gradient(70% 60% at 0% 0%, color-mix(in srgb, var(--pink) 14%, transparent), transparent 70%),
    radial-gradient(60% 60% at 100% 100%, color-mix(in srgb, var(--blue) 14%, transparent), transparent 70%),
    #1c1c21;
}
.pstage .sfolder { margin: 0; padding: 10px 10px 8px; }
.pstage .folder::before { width: max(56px, 40%); height: 11px; }
.pstage .folder-label { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; padding-bottom: 6px; font-size: 0.7rem; }
.pstage .folder-label svg { width: 13px; height: 13px; flex: none; color: color-mix(in srgb, var(--tint) 75%, var(--ink)); }
.pstage .folder-label span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pzone { position: absolute; border-radius: 18px; border: 1.5px dashed var(--line-strong); }
.pzone-label { position: absolute; top: 9px; left: 13px; font-size: 0.66rem; color: var(--ink-3); }
.pchips { position: absolute; inset: 0; pointer-events: none; }
.pchips > * { pointer-events: auto; }
.pcontrols { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px; }
.phint { width: 100%; text-align: center; font-size: 0.84rem; color: var(--ink-3); }

/* The Trash tray: a folder card in the brand colour. */
.ptray {
  --tint: var(--brand);
  position: absolute; padding: 8px 10px; border-radius: 6px 16px 16px 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tint) var(--fill-1), var(--card)), color-mix(in srgb, var(--tint) var(--fill-2), var(--card)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) var(--edge-mix), transparent), inset 0 2px 0 color-mix(in srgb, var(--tint) 70%, transparent);
}
.ptray::before { content: ""; position: absolute; left: 0; bottom: calc(100% - 2px); width: 70px; height: 10px; border-radius: 10px 16px 0 0 / 10px 10px 0 0; background: var(--tint); }
.ptray.is-flash { animation: folder-flash 0.9s var(--ease-soft); }
.ptray-label { display: flex; align-items: center; gap: 6px; font: 600 0.7rem/1 var(--font-mono); color: var(--ink); }
.ptray-label svg { width: 13px; height: 13px; }
.ptray-count { margin-left: 4px; min-width: 20px; padding: 2px 6px; border-radius: 999px; text-align: center; font-size: 0.66rem; color: var(--on-colour); background: var(--tint); }
.ptray-size { position: absolute; top: 8px; right: 10px; font-size: 0.66rem; color: var(--ink-2); }
.ptray-slot { position: absolute; left: 8px; right: 8px; bottom: 8px; top: 26px; }
.sfolder-count.pop, .ptray-count.pop { animation: count-pop 0.7s var(--spring-bounce); }

/* File chips */
.fchip {
  position: absolute; left: 0; top: 0; width: 112px; height: 28px; display: flex; align-items: center; gap: 6px;
  padding: 0 7px 0 5px; border: 0; border-radius: 8px; background: var(--card); color: var(--ink); text-align: left;
  font: 600 0.6rem/1 var(--font); white-space: nowrap; cursor: default;
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 2px 6px -3px rgb(40 25 10 / 0.3), 0 10px 18px -14px rgb(40 25 10 / 0.4);
  transform-origin: 50% 50%; will-change: transform;
}
:root[data-theme="dark"] .fchip { background: #2a2a31; }
.fchip .chip-kind { width: 17px; height: 21px; border-radius: 4px; }
.fchip .chip-kind::before { left: 3px; right: 3px; top: 4px; height: 6px; background: linear-gradient(var(--line-strong) 0 0) 0 0 / 100% 1.5px no-repeat, linear-gradient(var(--line-strong) 0 0) 0 3px / 70% 1.5px no-repeat; }
.fchip .chip-kind b { left: 1px; right: 1px; bottom: 2px; padding: 1px 0; font-size: 0.36rem; border-radius: 2px; }
.fc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fc-size { flex: none; font-size: 0.56rem; color: var(--ink-3); font-weight: 600; }
button.fchip { cursor: pointer; }
button.fchip:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* ---------- Clean Up ---------- */

.pbar { position: absolute; left: 18px; right: 18px; top: 14px; }
.pbar-label { font-size: 0.66rem; color: var(--ink-2); margin-bottom: 6px; }
.pbar-label b { color: var(--ink); }
.pbar-track { display: flex; gap: 3px; height: 14px; padding: 2px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.pbar-seg { position: relative; height: 100%; border-radius: 999px; overflow: hidden; min-width: 4px; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--teal) 55%, transparent) 0 3px, transparent 3px 6px); }
.pbar-fill { position: absolute; inset: 0; border-radius: inherit; transform-origin: 100% 50%; background: var(--tint); }
.pbar-seg--other { flex: 44; background: color-mix(in srgb, var(--ink-3) 45%, transparent); }
.pbar-seg--downloads { flex: 2.28; --tint: var(--blue); }
.pbar-seg--installers { flex: 1.74; --tint: var(--amber); }
.pbar-seg--screenshots { flex: 0.012; --tint: var(--pink); }
.pbar-seg--videos { flex: 9.9; --tint: var(--violet); }
.pbar-seg--free { flex: 6.07; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--teal) 55%, transparent) 0 3px, transparent 3px 6px); }
.pcards { position: absolute; left: 18px; right: 18px; top: 74px; height: 170px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pcard { position: relative; height: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; border: 0; }
.pcard:hover { transform: translate3d(0, -3px, 0); }
.pcard:active { transform: scale(0.97); }
.pcard-size { display: block; font-size: 0.68rem; font-weight: 700; color: var(--ink); }
.pcard-slot { position: absolute; left: 8px; right: 8px; top: 58px; bottom: 8px; }
.pcard.is-cleared .pcard-size { text-decoration: line-through; color: var(--ink-3); }
.pstage--cleanup .ptray { left: 18px; right: 18px; bottom: 14px; height: 84px; }

/* ---------- Duplicates ---------- */

.pzone--dupes { left: 14px; right: 14px; top: 12px; height: 176px; }
.pstacks { position: absolute; left: 14px; bottom: 14px; width: 384px; height: 140px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pstack { position: relative; border-radius: 14px; border: 1.5px dashed transparent; transition: border-color 0.4s, background-color 0.4s; }
.pstack.is-on { border-color: var(--line-strong); background: color-mix(in srgb, var(--card) 40%, transparent); }
.pstack-label { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 0.6rem; color: var(--ink-3); opacity: 0; transition: opacity 0.4s; }
.pstack.is-on .pstack-label { opacity: 1; }
.pstage--dupes .ptray { right: 14px; bottom: 14px; width: 142px; height: 140px; }
.pstage--dupes .ptray-size { top: auto; bottom: 8px; left: 10px; right: auto; }
.pstage--dupes .ptray-slot { top: 30px; bottom: 26px; }
.fchip--dupe { width: 118px; height: 30px; }
.fchip--group-a .chip-kind { background: linear-gradient(165deg, #9ed1ff, #4a6fd6 60%, #f5a06a); }
.fchip--group-b .chip-kind { background: linear-gradient(165deg, #d8c4ff, #7a52e0); }
.fchip--dupe::after {
  content: ""; position: absolute; right: -6px; top: -7px; padding: 2px 6px; border-radius: 999px;
  font: 700 0.5rem/1.2 var(--font-mono); color: var(--on-colour); opacity: 0; transform: scale(0.6);
  transition: opacity 0.25s, transform var(--spring-bounce-t) var(--spring-bounce);
}
.fchip--dupe.is-keep::after { content: "Keep"; background: var(--teal); opacity: 1; transform: none; }
.fchip--dupe.is-extra::after { content: "Trash"; background: var(--pink); opacity: 1; transform: none; }
.fchip--dupe.is-extra { cursor: pointer; }

/* ---------- Deep Clean ---------- */

.pprojects { position: absolute; left: 14px; right: 14px; top: 16px; height: 238px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pproject { position: relative; height: 100%; }
.pproject-slot { position: absolute; left: 8px; right: 8px; bottom: 8px; top: 64px; }
.pinuse { display: inline-block; padding: 3px 7px; border-radius: 999px; font-size: 0.56rem; font-weight: 700; color: var(--on-colour); background: var(--orange); }
.pproject.is-refusing { animation: refuse 0.5s var(--ease-soft); }
@keyframes refuse { 20% { transform: translate3d(-5px, 0, 0); } 40% { transform: translate3d(5px, 0, 0); } 60% { transform: translate3d(-3px, 0, 0); } 80% { transform: translate3d(2px, 0, 0); } }
.pblock {
  position: absolute; left: 0; top: 0; width: 104px; display: grid; align-content: end; gap: 2px; padding: 8px; border: 0; border-radius: 10px;
  text-align: left; cursor: pointer; color: var(--on-colour); will-change: transform;
  background: repeating-linear-gradient(-45deg, rgb(255 255 255 / 0.16) 0 6px, transparent 6px 12px), linear-gradient(180deg, color-mix(in srgb, var(--blue) 80%, white), var(--blue));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.4), 0 10px 18px -10px color-mix(in srgb, var(--blue) 70%, transparent);
}
.pblock b { font: 700 0.66rem/1.1 var(--font-mono); }
.pblock .mono { font-size: 0.6rem; font-weight: 600; }
.pblock--tall { height: 128px; } .pblock--mid { height: 92px; } .pblock--short { height: 56px; }
.pblock[data-block="ml"] { background: repeating-linear-gradient(-45deg, rgb(255 255 255 / 0.16) 0 6px, transparent 6px 12px), linear-gradient(180deg, color-mix(in srgb, var(--violet) 80%, white), var(--violet)); }
.pblock[data-block="dashboard"] { background: repeating-linear-gradient(-45deg, rgb(255 255 255 / 0.16) 0 6px, transparent 6px 12px), linear-gradient(180deg, color-mix(in srgb, var(--teal) 80%, white), var(--teal)); }
.pblock--locked { cursor: not-allowed; color: var(--ink-2); background: repeating-linear-gradient(-45deg, var(--line) 0 6px, transparent 6px 12px), var(--paper-2); box-shadow: inset 0 0 0 1.5px var(--orange); }
.pstage--deep .ptray { left: 14px; right: 14px; bottom: 14px; height: 76px; }

/* ---------- Offload ---------- */

.pcase--bare .pcontrols { display: none; }
.pstage--offload { height: 300px; }
.poff-folder { position: absolute !important; left: 14px; top: 26px; width: 290px; display: grid; gap: 8px; }
.poff-slot { position: relative; display: block; height: 40px; }
.poff-hold {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 10px;
  border: 1.5px dashed color-mix(in srgb, var(--violet) 75%, var(--ink-3)); background: color-mix(in srgb, var(--violet) 8%, transparent);
  color: var(--ink-2); font: 600 0.72rem/1 var(--font); text-align: left; cursor: pointer;
  opacity: 0; transform: scale(0.95); pointer-events: none;
  transition: opacity 0.4s var(--ease-soft), transform var(--spring-bounce-t) var(--spring-bounce), background-color 0.2s;
}
.poff-hold.is-on { opacity: 1; transform: none; pointer-events: auto; }
.poff-hold:hover { background: color-mix(in srgb, var(--violet) 16%, transparent); }
.poff-badge { flex: none; padding: 3px 6px; border-radius: 6px; font-size: 0.6rem; color: var(--on-colour); background: var(--violet); }
.pzone--cloud { right: 14px; top: 14px; width: 222px; height: 272px; display: grid; justify-items: center; align-content: start; padding-top: 18px; transition: box-shadow 0.4s; }
.pzone--cloud.is-flash { animation: cloud-flash 0.9s var(--ease-soft); }
@keyframes cloud-flash { 25% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 30%, transparent), 0 0 40px -6px color-mix(in srgb, var(--blue) 60%, transparent); } }
.pzone--cloud .pzone-label { position: static; margin-top: 2px; }
.pcloud { width: 120px; height: 80px; overflow: visible; }
.pcloud path { fill: color-mix(in srgb, var(--blue) 22%, var(--card)); stroke: var(--blue); stroke-width: 1.6; }
.pcloud-slot { position: absolute; left: 12px; right: 12px; top: 128px; bottom: 12px; }
.fchip--offload { width: 262px; height: 40px; padding-right: 30px; font-size: 0.74rem; cursor: pointer; transition: box-shadow 0.35s; }
.fchip--offload .chip-kind { width: 20px; height: 26px; }
.fchip--offload .fc-size { font-size: 0.66rem; }
.fchip--offload.is-picked { box-shadow: inset 0 0 0 2px var(--brand), 0 8px 18px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
.pring { position: absolute; right: 7px; top: 50%; width: 20px; height: 20px; margin-top: -10px; opacity: 0; transition: opacity 0.3s; }
.fchip--offload.is-up .pring { opacity: 1; }
.pring-track { fill: none; stroke: var(--line-strong); stroke-width: 2.6; }
.pring-fill { fill: none; stroke: var(--teal); stroke-width: 2.8; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transform: rotate(-90deg); transform-origin: 50% 50%; }
.pring-check { fill: none; stroke: var(--teal); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(0.4); transform-box: fill-box; transform-origin: 50% 50%; transition: opacity 0.2s, transform var(--spring-bounce-t) var(--spring-bounce); }
.fchip--offload.is-done .pring-check { opacity: 1; transform: none; }

/* ---------- Not sure ---------- */

.pns-cards { position: absolute; left: 14px; right: 14px; top: 130px; height: 92px; display: grid; grid-template-columns: 200px 200px; justify-content: space-between; }
.pns-card { position: relative; height: 100%; cursor: pointer; transition: transform var(--spring-bounce-t) var(--spring-bounce), box-shadow 0.3s; }
.pns-card.is-pulling { transform: translate3d(0, -6px, 0) scale(1.03); box-shadow: inset 0 0 0 2px var(--tint), 0 14px 30px -14px color-mix(in srgb, var(--tint) 70%, transparent); }
.pns-card.is-pulling::before { transform: translate3d(0, -4px, 0) rotate(-3deg); }
.pns-slot { position: absolute; left: 8px; right: 8px; top: 30px; bottom: 6px; }
.ptray--ns { --tint: var(--amber); left: 14px; right: 14px; bottom: 12px; height: 118px; }
.pns-said { position: absolute; left: 270px; right: 12px; top: 8px; display: grid; gap: 6px; }
.pns-said p { font-size: 0.66rem; line-height: 1.35; color: var(--ink-2); padding: 6px 8px; border-radius: 9px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); opacity: 0; transform: translate3d(8px, 0, 0); transition: opacity 0.35s, transform 0.6s var(--spring); }
.pns-said p .mono { display: block; font-size: 0.56rem; color: var(--ink); font-weight: 700; margin-bottom: 2px; }
.ptray--ns.is-holding .pns-said p, .ptray--ns.is-suggesting .pns-said p { opacity: 1; transform: none; }
.ptray--ns.is-holding .pns-said p:nth-child(2) { transition-delay: 0.12s; }
.pns-choose { position: absolute; left: 270px; right: 12px; bottom: 8px; display: flex; gap: 6px; }
.pns-choose .btn { min-height: 28px; padding: 0 12px; font-size: 0.72rem; }
.ptray--ns.is-suggesting [data-choose="finance"] { box-shadow: 0 0 0 2px var(--teal), 0 8px 18px -8px var(--teal); transform: scale(0.96); }
.pns-chip { cursor: default; }

/* ---------- Auto-sort ---------- */

.pzone--auto { left: 14px; right: 14px; top: 12px; height: 150px; }
.pauto-cards { position: absolute; left: 14px; right: 14px; bottom: 12px; height: 152px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pauto-card { position: relative; height: 100%; }
.pauto-slot { position: absolute; left: 8px; right: 8px; top: 36px; bottom: 8px; }
.pauto-card .sfolder-count { font-size: 0.62rem; padding: 2px 6px; min-width: 18px; }
.pauto-chip.is-unsure::after {
  content: "Not sure"; position: absolute; right: 8px; top: -8px; padding: 2px 7px; border-radius: 999px;
  font: 700 0.56rem/1.2 var(--font-mono); color: var(--on-colour); background: var(--amber);
}
.ptoast {
  position: absolute; right: 12px; top: 10px; z-index: 60; max-width: 330px; display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 14px; border-radius: 999px; font-size: 0.7rem; color: var(--ink);
  background: var(--glass-strong); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 0 0 1px var(--glass-edge), 0 14px 30px -14px var(--glass-shade);
  opacity: 0; transform: translate3d(0, -10px, 0) scale(0.96); transition: opacity 0.3s, transform 0.6s var(--spring-bounce); pointer-events: none;
}
.ptoast.is-on { opacity: 1; transform: none; pointer-events: auto; }
.ptoast b { font-weight: 650; }
.ptoast-undo { flex: none; padding: 6px 10px; border: 0; border-radius: 999px; background: var(--brand); color: var(--on-colour); font: 700 0.68rem/1 var(--font); cursor: pointer; }
.ptoast-undo:active { transform: scale(0.94); }

/* ---------- The sort section's layout ---------- */

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 3vw, 40px); margin-top: clamp(56px, 7vw, 88px); }
.duo-item { display: grid; gap: 18px; align-content: start; min-width: 0; }
.duo-text h3 { font-size: clamp(1.3rem, 1.05rem + 0.7vw, 1.65rem); letter-spacing: -0.02em; }
.duo-text p { margin-top: 8px; color: var(--ink-2); }
@media (max-width: 699px) { .duo { grid-template-columns: 1fr; } }
.notes3 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: clamp(40px, 5vw, 64px); }
.notes3 li { padding-top: 14px; border-top: 2px solid var(--line); color: var(--ink-2); font-size: 0.95rem; }
.notes3 strong { display: block; color: var(--ink); font-weight: 650; margin-bottom: 4px; }
@media (max-width: 1000px) { .notes3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .notes3 { grid-template-columns: 1fr; } }
.shelves-head { margin-top: clamp(48px, 6vw, 72px); }
.shelves { grid-template-columns: repeat(6, 1fr); gap: 22px 12px; }
.shelf { padding: 14px 14px 14px; }
.shelf p { font-size: 0.84rem; }
@media (max-width: 1100px) { .shelves { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) { .shelves { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Why this name (the sorter) ---------- */

.why {
  position: absolute; z-index: 80; width: 300px; padding: 12px; border-radius: 18px; pointer-events: none;
  background: var(--glass-strong); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 0 0 1px var(--glass-edge), 0 24px 50px -20px var(--glass-shade);
  opacity: 0; transform: translate3d(0, 8px, 0) scale(0.96); transform-origin: 50% 100%;
  transition: opacity 0.25s, transform 0.55s var(--spring-bounce);
}
.why.is-on { opacity: 1; transform: none; }
.why-title { font: 700 0.62rem/1 var(--font-mono); color: var(--accent-ink); margin-bottom: 8px; }
.why-paper { position: relative; padding: 10px 12px; border-radius: 6px; background: #fffdf9; color: #2a2622; box-shadow: 0 1px 2px rgb(0 0 0 / 0.12), 0 8px 18px -10px rgb(0 0 0 / 0.3); font-size: 0.62rem; }
.why-paper [data-part] { border-radius: 4px; transition: background-color 0.3s, box-shadow 0.3s; }
.why-paper .wp-who { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 0.72rem; }
.why-paper .wp-who i { width: 14px; height: 14px; border-radius: 4px; background: linear-gradient(135deg, var(--teal), var(--blue)); }
.why-paper .wp-what { margin-top: 8px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.66rem; }
.why-paper .wp-lines { margin: 6px 0; height: 16px; background: linear-gradient(#d9d2c8 0 0) 0 2px / 92% 2px no-repeat, linear-gradient(#d9d2c8 0 0) 0 8px / 70% 2px no-repeat, linear-gradient(#d9d2c8 0 0) 0 14px / 80% 2px no-repeat; }
.why-paper .wp-row { display: flex; justify-content: space-between; padding: 2px 4px; }
.why-paper .wp-pic { height: 64px; border-radius: 6px; background: linear-gradient(165deg, #ffd59a, #ff9a52 45%, #7c5cd6); display: grid; place-items: end start; padding: 5px; }
.why-paper .wp-pic span { padding: 2px 6px; border-radius: 4px; background: rgb(255 255 255 / 0.85); font-weight: 700; }
.why-paper .wp-shot { height: 54px; border-radius: 6px; background: #eef2fb; padding: 8px; display: grid; gap: 4px; align-content: start; }
.why-paper .wp-shot span { font-weight: 700; padding: 1px 4px; justify-self: start; }
.why-name { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 10px; font: 600 0.68rem/1.2 var(--font); }
.why-name .tok { opacity: 1; transform: none; }
.why-name .tok.is-lit, .why [data-part].is-lit { background: color-mix(in srgb, var(--tint) 34%, transparent); box-shadow: 0 0 0 2px var(--tint); }
.why [data-part="who"] { --tint: var(--blue); } .why [data-part="what"] { --tint: var(--violet); } .why [data-part="much"] { --tint: var(--teal); } .why [data-part="when"] { --tint: var(--orange); }

/* ---------- Less motion, and without the script ---------- */

@media (prefers-reduced-motion: reduce) {
  .js .pin--space .pstep > *, .js .pin--offload .ostep, .fchip, .pblock { transform: none; }
  .js .pin--space .pstep.is-future > *, .js .pin--space .pstep.is-past > * { transform: none !important; }
  .ptoast { transform: none !important; }
}
html:not(.js) .pchips { position: static; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; }
html:not(.js) .pstage { width: auto; height: auto; display: grid; gap: 12px; padding: 14px; }
html:not(.js) .pstage > * { position: static !important; width: auto !important; height: auto !important; }
html:not(.js) .fchip, html:not(.js) .pblock, html:not(.js) .chip { position: static; }
html:not(.js) .pcontrols, html:not(.js) .ptoast { display: none; }
html:not(.js) .poff-hold { opacity: 1; position: static; }

/* "What happens to your files": a small note under each step. */
.fate {
  display: grid; gap: 6px; padding: 14px 16px; border-radius: 16px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.95rem; color: var(--ink-2);
}
.fate .mono { font-weight: 700; color: var(--good); }

/* A panel's stage takes no room of its own: the fit box is sized to the scaled stage by scenes.js. */
.js .pcase.is-live .pfit { overflow: visible; }
.js .pcase.is-live .pstage { position: absolute; left: 0; top: 0; }
.pstep > *, .duo-item > *, .offload-panel, .pin-stage > * { min-width: 0; }

/* ---------- Panels on a phone: a narrow layout of their own (360 wide), so chips stay readable ---------- */

@media (max-width: 640px) {
  .pstage { width: 360px; }
  .pzone-label { font-size: 0.62rem; }

  .pstage--cleanup { height: 438px; }
  .pbar { left: 12px; right: 12px; top: 12px; }
  .pcards { left: 12px; right: 12px; top: 64px; height: 262px; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, 1fr); gap: 22px 10px; }
  .pcard-slot { top: 52px; }
  .pstage--cleanup .ptray { left: 12px; right: 12px; bottom: 12px; height: 84px; }
  .pstage--cleanup .fchip { width: 152px; }

  .pstage--dupes { height: 446px; }
  .pzone--dupes { left: 10px; right: 10px; top: 10px; height: 176px; }
  .pstacks { left: 10px; right: 10px; bottom: 108px; width: auto; height: 128px; gap: 6px; }
  .pstage--dupes .ptray { left: 10px; right: 10px; bottom: 10px; width: auto; height: 86px; }
  .pstage--dupes .ptray-size { top: 8px; bottom: auto; left: auto; right: 10px; }
  .pstage--dupes .ptray-slot { top: 28px; bottom: 8px; }
  .fchip--dupe { width: 104px; font-size: 0.56rem; }
  .fchip--dupe .fc-size { display: none; }

  .pstage--deep { height: 452px; }
  .pprojects { left: 10px; right: 10px; top: 14px; height: 326px; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, 1fr); gap: 22px 10px; }
  .pproject-slot { top: 58px; }
  .pblock { width: 120px; }
  .pblock--tall { height: 88px; } .pblock--mid { height: 70px; } .pblock--short { height: 48px; }
  .pstage--deep .ptray { left: 10px; right: 10px; bottom: 10px; height: 76px; }

  .pstage--offload { height: 340px; }
  .poff-folder { left: 10px; right: 10px; top: 22px; width: auto; }
  .pzone--cloud { left: 10px; right: 10px; top: auto; bottom: 10px; width: auto; height: 132px; justify-items: start; padding: 14px 0 0 16px; }
  .pcloud { width: 84px; height: 56px; }
  .pcloud-slot { left: 120px; right: 10px; top: 10px; bottom: 10px; }
  .fchip--offload { width: 316px; }

  .pstage--notsure { height: 470px; }
  .pns-cards { left: 10px; right: 10px; top: 124px; grid-template-columns: 158px 158px; }
  .ptray--ns { left: 10px; right: 10px; bottom: 10px; height: 186px; }
  .pns-said { left: 12px; right: 12px; top: 30px; }
  .pns-choose { left: 12px; right: 12px; bottom: 10px; }
  .pstage--notsure .pns-chip { width: 236px; }

  .pstage--auto { height: 420px; }
  .pzone--auto { left: 10px; right: 10px; top: 10px; height: 168px; }
  .pauto-cards { left: 10px; right: 10px; bottom: 10px; height: 160px; gap: 8px; }
  .pauto-chip { width: 214px; }
  .ptoast { left: 10px; right: 10px; top: 8px; max-width: none; }
}

/* Room for each panel before the script measures it, so nothing below jumps when it does. */
.js .pcase .pfit { aspect-ratio: 560 / 360; max-height: 360px; }
.js .pcase[data-panel="offload"] .pfit { aspect-ratio: 560 / 300; max-height: 300px; }
@media (max-width: 640px) {
  .js .pcase[data-panel="cleanup"] .pfit { aspect-ratio: 360 / 438; max-height: 438px; }
  .js .pcase[data-panel="dupes"] .pfit { aspect-ratio: 360 / 446; max-height: 446px; }
  .js .pcase[data-panel="deep"] .pfit { aspect-ratio: 360 / 452; max-height: 452px; }
  .js .pcase[data-panel="offload"] .pfit { aspect-ratio: 360 / 340; max-height: 340px; }
  .js .pcase[data-panel="notsure"] .pfit { aspect-ratio: 360 / 470; max-height: 470px; }
  .js .pcase[data-panel="auto"] .pfit { aspect-ratio: 360 / 420; max-height: 420px; }
}
/* Between a phone and a laptop: each Free up space step side by side (words and panel, then its capture). */
@media (min-width: 900px) and (max-height: 599px) {
  .pin--space .pstep { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 14px 28px; align-items: start; }
  .pin--space .pstep-text { grid-column: 1; grid-row: 1; }
  .pin--space .pstep-panel { grid-column: 1; grid-row: 2; }
  .pin--space .pstep-shot { grid-column: 2; grid-row: 1 / 3; align-self: center; }
}

/* Phones and tablets, tall enough: Free up space pinned too. Each step shows its words, then its panel plays, then
   its real capture takes the panel's place, all as you scroll. */
@media (max-width: 899px) and (min-height: 640px) {
  .js .pin--space .pin-track { height: calc(100vh - 80px + 5 * 100vh); }
  .js .pin--space .pin-stage {
    position: sticky; top: 72px; height: calc(100vh - 80px);
    display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px;
  }
  .js .pin--space .pin-head { gap: 8px; }
  .js .pin--space .steprow { justify-self: stretch; padding-inline: 4px; }
  .js .pin--space .steprow-item { padding: 8px 12px; font-size: 0.84rem; }
  .js .pin--space .spine { display: none; }
  .js .pin--space .pin-steps { display: grid; min-height: 0; }
  .js .pin--space .pstep { grid-area: 1 / 1; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; }
  .js .pin--space .pstep-text { grid-row: 1; }
  .js .pin--space .pstep-text h3 { font-size: 1.2rem; }
  .js .pin--space .pstep-text > p:not(.pstep-n):not(.fate) { font-size: 0.9rem; margin-top: 4px; line-height: 1.45; }
  .js .pin--space .pstep .fate { margin-top: 8px; padding: 9px 12px; font-size: 0.82rem; gap: 3px; }
  .js .pin--space .pstep-panel, .js .pin--space .pstep-shot { grid-row: 2; grid-column: 1; min-height: 0; transition: opacity 0.5s var(--ease-soft), transform 0.7s var(--spring-calm); }
  .js .pin--space .pstep-shot { display: grid; place-items: center; }
  .js .pin--space .pstep-shot .shot { height: 100%; display: grid; place-items: center; }
  .js .pin--space .pstep-shot .shot img { width: auto; height: auto; max-width: 100%; max-height: var(--fit-h, 100%); }
  .js .pin--space .pstep:not(.pstep--shot):not(.show-shot) .pstep-shot { opacity: 0; transform: translate3d(0, 24px, 0) scale(0.97); pointer-events: none; }
  .js .pin--space .pstep.show-shot .pstep-panel { opacity: 0; transform: translate3d(0, -20px, 0) scale(0.97); pointer-events: none; }
  .js .pin--space .pstep { opacity: 0; pointer-events: none; transition: opacity 0.45s var(--ease-soft); }
  .js .pin--space .pstep.is-current { opacity: 1; pointer-events: auto; }
  .js .pin--space .pstep .pcontrols { display: none; }
}

/* ---------- Storage: System Data splits into its parts ---------- */

.folder--grey { --tint: color-mix(in srgb, var(--ink-3) 85%, var(--card)); }
.pzone-title { display: flex; align-items: center; gap: 6px; font-size: 0.66rem; color: var(--ink-2); }
.pzone-title svg { width: 13px; height: 13px; }
.psd { position: absolute; left: 18px; right: 18px; top: 14px; }
.psd-label { font-size: 0.66rem; color: var(--ink-2); margin-bottom: 6px; }
.psd-label b { color: var(--ink); }
.psd-bar { position: relative; display: flex; gap: 3px; height: 40px; padding: 3px; border-radius: 13px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.psd-seg {
  position: relative; height: 100%; border-radius: 9px; overflow: hidden; transform-origin: 50% 100%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 82%, white), var(--tint));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35);
}
.psd-seg--teal { --tint: var(--teal); } .psd-seg--amber { --tint: var(--amber); } .psd-seg--orange { --tint: var(--orange); }
.psd-seg--blue { --tint: var(--blue); } .psd-seg--violet { --tint: var(--violet); } .psd-seg--grey { --tint: color-mix(in srgb, var(--ink-3) 70%, var(--card)); }
.psd-seg[data-seg="appdata"] { flex: 24; } .psd-seg[data-seg="devtools"] { flex: 18; } .psd-seg[data-seg="caches"] { flex: 14; }
.psd-seg[data-seg="sims"] { flex: 13; } .psd-seg[data-seg="swap"] { flex: 8; } .psd-seg[data-seg="macos"] { flex: 16; } .psd-seg[data-seg="other"] { flex: 7; }
.psd-grey, .psd-lid { position: absolute; inset: 0; background: color-mix(in srgb, var(--ink-3) 55%, var(--card)); }
.psd-lid { inset: 3px; border-radius: 10px; display: grid; place-items: center; }
.psd-lid b { font: 700 0.78rem/1 var(--font-mono); color: var(--ink); letter-spacing: 0.02em; }
.psparts { position: absolute; left: 18px; right: 18px; top: 102px; bottom: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 20px 10px; }
.pspart-slot { position: relative; }
.pstage .pspart { position: absolute; left: 0; top: 0; margin: 0; padding: 9px 9px 8px; display: grid; align-content: start; gap: 6px; overflow: hidden; will-change: transform; }
.pstage .pspart::before { width: max(44px, 46%); height: 10px; }
.pstage .pspart .folder-label { margin: 0; padding-bottom: 6px; font-size: 0.62rem; align-items: flex-start; }
.pstage .pspart .folder-label span { white-space: normal; line-height: 1.25; }
.pspart-in { display: grid; gap: 4px; }
.pspart-row { display: flex; align-items: center; gap: 5px; min-width: 0; padding: 3px 6px; border-radius: 6px; font-size: 0.56rem; color: var(--ink); background: color-mix(in srgb, var(--card) 70%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 30%, transparent); }
.pspart-row svg { width: 11px; height: 11px; flex: none; color: var(--tint); }
.pspart-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pspart-note { font-size: 0.6rem; line-height: 1.3; color: var(--ink-2); }
.pspart[data-part="macos"] .pspart-note { display: inline-flex; justify-self: start; padding: 2px 7px; border-radius: 999px; font-weight: 700; color: var(--ink); background: var(--line); }

/* ---------- Memory & Swap: the heaviest app quits, swap lifts off the disk ---------- */

.pmem { position: absolute; left: 18px; right: 18px; top: 14px; height: 126px; }
.pmem-apps { position: absolute; left: 0; right: 0; top: 24px; bottom: 0; display: grid; grid-template-columns: 1.3fr 1fr 1fr 0.8fr; gap: 10px; }
.pmem-app {
  position: relative; display: grid; align-content: space-between; gap: 6px; padding: 10px; border-radius: 14px; will-change: transform;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tint) var(--fill-1), var(--card)), color-mix(in srgb, var(--tint) var(--fill-2), var(--card)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) var(--edge-mix), transparent), inset 0 2px 0 color-mix(in srgb, var(--tint) 70%, transparent), 0 14px 30px -20px color-mix(in srgb, var(--tint) var(--glow-mix), transparent);
}
.pmem-app--blue { --tint: var(--blue); } .pmem-app--teal { --tint: var(--teal); } .pmem-app--violet { --tint: var(--violet); } .pmem-app--amber { --tint: var(--amber); }
.pmem-name { font: 650 0.7rem/1.15 var(--font); color: var(--ink); }
.pmem-use { position: relative; height: 9px; border-radius: 999px; background: color-mix(in srgb, var(--tint) 18%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 30%, transparent); overflow: hidden; }
.pmem-fill { position: absolute; inset: 0; border-radius: inherit; transform-origin: 0 50%; background: var(--tint); }
.pmem-app[data-app="chrome"] .pmem-fill { transform: scaleX(1); } .pmem-app[data-app="docker"] .pmem-fill { transform: scaleX(0.66); }
.pmem-app[data-app="xcode"] .pmem-fill { transform: scaleX(0.5); } .pmem-app[data-app="notes"] .pmem-fill { transform: scaleX(0.16); }
.pmem-tag { justify-self: start; padding: 2px 7px; border-radius: 999px; font-size: 0.54rem; font-weight: 700; color: var(--ink-2); background: var(--line); }
.pmem-app.is-heavy .pmem-tag { color: var(--on-colour); background: var(--orange); }
.pmem-tag-off { display: none; }
.pmem-app.is-quit .pmem-tag { color: var(--ink-2); background: var(--line); }
.pmem-app.is-quit .pmem-tag-on { display: none; }
.pmem-app.is-quit .pmem-tag-off { display: inline; }
.pdisk {
  --tint: var(--violet);
  position: absolute; left: 18px; right: 18px; top: 160px; bottom: 14px; padding: 9px 12px; border-radius: 6px 16px 16px 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tint) var(--fill-1), var(--card)), color-mix(in srgb, var(--tint) var(--fill-2), var(--card)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) var(--edge-mix), transparent), inset 0 2px 0 color-mix(in srgb, var(--tint) 70%, transparent);
}
.pdisk::before { content: ""; position: absolute; left: 0; bottom: calc(100% - 2px); width: 90px; height: 10px; border-radius: 10px 16px 0 0 / 10px 10px 0 0; background: var(--tint); }
.pswap-slot { position: absolute; left: 12px; right: 12px; top: 32px; bottom: 44px; }
.pswap-bar { position: absolute; left: 12px; right: 12px; bottom: 12px; display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.pswap-label { font-size: 0.6rem; color: var(--ink-2); }
.pswap-track { position: relative; height: 12px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.pswap-fill { position: absolute; inset: 2px; border-radius: inherit; transform-origin: 0 50%; background: repeating-linear-gradient(-45deg, rgb(255 255 255 / 0.18) 0 5px, transparent 5px 10px), var(--violet); }
.fchip--swap { width: 118px; }
.fchip--swap .chip-kind { background: linear-gradient(180deg, color-mix(in srgb, var(--violet) 70%, white), var(--violet)); }
.fchip--swap .chip-kind b { color: var(--on-colour); background: transparent; }

html:not(.js) .pspart { position: static; }

@media (max-width: 640px) {
  .pstage--storage { height: 470px; }
  .psd { left: 12px; right: 12px; top: 12px; }
  .psparts { left: 12px; right: 12px; top: 98px; bottom: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 18px 10px; }
  .pstage--memory { height: 404px; }
  .pmem { left: 12px; right: 12px; top: 12px; height: 168px; }
  .pmem-apps { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; }
  .pmem-app { padding: 8px 10px; gap: 4px; }
  .pdisk { left: 12px; right: 12px; top: 204px; bottom: 12px; }
  .pswap-slot { left: 10px; right: 10px; }
  .fchip--swap { width: 100px; }
  .js .pcase[data-panel="storage"] .pfit { aspect-ratio: 360 / 470; max-height: 470px; }
  .js .pcase[data-panel="memory"] .pfit { aspect-ratio: 360 / 404; max-height: 404px; }
}

/* Laptops with a short window: the panel takes the tall column and the capture yields, under the words. */
@media (min-width: 900px) and (min-height: 600px) and (max-height: 780px) {
  .js .pin--space .pstep { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .js .pin--space .pstep-panel { grid-column: 2; grid-row: 1 / 3; display: grid; align-content: center; }
  .js .pin--space .pstep-shot { grid-column: 1; grid-row: 2; }
  .js .pin--space .pstep-text > p:not(.pstep-n):not(.fate) { font-size: 0.92rem; margin-top: 6px; }
  .js .pin--space .pstep .fate { margin-top: 8px; padding: 9px 12px; font-size: 0.84rem; }
  .js .pin--space .pstep h3 { font-size: 1.3rem; }
}

/* Tablets: Not sure and Auto-sort sit side by side, each in its narrow (360-wide) layout. */
@media (min-width: 641px) and (max-width: 899px) {
  .duo { gap: 20px; }
  .pstage--notsure, .pstage--auto { width: 360px; }
  .pstage--notsure { height: 470px; }
  .pns-cards { left: 10px; right: 10px; top: 124px; grid-template-columns: 158px 158px; }
  .ptray--ns { left: 10px; right: 10px; bottom: 10px; height: 186px; }
  .pns-said { left: 12px; right: 12px; top: 30px; }
  .pns-choose { left: 12px; right: 12px; bottom: 10px; }
  .pstage--notsure .pns-chip { width: 236px; }
  .pstage--auto { height: 420px; }
  .pzone--auto { left: 10px; right: 10px; top: 10px; height: 168px; }
  .pauto-cards { left: 10px; right: 10px; bottom: 10px; height: 160px; gap: 8px; }
  .pauto-chip { width: 214px; }
  .ptoast { left: 10px; right: 10px; top: 8px; max-width: none; }
  .js .pcase[data-panel="notsure"] .pfit { aspect-ratio: 360 / 470; max-height: 470px; }
  .js .pcase[data-panel="auto"] .pfit { aspect-ratio: 360 / 420; max-height: 420px; }
}

/* ---------- Tidy in the app: a pinned stage, one large window, the steps changing as you scroll ---------- */

.pin--tidy { margin-top: clamp(20px, 3vw, 32px); }
.pin--tidy .sort-media-lead { margin-bottom: 4px; }
.tstep-line { font: 600 1.05rem/1.45 var(--font-round); color: var(--ink); max-width: 760px; }
.tstep-n { display: inline-block; margin-right: 8px; padding: 3px 8px; border-radius: 999px; font-size: 0.72rem; color: var(--on-colour); background: var(--brand); vertical-align: 1px; }
.tfig { margin: 0; position: relative; }
.tfig img, .tfig video { display: block; width: 100%; height: auto; border-radius: 1.7% / 2.5%; box-shadow: var(--shadow-shot); }
.tfig--why .tfig-panel img { border-radius: 28px; }
.tmarks { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.tmark {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 6px 6px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink-2); font: 600 0.82rem/1 var(--font);
  transition: background-color 0.25s, color 0.25s;
}
.tmark:hover { background: var(--line); color: var(--ink); }
.tmark-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 0.7rem; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); transition: background-color 0.25s, color 0.25s; }
.tmark.is-on { color: var(--ink); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.tmark.is-on .tmark-n { color: var(--on-colour); background: var(--brand); box-shadow: none; }

/* Stacked (phones, short windows, less motion): each step full width, its line above it, fading in. */
.pin--tidy .tmarks { display: none; }
.pin--tidy .tstep { display: grid; gap: 8px; }
.pin--tidy .tstep + .tstep { margin-top: clamp(18px, 5vw, 52px); }
.pin--tidy .tfig-backdrop { display: none; }
.pin--tidy .tfig-panel { max-width: min(480px, 66%); margin-inline: auto; }
@media (max-width: 640px) { .pin--tidy .tstep-line { font-size: 0.95rem; } }
.pin--tidy .clip { display: grid; place-items: center; }
.pin--tidy .clip video { max-width: min(100%, var(--clip-max, 640px)); }
.pin--tidy .clip-toggle { right: 12px; bottom: 12px; }

/* Pinned only where the window can be large enough to read (about 870 pixels wide or more). */
@media (min-width: 900px) and (min-height: 740px) and (prefers-reduced-motion: no-preference), (min-width: 700px) and (min-height: 800px) and (prefers-reduced-motion: no-preference) {
  .js .pin--tidy .pin-track { height: calc(var(--stage-h, 100vh - 104px) + 4px + var(--n, 4) * 85vh); }
  .js .pin--tidy .pin-stage {
    position: sticky; top: var(--stage-top, 88px); height: var(--stage-h, calc(100vh - 104px));
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); gap: 18px 24px;
  }
  .js .pin--tidy .tmarks { display: flex; grid-area: 1 / 2; align-self: center; }
  .js .pin--tidy .tstep { display: contents; }
  .js .pin--tidy .tstep + .tstep { margin: 0; }
  .js .pin--tidy .tstep-line {
    grid-area: 1 / 1; align-self: center; opacity: 0; transform: translate3d(0, 10px, 0);
    transition: opacity 0.35s var(--ease-soft), transform 0.6s var(--spring-calm);
  }
  .js .pin--tidy .tstep.is-current .tstep-line { opacity: 1; transform: none; }
  .js .pin--tidy .tfig { grid-area: 2 / 1 / 3 / 3; justify-self: center; align-self: center; width: var(--win-w, 100%); visibility: hidden; will-change: opacity, transform, clip-path; }
  .js .pin--tidy .tfig-backdrop { display: block; position: absolute; inset: 0; }
  .js .pin--tidy .tfig-backdrop::after { content: ""; position: absolute; inset: 0; border-radius: 1.7% / 2.5%; background: color-mix(in srgb, var(--paper) 42%, transparent); }
  .js .pin--tidy .tfig-panel { position: absolute; right: 6%; top: 50%; width: calc(var(--fig-w, 1100px) * 790 / var(--fig-src-w, 1920)); max-width: none; transform: translate3d(0, -50%, 0); }
  .js .pin--tidy .tfig-panel img { box-shadow: 0 30px 70px -20px rgb(20 10 0 / 0.45), 0 0 0 1px var(--line); }
  .js .pin--tidy .clip { display: grid; place-items: center; }
  .js .pin--tidy .clip video { width: auto; max-width: min(100%, var(--clip-max, 640px)); max-height: 100%; }
}
