/* Hallmark · custom · idea: "the page is a Mac desktop, and Kestrel works on it" · vibe: "a dusk desktop you can pick up" · paper: dark warm umber · accent: kestrel amber · faces: system (SF Pro, SF Mono) · hero: a window holding the pitch, a second window the visitor can throw at the browser edge · posture: full palette (amber signal, plumage aurora, note pastels, terminal tints, each with one job) · axes: dark/grotesk/warm */
/* critique: the risk is a toy that hides the pitch; every window holds real copy, and everything works by scripted demo for touch and keyboard. */
/* waive 47a: the user chose this direction; the windows are the product's working surface, not decoration around a screenshot. */
/* waive 67: the deck's tab labels copy the app's own uppercase tracked labels (NoteDeckPanel.swift). */
/* waive 62: the edge wheel is a popover the deck opens; the deck itself needs the script. */
/* waive 37: one family (the system face) by design, because the page is a macOS desktop. */

:root {
  color-scheme: dark;

  /* ground and ink, tinted toward umber (hue 55) */
  --color-paper: oklch(15% 0.012 55);
  --color-paper-2: oklch(19% 0.012 55);
  --color-ink: oklch(95% 0.008 70);
  --color-ink-2: oklch(82% 0.012 70);
  --color-muted: oklch(70% 0.014 65);
  --color-rule: oklch(32% 0.012 60);

  /* windows (macOS dark appearance) */
  --color-win: oklch(22% 0.008 60);
  --color-win-2: oklch(26% 0.008 60);
  --color-win-edge: oklch(38% 0.01 60 / 0.75);
  --color-titlebar: oklch(25% 0.008 60);
  --color-glass: oklch(18% 0.01 55 / 0.72);
  --color-red-light: #ff5f57;
  --color-yellow-light: #febc2e;
  --color-green-light: #28c840;

  /* the signal: kestrel amber, and the ink that sits on it */
  --color-accent: oklch(82% 0.15 78);
  --color-accent-hi: oklch(87% 0.13 82);
  --color-accent-ink: oklch(22% 0.05 60);
  --color-focus: oklch(80% 0.19 75);
  /* the macOS selection highlight, deep enough for white text */
  --color-highlight: oklch(50% 0.17 262);

  /* a kestrel's plumage, as the snap preview draws it (SnapController.swift) */
  --plume-amber: #f5b840;
  --plume-rust: #e86630;
  --plume-rose: #e8476b;
  --plume-slate: #5c8cf0;
  --plumage: conic-gradient(from 0deg, var(--plume-amber), var(--plume-rust), var(--plume-rose), var(--plume-slate), var(--plume-amber));

  /* wallpaper glows */
  --glow-slate: oklch(42% 0.11 262 / 0.55);
  --glow-rust: oklch(48% 0.14 42 / 0.5);
  --glow-rose: oklch(38% 0.11 10 / 0.45);

  /* notes (Note.swift): fill and accent per colour, and the ink on paper */
  --note-ink: oklch(25% 0.01 75);
  --note-yellow: #fce38a; --note-yellow-a: #f2c230;
  --note-salmon: #f9bba8; --note-salmon-a: #ee8a70;
  --note-mint: #b8ead6; --note-mint-a: #5fcba3;
  --note-blue: #bcd8f6; --note-blue-a: #6fa8ea;
  --note-lavender: #dacbf5; --note-lavender-a: #a98ae6;
  --note-delete: oklch(42% 0.13 30);

  /* capture flash: systemGreen at 45% */
  --color-capture: rgb(52 199 89 / 0.45);
  --color-capture-edge: rgb(52 199 89);
  --color-warn: oklch(78% 0.14 65);

  /* terminal */
  --color-term: #1d232c;
  --color-term-ink: #e6edf3;
  --color-term-dim: #8b98a8;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;

  --text-xs: 0.8125rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-h2: clamp(2rem, 1.4rem + 2vw, 3rem);
  --text-display: clamp(2.6rem, 1.6rem + 3.6vw, 4.4rem);

  --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px;
  --space-xl: 40px; --space-2xl: 64px; --space-3xl: 96px; --space-4xl: 144px;

  --radius-win: 12px;
  --radius-ctl: 8px;
  --measure: 1200px;
  --menubar: 30px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.5, 0, 0.75, 0);
  --ease-spring: cubic-bezier(0.3, 1.18, 0.5, 1);
  --dur-micro: 120ms;
  --dur-short: 220ms;
  --dur-long: 420ms;

  --z-win: 10;
  --z-snap: 250;
  --z-deck: 270;
  --z-menubar: 300;
  --z-card: 280;
  --z-hud: 290;
  --z-cursor: 600;

  /* derived tones: tints of the tokens above, named by use */
  --accent-10: oklch(82% 0.15 78 / 0.1);
  --accent-18: oklch(82% 0.15 78 / 0.18);
  --accent-32: oklch(82% 0.15 78 / 0.32);
  --amber-30: rgb(245 184 64 / 0.3);
  --black-20: oklch(0% 0 0 / 0.2);
  --black-25: oklch(0% 0 0 / 0.25);
  --black-30: oklch(0% 0 0 / 0.3);
  --black-35: oklch(0% 0 0 / 0.35);
  --black-40: oklch(0% 0 0 / 0.4);
  --black-42: oklch(0% 0 0 / 0.42);
  --black-50: oklch(0% 0 0 / 0.5);
  --black-60: oklch(0% 0 0 / 0.6);
  --black-70: oklch(0% 0 0 / 0.7);
  --black-75: oklch(0% 0 0 / 0.75);
  --black-80: oklch(0% 0 0 / 0.8);
  --black-85: oklch(0% 0 0 / 0.85);
  --folder-deep: oklch(52% 0.15 262);
  --note-ink-07: oklch(25% 0.01 75 / 0.07);
  --note-ink-08: oklch(25% 0.01 75 / 0.08);
  --note-ink-12: oklch(25% 0.01 75 / 0.12);
  --note-ink-18: oklch(25% 0.01 75 / 0.18);
  --note-ink-20: oklch(25% 0.01 75 / 0.2);
  --note-ink-25: oklch(25% 0.01 75 / 0.25);
  --note-ink-35: oklch(25% 0.01 75 / 0.35);
  --note-ink-45: oklch(25% 0.01 75 / 0.45);
  --note-ink-50: oklch(25% 0.01 75 / 0.5);
  --note-ink-55: oklch(25% 0.01 75 / 0.55);
  --note-ink-60: oklch(25% 0.01 75 / 0.6);
  --note-ink-85: oklch(25% 0.01 75 / 0.85);
  --rust-16: rgb(232 102 48 / 0.16);
  --selection-wash: oklch(60% 0.02 250 / 0.12);
  --slate-00: rgb(92 140 240 / 0);
  --slate-12: rgb(92 140 240 / 0.12);
  --term-ink-70: oklch(95% 0 0 / 0.7);
  --tone-1: oklch(20% 0.02 50 / 0.86);
  --tone-7: #000;
  --tone-9: oklch(0% 0 0);
  --white: oklch(100% 0 0);
  --white-04: oklch(100% 0 0 / 0.04);
  --white-06: oklch(100% 0 0 / 0.06);
  --white-14: oklch(100% 0 0 / 0.14);
  --white-16: oklch(100% 0 0 / 0.16);
  --white-20: oklch(100% 0 0 / 0.2);
  --white-35: oklch(100% 0 0 / 0.35);
  --white-90: oklch(100% 0 0 / 0.9);
  --whiteboard: oklch(96% 0.004 90);
  --whiteboard-blue: oklch(40% 0.12 260);
  --whiteboard-ink: oklch(30% 0.03 250);
  --whiteboard-red: oklch(45% 0.17 25);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--menubar) + var(--space-lg)); }
body {
  background: var(--color-paper); color: var(--color-ink);
  font-family: var(--font); font-size: var(--text-md); line-height: 1.55;
  -webkit-font-smoothing: antialiased; font-synthesis: none; text-rendering: optimizeLegibility;
}
/* the wallpaper: a dusk sky in the bird's colours, fixed like a real desktop */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 55% at 12% 8%, var(--glow-slate), transparent 70%),
    radial-gradient(55% 50% at 92% 88%, var(--glow-rust), transparent 70%),
    radial-gradient(45% 40% at 78% 22%, var(--glow-rose), transparent 70%),
    var(--color-paper);
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
::selection { background: var(--color-accent); color: var(--color-accent-ink); }
h1, h2 { overflow-wrap: break-word; min-width: 0; text-wrap: balance; font-weight: 650; }
p { text-wrap: pretty; }
code { font-family: var(--font-mono); font-size: 0.9em; }
.copy p code { white-space: nowrap; }
kbd {
  font-family: var(--font); font-size: 0.86em; font-weight: 500; color: var(--color-ink);
  display: inline-block; min-width: 1.9em; text-align: center; padding: 0 0.45em; line-height: 1.55;
  border: 1px solid var(--color-rule); border-bottom-width: 2px; border-radius: 6px; background: var(--color-paper-2);
  white-space: nowrap;
}
.bird {
  display: inline-block; width: 16px; height: 16px; flex-shrink: 0; background: currentColor;
  -webkit-mask: url(/bird.png) center / contain no-repeat; mask: url(/bird.png) center / contain no-repeat;
}

/* ---------- menu bar ---------- */
.menubar {
  position: fixed; inset: 0 0 auto 0; height: var(--menubar); z-index: var(--z-menubar);
  display: flex; align-items: center; gap: var(--space-lg); padding: 0 var(--space-md);
  background: var(--color-glass); -webkit-backdrop-filter: blur(24px) saturate(150%); backdrop-filter: blur(24px) saturate(150%);
  font-size: var(--text-sm); font-weight: 500; white-space: nowrap;
}
.menubar a { text-decoration: none; }
.mb-brand { display: inline-flex; align-items: center; gap: var(--space-xs); font-weight: 700; }
.mb-nav { display: flex; gap: var(--space-lg); }
.mb-nav a { color: var(--color-ink-2); }
.mb-nav a:hover, .mb-nav a[aria-current="true"] { color: var(--color-ink); }
.mb-grow { flex: 1; }
.mb-get { display: none; color: var(--color-accent); }
.mb-status-wrap { position: relative; }
.mb-status {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 7px; border: 0; border-radius: 5px;
  background: transparent; color: var(--color-ink); font: inherit; cursor: default;
}
.mb-status[aria-expanded="true"], .mb-status:hover { background: var(--white-16); }
.mb-status .badge { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mb-status .badge:empty { display: none; }
.mb-clock { font-variant-numeric: tabular-nums; }
.status-menu {
  position: absolute; right: 0; top: 26px; min-width: 260px; padding: 5px;
  background: var(--color-glass); -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%);
  border: 1px solid var(--color-win-edge); border-radius: 10px; box-shadow: 0 18px 50px -12px var(--black-70);
  display: grid; font-size: var(--text-sm);
}
.status-menu[hidden] { display: none; }
.status-menu a, .status-menu button {
  display: flex; justify-content: space-between; gap: var(--space-lg); align-items: center;
  padding: 3px 10px; border-radius: 5px; border: 0; background: none; color: var(--color-ink); font: inherit; text-align: left; cursor: default;
}
.status-menu a:hover, .status-menu button:hover, .status-menu a:focus-visible, .status-menu button:focus-visible {
  background: var(--color-highlight); outline: none;
}
.status-menu kbd { border: 0; background: none; color: var(--color-muted); padding: 0; min-width: 0; }
.status-menu hr { border: 0; border-top: 1px solid var(--color-rule); margin: 5px var(--space-xs); }

/* ---------- the desk: sections are areas of one desktop ---------- */
main { padding-top: var(--menubar); }
.desk {
  width: 100%; max-width: var(--measure); margin-inline: auto;
  padding-inline: max(var(--space-lg), env(safe-area-inset-left, 0px));
}
.slot { position: relative; min-width: 0; }

.hero {
  min-height: calc(100svh - var(--menubar)); display: grid; align-items: center; gap: var(--space-xl);
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); padding-block: var(--space-xl);
}
.feature {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-2xl);
  align-items: center; padding-block: var(--space-3xl);
}
.feature--flip .copy { order: 2; }
.copy h2 { font-size: var(--text-h2); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 var(--space-md); max-width: 16ch; }
.copy p { color: var(--color-ink-2); font-size: var(--text-lg); margin: 0 0 var(--space-md); max-width: 46ch; }
.copy .aside { color: var(--color-accent); font-size: var(--text-md); }
.keys { margin: var(--space-lg) 0; display: grid; gap: var(--space-xs); }
.keys div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--space-md); align-items: baseline; }
.keys dt { display: flex; gap: var(--space-2xs); }
.keys dd { margin: 0; color: var(--color-ink-2); }

/* ---------- windows ---------- */
.win {
  position: relative; background: var(--color-win); border: 1px solid var(--color-win-edge); border-radius: var(--radius-win);
  box-shadow: 0 24px 60px -22px var(--black-75), 0 0 0 0.5px var(--black-60);
  overflow: hidden; z-index: var(--z-win); transform-origin: 0 0;
}
.win.is-free { position: absolute; left: 0; top: 0; }
.win.is-held { box-shadow: 0 40px 90px -24px var(--black-85), 0 0 0 0.5px var(--black-60); }
.win.is-gliding { transition: transform 320ms var(--ease-spring); }
.titlebar {
  height: 28px; display: flex; align-items: center; gap: var(--space-xs); padding: 0 var(--space-sm); background: var(--color-titlebar);
  border-bottom: 1px solid var(--black-35); font-size: 13px; font-weight: 600; color: var(--color-muted);
  user-select: none;
}
.titlebar i, .tt-lights i { width: 12px; height: 12px; border-radius: 50%; background: var(--color-red-light); flex-shrink: 0; }
.titlebar i:nth-child(2), .tt-lights i:nth-child(2) { background: var(--color-yellow-light); }
.titlebar i:nth-child(3), .tt-lights i:nth-child(3) { background: var(--color-green-light); }
.titlebar span { flex: 1; text-align: center; margin-right: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-body { padding: var(--space-xl); }

/* hero window */
.hero-body { padding: var(--space-2xl) var(--space-2xl) var(--space-xl); }
.app-icon { display: block; width: 88px; height: 88px; margin-bottom: var(--space-lg); }
.hero h1 { font-size: var(--text-display); line-height: 1; letter-spacing: -0.04em; margin: 0; max-width: 12ch; }
.lede { font-size: 1.25rem; color: var(--color-ink-2); margin: var(--space-lg) 0 var(--space-xl); max-width: 34ch; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-lg); }
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 26px; border-radius: 999px;
  background: var(--color-accent); color: var(--color-accent-ink); font-weight: 650; text-decoration: none; font-size: var(--text-md);
  transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.btn:hover { background: var(--color-accent-hi); }
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.link { color: var(--color-ink-2); text-decoration: underline; text-decoration-color: var(--color-rule); text-underline-offset: 4px; }
.link:hover { color: var(--color-ink); text-decoration-color: var(--color-accent); }
.meta { color: var(--color-muted); font-size: var(--text-sm); margin: var(--space-md) 0 0; }

/* the try-me window */
.try-body { padding: var(--space-xl); }
.try-body h2 { font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1.2; margin: var(--space-lg) 0 var(--space-xs); }
.try-body p { color: var(--color-ink-2); margin: 0 0 var(--space-lg); }
.bigkeys { display: flex; align-items: center; gap: var(--space-sm); }
.bigkeys .eq { color: var(--color-muted); font-size: var(--text-sm); }
.key {
  display: inline-grid; place-items: center; min-width: 30px; height: 28px; padding: 0 var(--space-xs); border-radius: 7px;
  background: var(--color-win-2); border: 1px solid var(--color-rule); border-bottom-width: 3px;
  font-size: 14px; font-weight: 600; color: var(--color-ink-2);
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.key--big { width: 84px; height: 72px; border-radius: 12px; font-size: 24px; align-content: space-between; justify-items: start; padding: var(--space-xs) var(--space-sm); }
.key--big small { font-size: 12px; font-weight: 500; color: var(--color-muted); }
.key--fn { font-size: 18px; }
.key.is-down { background: var(--color-accent); color: var(--color-accent-ink); transform: translateY(2px); border-bottom-width: 1px; }
.key.is-down small { color: var(--color-accent-ink); }
.ghost-btn {
  min-height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--color-rule); background: transparent;
  color: var(--color-ink); font: inherit; font-size: var(--text-sm); font-weight: 600; cursor: pointer;
  transition: border-color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out);
}
.ghost-btn:hover { border-color: var(--color-accent); background: var(--white-04); }
.ghost-btn:active { transform: scale(0.97); }

/* nearest-corner window */
.corner-body { padding: var(--space-lg); }
.quad {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; height: 260px;
  border-radius: 8px; overflow: hidden;
}
.quad b { position: relative; background: var(--color-win-2); transition: background-color var(--dur-micro) var(--ease-out); }
.quad b::after { content: ""; position: absolute; width: 22px; height: 22px; border: 3px solid var(--color-muted); opacity: 0.5; }
.quad b[data-q="tl"]::after { left: 10px; top: 10px; border-right: 0; border-bottom: 0; }
.quad b[data-q="tr"]::after { right: 10px; top: 10px; border-left: 0; border-bottom: 0; }
.quad b[data-q="bl"]::after { left: 10px; bottom: 10px; border-right: 0; border-top: 0; }
.quad b[data-q="br"]::after { right: 10px; bottom: 10px; border-left: 0; border-top: 0; }
.quad b.is-on { background: var(--accent-18); }
.quad b.is-on::after { border-color: var(--color-accent); opacity: 1; }
.caption { color: var(--color-muted); font-size: var(--text-sm); margin: var(--space-md) 0 0; }
.caption kbd { font-size: 0.8em; }

/* snap zones window */
.zones-body { padding: var(--space-lg); }
.zonemap {
  position: relative; aspect-ratio: 16 / 10; border-radius: 8px; background:
    radial-gradient(60% 60% at 20% 15%, var(--glow-slate), transparent 70%),
    radial-gradient(60% 60% at 90% 90%, var(--glow-rust), transparent 70%), var(--color-paper);
  display: grid; grid-template-columns: 22% 1fr 22%; grid-template-rows: 26% 1fr 26%; overflow: hidden;
}
.zonemap button { border: 0; background: transparent; cursor: crosshair; position: relative; z-index: 2; }
.zonemap button:focus-visible { outline-offset: -3px; }
.zonemap [data-zone="left"] { grid-column: 1; grid-row: 2; }
.zonemap [data-zone="right"] { grid-column: 3; grid-row: 2; }
.zonemap [data-zone="bottom"] { grid-column: 2; grid-row: 3; }
.zonemap [data-zone="top"] { grid-column: 2; grid-row: 1; }
.zonemap [data-zone="bottomLeft"] { grid-column: 1; grid-row: 3; }
.zonemap [data-zone="bottomRight"] { grid-column: 3; grid-row: 3; }
.zonemap::after { content: ""; grid-column: 2; grid-row: 2; }
.zm-pane {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%; border-radius: 8px; padding: 2.5px; z-index: 1; pointer-events: none;
  background: var(--plumage); opacity: 0; transform-origin: 0 0;
  transition: transform var(--dur-long) var(--ease-spring), opacity var(--dur-short) var(--ease-out);
}
.zm-pane::before { content: ""; position: absolute; inset: 2.5px; border-radius: 6px; background: radial-gradient(70% 70% at 50% 50%, var(--accent-32), var(--tone-1)); }
.zm-pane.is-on { opacity: 1; }

/* capture window */
.capture-body { padding: var(--space-lg); }
.modes { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-bottom: var(--space-md); }
.modes button {
  min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 var(--space-sm); border-radius: 999px;
  border: 1px solid var(--color-rule); background: transparent; color: var(--color-ink-2); font: inherit; font-size: var(--text-sm); cursor: pointer;
}
.modes button[aria-checked="true"] { border-color: var(--color-accent); color: var(--color-ink); background: var(--accent-10); }
.modes kbd { font-size: 0.82em; }
.shot { position: relative; border-radius: 8px; overflow: hidden; cursor: crosshair; user-select: none; touch-action: none; }
.shot-art {
  padding: var(--space-xl) var(--space-xl) var(--space-2xl); background: var(--whiteboard); color: var(--whiteboard-ink);
  font-family: "Marker Felt", "Chalkboard SE", var(--font); min-height: 250px;
}
.shot-art p { margin: 0 0 var(--space-sm); font-size: 1.15rem; }
.shot-art .sl-big { font-size: 1.9rem; color: var(--whiteboard-red); margin-bottom: var(--space-md); }
.shot-art .sl-path { font-family: var(--font-mono); font-size: 0.95rem; color: var(--whiteboard-blue); margin-top: var(--space-lg); }
.sel { position: absolute; left: 0; top: 0; width: 1px; height: 1px; border: 1px solid var(--white-90); outline: 1px solid var(--black-50);
  background: var(--selection-wash); transform-origin: 0 0; opacity: 0; pointer-events: none; }
.sel.is-on { opacity: 1; }
.flash { position: absolute; left: 0; top: 0; width: 1px; height: 1px; background: var(--color-capture); border-radius: 4px; opacity: 0; transform-origin: 0 0; pointer-events: none; }
.flash.is-on { animation: flash 700ms var(--ease-out) forwards; }
@keyframes flash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
.popover {
  position: absolute; left: 0; top: 0; width: 270px; padding: var(--space-sm) var(--space-md); border-radius: 14px;
  background: var(--color-win); border: 1px solid var(--color-win-edge); box-shadow: 0 18px 40px -14px var(--black-70);
  color: var(--color-ink); font-size: var(--text-sm); opacity: 0; transform: translateY(6px) scale(0.97); pointer-events: none;
  transition: opacity var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out);
}
.popover.is-on { opacity: 1; transform: none; pointer-events: auto; }
.popover select { font: inherit; font-size: 12px; color: var(--color-ink); background: var(--color-win-2); border: 1px solid var(--color-rule); border-radius: 6px; padding: 2px 6px; }
.popover .pv-head { display: flex; justify-content: space-between; align-items: center; color: var(--color-muted); font-size: 12px; margin-bottom: 6px; }
.popover .pv-text { margin: 0; line-height: 1.45; }

/* the open note */
.win--bare { background: transparent; border: 0; overflow: visible; box-shadow: none; max-width: 420px; margin-inline: auto; }
.note-card {
  --fill: var(--note-yellow); --accent: var(--note-yellow-a);
  background: var(--fill); color: var(--note-ink); border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 70px -24px var(--black-80), 0 0 0 0.5px var(--black-30);
  display: flex; flex-direction: column; min-height: 320px; transition: background-color var(--dur-short) var(--ease-out);
}
.note-card[data-color="salmon"] { --fill: var(--note-salmon); --accent: var(--note-salmon-a); }
.note-card[data-color="mint"] { --fill: var(--note-mint); --accent: var(--note-mint-a); }
.note-card[data-color="blue"] { --fill: var(--note-blue); --accent: var(--note-blue-a); }
.note-card[data-color="lavender"] { --fill: var(--note-lavender); --accent: var(--note-lavender-a); }
.nc-head { display: flex; align-items: center; gap: 6px; padding: var(--space-sm) 10px var(--space-xs) 14px; }
.nc-title { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 650; color: inherit; padding: 0; }
.nc-title::placeholder { color: var(--note-ink-45); }
.nc-title:focus-visible { outline: none; }
.nc-saved { font-size: 10.5px; color: var(--note-ink-55); white-space: nowrap; }
.nc-icon { width: 24px; height: 24px; border: 0; background: none; color: var(--note-ink-60); border-radius: 5px; cursor: pointer; display: grid; place-items: center; }
.nc-icon:hover { background: var(--note-ink-08); }
.nc-icon svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nc-rule { height: 1px; margin: 0 var(--space-sm); background: var(--note-ink-12); }
.nc-body {
  flex: 1; padding: 10px 14px; font-size: 14px; line-height: 1.55; outline: none; min-height: 180px; max-height: 340px; overflow-y: auto;
  white-space: pre-wrap; overflow-wrap: anywhere; caret-color: var(--note-ink);
}
.nc-body ::selection { background: var(--note-ink-20); color: inherit; }
.nc-body .ln { min-height: 1.55em; }
.nc-body .h1 { font-size: 20px; font-weight: 700; line-height: 1.3; }
.nc-body .h2 { font-size: 17px; font-weight: 700; }
.nc-body .mk { color: var(--note-ink-35); }
.nc-body strong { font-weight: 700; }
.nc-body em { font-style: italic; }
.nc-body s { text-decoration-thickness: 1.5px; }
.nc-body .code { font-family: var(--font-mono); font-size: 0.88em; background: var(--note-ink-08); border-radius: 4px; padding: 0 2px; }
.nc-body .cb {
  display: inline-block; position: relative; color: transparent; width: 1.1em; height: 1.55em; vertical-align: top;
  white-space: nowrap; overflow: hidden; cursor: pointer; margin-right: 2px;
}
.nc-body .cb::before {
  content: ""; position: absolute; left: 0; top: 0.18em; width: 0.95em; height: 0.95em; border-radius: 4px;
  border: 1.5px solid var(--note-ink-50); background: var(--white-35);
}
.nc-body .cb.is-done::before { background: var(--note-ink); border-color: var(--note-ink); }
.nc-body .cb.is-done::after {
  content: ""; position: absolute; left: 0.32em; top: 0.3em; width: 0.28em; height: 0.52em;
  border: solid var(--fill); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.nc-body .done { color: var(--note-ink-50); text-decoration: line-through; }
.nc-foot { display: flex; align-items: center; gap: 7px; padding: 9px var(--space-sm); }
.nc-sw {
  width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--note-ink-18); cursor: pointer; padding: 0;
  background: var(--sw); position: relative;
}
.nc-sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--fill), 0 0 0 4px var(--sw-a); }
.nc-grow { flex: 1; }
.nc-pill {
  font: inherit; font-size: 11px; font-weight: 650; color: var(--note-ink); padding: var(--space-2xs) 10px; border-radius: 999px; cursor: pointer;
  background: var(--note-ink-07); border: 1px solid var(--note-ink-12);
}
.nc-pill--delete { color: var(--note-delete); }
.nc-pill:hover { background: var(--note-ink-12); }
.nc-toast { display: flex; align-items: center; gap: 10px; padding: 14px; font-size: 12.5px; font-weight: 500; }

/* the floating card, opened from the deck */
.note-float {
  position: fixed; z-index: var(--z-card); width: min(360px, calc(100% - var(--space-2xl))); transform-origin: 100% 50%;
  animation: card-in 320ms var(--ease-spring);
}
.note-float.is-leaving { animation: card-out 220ms var(--ease-in) forwards; }
@keyframes card-in { from { opacity: 0; transform: var(--from, translateX(40px)) scale(0.5); } }
@keyframes card-out { to { opacity: 0; transform: var(--from, translateX(40px)) scale(0.5); } }

/* ---------- the deck (built by main.js) ---------- */
.deck { position: fixed; z-index: var(--z-deck); pointer-events: none; }
.deck[data-edge="right"] { right: 0; top: 50%; }
.deck[data-edge="left"] { left: 0; top: 50%; }
.deck[data-edge="bottom"] { bottom: 0; left: 50%; }
.deck[data-edge="top"] { top: var(--menubar); left: 50%; }
.deck.is-hidden { display: none; }
.deck-pill {
  position: absolute; pointer-events: auto; display: flex; gap: var(--space-2xs); padding: 6px; border-radius: 999px; cursor: pointer;
  background: var(--black-42); border: 0.5px solid var(--white-20);
  transition: opacity 100ms var(--ease-out);
}
.deck-pill i { display: block; border-radius: 2px; background: var(--dash); }
.deck[data-edge="right"] .deck-pill, .deck[data-edge="left"] .deck-pill { flex-direction: column; width: 10px; padding: 6px 3px; }
.deck[data-edge="right"] .deck-pill i, .deck[data-edge="left"] .deck-pill i { width: 4px; height: 12px; }
.deck[data-edge="top"] .deck-pill, .deck[data-edge="bottom"] .deck-pill { height: 10px; padding: 3px 6px; }
.deck[data-edge="top"] .deck-pill i, .deck[data-edge="bottom"] .deck-pill i { width: 12px; height: 4px; }
.deck.is-fanned .deck-pill { opacity: 0; pointer-events: none; }
.deck-fan { position: absolute; pointer-events: none; }
.deck.is-fanned .deck-fan { pointer-events: auto; }
.deck-tab {
  position: absolute; left: 0; top: 0; border: 0; padding: 0; background: var(--fill); color: var(--note-ink); font: inherit; text-align: left; cursor: pointer;
  box-shadow: -1px 1px 3px var(--black-25); opacity: 0; display: flex;
  transition: transform 260ms var(--ease-spring), opacity 160ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.deck.is-fanned .deck-tab { opacity: 1; }
.deck-tab.is-open { box-shadow: -3px 4px 14px var(--black-35); }
.deck-tab .dt-strip { flex-shrink: 0; display: grid; place-items: center; font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; color: var(--note-ink-60); text-transform: uppercase; overflow: hidden; white-space: nowrap; }
.deck-tab .dt-strip span { display: block; max-width: 50px; overflow: hidden; text-overflow: ellipsis; }
.deck-tab .dt-div { flex-shrink: 0; border: 0 dashed var(--note-ink-25); }
.deck-tab .dt-prev { flex: 1; min-width: 0; padding: var(--space-sm); opacity: 0; transition: opacity 140ms var(--ease-out); overflow: hidden; }
.deck-tab.is-open .dt-prev { opacity: 1; }
.dt-prev b { display: flex; justify-content: space-between; gap: 6px; font-size: 12.5px; }
.dt-prev b small { font-size: 10px; font-weight: 500; color: var(--note-ink-50); }
.dt-prev p { margin: 6px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--note-ink-85); white-space: pre-line;
  -webkit-mask: linear-gradient(var(--tone-7) 60%, transparent); mask: linear-gradient(var(--tone-7) 60%, transparent); max-height: 120px; }
.deck-btn {
  position: absolute; width: 26px; height: 26px; border-radius: 50%; border: 0.5px solid var(--color-win-edge); padding: 0;
  background: var(--color-glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  color: var(--color-ink-2); display: grid; place-items: center; cursor: pointer; opacity: 0;
  transition: opacity 160ms var(--ease-out), transform 260ms var(--ease-spring);
}
.deck.is-fanned .deck-btn { opacity: 1; }
.deck-btn svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.deck-wheel {
  position: absolute; width: 112px; height: 112px; border-radius: 50%; pointer-events: auto;
  background: var(--color-glass); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); border: 0.5px solid var(--color-win-edge);
  box-shadow: 0 12px 30px -10px var(--black-60); opacity: 0; transform: scale(0.3); pointer-events: none;
  transition: opacity 180ms var(--ease-out), transform 360ms var(--ease-spring);
}
.deck-wheel.is-open { opacity: 1; transform: none; pointer-events: auto; }
.deck-wheel button { position: absolute; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--color-ink-2); cursor: pointer; display: grid; place-items: center; }
.deck-wheel button:hover, .deck-wheel button[aria-pressed="true"] { background: var(--color-highlight); color: var(--color-ink); }
.deck-wheel svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.deck-wheel [data-edge="top"] { left: 39px; top: 6px; }
.deck-wheel [data-edge="bottom"] { left: 39px; bottom: 6px; }
.deck-wheel [data-edge="left"] { left: 6px; top: 39px; }
.deck-wheel [data-edge="right"] { right: 6px; top: 39px; }

/* ---------- terminal ---------- */
.win--term { background: var(--color-term); }
.term-tabs { display: flex; align-items: stretch; height: 34px; background: var(--black-35); }
.tt-lights { display: flex; align-items: center; gap: var(--space-xs); padding: 0 var(--space-sm); }
.tt {
  flex: 1; border: 0; border-left: 1px solid var(--black-40); background: transparent; color: var(--color-term-dim);
  font: inherit; font-size: 12px; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
.tt[aria-pressed="true"] { color: var(--color-term-ink); background: var(--tab-bg, var(--color-term)); }
.term-body { background: var(--tab-bg, var(--color-term)); transition: background-color var(--dur-short) var(--ease-out); }
.term-body pre { margin: 0; padding: var(--space-lg); font-family: var(--font-mono); font-size: 13px; line-height: 1.7; color: var(--color-term-ink); overflow-x: auto; }
.term-body .p { color: var(--color-term-dim); }
.term-body .img { color: var(--plume-amber); }
.term-body .cursor { display: inline-block; width: 0.6em; height: 1.15em; vertical-align: -0.2em; background: var(--color-term-ink); }
.tints { padding: var(--space-md) var(--space-lg) var(--space-lg); border-top: 1px solid var(--black-40); background: var(--black-20); }
.tints-label { display: block; font-size: var(--text-xs); color: var(--color-term-dim); margin-bottom: var(--space-xs); }
.tint-keys { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.tint-keys button {
  min-height: 44px; border-radius: 7px; border: 1px solid var(--white-14); background: var(--sw); color: var(--color-term-ink);
  font: inherit; font-size: 11px; display: grid; place-items: center; cursor: pointer; padding: 2px;
  transition: transform var(--dur-micro) var(--ease-out);
}
.tint-keys button:active { transform: scale(0.95); }
.tint-keys button[aria-pressed="true"] { border-color: var(--color-term-ink); }
.tint-keys button span { font-size: 10px; color: var(--term-ink-70); }

/* ---------- what's running ---------- */
.win--panel { background: var(--color-glass); -webkit-backdrop-filter: blur(30px) saturate(150%); backdrop-filter: blur(30px) saturate(150%); max-width: 520px; margin-inline: auto; }
.run-head { display: flex; justify-content: space-between; align-items: baseline; padding: 14px var(--space-md) 10px; font-weight: 650; }
.run-mem { font-size: 11px; font-weight: 400; color: var(--color-muted); font-variant-numeric: tabular-nums; }
.run-list { padding: 0 6px var(--space-xs); }
.run-sec { font-size: 11px; font-weight: 650; color: var(--color-muted); padding: 10px 10px var(--space-2xs); }
.run-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--space-sm); align-items: center; padding: 7px 10px; border-radius: 8px;
  transition: opacity var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out);
}
.run-row:hover { background: var(--white-06); }
.run-row.is-gone { opacity: 0; transform: translateX(16px); }
.run-row .rt { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-row .rr { font-size: 11px; color: var(--color-warn); }
.run-row .rd { font-size: 11px; color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-row .rm { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--color-ink-2); text-align: right; }
.run-row button {
  font: inherit; font-size: 11px; font-weight: 600; min-height: 28px; padding: 0 var(--space-sm); border-radius: 6px; cursor: pointer;
  border: 1px solid var(--color-rule); background: var(--color-win-2); color: var(--color-ink);
}
.run-row button:hover { border-color: var(--color-ink-2); }
.run-row button:disabled { opacity: 0.55; cursor: not-allowed; }
.run-empty { padding: 20px var(--space-md) var(--space-lg); margin: 0; color: var(--color-muted); font-size: 13px; }

/* ---------- extras ---------- */
.extras { padding-block: var(--space-3xl); }
.extras-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2xl); }
.extras h2 { font-size: 1.75rem; letter-spacing: -0.02em; margin: 0 0 var(--space-lg); }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-md); }
.table th { text-align: left; font-weight: 500; color: var(--color-muted); font-size: var(--text-sm); padding: 0 0 var(--space-xs); border-bottom: 1px solid var(--color-rule); white-space: nowrap; }
.table td { padding: var(--space-sm) var(--space-md) var(--space-sm) 0; border-bottom: 1px solid var(--color-rule); color: var(--color-ink-2); vertical-align: baseline; }
.table td:first-child { white-space: nowrap; color: var(--color-ink); width: 10rem; }
.fine { color: var(--color-muted); font-size: var(--text-sm); margin: var(--space-md) 0 0; }

/* ---------- download ---------- */
.get { padding-block: var(--space-3xl) var(--space-4xl); display: grid; justify-items: center; }
.get-slot { width: min(100%, 560px); }
.get-body { text-align: center; display: grid; justify-items: center; padding: var(--space-2xl) var(--space-xl) var(--space-xl); }
.install { display: flex; align-items: center; gap: var(--space-lg); margin-bottom: var(--space-xl); }
.install .arrow { width: 110px; height: 24px; fill: none; stroke: var(--color-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.install .folder { width: 96px; height: 78px; border-radius: 8px; background: linear-gradient(var(--plume-slate), var(--folder-deep)); position: relative; }
.install .folder::before { content: ""; position: absolute; left: 0; top: -9px; width: 40px; height: 14px; border-radius: 5px 5px 0 0; background: var(--plume-slate); }
.get h2 { font-size: 2rem; letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 var(--space-xl); }
.first-open { max-width: 42ch; }

.foot {
  max-width: var(--measure); margin-inline: auto; padding: var(--space-xl) var(--space-lg) var(--space-2xl);
  border-top: 1px solid var(--color-rule); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-sm) var(--space-lg);
  color: var(--color-muted); font-size: var(--text-sm);
}
.foot a { color: var(--color-ink-2); }

/* ---------- snap preview: a pane of kestrel-coloured light ---------- */
.snap-layer { position: fixed; inset: 0; z-index: var(--z-snap); pointer-events: none; }
.snap-pane { position: absolute; left: 0; top: 0; opacity: 0; transform-origin: 0 0; }
.snap-pane.is-on { opacity: 1; }
.snap-pane.is-moving { transition: transform 420ms var(--ease-spring), opacity 140ms var(--ease-out); }
.snap-pane.is-out { transition: transform 160ms var(--ease-in), opacity 160ms var(--ease-in); }
.snap-pane.is-landing { transition: opacity 400ms var(--ease-out) 120ms; }
.sp-glass {
  position: absolute; inset: 0; border-radius: 18px; overflow: hidden;
  background: radial-gradient(90% 90% at var(--gx, 50%) var(--gy, 50%), var(--amber-30), var(--rust-16) 50%, var(--slate-12));
}
.sp-rim, .sp-bloom b {
  position: absolute; inset: 0; border-radius: 18px; padding: 3.5px; overflow: hidden;
  -webkit-mask: linear-gradient(var(--tone-7) 0 0) content-box, linear-gradient(var(--tone-7) 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(var(--tone-7) 0 0) content-box exclude, linear-gradient(var(--tone-7) 0 0);
}
.sp-bloom { position: absolute; inset: -6px; filter: blur(18px); opacity: 0.7; }
.sp-bloom b { padding: var(--space-md); border-radius: 24px; }
.sp-rim i, .sp-bloom i {
  position: absolute; left: 50%; top: 50%; width: 260vmax; height: 260vmax; margin: -130vmax 0 0 -130vmax;
  background: var(--plumage); animation: aurora 5s linear infinite;
}
@keyframes aurora { to { transform: rotate(1turn); } }
.sp-bird {
  position: absolute; left: 50%; top: 50%; width: 84px; height: 88px; margin: -44px 0 0 -42px; background: var(--white);
  -webkit-mask: url(/bird.png) center / contain no-repeat; mask: url(/bird.png) center / contain no-repeat; opacity: 0.3;
}
.snap-pane.is-landing .sp-bird { transform: scale(1.4); opacity: 0; transition: transform 320ms var(--ease-out), opacity 320ms var(--ease-out); }
.sp-flash { position: absolute; inset: 0; background: var(--white); opacity: 0; }
.snap-pane.is-landing .sp-flash { animation: sp-flash 340ms var(--ease-out); }
@keyframes sp-flash { 30% { opacity: 0.28; } 100% { opacity: 0; } }
.sp-ring { position: absolute; left: 0; top: 0; width: 16px; height: 16px; margin: calc(var(--space-xs) * -1) 0 0 calc(var(--space-xs) * -1); border-radius: 50%; border: 2px solid var(--plume-amber); opacity: 0; }
.snap-pane.is-landing .sp-ring { animation: sp-ring 500ms var(--ease-out); }
@keyframes sp-ring { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(var(--reach, 80)); } }
.edge-light, .edge-bloom {
  position: absolute; left: 0; top: 0; opacity: 0; border-radius: 4px;
  background: linear-gradient(var(--edge-dir, 180deg), var(--slate-00), var(--plume-rust), var(--plume-amber), var(--plume-rust), var(--slate-00));
}
.edge-bloom { filter: blur(14px); }

/* ---------- hud and the demo cursor ---------- */
.hud {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: var(--z-hud);
  display: flex; align-items: center; gap: var(--space-xs); padding: 7px 14px 7px var(--space-xs); border-radius: 14px;
  background: var(--color-glass); -webkit-backdrop-filter: blur(24px) saturate(150%); backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--color-win-edge); font-size: var(--text-sm); color: var(--color-ink-2);
  transition: opacity var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out);
}
.hud-eq { color: var(--color-muted); font-size: 12px; margin-right: var(--space-xs); }
.hud-text { margin-left: var(--space-xs); }
.hud.is-quiet .hud-text { display: none; }
.hud.is-away:not(.is-live) { opacity: 0; transform: translate(-50%, 8px); pointer-events: none; }
.ghost-cursor { position: fixed; left: 0; top: 0; z-index: var(--z-cursor); pointer-events: none; opacity: 0; transition: opacity var(--dur-short) var(--ease-out); }
.ghost-cursor.is-on { opacity: 1; }
.ghost-cursor path { fill: var(--white); stroke: var(--tone-9); stroke-width: 1.6; stroke-linejoin: round; }

/* ---------- smaller screens and touch: no modifier keys, so the demos carry it ---------- */
@media (max-width: 960px) {
  .mb-nav { display: none; }
  .mb-get { display: inline; }
  .hero, .feature, .extras-grid { grid-template-columns: minmax(0, 1fr); }
  .feature { gap: var(--space-xl); padding-block: var(--space-2xl); }
  .feature--flip .copy { order: 0; }
  .hero-body { padding: var(--space-xl) var(--space-lg); }
  .win-body { padding: var(--space-lg); }
  .tint-keys { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (pointer: coarse), (max-width: 960px) {
  .hud { display: none; }
  .menubar { --menubar: 40px; height: 40px; font-size: var(--text-md); }
  main { padding-top: var(--space-xl); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
