/* YummyOrange website. Tokens first; see DESIGN.md for the reasoning and contrast figures. */

:root {
  color-scheme: light dark;
  /* Brand (DWPalette.swift) */
  --dahlia: #E2669C;
  --butter: #FFE1A1;
  --cream: #FFF4EA;
  --accent: #E266BA;
  --accent-light: #E98BCB;
  --accent-highlight: #EEA6D7;
  --accent-deep: #A74086;
  --plum: #2A0F1F;

  /* Neutrals, tinted toward cream */
  --bg: #FBF8F5;
  --surface: #FFFFFF;
  --surface-2: #F4EEEA;
  --text: #1D1B1E;
  --text-2: #5A5157;
  --text-3: #6B6166;
  --line: rgba(60, 28, 44, 0.11);
  --line-strong: rgba(60, 28, 44, 0.18);
  --ink: #A93F73;
  --note-ink: #8E2F60;
  --btn: #A93F73;
  --btn-hover: #983566;
  --btn-text: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(40, 20, 30, 0.06), 0 2px 8px rgba(40, 20, 30, 0.05);
  --shadow-md: 0 2px 6px rgba(40, 20, 30, 0.07), 0 12px 32px rgba(40, 20, 30, 0.10);
  --shadow-lg: 0 4px 12px rgba(40, 20, 30, 0.10), 0 24px 56px rgba(40, 20, 30, 0.16);

  /* The playground scene (the app's welcome page: dahlia with a butter glow from the bottom centre) */
  --scene: #E2669C;
  --scene-glow: rgba(255, 225, 161, 1);
  --label-pill: rgba(42, 10, 28, 0.45);

  /* The wheel (README › Design › Wheel) */
  --w-petal-in: #F0F0F2;
  --w-petal-out: #E3E4E7;
  --w-border: #D1D1D6;
  --w-ring: #EEEFF1;
  --w-ring-edge: rgba(255, 255, 255, 0.9);
  --w-hole: #FFFFFF;
  --w-cap: #FFFFFF;
  --w-label: #3A3A3C;
  --w-hl-border: rgba(167, 64, 134, 0.85);

  /* The Clothesline screen */
  --wall-a: #D7D2F0;
  --wall-b: #EBDCE8;
  --wall-c: #F7DED4;
  --menubar: rgba(255, 255, 255, 0.58);
  --mb-ink: rgba(30, 24, 32, 0.55);
  --polaroid: #FFFFFF;
  --polaroid-ink: #2B2729;
  --card-ring: #2A0F1F;

  --radius-control: 12px;
  --radius-card: 20px;
  --radius-scene: 28px;
  --wrap: 1120px;
  --gutter: 24px;
  --section-gap: 128px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141113;
    --surface: #1E1A1D;
    --surface-2: #29242A;
    --text: #F6F1F3;
    --text-2: #C4B9BF;
    --text-3: #A89DA3;
    --line: rgba(255, 236, 246, 0.10);
    --line-strong: rgba(255, 236, 246, 0.17);
    --ink: #F29BC1;
    --note-ink: #F29BC1;
    --btn: #E2669C;
    --btn-hover: #EA7DAB;
    --btn-text: #2A0F1F;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.4), 0 24px 56px rgba(0, 0, 0, 0.5);

    --scene: #CF6094;
    --scene-glow: rgba(240, 205, 140, 0.92);
    --label-pill: rgba(30, 6, 20, 0.5);

    --w-petal-in: #434347;
    --w-petal-out: #36363A;
    --w-border: #2A2A2D;
    --w-ring: #2C2C2F;
    --w-ring-edge: rgba(255, 255, 255, 0.10);
    --w-hole: #232326;
    --w-cap: #48484C;
    --w-label: #E5E5EA;
    --w-hl-border: rgba(238, 166, 215, 0.6);

    --wall-a: #2B2742;
    --wall-b: #3A2A3E;
    --wall-c: #4A3036;
    --menubar: rgba(30, 26, 32, 0.62);
    --mb-ink: rgba(255, 245, 250, 0.55);
    --polaroid: #ECE7E3;
    --polaroid-ink: #2B2729;
    --card-ring: #FFF4EA;
  }
}

@media (prefers-contrast: more) {
  :root { --text-2: #3F383C; --text-3: #4A4246; --line: rgba(60, 28, 44, 0.3); --line-strong: rgba(60, 28, 44, 0.45); }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root { --text-2: #E2D9DE; --text-3: #D0C6CB; --line: rgba(255, 236, 246, 0.3); --line-strong: rgba(255, 236, 246, 0.45); }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html.smooth-scroll { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
strong { font-weight: 600; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mono { font-family: var(--font-mono); font-size: 0.92em; overflow-wrap: anywhere; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.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; }
.skip-link { position: absolute; left: 16px; top: -64px; z-index: 100; padding: 10px 16px; border-radius: var(--radius-control); background: var(--surface); color: var(--text); box-shadow: var(--shadow-md); transition: top 0.15s var(--ease); }
.skip-link:focus { top: 12px; }

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

/* Inline key cap (kbd) */
.k {
  display: inline-grid; place-items: center; min-width: 1.6em; height: 1.45em; padding: 0 0.3em;
  border-radius: 6px; background: linear-gradient(#2C2C2C, #1A1A1A); color: #FFF;
  font: 500 0.86em/1 var(--font); box-shadow: 0 2px 0 #0A0A0A; vertical-align: 0.12em; margin: 0 0.06em;
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border: 0; border-radius: 24px;
  background: var(--btn); color: var(--btn-text);
  font: 600 1rem/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color 0.15s var(--ease), transform 0.1s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--btn-hover); }
.btn:active { transform: scale(0.97); }
.btn-quiet { background: var(--surface-2); color: var(--text); }
.btn-quiet:hover { background: color-mix(in srgb, var(--surface-2) 80%, var(--text) 8%); }
.btn-small { min-height: 34px; padding: 0 16px; border-radius: 17px; font-size: 0.875rem; }
.btn-wide { width: 100%; }
/* Until config.js has a DMG URL, download buttons say so and link nowhere (config.js sets data-release before paint) */
.dl-pending { display: none; }
:root[data-release="pending"] .dl-ready { display: none; }
:root[data-release="pending"] .dl-pending { display: inline; }
:root[data-release="pending"] [data-download] { background: transparent; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-strong); cursor: default; pointer-events: none; }
:root[data-release="pending"] .cta-row .btn-quiet { background: var(--btn); color: var(--btn-text); }
:root[data-release="pending"] .cta-row .btn-quiet:hover { background: var(--btn-hover); }
:root[data-release="pending"] .cta-row [data-download] { order: 1; }
:root:not([data-release="pending"]) .pending-only { display: none; }
:root[data-release="pending"] .ready-only { display: none; }

/* ---------- Top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent; transition: border-color 0.2s var(--ease);
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; }
.brand img { border-radius: 7px; }
.topnav { display: flex; gap: 4px; margin-left: auto; }
.topnav a { padding: 8px 12px; border-radius: 10px; color: var(--text-2); font-size: 0.9375rem; text-decoration: none; transition: color 0.15s var(--ease), background-color 0.15s var(--ease); }
.topnav a:hover { color: var(--text); background: var(--surface-2); }
@media (prefers-reduced-transparency: reduce) { .topbar { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; } }

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

.hero { padding-top: 72px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-icon { width: 128px; height: 128px; filter: drop-shadow(0 10px 24px rgba(40, 20, 30, 0.18)); margin-bottom: 28px; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.04; font-weight: 600; letter-spacing: -0.03em; max-width: 14ch; text-wrap: balance; }
.lede { margin-top: 20px; max-width: 36rem; color: var(--text-2); font-size: 1.1875rem; line-height: 1.5; text-wrap: pretty; }
.hero .lede { text-wrap: balance; }
.lede-keys { white-space: nowrap; } /* the three caps and their comma never split */
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.hero-meta { margin-top: 16px; color: var(--text-3); font-size: 0.875rem; }

/* ---------- Playground scene ---------- */

.playground { margin-top: 56px; }
.scene {
  position: relative; isolation: isolate;
  height: clamp(540px, 52vw, 620px);
  border-radius: var(--radius-scene); overflow: hidden;
  background:
    radial-gradient(90% 62% at 50% 112%, var(--scene-glow) 0%, color-mix(in srgb, var(--scene-glow) 70%, transparent) 30%, transparent 68%),
    var(--scene);
  -webkit-user-select: none; user-select: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.scene-caption { margin-top: 12px; text-align: center; color: var(--text-3); font-size: 0.8125rem; }

.files { position: absolute; inset: 0; }
.files > li { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); }
.file {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 6px; border: 0; background: none; border-radius: 12px;
  cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent;
  will-change: transform;
}
.file:focus-visible { outline: 2px solid #FFF; outline-offset: 2px; }
.file.dragging { cursor: grabbing; z-index: 45; position: relative; }
.scene[data-state="open"] .file.dragging { opacity: 0.72; }
.file.dragging .file-icon { box-shadow: 0 14px 30px rgba(60, 10, 35, 0.35); }
.file.returning { z-index: 20; position: relative; }
.files > li.under-wheel { z-index: 39 !important; }
.file-name {
  max-width: 120px; padding: 2px 8px; border-radius: 6px;
  background: var(--label-pill); color: #FFF;
  font-size: 0.8125rem; font-weight: 500; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file.selected .file-name, .file:focus-visible .file-name { background: #FFF; color: var(--plum); }

.file-icon { position: relative; display: block; transition: box-shadow 0.2s var(--ease); }
.file-icon.thumb { width: 96px; height: 64px; padding: 3px; background: #FFF; border-radius: 6px; box-shadow: 0 4px 12px rgba(60, 10, 35, 0.22); }
.file-icon.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; pointer-events: none; }
.file-icon.video .dur { position: absolute; left: 7px; bottom: 7px; padding: 1px 5px 1px 14px; border-radius: 4px; background: rgba(0, 0, 0, 0.6); color: #FFF; font-size: 0.625rem; font-weight: 600; }
.file-icon.video .dur::before { content: ""; position: absolute; left: 5px; top: 50%; translate: 0 -50%; border-left: 6px solid #FFF; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.file-icon.doc {
  width: 52px; height: 66px; border-radius: 4px; background: #FFF;
  clip-path: polygon(0 0, 70% 0, 100% 22%, 100% 100%, 0 100%);
  box-shadow: 0 4px 12px rgba(60, 10, 35, 0.22);
}
.file-icon.doc::after { content: ""; position: absolute; right: 0; top: 0; width: 30%; height: 22%; background: linear-gradient(225deg, transparent 50%, #E3DED9 50%); }
.doc-art { position: absolute; left: 9px; right: 9px; top: 16px; height: 26px; }
.doc-art.lines { background: repeating-linear-gradient(#D6D0CC 0 2px, transparent 2px 6px); }
.doc-art.cells { background: linear-gradient(90deg, transparent 32%, #D6D0CC 32% 36%, transparent 36% 66%, #D6D0CC 66% 70%, transparent 70%), repeating-linear-gradient(#D6D0CC 0 2px, transparent 2px 7px); }
.doc-art.wave { background: linear-gradient(90deg, #B9AFC9 0 3px, transparent 3px 6px, #B9AFC9 6px 9px, transparent 9px 12px) center / 12px 100% repeat-x; mask: linear-gradient(transparent 0, #000 0) center / 100% 100%; clip-path: polygon(0 40%, 10% 25%, 20% 45%, 30% 10%, 40% 35%, 50% 0, 60% 30%, 70% 15%, 80% 40%, 90% 30%, 100% 45%, 100% 55%, 90% 70%, 80% 60%, 70% 85%, 60% 70%, 50% 100%, 40% 65%, 30% 90%, 20% 55%, 10% 75%, 0 60%); }
.doc-badge { position: absolute; left: 50%; bottom: 6px; translate: -50% 0; padding: 1px 4px; border-radius: 3px; color: #FFF; font-size: 0.625rem; font-weight: 700; line-height: 1.2; letter-spacing: 0.02em; background: #6B6468; }
.doc[data-kind="pdf"] .doc-badge { background: #C44848; }
.doc[data-kind="docx"] .doc-badge { background: #3C67B8; }
.doc[data-kind="xlsx"] .doc-badge { background: #2E7D52; }
.doc[data-kind="wav"] .doc-badge { background: #7650B5; }
.doc[data-kind="md"] .doc-badge { background: #5E5A5C; }
.file-icon.book { width: 50px; height: 66px; border-radius: 3px 6px 6px 3px; background: linear-gradient(90deg, #5E3F6E 0 6px, #7D5590 6px); box-shadow: 0 4px 12px rgba(60, 10, 35, 0.25); }
.book-title { position: absolute; left: 13px; right: 7px; top: 14px; height: 18px; background: repeating-linear-gradient(var(--butter) 0 3px, transparent 3px 7px); opacity: 0.9; }
.file-icon.folder { width: 76px; height: 58px; margin-top: 4px; border-radius: 6px; background: linear-gradient(#FFE6B2, #F3C56C); box-shadow: 0 4px 12px rgba(60, 10, 35, 0.2); }
.file-icon.folder::before { content: ""; position: absolute; left: 0; top: -6px; width: 30px; height: 12px; border-radius: 4px 4px 0 0; background: #F6D28B; z-index: -1; }

/* Notes: the onboarding's rounded, hand-written style, with an arrow that draws itself */
.scene-note { position: absolute; left: 13%; top: 4%; display: flex; align-items: flex-start; gap: 0; pointer-events: none; z-index: 5; }
.scene-note .note-arrow { order: -1; margin: 12px -10px 0 0; }
.note-text { font: 600 1.25rem/1.2 var(--font-rounded); color: var(--plum); white-space: nowrap; }
.note-arrow { overflow: visible; }
.note-arrow path { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.9s var(--ease) 0.2s; }
.scene-note { color: var(--plum); }
.scene-note.drawn .note-arrow path, .screen-note.drawn .note-arrow path { stroke-dashoffset: 0; }
.scene[data-state]:not([data-state="idle"]) .scene-note .note-arrow { opacity: 0; transition: opacity 0.2s; }
/* Once a drag starts the note moves down beside the key caps, where the wheel never opens */
@media (min-width: 761px) {
  .scene[data-state]:not([data-state="idle"]) .scene-note { top: auto; bottom: 34px; left: 28px; }
  .scene[data-state]:not([data-state="idle"]) .scene-note .note-arrow { display: none; }
  .scene[data-state]:not([data-state="idle"]) .note-text { font-size: 1.125rem; max-width: 13em; white-space: normal; }
}
.note-text.swap { animation: note-in 0.28s var(--ease); }
@keyframes note-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Key caps (the app's: near-black face, a deeper side, the glyph top right, the name bottom left) */
.keybar { position: absolute; left: 50%; bottom: 20px; translate: -50% 0; display: flex; align-items: center; gap: 12px; z-index: 42; }
.keys { display: flex; gap: 12px; }
.keybtn {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 14px 4px 4px;
  border: 0; border-radius: 14px; background: rgba(255, 248, 236, 0.55);
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s var(--ease);
}
.keybtn:hover { background: rgba(255, 248, 236, 0.8); }
.keybtn-label { color: var(--plum); font-weight: 600; font-size: 0.9375rem; }
.cap {
  position: relative; display: inline-grid; grid-template-rows: 1fr auto; flex: none;
  min-width: 54px; height: 44px; padding: 5px 7px 6px;
  border-radius: 8px; background: linear-gradient(#2B2B2B, #191919); color: #FFF;
  box-shadow: 0 3px 0 #0A0A0A, 0 5px 10px rgba(0, 0, 0, 0.22);
  transition: transform 0.08s var(--ease), box-shadow 0.08s var(--ease), background 0.12s var(--ease);
}
.cap-sym { justify-self: end; font-size: 0.8125rem; line-height: 1; }
.cap-name { align-self: end; justify-self: start; font-size: 0.6875rem; line-height: 1; white-space: nowrap; }
/* With a mouse the cap rises a point as the pointer arrives, on the frame its tick plays (apple-motion §13), so the
   sound has something to belong to; a press still sinks it. */
@media (hover: hover) and (pointer: fine) {
  .keybtn:hover .cap { transform: translateY(-1px); box-shadow: 0 4px 0 #0A0A0A, 0 6px 12px rgba(0, 0, 0, 0.24); }
}
.keybtn:active .cap, .keybtn.pressed .cap { transform: translateY(2px); box-shadow: 0 1px 0 #0A0A0A, 0 2px 4px rgba(0, 0, 0, 0.2); }
.keybtn.on .cap, .keybtn[aria-pressed="true"] .cap { background: linear-gradient(var(--accent-light), var(--accent)); box-shadow: 0 3px 0 var(--accent-deep), 0 5px 12px rgba(167, 64, 134, 0.35); color: #2A0F1F; }
@media (hover: hover) and (pointer: fine) {
  .keybtn.on:hover .cap, .keybtn[aria-pressed="true"]:hover .cap { box-shadow: 0 4px 0 var(--accent-deep), 0 6px 14px rgba(167, 64, 134, 0.38); }
}
.keybtn.on:active .cap, .keybtn.on.pressed .cap, .keybtn[aria-pressed="true"]:active .cap { box-shadow: 0 1px 0 var(--accent-deep); }
/* On the dahlia scene the default pink focus ring is 1.6:1; plum is 5.6:1 */
.scene .keybtn:focus-visible, .scene .sound-toggle:focus-visible { outline-color: var(--plum); }

/* The Sound button beside the keys: a button that behaves like a toggle (toggles.md › Platform considerations), set
   apart from the keys by a hairline because it isn't a wheel key. On, it is filled like the keys and shows a speaker
   with waves; off, it is an outline with a crossed-out speaker, so the state never rests on colour alone. */
.sound-toggle {
  position: relative; display: inline-flex; align-items: center; gap: 8px; flex: none;
  min-width: 44px; min-height: 52px; margin-left: 13px; padding: 4px 16px 4px 12px;
  white-space: nowrap;
  border: 0; border-radius: 14px; background: rgba(255, 248, 236, 0.55); color: var(--plum);
  font: 600 0.9375rem/1.2 var(--font); cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.1s var(--ease);
}
.sound-toggle::before { content: ""; position: absolute; left: -13px; top: 12px; bottom: 12px; width: 1px; background: rgba(42, 15, 31, 0.22); }
.sound-toggle:hover { background: rgba(255, 248, 236, 0.8); }
.sound-toggle:active { transform: scale(0.97); }
.sound-toggle[aria-pressed="false"] { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(42, 15, 31, 0.3); }
.sound-toggle[aria-pressed="false"]:hover { background: rgba(255, 248, 236, 0.3); }
/* In the playground the keys stay centred where they always were (the drag note sits left of them); the button hangs
   off their right side. Under 761 px it joins the row. */
@media (min-width: 761px) {
  .keybar .sound-toggle { position: absolute; left: 100%; top: 50%; translate: 0 -50%; width: max-content; margin-left: 25px; }
}
.sound-icon { display: grid; place-items: center; }
.sound-icon .ic { grid-area: 1 / 1; max-width: none; }
.sound-toggle[aria-pressed="true"] .ic-off, .sound-toggle[aria-pressed="false"] .ic-on { visibility: hidden; }

/* The wheel (live SVG, geometry from WheelGeometry.swift) */
.wheel-layer { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.wheel { position: absolute; left: 0; top: 0; pointer-events: none; touch-action: none; }
.wheel.open { pointer-events: auto; }
.wheel:focus { outline: none; }
.wheel:focus-visible .wheel-svg { outline: none; }
.wheel-svg { width: 100%; height: 100%; overflow: visible; }
.w-ring { fill: var(--w-ring); }
.w-ring-edge { fill: none; stroke: var(--w-ring-edge); stroke-width: 1; }
.w-hole { fill: var(--w-hole); }
.w-petal { stroke: var(--w-border); stroke-width: 2; stroke-linejoin: round; }
.w-petal.hl { stroke: var(--w-hl-border); }
.w-label { fill: var(--w-label); color: var(--w-label); font-family: var(--font); font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; }
.w-label.hl { fill: var(--plum); color: var(--plum); }
.w-label.plain { letter-spacing: 0; text-transform: none; }
.w-label use { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.w-cap { fill: var(--w-cap); }
.w-cap-text { fill: var(--w-label); font-family: var(--font); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.w-cap-text.plain { letter-spacing: 0; text-transform: none; }
.wheel .stop-in { stop-color: var(--w-petal-in); }
.wheel .stop-out { stop-color: var(--w-petal-out); }
.wheel-focus-ring { fill: none; stroke: var(--ink); stroke-width: 2; opacity: 0; }
.wheel:focus-visible .wheel-focus-ring { opacity: 1; }

/* Result shelf (a new shelf near the pointer, as in the app) */
.result-shelf {
  position: absolute; z-index: 50; width: 248px; padding: 12px; border-radius: 16px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: 56px 1fr 28px; gap: 4px 12px; align-items: center;
}
.result-shelf[hidden] { display: none; }
.result-shelf .r-thumb { grid-row: span 2; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.result-shelf .r-thumb img { width: 100%; height: 100%; object-fit: cover; }
.result-shelf .r-thumb .ic { width: 26px; height: 26px; color: var(--text-2); }
.result-shelf .r-thumb .r-ext { font: 700 0.6875rem/1 var(--font); color: var(--text-2); letter-spacing: 0.03em; }
.result-shelf .r-name { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 600; font-size: 0.9375rem; line-height: 1.3; }
.result-shelf .r-file { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-shelf .r-note { grid-column: 2; color: var(--text-2); font-size: 0.8125rem; line-height: 1.35; }
.result-shelf .r-close { position: relative; grid-row: 1; grid-column: 3; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 14px; background: var(--surface-2); color: var(--text-2); cursor: pointer; }
.result-shelf .r-close::before { content: ""; position: absolute; inset: -8px; }
.result-shelf .r-close .ic { width: 14px; height: 14px; }
.result-shelf .r-new { flex: none; padding: 1px 6px; border-radius: 5px; background: var(--dahlia); color: var(--plum); font-size: 0.6875rem; font-weight: 600; }
.result-shelf .r-link { grid-column: 2 / 4; font-size: 0.8125rem; }

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

.section { margin-top: var(--section-gap); }
.section-head { max-width: 44rem; }
h2 { font-size: clamp(1.875rem, 4vw, 2.75rem); line-height: 1.1; font-weight: 600; letter-spacing: -0.022em; text-wrap: balance; }
.section-head p { margin-top: 14px; color: var(--text-2); font-size: 1.1875rem; line-height: 1.5; text-wrap: pretty; }
h3 { font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.fine { margin-top: 16px; color: var(--text-3); font-size: 0.875rem; line-height: 1.5; }

/* Tabs (segmented) */
.tabs {
  display: flex; gap: 2px; margin-top: 32px; padding: 4px; width: fit-content; max-width: 100%;
  overflow-x: auto; scrollbar-width: none; border-radius: 14px; background: var(--surface-2);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs [role="tab"] {
  flex: none; min-height: 36px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent;
  color: var(--text-2); font-size: 0.9375rem; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.tabs [role="tab"]:hover { color: var(--text); }
.tabs [role="tab"][aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tabs [role="tab"]:focus-visible { outline-offset: -2px; }

/* Explorer: a list of kinds, one wheel switched by its key cap, and what the kind opens and becomes */
.explorer {
  display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 24px; margin-top: 40px; padding: 16px;
  border-radius: 24px; background: var(--surface); border: 1px solid var(--line);
}
.ex-kinds { display: flex; flex-direction: column; gap: 2px; padding: 4px; align-self: start; border-radius: 16px; background: var(--surface-2); scrollbar-width: none; }
.ex-kinds::-webkit-scrollbar { display: none; }
.ex-kinds [role="tab"] {
  flex: none; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-height: 46px; padding: 5px 12px;
  border: 0; border-radius: 12px; background: transparent; color: var(--text-2); text-align: left; cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.ex-kinds [role="tab"]:hover { color: var(--text); }
.ex-kinds [role="tab"][aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.ex-kinds [role="tab"]:focus-visible { outline-offset: -2px; }
.ex-kinds .k-name { font-size: 0.9375rem; font-weight: 500; line-height: 1.25; }
.ex-kinds [aria-selected="true"] .k-name { font-weight: 600; }
.ex-kinds .k-file { font-size: 0.8125rem; line-height: 1.3; color: var(--text-3); }
.ex-panel { display: grid; grid-template-columns: minmax(0, 1fr) 232px; gap: 32px; padding: 12px 8px 8px; align-items: start; }
.ex-panel:focus { outline: none; }
.ex-stage { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.ex-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px; }
.ex-keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ex-controls .sound-toggle { margin-left: 11px; background: var(--surface-2); color: var(--text); }
.ex-controls .sound-toggle::before { left: -11px; background: var(--line-strong); }
.ex-controls .sound-toggle:hover { background: color-mix(in srgb, var(--surface-2) 80%, var(--text) 8%); }
.ex-controls .sound-toggle[aria-pressed="false"] { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.ex-controls .sound-toggle[aria-pressed="false"]:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
/* Here an unchosen key has the same fill as Sound when it is on, so on also shows the speaker in the accent, the
   colour of the chosen key (4.9:1 on the fill in light, 8.0:1 in dark); off keeps the crossed-out speaker in text colour. */
.ex-controls .sound-toggle[aria-pressed="true"] .sound-icon { color: var(--accent-deep); }
@media (prefers-color-scheme: dark) {
  .ex-controls .sound-toggle[aria-pressed="true"] .sound-icon { color: var(--accent-highlight); }
}
/* When the wheel's column is narrower than the row of keys and Sound (a 961–1139 px window, or a phone), the caps
   stand above their names, as on a phone, and the keys give up width before anything wraps. */
.ex-stage { container-type: inline-size; }
@container (max-width: 560px) {
  .ex-controls { flex-wrap: nowrap; gap: 8px; }
  .ex-keys { flex-wrap: nowrap; min-width: 0; }
  .ex-keys .keybtn { flex: 0 1 88px; flex-direction: column; gap: 6px; min-width: 0; padding: 6px 6px 8px; }
  .ex-keys .keybtn-label { font-size: 0.8125rem; }
  .ex-controls .sound-toggle { flex-direction: column; justify-content: center; gap: 6px; min-width: 64px; margin-left: 9px; padding: 6px 6px 8px; font-size: 0.8125rem; line-height: 1.25; }
  .ex-controls .sound-toggle::before { left: -9px; top: 14px; bottom: 14px; }
  .ex-controls .sound-icon { height: 44px; }
}
/* (342 px is the column at a 400 px window, where the caps shrink to 40 px) */
@container (max-width: 342px) {
  .ex-controls .sound-toggle { min-width: 56px; padding-inline: 4px; }
  .ex-controls .sound-icon { height: 40px; }
}
/* A very narrow column (a 320 px phone): Sound gets its own row under the keys */
@container (max-width: 300px) {
  .ex-controls { flex-wrap: wrap; }
  .ex-controls .sound-toggle { flex-direction: row; min-height: 44px; margin-left: 0; padding: 0 14px 0 10px; }
  .ex-controls .sound-toggle::before { display: none; }
  .ex-controls .sound-icon { height: auto; }
}
.keybtn.on-surface, .ex-keys .keybtn { background: var(--surface-2); }
.ex-keys .keybtn:hover { background: color-mix(in srgb, var(--surface-2) 80%, var(--text) 8%); }
.ex-keys .keybtn-label { color: var(--text); }
.explorer-wheel { position: relative; width: 100%; max-width: 440px; aspect-ratio: 1; margin-top: 16px; display: grid; place-items: center; }
/* Its petals are picked by a tap, never a drag, so a swipe that starts on it scrolls the page (gestures.md) */
.explorer-wheel .wheel { position: relative; touch-action: manipulation; }
.explorer-caption { min-height: 4.4em; margin-top: 8px; max-width: 28rem; text-align: center; color: var(--text-2); font-size: 0.9375rem; line-height: 1.45; text-wrap: balance; }
.explorer-caption b { color: var(--text); font-weight: 600; }
.wheel-empty[hidden] { display: none; }
.wheel-empty { width: 70%; aspect-ratio: 1; display: grid; place-items: center; padding: 15%; border-radius: 50%; border: 1.5px dashed var(--line-strong); color: var(--text-3); text-align: center; font-size: 0.9375rem; line-height: 1.4; }
.ex-facts { padding-top: 64px; }
.ex-facts > div { padding: 12px 0; border-top: 1px solid var(--line); }
.ex-facts > div:last-child { border-bottom: 1px solid var(--line); }
.ex-facts dt { color: var(--text-3); font-size: 0.8125rem; font-weight: 500; }
.ex-facts dd { margin-top: 3px; color: var(--text); font-size: 0.9375rem; line-height: 1.45; }
.ex-facts dd.note { color: var(--text-2); }

/* Split layout */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-copy p { margin-top: 16px; color: var(--text-2); }
.split-copy h2 + p { margin-top: 18px; font-size: 1.1875rem; line-height: 1.5; }
.split-copy strong { color: var(--text); }
.ticks { margin-top: 12px; display: grid; gap: 6px; }
.ticks li { position: relative; padding-left: 24px; color: var(--text-2); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--dahlia); }

.shelves-art { position: relative; padding-bottom: 48px; }
.shot { border-radius: 14px; box-shadow: var(--shadow-md); }
.shot-menu { width: 82%; }
.shot-shelf { position: absolute; right: 0; bottom: 0; width: 34%; border-radius: 22px; box-shadow: var(--shadow-lg); }

/* ---------- The Clothesline ---------- */

.screen {
  position: relative; margin-top: 40px; height: clamp(380px, 34vw, 420px);
  border-radius: 20px; overflow: hidden; isolation: isolate;
  background: linear-gradient(118deg, var(--wall-a) 0%, var(--wall-b) 48%, var(--wall-c) 100%);
  border: 1px solid var(--line); -webkit-user-select: none; user-select: none; touch-action: pan-y;
}
.menubar { position: absolute; inset: 0 0 auto; height: 30px; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--menubar); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); z-index: 2; }
.mb-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--mb-ink); }
.mb-pill { width: 32px; height: 7px; border-radius: 4px; background: var(--mb-ink); opacity: 0.7; }
.mb-pill.w2 { width: 48px; opacity: 1; }
.mb-pill.w3 { width: 56px; }
.mb-spacer { flex: 1; }
.mb-glyph { width: 15px; height: 15px; color: var(--text); opacity: 0.85; }
.mb-time { font-size: 0.75rem; font-weight: 600; color: var(--mb-ink); font-variant-numeric: tabular-nums; }
.notch {
  position: absolute; z-index: 6; top: 0; left: 50%; translate: -50% 0;
  width: clamp(124px, 15%, 184px); height: 32px; padding: 0; border: 0; border-radius: 0 0 14px 14px;
  background: #000; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.notch:focus-visible { outline-offset: 2px; border-radius: 0 0 14px 14px; }
.notch-fill { position: absolute; left: 14px; right: 14px; bottom: 5px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #F7C878, var(--dahlia)); transform: scaleX(0); transform-origin: left; opacity: 0.9; }
.notch.arming .notch-fill { transform: scaleX(1); transition: transform 0.5s linear; }
.notch[aria-expanded="true"] .notch-fill { transform: scaleX(0); transition: transform 0.2s var(--ease); }

.line-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; overflow: visible; }
.string { fill: none; stroke: url(#string-grad); stroke-width: 2.4; stroke-linecap: round; }
.string-glow { fill: none; stroke: url(#string-grad); stroke-width: 7; stroke-linecap: round; filter: url(#string-glow); opacity: 0.75; }

.line-cards { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.line-cards > li { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.card {
  position: absolute; left: 0; top: 0; width: var(--cw, 112px); padding: 6px 6px 0; border: 0; border-radius: 4px;
  background: var(--polaroid); color: var(--polaroid-ink);
  box-shadow: 0 2px 4px rgba(40, 20, 30, 0.12), 0 10px 20px rgba(40, 20, 30, 0.16);
  transform-origin: 50% 0; cursor: grab; pointer-events: auto; touch-action: none; -webkit-tap-highlight-color: transparent;
  will-change: transform;
}
.card.lifted { cursor: grabbing; box-shadow: 0 4px 8px rgba(40, 20, 30, 0.14), 0 22px 40px rgba(40, 20, 30, 0.24); }
.card.ghost { opacity: 0.55; }
.card:focus-visible, .card.selected { outline: 3px solid var(--card-ring); outline-offset: 3px; border-radius: 6px; }
.card-thumb { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 2px; overflow: hidden; background: #F1ECE8; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.card-thumb .doc-mini { position: absolute; inset: 14% 28%; background: #FFF; border-radius: 2px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
.card-thumb .doc-mini::after { content: ""; position: absolute; inset: 18% 14%; background: repeating-linear-gradient(#D9D2CE 0 2px, transparent 2px 5px); }
.card-thumb .shot-mini { position: absolute; inset: 14% 10%; padding-top: 7px; border-radius: 3px; background: #FFF; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); overflow: hidden; }
.card-thumb .shot-mini::before { content: ""; position: absolute; left: 4px; top: 2px; width: 3px; height: 3px; border-radius: 50%; background: #FF5F57; box-shadow: 5px 0 #FEBC2E, 10px 0 #28C840; }
.card-thumb .shot-mini img { width: 100%; height: 100%; object-fit: cover; }
.card-thumb .wave-mini { position: absolute; inset: 30% 12%; background: linear-gradient(90deg, #8A6CB8 0 2px, transparent 2px 4px) 0 0 / 4px 100% repeat-x; clip-path: polygon(0 40%, 12% 20%, 25% 45%, 37% 5%, 50% 35%, 62% 0, 75% 30%, 87% 15%, 100% 45%, 100% 55%, 87% 85%, 75% 70%, 62% 100%, 50% 65%, 37% 95%, 25% 55%, 12% 80%, 0 60%); }
.card-thumb .dur { position: absolute; left: 5px; bottom: 5px; padding: 1px 4px 1px 11px; border-radius: 3px; background: rgba(0, 0, 0, 0.6); color: #FFF; font-size: 0.5625rem; font-weight: 600; }
.card-thumb .dur::before { content: ""; position: absolute; left: 4px; top: 50%; translate: 0 -50%; border-left: 5px solid #FFF; border-top: 3px solid transparent; border-bottom: 3px solid transparent; }
.card-thumb .ext { position: absolute; left: 50%; bottom: 12%; translate: -50% 0; padding: 0 3px; border-radius: 2px; color: #FFF; font-size: 0.5rem; font-weight: 700; }
.card-name { display: block; padding: 5px 2px 7px; font-size: 0.75rem; font-weight: 600; line-height: 1.2; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pin {
  position: absolute; left: 50%; top: -15px; width: 9px; height: 26px; translate: -50% 0; border-radius: 2px;
  background: linear-gradient(90deg, #C98F5C 0 45%, #9A6A40 45% 55%, #D9A472 55%);
  box-shadow: 0 1px 2px rgba(60, 30, 10, 0.3); pointer-events: none;
}
.pin::after { content: ""; position: absolute; left: -1px; right: -1px; top: 9px; height: 4px; border-radius: 1px; background: linear-gradient(#E4E4E8, #9B9BA2); }
.card.ghost .pin { rotate: -12deg; }

.screen-note { position: absolute; top: 34px; left: calc(50% + 96px); display: flex; align-items: flex-start; gap: 4px; z-index: 3; pointer-events: none; color: var(--note-ink); }
.screen-note .note-text { color: var(--note-ink); margin-top: 44px; font-size: 1.125rem; }
.screen-note .note-arrow { transform: scale(-1, 1); }
.screen.line-out .screen-note { top: calc(var(--line-bottom, 240px) - 4px); left: 16px; right: 16px; justify-content: center; align-items: center; text-align: center; }
.screen.line-out .screen-note .note-arrow { display: none; }
.screen.line-out .screen-note .note-text { margin-top: 0; white-space: normal; max-width: none; }
.desk-file { position: absolute; left: 6%; bottom: 8%; z-index: 7; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px; border: 0; background: none; border-radius: 12px; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; }
.desk-file .file-name { background: rgba(30, 20, 30, 0.55); }
.desk-file.dragging { cursor: grabbing; z-index: 9; }
.desk-file.dragging .file-icon { box-shadow: 0 14px 30px rgba(40, 10, 30, 0.3); }
.shot-btn { position: absolute; right: 16px; bottom: 16px; z-index: 7; min-height: 36px; padding: 0 14px; border: 0; border-radius: 18px; background: color-mix(in srgb, var(--surface) 82%, transparent); color: var(--text); font-size: 0.875rem; font-weight: 500; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform 0.1s var(--ease); }
.shot-btn:active { transform: scale(0.97); }
.flash { position: absolute; inset: 0; z-index: 20; background: #FFF; opacity: 0; pointer-events: none; }

.realthing { margin-top: 56px; }
.realthing-frame { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); aspect-ratio: 1440 / 250; }
.realthing video { width: 100%; height: 100%; object-fit: cover; }
.video-toggle { position: absolute; right: 10px; top: 8px; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px 0 10px; border: 0; border-radius: 16px; background: rgba(20, 14, 18, 0.62); color: #FFF; font-size: 0.8125rem; font-weight: 500; cursor: pointer; }
.video-toggle .ic { width: 14px; height: 14px; }
.cl-more { margin-top: 72px; grid-template-columns: 5fr 6fr; }
.cl-more h3 { font-size: 1.375rem; letter-spacing: -0.01em; }
.cl-more .split-copy p { margin-top: 12px; }

/* ---------- Guides (written by tools/make-guides.py) ----------
   One page per everyday job (edit a PDF, HEIC to JPG, save an Instagram video): the answer first, numbered steps, what
   else works, a few questions, related guides. The doc-page layout, with cards for the links between guides. */
.guide .crumbs { font-size: 0.875rem; color: var(--text-3); }
.guide .crumbs a { color: var(--ink); text-decoration: none; }
.guide .crumbs a:hover { text-decoration: underline; }
.guide .crumbs + h1 { margin-top: 10px; }
.guide-cta { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.doc-page .guide-cta p { margin-top: 0; color: var(--text-3); font-size: 0.875rem; }
.guide .faq { margin-top: 16px; }
/* Guide tiles: a short loop of the job and its name; the whole tile is the link. The still (light or dark) shows until
   the loop plays, which is only while the tile is on screen and never under Reduce Motion (site.js). */
.guide-tiles { margin: 20px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
@media (min-width: 720px) { .guide-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; } }
@media (min-width: 1040px) { .guides-home .guide-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.guide-tile { display: block; border-radius: 14px; color: var(--text); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.gt-media { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.gt-media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; }
.gt-media img, .gt-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gt-video { opacity: 0; }
.gt-media.playing .gt-video { opacity: 1; }
.gt-title { display: block; margin-top: 10px; font-size: 0.9375rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; }
@media (hover: hover) { .guide-tile:hover .gt-media { box-shadow: var(--shadow-md); } }
.guide-tile:active .gt-media { transform: scale(0.98); }
@media (prefers-reduced-motion: no-preference) {
  .gt-media { transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease); }
  .guide-tile:active .gt-media { transition-duration: 0.1s; }
  .gt-video { transition: opacity 0.15s var(--ease); }
}
.doc-page .guide-all { margin-top: 20px; }
.guide-all a { color: var(--ink); }
.guide-table-wrap { margin-top: 16px; overflow-x: auto; }
.guide-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.45; }
.guide-table th, .guide-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.guide-table thead th { color: var(--text-3); font-size: 0.8125rem; font-weight: 600; }
.guide-table tbody th { width: 44%; color: var(--text); font-weight: 600; }
.guide-table td { color: var(--text-2); }
.guides-home .guide-tiles { margin-top: 28px; }
.guide-tile:focus-visible { border-radius: 14px; }

/* ---------- From a link (LinkDownload.swift, simulated) ----------
   The Clothesline's desk (wall, menu bar, notch, string, polaroids) with a browser window on it. The address is the
   thing to grab: it highlights on press, a link chip follows the pointer 1:1, ⇧ blooms the Convert wheel, and the
   result flies out of the corner banner onto the line. */

.link-desk {
  position: relative; margin-top: 40px; height: 700px;
  border-radius: 20px; overflow: hidden; isolation: isolate;
  background: linear-gradient(118deg, var(--wall-a) 0%, var(--wall-b) 48%, var(--wall-c) 100%);
  border: 1px solid var(--line); -webkit-user-select: none; user-select: none; touch-action: pan-y;
  --lk-browser-top: 200px;
}
.link-desk .card { cursor: default; pointer-events: none; }
/* A download's name is the post's title: up to two lines, so "Sunset drive.mp4" reads whole on a phone too */
.link-desk .card-name { margin: 5px 0 7px; padding: 0 2px; font-size: 0.6875rem; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: break-word; }
.link-desk .line-svg { z-index: 6; }
.link-desk .line-cards { z-index: 7; }

.browser {
  position: absolute; z-index: 5; left: 50%; top: var(--lk-browser-top); translate: -50% 0;
  width: min(540px, calc(100% - 32px)); border-radius: 12px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-lg), 0 0 0 0.5px var(--line-strong);
}
.br-top { display: flex; align-items: flex-end; gap: 14px; padding: 9px 10px 0 14px; background: var(--surface-2); }
.br-lights { display: flex; gap: 7px; flex: none; align-self: center; margin-top: -2px; }
.br-lights i { width: 11px; height: 11px; border-radius: 50%; background: #FF5F57; }
.br-lights i:nth-child(2) { background: #FEBC2E; }
.br-lights i:nth-child(3) { background: #28C840; }
.br-tabs { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.br-tabs::-webkit-scrollbar { display: none; }
.br-tabs [role="tab"] {
  flex: none; min-height: 32px; padding: 0 12px; border: 0; border-radius: 8px 8px 0 0;
  background: transparent; color: var(--text-2); font: 500 0.8125rem/1 var(--font); cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.br-tabs [role="tab"]:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 45%, transparent); }
.br-tabs [role="tab"][aria-selected="true"] { background: var(--surface); color: var(--text); font-weight: 600; }
.br-tabs [role="tab"]:focus-visible { outline-offset: -3px; }
.br-bar { padding: 8px 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.br-address {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 36px; padding: 0 12px;
  border: 0; border-radius: 9px; background: var(--surface-2); color: var(--text-2);
  font: 0.875rem/1.2 var(--font); cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent;
}
.br-address:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.br-address .br-lock { width: 12px; height: 12px; color: var(--text-3); }
.br-url { min-width: 0; padding: 2px 5px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background-color 0.12s var(--ease), color 0.12s var(--ease); }
/* Selected on press, as a browser selects its address: plum on the light accent, 9.3:1 */
.br-address.selected .br-url { background: var(--accent-highlight); color: var(--plum); }
.link-desk[data-state="dragging"] .br-address, .link-desk[data-state="open"] .br-address { cursor: grabbing; }
.br-page { padding: 10px 10px 12px; }
.br-video { position: relative; aspect-ratio: 2.35 / 1; border-radius: 8px; overflow: hidden; background: #1A1418; }
.br-video img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; transition: opacity 0.2s var(--ease); }
.br-play { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; translate: -50% -50%; border-radius: 50%; background: rgba(20, 12, 18, 0.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.br-play::after { content: ""; position: absolute; left: 22px; top: 17px; border-left: 16px solid #FFF; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.br-dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 6px; border-radius: 4px; background: rgba(0, 0, 0, 0.62); color: #FFF; font-size: 0.6875rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.br-info { padding: 9px 2px 0; }
.br-title { font-weight: 600; font-size: 1rem; line-height: 1.3; color: var(--text); }
.br-meta { margin-top: 2px; color: var(--text-3); font-size: 0.8125rem; }

/* The note: above the browser, pointing at the address; once a drag starts it sits beside the key, where the wheel
   never opens (as in the playground). */
.lk-note { position: absolute; z-index: 4; left: calc(50% - 250px); top: 92px; display: flex; align-items: flex-start; gap: 2px; pointer-events: none; color: var(--note-ink); }
.lk-note .note-text { color: var(--note-ink); font-size: 1.125rem; }
.lk-note .note-arrow { margin-top: 14px; }
.lk-note.drawn .note-arrow path { stroke-dashoffset: 0; }
.link-desk[data-state]:not([data-state="idle"]) .lk-note,
.link-desk.line-out .lk-note { top: auto; bottom: 34px; left: 28px; max-width: calc(50% - 130px); }
.link-desk[data-state]:not([data-state="idle"]) .lk-note .note-arrow,
.link-desk.line-out .lk-note .note-arrow { display: none; }
.link-desk[data-state]:not([data-state="idle"]) .lk-note .note-text,
.link-desk.line-out .lk-note .note-text { white-space: normal; }

.lk-keybar { bottom: 20px; }
.lk-keybar .keybtn, .lk-keybar .sound-toggle { background: color-mix(in srgb, var(--surface) 62%, transparent); }
.lk-keybar .keybtn:hover, .lk-keybar .sound-toggle:hover { background: color-mix(in srgb, var(--surface) 85%, transparent); }
.lk-keybar .keybtn-label, .lk-keybar .sound-toggle { color: var(--text); }
.lk-keybar .sound-toggle::before { background: var(--line-strong); }
.lk-keybar .sound-toggle[aria-pressed="false"] { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); }

/* The drag image: what a browser shows under the pointer while a link is dragged */
.lk-chip {
  position: absolute; left: 0; top: 0; z-index: 41; display: flex; align-items: center; gap: 10px;
  max-width: 270px; padding: 8px 14px 8px 8px; border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 90%, transparent); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  box-shadow: var(--shadow-lg), 0 0 0 0.5px var(--line-strong); pointer-events: none; will-change: transform;
}
.lk-chip[hidden] { display: none; }
.lk-chip-icon { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); color: var(--text-2); }
.lk-chip-icon .ic { width: 16px; height: 16px; }
.lk-chip-text { min-width: 0; display: grid; gap: 1px; }
.lk-chip-title { font-weight: 600; font-size: 0.875rem; line-height: 1.25; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-chip-url { font-size: 0.75rem; line-height: 1.25; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* While the wheel is up, the dragged link goes under it, so the centre capsule is never covered */
.link-desk[data-state="open"] .lk-chip { z-index: 39; opacity: 0.82; }

/* The corner banner (the app's HUD): "→ MP4  ·  name" and a progress bar */
.lk-hud {
  position: absolute; z-index: 9; right: 14px; top: 42px; width: min(280px, calc(100% - 28px)); padding: 12px 14px 13px;
  border-radius: 14px; background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow-md), 0 0 0 0.5px var(--line-strong);
}
.lk-hud[hidden] { display: none; }
.lk-hud-text { display: block; font-size: 0.8125rem; font-weight: 600; line-height: 1.3; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-hud-bar { display: block; margin-top: 9px; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.lk-hud-bar i { display: block; width: 100%; height: 100%; border-radius: 2px; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--accent-light), var(--accent-deep)); }

@media (prefers-reduced-transparency: reduce) {
  .lk-chip, .lk-hud { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .br-play { background: rgba(20, 12, 18, 0.72); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (max-width: 960px) {
  .lk-note { left: 24px; }
}
@media (max-width: 760px) {
  .link-desk { height: 640px; --lk-browser-top: 186px; }
  .browser { width: calc(100% - 24px); }
  .br-tabs [role="tab"] { padding: 0 9px; }
  .br-top { padding-left: 10px; gap: 10px; }
  .br-lights { display: none; }
  /* On a phone the first note sits in the empty space where the line will hang; once something happens it moves
     between the browser and the key, and stays there. */
  .lk-note, .link-desk[data-state]:not([data-state="idle"]) .lk-note, .link-desk.line-out .lk-note {
    top: auto; bottom: 110px; left: 12px; right: 12px; max-width: none; justify-content: center; text-align: center;
  }
  .link-desk[data-state="idle"]:not(.line-out) .lk-note { top: 96px; bottom: auto; }
  .lk-note .note-arrow { display: none; }
  .lk-note .note-text { white-space: normal; font-size: 1.0625rem; }
  .lk-keybar { flex-wrap: nowrap; }
  .lk-keybar .sound-toggle { margin-left: 13px; }
}

/* ---------- Editors: css/editors.css ---------- */

/* ---------- Download ---------- */

.download { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; padding: 48px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); }
.download-copy img { width: 88px; height: 88px; margin-bottom: 20px; filter: drop-shadow(0 8px 18px rgba(40, 20, 30, 0.16)); }
.download-copy p { margin-top: 14px; color: var(--text-2); font-size: 1.0625rem; }
.steps { margin-top: 18px; display: grid; gap: 12px; counter-reset: step; }
.steps li { position: relative; padding-left: 38px; color: var(--text-2); counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--text); font-size: 0.875rem; font-weight: 600; }
.steps strong { color: var(--text); }
.download-card { padding: 24px; border-radius: 20px; background: var(--surface-2); }
.specs > div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.specs dt { color: var(--text-2); }
.specs dd { font-variant-numeric: tabular-nums; }
.specs [data-config-text="chip"] { white-space: nowrap; } /* "Apple silicon" stays on one line */
.ffmpeg-note { margin-top: 16px; color: var(--text-2); font-size: 0.9375rem; line-height: 1.5; }
.download-card .btn { margin-top: 16px; }
.download-card .fine { text-align: center; margin-top: 12px; }

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

.faq { margin-top: 24px; max-width: 52rem; border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-weight: 600; font-size: 1.0625rem; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); rotate: 45deg; translate: 0 -3px; transition: rotate 0.2s var(--ease), translate 0.2s var(--ease); }
.faq details[open] summary::after { rotate: 225deg; translate: 0 3px; }
.faq details p { padding: 0 0 20px; color: var(--text-2); max-width: 46rem; }

/* Privacy and Footer: see the end of this file */

/* ---------- Release notes and privacy pages ---------- */

.doc-page { max-width: calc(44rem + 2 * var(--gutter)); padding-top: 56px; }
.doc-page h1 { font-size: clamp(2.25rem, 5vw, 3rem); max-width: none; }
.doc-page h2 { margin-top: 48px; font-size: 1.5rem; letter-spacing: -0.015em; }
.doc-page p { margin-top: 14px; color: var(--text-2); }
.doc-page .doc-lede { margin-top: 20px; font-size: 1.1875rem; line-height: 1.5; }
.doc-page .doc-meta { margin-top: 8px; color: var(--text-3); font-size: 0.875rem; }
.doc-list { margin-top: 16px; display: grid; gap: 12px; }
.doc-list li { position: relative; padding-left: 20px; color: var(--text-2); }
.doc-list li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.doc-list strong { color: var(--text); }
.release { margin-top: 8px; }
/* The FFmpeg license page: a library table, checksums and configure lines. Long lines wrap, so a phone never scrolls sideways. */
.doc-page h3 { margin-top: 28px; font-size: 1.0625rem; font-weight: 600; }
.doc-page h3 + p { margin-top: 6px; }
.doc-page pre { margin: 10px 0 0; padding: 14px 16px; border-radius: var(--radius-control); background: var(--surface-2); color: var(--text); font: 0.8125rem/1.6 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.doc-page pre code { font: inherit; }
.doc-page .steps { margin-top: 16px; }
.doc-table-wrap { margin-top: 16px; overflow-x: auto; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.45; }
.doc-table th, .doc-table td { padding: 10px 16px 10px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.doc-table thead th { color: var(--text-3); font-size: 0.8125rem; font-weight: 600; }
.doc-table tbody th { color: var(--text); font-weight: 600; white-space: nowrap; }
.doc-table td { color: var(--text-2); }
.source-list .mono { color: var(--text-3); font-size: 0.8125rem; }
.doc-page .mono.nowrap { white-space: nowrap; overflow-wrap: normal; }
.doc-page .steps pre { margin-top: 8px; }
.footer-links a[aria-current="page"] { color: var(--text); }

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

@media (max-width: 960px) {
  .split, .cl-more { grid-template-columns: 1fr; }
  .download { grid-template-columns: minmax(0, 1fr); padding: 32px 24px; gap: 32px; }
  .shelves-art { max-width: 560px; }
  .explorer { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ex-kinds { flex-direction: row; overflow-x: auto; border-radius: 14px; }
  .ex-kinds [role="tab"] { align-items: center; min-height: 36px; padding: 0 14px; border-radius: 10px; }
  .ex-kinds .k-file { display: none; }
  .ex-panel { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ex-facts { padding-top: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); column-gap: 24px; }
  .ex-facts > div:last-child { border-bottom: 0; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; --section-gap: 88px; }
  .topnav { display: none; }
  .topbar-inner { justify-content: space-between; }
  .hero { padding-top: 48px; }
  .hero-icon { width: 104px; height: 104px; }
  .explorer { padding: 12px; }
  .ex-panel { padding: 12px 0 0; }
  /* The wheel uses the card's padding too, so its names stay at 11 px on a 390 px phone */
  .ex-stage .explorer-wheel { width: calc(100% + 20px); max-width: none; margin-inline: -10px; }

  .scene { height: 560px; }
  .files { inset: 72px 6px auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 0; justify-items: center; }
  .files > li { position: static; transform: none; min-width: 0; max-width: 100%; }
  .file { padding: 4px; max-width: 100%; }
  .file-icon.thumb { width: 66px; height: 44px; }
  .file-icon.doc { width: 42px; height: 54px; }
  .doc-art { top: 12px; height: 20px; left: 7px; right: 7px; }
  .file-icon.book { width: 42px; height: 54px; }
  .file-icon.folder { width: 60px; height: 46px; }
  .file-name { max-width: 100%; font-size: 0.75rem; padding: 1px 5px; }
  .scene-note { left: 16px; top: 18px; }
  .scene-note .note-arrow { display: none; }
  .note-text { font-size: 1.0625rem; }
  .keybar { gap: 8px; bottom: 16px; width: calc(100% - 24px); justify-content: center; }
  .keys { gap: 8px; min-width: 0; }
  .keybtn { flex-direction: column; gap: 6px; padding: 6px 6px 8px; min-width: 88px; }
  .keybtn-label { font-size: 0.8125rem; }
  /* The Sound button stands like the keys: its speaker where a cap would be, its name below */
  .sound-toggle { flex-direction: column; justify-content: center; gap: 6px; min-width: 64px; margin-left: 9px; padding: 6px 6px 8px; font-size: 0.8125rem; line-height: 1.25; }
  .sound-toggle::before { left: -9px; top: 14px; bottom: 14px; }
  .sound-icon { height: 44px; }

  .screen { height: 380px; }
  /* The note goes to the left of the notch, its arrow pointing up at it, so nothing is cut off at the edge */
  .screen-note { left: 14px; top: 34px; flex-direction: column; gap: 0; }
  .screen-note .note-arrow { transform: none; }
  .screen-note .note-text { margin-top: 2px; font-size: 1rem; white-space: normal; max-width: 10em; }
  .shot-btn { right: 12px; bottom: 12px; }
}

@media (max-width: 600px) {
  .specs > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .realthing { display: none; }
  .cl-more { margin-top: 48px; }
}

/* Touch: tabs reach 44 pt */
@media (pointer: coarse) {
  .tabs [role="tab"], .ex-kinds [role="tab"] { min-height: 44px; }
}

@media (max-width: 400px) {
  .keys { flex: 1; }
  .keybtn { min-width: 0; flex: 1; }
  .keybtn .cap { min-width: 48px; height: 40px; padding-inline: 6px; }
  .sound-toggle { min-width: 56px; padding-inline: 4px; }
  .sound-icon { height: 40px; }
  .scene-note .note-text { font-size: 1rem; }
}
/* 320 px: beside Sound, the keys share the row by their caps' widths, so "command" keeps its cap */
@media (max-width: 340px) {
  .keys .keybtn { flex: 1 1 auto; padding-inline: 4px; }
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .note-arrow path { stroke-dashoffset: 0; }
  .btn:active, .shot-btn:active, .sound-toggle:active { transform: none; }
}

/* ==========================================================================
   Privacy picture and footer
   (owned here: the #privacy section of index.html and the footer on every page)
   ========================================================================== */

/* ---------- Privacy: a photo goes through the wheel and the new file lands beside it, on the Mac ---------- */

.priv {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: center; gap: 56px;
  margin-top: 32px; padding: 48px 56px; border-radius: var(--radius-scene);
  background: var(--surface); border: 1px solid var(--line);
}
/* --priv-travel: from the wheel's centre to the new file's centre, so the file comes out of the wheel */
.priv-art { position: relative; padding-top: 40px; --priv-travel: 134px; view-timeline-name: --priv; }
.priv-mac { width: 100%; max-width: 500px; margin-inline: auto; }
.priv-screen {
  position: relative; overflow: hidden; aspect-ratio: 16 / 10;
  border: 10px solid #1A171A; border-bottom-width: 14px; border-radius: 18px 18px 6px 6px;
  background: linear-gradient(135deg, var(--wall-a), var(--wall-b) 55%, var(--wall-c));
  box-shadow: 0 0 0 1px var(--line-strong);
}
.priv-menubar { position: absolute; inset: 0 0 auto; height: 14px; background: var(--menubar); }
.priv-notch { position: absolute; top: 0; left: 50%; translate: -50% 0; width: 16%; height: 14px; border-radius: 0 0 6px 6px; background: #1A171A; }
.priv-base {
  position: relative; height: 14px; margin-inline: -7%; border-radius: 3px 3px 14px 14px;
  background: linear-gradient(#E6E1E4, #BCB5B9); box-shadow: 0 12px 20px -12px rgba(40, 20, 30, 0.45);
}
@media (prefers-color-scheme: dark) { .priv-base { background: linear-gradient(#77707A, #4E484F); } }
.priv-base::before { content: ""; position: absolute; left: 50%; top: 0; translate: -50% 0; width: 18%; height: 5px; border-radius: 0 0 6px 6px; background: rgba(0, 0, 0, 0.12); }
.priv-flow { position: absolute; inset: 14px 0 0; display: flex; align-items: center; justify-content: center; gap: 10px; }
.priv-file { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.priv-thumb { display: block; width: 96px; height: 64px; padding: 3px; background: #FFF; border-radius: 6px; box-shadow: 0 4px 12px rgba(60, 10, 35, 0.22); }
.priv-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.priv-name { padding: 2px 8px; border-radius: 6px; background: color-mix(in srgb, var(--plum) 72%, transparent); color: #FFF; font-size: 0.75rem; font-weight: 500; line-height: 1.35; white-space: nowrap; }
.priv-new .priv-name { background: var(--accent-deep); }
.priv-arrow { width: 28px; height: 12px; flex: none; fill: none; stroke: var(--mb-ink); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.priv-wheel { width: 76px; height: 76px; flex: none; filter: drop-shadow(0 6px 14px rgba(60, 10, 35, 0.25)); }
.pw-ring { fill: var(--w-border); }
.pw-petals, .pw-hl { fill: none; stroke-width: 17; stroke-dashoffset: -0.55; }
.pw-petals { stroke: var(--w-petal-in); stroke-dasharray: 8.9 1.1; }
.pw-hl { stroke: var(--accent); stroke-dasharray: 8.9 51.1; }
.pw-cap { fill: var(--w-cap); }
/* The cloud, crossed out: nothing goes up */
.priv-cloud { position: absolute; top: 0; right: 4%; width: 60px; height: auto; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.pc-cloud, .pc-slash { stroke: var(--text-3); stroke-width: 1.75; }
.pc-gap { stroke: var(--surface); stroke-width: 6; }

.priv-facts { display: grid; gap: 20px; }
.priv-facts li { display: flex; align-items: center; gap: 14px; font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.priv-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--ink); }

/* One moment, tied to the scroll so it can't run ahead of you: the wheel's petal lights, then the new file comes
   out of the wheel to sit beside the original. Transform and opacity only; without support or with Reduce Motion,
   the finished picture shows. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .pw-hl, .priv-arrow-out, .priv-new { animation: linear both; animation-timeline: --priv; }
    .pw-hl { animation-name: priv-fade; animation-range: entry 45% entry 70%; }
    .priv-arrow-out { animation-name: priv-fade; animation-range: entry 68% entry 82%; }
    .priv-new { animation-name: priv-out; animation-range: entry 70% entry 100%; }
  }
}
@keyframes priv-fade { from { opacity: 0; } }
@keyframes priv-out { from { opacity: 0; transform: translateX(calc(-1 * var(--priv-travel))) scale(0.4); } }

/* ---------- Footer: brand and links on one row, the legal line under a hairline, all on one left edge ---------- */

.footer { margin-top: var(--section-gap); border-top: 1px solid var(--line); }
.footer-inner {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 20px 40px;
  padding-top: 32px; padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
}
.footer .brand img { border-radius: 6px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 28px; }
.footer-links a { padding-block: 6px; color: var(--text-2); text-decoration: none; font-size: 0.9375rem; line-height: 1.4; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.footer-legal { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 0.8125rem; line-height: 1.5; }
.footer-legal a { color: inherit; text-decoration-color: var(--line-strong); }
.footer-legal a:hover { color: var(--text); text-decoration-color: currentColor; }
/* Directory badges ("Listed on …"): a quiet row above the legal line. The directory draws each badge in light and dark,
   and the <picture> picks the one for the page's appearance. 44 px tall: big enough to tap, small enough to stay quiet. */
.footer-badges { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.footer-badges a { display: block; border-radius: 10px; } /* the focus ring follows the badge's corners */
.footer-badges img { width: auto; height: 44px; }
.footer-badges a:active img { transform: scale(0.97); }
@media (prefers-reduced-motion: no-preference) { .footer-badges img { transition: transform 100ms ease-out; } }

@media (max-width: 960px) {
  .priv { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 40px 32px 32px; }
  .priv-facts { grid-template-columns: 1fr 1fr; gap: 16px 24px; }
}
@media (max-width: 760px) {
  .priv { margin-top: 24px; padding: 20px 16px 24px; border-radius: var(--radius-card); gap: 24px; }
  .priv-art { padding-top: 30px; --priv-travel: 88px; }
  .priv-screen { border-width: 6px 6px 9px; border-radius: 12px 12px 4px 4px; }
  .priv-menubar, .priv-notch { height: 10px; }
  .priv-flow { inset: 10px 0 0; gap: 6px; }
  .priv-thumb { width: 64px; height: 43px; padding: 2px; border-radius: 5px; }
  .priv-wheel { width: 52px; height: 52px; }
  .priv-arrow { width: 18px; }
  .priv-name { padding: 1px 5px; font-size: 0.6875rem; }
  .priv-cloud { width: 42px; right: 2%; }
  .priv-facts { gap: 12px 16px; }
  .priv-facts li { gap: 10px; font-size: 1rem; }
  .priv-ic { width: 36px; height: 36px; }
  .priv-ic .ic { width: 18px; height: 18px; }

  /* Stacked and left-aligned; links in two columns, each 44 px tall to tap */
  .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 28px; padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); }
  .footer-links { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, auto); grid-auto-flow: column; gap: 0 16px; }
  .footer-links a { display: flex; align-items: center; min-height: 44px; padding-block: 0; }
  .footer-legal { padding-top: 16px; }
  .footer-legal span { display: block; text-wrap: balance; }
}
