/* Could Be Better — site styles. Colours are the app's own OKLCH tokens
   (Noted/Noted/DesignSystem/Palette.swift), light and dark. */

:root {
  --paper: oklch(0.985 0.005 85);
  --paper-inset: oklch(0.97 0.006 85);
  --paper-raised: oklch(1 0 0);
  --rule: oklch(0.9 0.006 85);
  --ink: oklch(0.22 0.01 260);
  --ink-mid: oklch(0.38 0.008 260);
  --ink-mute: oklch(0.52 0.006 260);
  --accent: oklch(0.53 0.12 250);
  --accent-ink: oklch(0.99 0 0);
  --wip: oklch(0.55 0.09 240);
  --published: oklch(0.55 0.08 150);
  --amber: oklch(0.55 0.12 70);
  --focus: oklch(0.52 0.15 290);
  --teal: oklch(0.55 0.08 200);
  --stop: oklch(0.5 0.17 25);
  --bezel-fill: #0c0d10;
  --shadow: 0 1px 2px oklch(0.2 0.01 260 / 0.06), 0 12px 40px oklch(0.2 0.01 260 / 0.1);
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --column: 1120px;
  --screen-bg: #fbfaf7;
  color-scheme: light dark;
}

/* Dark: the system setting, unless the visitor picked a side with the
   switch in the header (theme.js sets data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: oklch(0.18 0.008 260);
    --paper-inset: oklch(0.21 0.009 260);
    --paper-raised: oklch(0.24 0.009 260);
    --rule: oklch(0.32 0.008 260);
    --ink: oklch(0.94 0.005 85);
    --ink-mid: oklch(0.8 0.006 85);
    --ink-mute: oklch(0.64 0.006 260);
    --accent: oklch(0.66 0.12 250);
    --accent-ink: oklch(0.16 0.01 260);
    --wip: oklch(0.72 0.11 240);
    --published: oklch(0.72 0.1 150);
    --amber: oklch(0.78 0.14 75);
    --focus: oklch(0.74 0.14 290);
    --teal: oklch(0.72 0.09 200);
    --stop: oklch(0.66 0.17 25);
    --bezel-fill: #23262c;
    --shadow: 0 1px 2px oklch(0 0 0 / 0.3), 0 16px 48px oklch(0 0 0 / 0.45);
    --screen-bg: #111318;
  }
}
:root[data-theme="dark"] {
  --paper: oklch(0.18 0.008 260);
  --paper-inset: oklch(0.21 0.009 260);
  --paper-raised: oklch(0.24 0.009 260);
  --rule: oklch(0.32 0.008 260);
  --ink: oklch(0.94 0.005 85);
  --ink-mid: oklch(0.8 0.006 85);
  --ink-mute: oklch(0.64 0.006 260);
  --accent: oklch(0.66 0.12 250);
  --accent-ink: oklch(0.16 0.01 260);
  --wip: oklch(0.72 0.11 240);
  --published: oklch(0.72 0.1 150);
  --amber: oklch(0.78 0.14 75);
  --focus: oklch(0.74 0.14 290);
  --teal: oklch(0.72 0.09 200);
  --stop: oklch(0.66 0.17 25);
  --bezel-fill: #23262c;
  --shadow: 0 1px 2px oklch(0 0 0 / 0.3), 0 16px 48px oklch(0 0 0 / 0.45);
  --screen-bg: #111318;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  position: relative;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
picture { display: contents; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--column); margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; letter-spacing: 0.01em; }
.brand img { width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 1px 3px oklch(0.2 0.01 260 / 0.18); }
.top nav { display: flex; gap: clamp(12px, 3vw, 26px); align-items: center; font-size: 15px; }
.top nav a { color: var(--ink-mid); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
.top nav a.button, .top nav a.button:hover { color: var(--accent-ink); }
.theme-switch { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--paper-inset); box-shadow: inset 0 0 0 1px var(--rule); }
.theme-switch button { display: grid; place-items: center; width: 30px; height: 26px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--ink-mute); cursor: pointer; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] { background: var(--paper-raised); color: var(--ink); box-shadow: 0 0 0 1px var(--rule), 0 1px 2px oklch(0 0 0 / 0.12); }
.theme-switch svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.top { flex-wrap: wrap; } .brand { white-space: nowrap; } .top nav { flex-wrap: wrap; }
/* Phone width: one button that flips to the other side, to leave room for the name. */
@media (max-width: 480px) {
  .top { gap: 8px; } .brand { gap: 8px; font-size: 16px; }
  .top nav { gap: 8px; }
  .theme-switch { padding: 0; background: none; box-shadow: none; }
  .theme-switch button { width: 34px; height: 34px; box-shadow: inset 0 0 0 1px var(--rule); }
  .theme-switch button[aria-pressed="true"] { display: none; }
}
.top nav .hide-narrow { display: none; }
@media (min-width: 640px) { .top nav .hide-narrow { display: inline; } }

/* Type */
.eyebrow { font-size: 12px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); margin: 0 0 14px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; line-height: 1.08; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(42px, 8.4vw, 92px); }
h2 { font-size: clamp(30px, 4.6vw, 48px); }
h3 { font-size: 22px; line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }
.lede { font-size: clamp(18px, 2.2vw, 22px); color: var(--ink-mid); max-width: 34em; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  font: 600 16px/1 var(--sans); text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button.quiet { background: var(--paper-raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
.button.small { padding: 9px 16px; font-size: 14px; }

/* Ambient glow: the app's stage colours, far behind everything */
.glow { position: absolute; inset: 0 0 auto 0; height: 1100px; overflow: hidden; pointer-events: none; z-index: -1; }
.glow i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.22; }
.glow i:nth-child(1) { width: 520px; height: 520px; left: -140px; top: -180px; background: var(--wip); }
.glow i:nth-child(2) { width: 460px; height: 460px; right: -120px; top: 40px; background: var(--focus); opacity: 0.16; }
.glow i:nth-child(3) { width: 520px; height: 420px; left: 30%; top: 520px; background: var(--published); opacity: 0.14; }
@media (prefers-reduced-motion: no-preference) {
  .glow i { animation: drift 22s ease-in-out infinite alternate; }
  .glow i:nth-child(2) { animation-duration: 28s; animation-delay: -6s; }
  .glow i:nth-child(3) { animation-duration: 34s; animation-delay: -12s; }
  @keyframes drift { to { transform: translate3d(60px, 40px, 0) scale(1.12); } }
}

/* Hero */
.hero { padding: clamp(20px, 5vw, 56px) 0 0; position: relative; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 10px 9px 14px; margin-bottom: clamp(20px, 4vw, 34px);
  border-radius: 999px; background: color-mix(in oklch, var(--paper-raised) 78%, transparent);
  box-shadow: inset 0 0 0 1px var(--rule), 0 6px 24px oklch(0.2 0.01 260 / 0.1);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--wip); }
.pill .clock { color: var(--ink-mute); font-weight: 500; min-width: 3.2em; text-align: right; }
.pill .stop { width: 26px; height: 26px; border-radius: 50%; background: color-mix(in oklch, var(--stop) 22%, transparent); position: relative; }
.pill .stop::after { content: ""; position: absolute; inset: 8px; border-radius: 2px; background: var(--stop); }
@media (prefers-reduced-motion: no-preference) { .pill .dot { animation: pulse 1.8s ease-in-out infinite; } @keyframes pulse { 50% { opacity: 0.35; } } }

.hero h1 { font-size: clamp(46px, 10.5vw, 128px); letter-spacing: -0.025em; line-height: 0.98; }
.circled { position: relative; display: inline-block; white-space: nowrap; }
.circled svg { position: absolute; left: -6%; top: -8%; width: 112%; height: 122%; overflow: visible; pointer-events: none; }
.circled path, .scrawl path { fill: none; stroke: var(--stop); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.circled path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.scrawl { margin: 8px 0 0; display: flex; align-items: center; gap: 6px; justify-content: flex-end; max-width: min(100%, 11.5em); font: italic 600 clamp(22px, 3.4vw, 34px)/1 "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive; color: var(--stop); transform: rotate(-4deg); opacity: 0; }
.scrawl svg { width: 1.6em; height: 1.1em; overflow: visible; }
.scrawl path { stroke-width: 2.6; }
.drawn .circled path { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s cubic-bezier(.6,.1,.3,1) 0.35s; }
.drawn .scrawl { opacity: 1; transition: opacity 0.5s ease 1.4s; }
.hero .lede { margin-top: clamp(18px, 3vw, 28px); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }
.hero .fine { margin-top: 14px; font-size: 14px; color: var(--ink-mute); }

/* Device frames */
.frame { background: var(--bezel-fill); padding: var(--bezel, 9px); border-radius: var(--radius, 26px); box-shadow: var(--shadow), 0 0 0 1px oklch(0.4 0.01 260 / 0.35); }
/* The screenshot is shown whole: the aspect ratio lives on the image (on the
   frame it included the bezel, so `cover` shaved every edge), and a margin
   of the app's own paper colour keeps content clear of the rounded corners. */
.frame img { width: 100%; height: auto; object-fit: contain; box-sizing: border-box; padding: var(--inset, clamp(4px, 1.6%, 14px)); border-radius: calc(var(--radius, 26px) - var(--bezel, 9px)); background: var(--screen-bg); }
.frame.pad-land img { aspect-ratio: 4 / 3; }
.frame.pad-land { --radius: clamp(14px, 2.2vw, 30px); --bezel: clamp(6px, 1vw, 12px); }
.frame.duo-open img { aspect-ratio: 2000 / 1407; }
.frame.duo-open { --radius: clamp(12px, 2vw, 26px); --bezel: clamp(5px, 0.8vw, 9px); position: relative; }
.frame.duo-open::after { content: ""; position: absolute; top: var(--bezel); bottom: var(--bezel); left: 50%; width: 1px; background: linear-gradient(oklch(0 0 0 / 0), oklch(0 0 0 / 0.16) 20%, oklch(0 0 0 / 0.16) 80%, oklch(0 0 0 / 0)); }
.frame.duo-fold img { aspect-ratio: 1031 / 1500; }
/* Folded Duo: the hinge is the left edge, so that side is square with a
   spine and only the right corners are round (screen radii 8pt and 59pt on a
   466pt-wide display, from the simulator's device profile). */
.frame.duo-fold { --inset: clamp(4px, 3.2%, 14px); --bezel: clamp(5px, 0.8vw, 9px); position: relative; padding-left: calc(var(--bezel) * 2.1); border-radius: 3.5% 15% 15% 3.5% / 2.4% 10.4% 10.4% 2.4%; }
.frame.duo-fold img { border-radius: 1.8% 12.8% 12.8% 1.8% / 1.3% 8.8% 8.8% 1.3%; }
.frame.duo-fold::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--bezel) * 1.5); border-radius: inherit; border-top-right-radius: 0; border-bottom-right-radius: 0; background: linear-gradient(90deg, oklch(1 0 0 / 0.16), oklch(1 0 0 / 0.03) 55%, oklch(0 0 0 / 0.35)); }
.frame.duo-open img { border-radius: 5.8% / 8.2%; }
.frame.duo-open { border-radius: 6.6% / 9.3%; }
.frame.phone img { aspect-ratio: 690 / 1500; }
.frame.phone { --inset: clamp(4px, 3%, 12px); --radius: clamp(20px, 3.4vw, 44px); --bezel: clamp(5px, 0.8vw, 9px); }

/* Hero stage: three devices, layered */
.stage { position: relative; margin: clamp(40px, 7vw, 80px) auto 0; max-width: 1040px; padding-bottom: 9%; perspective: 1400px; }
.stage .pad-land { width: 78%; margin: 0 auto; }
.stage .duo-open { position: absolute; left: 0; bottom: 0; width: 44%; }
.stage .phone { position: absolute; right: 1%; bottom: 2%; width: 19%; }
.layer { transition: transform 0.25s ease-out; will-change: transform; }

/* Marquee of notes */
.marquee { margin-top: clamp(56px, 8vw, 96px); overflow: hidden; border-block: 1px solid var(--rule); padding: 16px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee .track { display: flex; gap: 14px; width: max-content; }
.marquee span { flex: none; padding: 7px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule); font-family: var(--serif); font-size: 18px; color: var(--ink-mid); white-space: nowrap; }
.marquee .hot { color: var(--stop); box-shadow: inset 0 0 0 1.5px var(--stop); font-family: var(--sans); font-weight: 700; letter-spacing: 0.04em; }
@media (prefers-reduced-motion: no-preference) { .marquee .track { animation: slide 48s linear infinite; } @keyframes slide { to { transform: translateX(-50%); } } }

/* The note generator */
.note-machine { margin: clamp(72px, 10vw, 120px) auto 0; text-align: center; max-width: 760px; }
.note-card {
  margin: 22px auto 0; padding: 26px 28px; text-align: left;
  background: var(--paper-raised); border-radius: 18px; box-shadow: 0 0 0 1px var(--rule), var(--shadow);
}
.note-card .from { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); }
.note-line { display: flex; gap: 14px; align-items: flex-start; margin-top: 14px; font-family: var(--serif); font-size: clamp(22px, 3.4vw, 30px); line-height: 1.25; min-height: 2.5em; }
.note-line .check { flex: none; width: 26px; height: 26px; margin-top: 0.2em; border-radius: 50%; border: 2px solid var(--ink-mute); background: none; cursor: pointer; padding: 0; transition: background 0.2s ease, border-color 0.2s ease; }
.note-line.done .check { background: var(--published); border-color: var(--published); }
.note-line.done .text { color: var(--ink-mute); text-decoration: line-through; }
.note-line .text { transition: opacity 0.18s ease; }
.note-line.swap .text { opacity: 0; }
.note-machine .actions { margin-top: 18px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.note-machine .tally { margin-top: 12px; font-size: 14px; color: var(--ink-mute); min-height: 1.5em; }

/* Device switcher */
.devices { margin-top: clamp(72px, 10vw, 130px); }
.devices h2 { max-width: 16em; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; margin-top: 28px; border-radius: 999px; background: var(--paper-inset); box-shadow: inset 0 0 0 1px var(--rule); max-width: 100%; overflow-x: auto; }
.tabs button { flex: none; border: 0; background: none; color: var(--ink-mid); font: 600 15px/1 var(--sans); padding: 11px 18px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { background: var(--paper-raised); color: var(--ink); box-shadow: 0 1px 2px oklch(0.2 0.01 260 / 0.14), 0 0 0 1px var(--rule); }
.panel-device { margin-top: 28px; display: grid; gap: clamp(24px, 4vw, 48px); align-items: center; }
.panel-device[hidden] { display: none; }
@media (min-width: 900px) { .panel-device { grid-template-columns: 1.55fr 1fr; } }
/* A panel whose screenshots take the full width, with the words in a row beneath. */
.panel-device.wide { grid-template-columns: 1fr; gap: clamp(22px, 3vw, 36px); }
.panel-device.wide .shots { align-items: center; }
@media (min-width: 900px) { .panel-device.wide .says { display: grid; grid-template-columns: 1.25fr 1fr; column-gap: clamp(28px, 5vw, 64px); align-items: start; } .panel-device.wide .says h3 { grid-column: 1; } .panel-device.wide .says p { grid-column: 1; } .panel-device.wide .says ul { grid-column: 2; grid-row: 1 / span 2; margin-top: 4px; } }
.panel-device .says p { margin-top: 12px; color: var(--ink-mid); }
.panel-device ul, .feature ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--ink-mid); }
.panel-device li { padding-left: 22px; position: relative; }
.panel-device li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--wip)); }
.shots { display: flex; gap: clamp(10px, 2vw, 22px); align-items: flex-end; justify-content: center; }
.shots figure { margin: 0; flex: 1 1 0; min-width: 0; }
.shots.three figure:first-child { flex: 0.62 1 0; }
.shots.three .grow { flex: 1.2 1 0; }
.shots.phones figure, .shots.phones figure:first-child { flex: 1 1 0; max-width: 220px; }
.shots figcaption { margin-top: 10px; font-size: 13px; color: var(--ink-mute); text-align: center; }
@media (max-width: 640px) { .shots.three:not(.phones) { flex-wrap: wrap; } .shots.three:not(.phones) figure { flex: 1 1 100%; } .shots.three:not(.phones) figure:first-child { flex: 0 1 46%; } }
@media (prefers-reduced-motion: no-preference) { .panel-device:not([hidden]) .shots { animation: rise 0.45s ease both; } @keyframes rise { from { opacity: 0; transform: translateY(12px); } } }

/* Apple Watch: a real screenshot in a case drawn to the 46mm proportions
   (251 x 291pt case, 22pt of glass around a 208 x 248pt screen). */
.watch-wrap { flex-direction: column; align-items: center; }
.watch-fig { margin: 0; display: grid; justify-items: center; }
.watch { position: relative; isolation: isolate; width: min(250px, 60vw); aspect-ratio: 251 / 291; padding: 8.76%; background: #000; border-radius: 28.9% / 24.9%; box-shadow: var(--shadow), 0 0 0 2px #6b6e76, 0 0 0 3px #2a2c31, inset 0 0 0 2px #18191c; }
.watch img { width: 100%; height: auto; aspect-ratio: 416 / 496; border-radius: 24% / 20.2%; }
.watch .crown { position: absolute; z-index: -1; left: 100%; top: 21%; width: 4.4%; height: 15%; margin-left: 1px; border-radius: 0 40% 40% 0 / 0 14% 14% 0; background: linear-gradient(#8a8d95, #4a4d54 50%, #6b6e76); }
.watch .side { position: absolute; z-index: -1; left: 100%; top: 51%; width: 1.8%; height: 21%; margin-left: 1px; border-radius: 0 60% 60% 0 / 0 8% 8% 0; background: #5a5d64; }
.watch-fig figcaption { margin-top: 18px; }

/* Feature cards */
.features { margin-top: clamp(72px, 10vw, 130px); display: grid; gap: clamp(14px, 2vw, 22px); grid-template-columns: 1fr; }
@media (min-width: 820px) { .features { grid-template-columns: 1fr 1fr; } .card.wide { grid-column: 1 / -1; grid-template-columns: 1fr 1.25fr; align-items: center; } }
.card { display: grid; gap: clamp(18px, 3vw, 36px); padding: clamp(22px, 3.4vw, 40px); border-radius: 26px; background: var(--paper-inset); box-shadow: inset 0 0 0 1px var(--rule); overflow: hidden; align-content: space-between; }
.card h3 { font-size: clamp(24px, 2.8vw, 32px); }
.card .copy p:not(.eyebrow) { margin-top: 12px; color: var(--ink-mid); }
.card .frame.small { width: min(62%, 240px); justify-self: center; margin-bottom: calc(-1 * clamp(22px, 3.4vw, 40px) - 18%); }
.card:hover .frame { transform: translateY(-4px); }
.card .frame { transition: transform 0.3s ease; }
.pipeline { display: flex; gap: 3px; height: 12px; margin-top: 22px; }
.pipeline i { width: var(--w); background: var(--c); border-radius: 3px; transform-origin: left; }
.reveal.in .pipeline i { animation: grow 0.9s cubic-bezier(.2,.7,.2,1) both; }
.reveal.in .pipeline i:nth-child(2) { animation-delay: 0.15s; } .reveal.in .pipeline i:nth-child(3) { animation-delay: 0.3s; }
@keyframes grow { from { transform: scaleX(0); } }
.legend { margin-top: 10px !important; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 6px; }

/* Privacy + beta panels */
.panel { margin-top: clamp(72px, 10vw, 130px); padding: clamp(28px, 5vw, 56px); border-radius: 26px; background: var(--paper-inset); box-shadow: inset 0 0 0 1px var(--rule); }
.panel .cols { display: grid; gap: 22px; margin-top: 26px; }
@media (min-width: 760px) { .panel .cols { grid-template-columns: repeat(3, 1fr); } }
.panel .cols h3 { font-family: var(--sans); font-size: 17px; font-weight: 650; }
.panel .cols p { margin-top: 6px; color: var(--ink-mid); font-size: 16px; }
.beta { text-align: center; }
.beta .lede { margin: 16px auto 0; }
.beta .actions { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.beta .fine { margin-top: 14px; font-size: 14px; color: var(--ink-mute); }
.spots { display: inline-flex; gap: 8px; align-items: center; margin-top: 18px; padding: 6px 12px; border-radius: 999px; background: var(--paper-raised); box-shadow: inset 0 0 0 1px var(--rule); font-size: 14px; color: var(--ink-mid); }
.spots i { width: 8px; height: 8px; border-radius: 50%; background: var(--published); }

/* FAQ */
.faq { margin: clamp(72px, 10vw, 130px) auto 0; max-width: 760px; }
.faq details { border-top: 1px solid var(--rule); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-mute); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--ink-mid); }

/* Footer */
footer { margin-top: clamp(72px, 10vw, 120px); padding: 28px 0 48px; border-top: 1px solid var(--rule); color: var(--ink-mute); font-size: 14px; }
footer .row { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer a { color: var(--ink-mid); }

/* Prose pages */
.prose { max-width: 720px; margin: clamp(28px, 6vw, 64px) auto 0; }
.prose h1 { font-size: clamp(36px, 6vw, 56px); }
.prose h2 { font-size: 26px; margin-top: 40px; }
.prose p, .prose ul { margin-top: 14px; color: var(--ink-mid); }
.prose ul { padding-left: 22px; }
.prose li { margin-top: 6px; }
.prose .updated { color: var(--ink-mute); font-size: 14px; }

/* Reveal on scroll (only when motion is welcome) */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .note-line .text { transition: none; }
}

/* Wide cards alternate sides; the Pulse charts sit on a plain sheet */
@media (min-width: 820px) { .card.wide.flip { grid-template-columns: 1.25fr 1fr; } .card.wide.flip .copy { order: 2; } }
.sheet { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow), 0 0 0 1px var(--rule); background: var(--screen-bg); padding: clamp(6px, 1.6%, 14px); }
.sheet img { width: 100%; height: auto; aspect-ratio: 1424 / 1520; }
.card:hover .sheet { transform: translateY(-4px); } .card .sheet { transition: transform 0.3s ease; }

/* Beta badge and the plain-spoken risk note */
.badge { display: inline-block; padding: 3px 9px; margin-right: 6px; border-radius: 999px; background: color-mix(in oklch, var(--amber) 18%, transparent); color: var(--amber); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.honest { margin: 28px auto 0; max-width: 40em; padding: 18px 20px; text-align: left; border-radius: 16px; background: var(--paper-raised); box-shadow: inset 0 0 0 1px var(--rule), inset 4px 0 0 var(--amber); }
.honest h3 { font-family: var(--sans); font-size: 15px; font-weight: 700; letter-spacing: 0.02em; }
.honest p { margin-top: 6px; font-size: 15px; color: var(--ink-mid); }
button.button { font-family: var(--sans); }

/* Invite dialog */
dialog#invite { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 24px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow), 0 0 0 1px var(--rule); overflow: auto; }
dialog#invite::backdrop { background: oklch(0.15 0.01 260 / 0.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
#invite form, #invite-done { padding: clamp(20px, 4vw, 30px); display: grid; gap: 14px; }
#invite h2 { font-size: 28px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-head .close { border: 0; background: var(--paper-inset); color: var(--ink-mid); width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; }
.dialog-lede { color: var(--ink-mid); font-size: 16px; }
#invite label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
#invite label small { font-weight: 400; color: var(--ink-mute); }
#invite input:not([type=checkbox]), #invite select, #invite textarea { font: 16px/1.3 var(--sans); color: var(--ink); padding: 12px 14px; border-radius: 12px; border: 1px solid var(--rule); background: var(--paper-raised); width: 100%; }
#invite input:focus-visible, #invite select:focus-visible, #invite textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
#invite fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
#invite legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; padding: 0; }
#invite .tick { display: flex; grid-template-columns: none; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 15px; }
#invite .tick input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--accent); }
#invite .consent { color: var(--ink-mid); font-size: 14px; padding: 12px 14px; border-radius: 12px; background: var(--paper-inset); }
.form-error { color: var(--stop); font-size: 14px; font-weight: 600; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
#invite .fine { font-size: 13px; color: var(--ink-mute); }
#invite .how { font-size: 14px; color: var(--ink-mid); padding: 10px 12px; border-radius: 10px; background: var(--paper-raised); box-shadow: inset 0 0 0 1px var(--rule); }
#invite-fallback { display: grid; gap: 10px; }
.send-ways { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.send-ways .button { text-align: center; justify-content: center; }
#invite #invite-copy { width: 100%; font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
#invite-done a.button { text-decoration: none; }

#invite [hidden] { display: none; }

#beta, #devices, #features, #privacy, #faq { scroll-margin-top: 24px; }

.prose h3.q { font-family: var(--sans); font-size: 19px; font-weight: 650; margin-top: 34px; }
.prose h3.q + p { margin-top: 8px; }
