/* Prism landing page — plain CSS, no build step.
   Dark first; light via prefers-color-scheme. All motion sits behind
   (prefers-reduced-motion: no-preference) or is started by JS that checks it. */

:root {
  color-scheme: dark;
  /* page */
  --bg: #0b0c10;
  --bg-2: #101117;
  --surface: #14151b;
  --surface-2: #1b1d24;
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f3f3f5;
  --text-2: #b4b6bf;
  --text-3: #8b8e99;
  --sky: #4f8ff7;           /* the app's accent */
  --sky-text: #8fb4f7;      /* the app's accent text on dark */
  --violet: #b4a4ce;        /* the mark */
  --pink: #f783ac;          /* a collaborator caret colour */
  --green: #44c98a;
  --amber: #f0b429;
  --btn-bg: #f3f3f5;
  --btn-fg: #0b0c10;
  --focus: #9ec0fb;
  --glow-a: rgba(79, 143, 247, 0.42);
  --glow-b: rgba(180, 164, 206, 0.34);
  --glow-c: rgba(247, 131, 172, 0.16);
  --shadow-xl: 0 50px 120px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --shadow-md: 0 20px 50px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --spot: rgba(143, 180, 247, 0.12);

  /* the demo app, from packages/core/src/styles/tokens.css (dark) */
  --app-base: #0c0d11;
  --app-surface: #131419;
  --app-elev: #1b1d24;
  --app-line: rgba(255, 255, 255, 0.08);
  --app-text: rgba(255, 255, 255, 0.92);
  --app-text-2: rgba(255, 255, 255, 0.62);
  --app-text-3: rgba(255, 255, 255, 0.54);
  --app-hover: rgba(255, 255, 255, 0.055);
  --app-selected: rgba(79, 143, 247, 0.16);
  --app-wiki: #8fb4f7;

  --radius: 20px;
  --gutter: 16px;
  --maxw: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.5, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f7f8fa;
    --bg-2: #eff1f5;
    --surface: #ffffff;
    --surface-2: #f2f4f7;
    --line: rgba(15, 23, 42, 0.08);
    --line-2: rgba(15, 23, 42, 0.16);
    --text: #0f1117;
    --text-2: #444955;
    --text-3: #5d626e;
    --sky: #2f6fe0;
    --sky-text: #2459c4;
    --violet: #6e57a6;
    --pink: #c8406f;
    --green: #12703f;
    --amber: #7a5300;
    --btn-bg: #0f1117;
    --btn-fg: #ffffff;
    --focus: #2f6fe0;
    --glow-a: rgba(79, 143, 247, 0.30);
    --glow-b: rgba(180, 164, 206, 0.34);
    --glow-c: rgba(247, 131, 172, 0.16);
    --shadow-xl: 0 50px 100px -40px rgba(30, 40, 80, 0.35), 0 0 0 1px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 20px 40px -24px rgba(30, 40, 80, 0.28), 0 0 0 1px rgba(15, 23, 42, 0.07);
    --spot: rgba(47, 111, 224, 0.08);

    /* the demo app (light) */
    --app-base: #f7f8fa;
    --app-surface: #ffffff;
    --app-elev: #ffffff;
    --app-line: rgba(15, 23, 42, 0.08);
    --app-text: #14161c;
    --app-text-2: #545a66;
    --app-text-3: #676c77;
    --app-hover: rgba(15, 23, 42, 0.045);
    --app-selected: rgba(47, 111, 224, 0.12);
    --app-wiki: #2459c4;
  }
}

@media (min-width: 640px) { :root { --gutter: 28px; } }
@media (min-width: 1024px) { :root { --gutter: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, video, svg, canvas { display: block; max-width: 100%; }
a { color: var(--sky-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
p a, li a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; color: var(--text); }
p { margin: 0; }
kbd {
  font: 600 0.82em/1 var(--mono); padding: 0.22em 0.45em; border-radius: 6px;
  border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--surface-2); color: var(--text);
}
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--btn-bg); color: var(--btn-fg); padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }
.wl { font-family: var(--mono); font-size: 0.9em; color: var(--sky-text); white-space: nowrap; }
.top-sentinel { position: absolute; top: 0; height: 24px; width: 1px; }

/* ───────────── Header ───────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  border-bottom-color: var(--line);
}
.header-row { display: flex; align-items: center; gap: 12px; height: 68px; transition: height .3s var(--ease); }
.is-scrolled .header-row { height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 1.06rem; letter-spacing: -0.01em; margin-right: auto; }
.brand:hover { text-decoration: none; }
.nav { display: none; gap: 2px; }
.nav a { color: var(--text-2); font-size: 0.92rem; padding: 8px 12px; border-radius: 999px; transition: color .2s, background-color .2s; }
.nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-gh { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--text-2); }
.nav-gh:hover { color: var(--text); background: var(--surface-2); }
@media (min-width: 960px) { .nav { display: flex; } .brand { margin-right: 0; } .nav { margin: 0 auto; } }

/* ───────────── Buttons ───────────── */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 1rem/1 var(--font); letter-spacing: -0.005em; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .25s var(--spring), background-color .2s, border-color .2s, box-shadow .25s var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 0.9rem; }
.btn-lg { min-height: 56px; padding: 0 30px; font-size: 1.06rem; }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); box-shadow: 0 8px 30px -10px var(--glow-a); }
.btn-primary:hover { box-shadow: 0 12px 40px -10px var(--glow-a), 0 0 0 4px color-mix(in srgb, var(--sky) 18%, transparent); }
.btn-ghost { color: var(--text); border-color: var(--line-2); background: color-mix(in srgb, var(--surface) 40%, transparent); }
.btn-ghost:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--sky) 40%, var(--line-2)); }
.btn-glass { background: rgba(11, 12, 16, 0.6); color: #f3f3f5; border-color: rgba(255, 255, 255, 0.2); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.btn-shine::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(143, 180, 247, 0.45) 50%, transparent 65%);
  transform: translateX(-120%);
}
@media (prefers-reduced-motion: no-preference) {
  .btn-shine:hover::after { transition: transform .8s var(--ease); transform: translateX(120%); }
}
.link-arrow { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; color: var(--text-2); }
.link-arrow:hover { color: var(--text); text-decoration: none; }
.link-arrow span { transition: transform .25s var(--spring); }
.link-arrow:hover span { transform: translateX(4px); }

/* ───────────── Hero ───────────── */
.hero { position: relative; padding: 64px 0 24px; overflow: clip; }
.mesh { position: absolute; inset: -10% -20% auto; height: 1100px; pointer-events: none; filter: blur(60px); opacity: 0.9; }
.blob { position: absolute; border-radius: 50%; will-change: transform; }
.b1 { width: 620px; height: 520px; left: 8%; top: 0; background: radial-gradient(closest-side, var(--glow-a), transparent); }
.b2 { width: 560px; height: 520px; right: 6%; top: 60px; background: radial-gradient(closest-side, var(--glow-b), transparent); }
.b3 { width: 520px; height: 420px; left: 40%; top: 340px; background: radial-gradient(closest-side, var(--glow-c), transparent); }
.follow { width: 420px; height: 420px; left: 0; top: 0; background: radial-gradient(closest-side, color-mix(in srgb, var(--sky) 26%, transparent), transparent); opacity: 0; transition: opacity .6s; }
.hero.is-pointer .follow { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .b1 { animation: drift1 22s ease-in-out infinite alternate; }
  .b2 { animation: drift2 26s ease-in-out infinite alternate; }
  .b3 { animation: drift3 30s ease-in-out infinite alternate; }
}
@keyframes drift1 { to { transform: translate(120px, 80px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-140px, 60px) scale(0.9); } }
@keyframes drift3 { to { transform: translate(-60px, -90px) scale(1.2); } }
.grid-lines {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 55% at 50% 20%, #000, transparent 75%); mask-image: radial-gradient(70% 55% at 50% 20%, #000, transparent 75%);
}
.hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; border-radius: 999px;
  border: 1px solid var(--line-2); background: color-mix(in srgb, var(--surface) 55%, transparent);
  color: var(--text-2); font-size: 0.86rem; font-weight: 500;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 22%, transparent); }
h1 {
  margin-top: 26px; font-weight: 750; letter-spacing: -0.048em; line-height: 0.98;
  font-size: clamp(2.7rem, 9.6vw, 6.4rem); text-wrap: balance;
}
.h1-line { display: inline-block; }
.grad {
  background: linear-gradient(95deg, var(--sky-text) 0%, var(--violet) 45%, var(--pink) 75%, var(--sky-text) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 0.06em;
}
@media (prefers-reduced-motion: no-preference) { .grad { animation: sheen 9s ease-in-out infinite alternate; } }
@keyframes sheen { to { background-position: 100% 0; } }
.lede { margin-top: 26px; max-width: 690px; font-size: clamp(1.06rem, 2.1vw, 1.26rem); color: var(--text-2); text-wrap: pretty; }
.lede em { font-style: normal; color: var(--text); font-weight: 600; }
.cta-row { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 14px; }
.keys { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.keys li { display: inline-flex; align-items: center; gap: 9px; padding: 6px 12px 6px 6px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 50%, transparent); color: var(--text-3); font-size: 0.86rem; transition: color .25s, border-color .25s, box-shadow .25s, transform .25s var(--spring); }
.keys kbd { font-size: 0.82rem; min-width: 30px; text-align: center; transition: background-color .25s, color .25s, border-color .25s; }
.keys li.is-lit { color: var(--text); border-color: color-mix(in srgb, var(--sky) 55%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sky) 14%, transparent), 0 10px 30px -12px var(--glow-a); transform: translateY(-2px); }
.keys li.is-lit kbd { background: var(--sky); border-color: var(--sky); color: #fff; }
@media (max-width: 479px) {
  .hero { padding-top: 44px; }
  .hero .cta-row .btn { width: 100%; }
  .keys li span { display: none; }
  .keys li { padding: 6px; }
}

/* ───────────── The demo app ───────────── */
.stage { position: relative; margin: 60px auto 0; max-width: 1080px; perspective: 1600px; }
.app {
  --dw: 1080px;
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  height: clamp(420px, 44vw, 530px);
  border-radius: 16px; background: var(--app-surface); box-shadow: var(--shadow-xl);
  color: var(--app-text); font: 400 14px/1.55 var(--font); text-align: left;
  transform-origin: 50% 0;
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .app { animation: tilt linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    @keyframes tilt { from { transform: rotateX(9deg) scale(0.96); } to { transform: none; } }
  }
}
.app-bar { display: flex; align-items: center; gap: 14px; height: 42px; padding: 0 14px; border-bottom: 1px solid var(--app-line); background: var(--app-base); flex: none; }
.lights { display: flex; gap: 7px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; } .lights i:nth-child(3) { background: #28c840; }
.app-tabs { display: flex; gap: 2px; min-width: 0; overflow: hidden; }
.app-tab { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 8px; font-size: 12.5px; color: var(--app-text-3); white-space: nowrap; transition: background-color .3s, color .3s; }
.app-tab.is-on { background: var(--app-hover); color: var(--app-text); }
.app-sync { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--app-text-3); white-space: nowrap; }
.app-sync i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.app-body { flex: 1; display: grid; grid-template-columns: 210px 1fr; min-height: 0; }
.app-side { background: var(--app-base); border-right: 1px solid var(--app-line); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.side-search { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; margin-bottom: 8px; border-radius: 8px; background: var(--app-hover); color: var(--app-text-3); font-size: 12.5px; }
.side-search kbd { font-size: 10.5px; padding: 2px 5px; background: transparent; color: var(--app-text-3); border-color: var(--app-line); }
.side-h { margin: 10px 10px 4px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--app-text-3); }
.side-i { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 7px; font-size: 13px; color: var(--app-text-2); white-space: nowrap; transition: background-color .3s, color .3s; }
.side-i.is-on { background: var(--app-selected); color: var(--app-text); }
.ico { flex: none; width: 13px; height: 15px; border-radius: 3px; border: 1.5px solid currentColor; opacity: 0.7; }
.ico.db { height: 13px; background: linear-gradient(currentColor, currentColor) 0 4px/100% 1.5px no-repeat, linear-gradient(currentColor, currentColor) 4px 0/1.5px 100% no-repeat; border-radius: 3px; }
.ico.graph { border-radius: 50%; width: 13px; height: 13px; }
.app-main { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.app-head { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 18px; flex: none; }
.crumb { font-size: 12.5px; color: var(--app-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb b { color: var(--app-text-2); font-weight: 500; }
.presence { margin-left: auto; display: flex; }
.av { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font: 700 11px/1 var(--font); font-style: normal; color: #fff; border: 2px solid var(--app-surface); }
.av-me { background: #3b82f6; }
.av-maya { background: #f783ac; color: #3a0d20; margin-left: -6px; transition: transform .45s var(--spring), opacity .3s; }
.presence .av-maya.is-out { transform: scale(0); opacity: 0; }
.share { font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 8px; background: #2f6fe0; color: #fff; }

.scene { position: absolute; inset: 46px 0 0; padding: 18px 36px 0 48px; opacity: 0; visibility: hidden; transform: translateY(10px) scale(0.99); transition: opacity .5s var(--ease), transform .6s var(--ease), visibility 0s .6s; }
.scene.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .5s var(--ease), transform .6s var(--ease), visibility 0s; }
.scene-page { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 28px; }
.doc { position: relative; min-width: 0; }
.doc-title { font-size: 30px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; color: var(--app-text); min-height: 36px; margin: 6px 0 12px; }
.doc-p { color: var(--app-text-2); font-size: 14.5px; min-height: 23px; margin: 0 0 10px; }
.todos { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.todo { display: flex; align-items: center; gap: 10px; min-height: 23px; color: var(--app-text); font-size: 14.5px; }
.box { flex: none; width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--app-text-3); position: relative; transition: background-color .25s, border-color .25s; }
.todo.is-done .box { background: var(--sky); border-color: var(--sky); }
.todo.is-done .box::after { content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.todo.is-done .todo-t { color: var(--app-text-3); text-decoration: line-through; text-decoration-color: var(--app-text-3); }
.hl { border-radius: 3px; transition: background-color .4s; }
.hl.is-on { background: rgba(247, 131, 172, 0.22); box-shadow: inset 0 -2px 0 rgba(247, 131, 172, 0.8); }
.wikichip { color: var(--app-wiki); font-weight: 500; text-decoration: underline dotted 1px; text-underline-offset: 3px; border-radius: 4px; padding: 0 2px; }
.wikichip.is-new { animation: chip .7s var(--ease); }
@keyframes chip { from { background: color-mix(in srgb, var(--sky) 35%, transparent); } }
.caret, .caret-maya { position: relative; display: none; vertical-align: -3px; width: 2px; height: 1.15em; margin-left: 1px; margin-right: -3px; background: var(--sky); border-radius: 1px; pointer-events: none; }
.caret.is-on, .caret-maya.is-on { display: inline-block; }
@media (prefers-reduced-motion: no-preference) { .caret.is-on.blink { animation: blink 1s steps(1) infinite; } }
@keyframes blink { 50% { opacity: 0; } }
.caret-maya { background: #f783ac; }
.flag { position: absolute; left: 0; bottom: 100%; transform: translateY(-2px); padding: 1px 6px; border-radius: 4px 4px 4px 0; background: #f783ac; color: #3a0d20; font: 700 10.5px/1.5 var(--font); white-space: nowrap; }
.pop {
  position: absolute; z-index: 3; width: 230px; padding: 6px; border-radius: 12px;
  background: var(--app-elev); border: 1px solid var(--app-line);
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.06), 0 12px 40px rgba(0, 0, 0, 0.35);
  opacity: 0; transform: translateY(-4px) scale(0.97); transform-origin: 0 0; pointer-events: none;
  transition: opacity .18s var(--ease), transform .22s var(--ease);
}
.pop.is-on { opacity: 1; transform: none; }
.pop-h { margin: 4px 8px 4px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--app-text-3); }
.pop-i { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 7px; font-size: 13px; color: var(--app-text); transition: background-color .15s, opacity .2s; }
.pop-i.is-active { background: var(--app-selected); }
.pop-i.is-hidden { display: none; }
.gly { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--app-line); background: var(--app-surface); font: 600 11px/1 var(--font); color: var(--app-text-2); }
.comment { align-self: start; margin-top: 108px; display: flex; gap: 10px; padding: 12px; border-radius: 12px; background: var(--app-elev); border: 1px solid var(--app-line); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.4); font-size: 12.5px; transition: opacity .4s var(--ease), transform .55s var(--spring); }
.comment.is-out { opacity: 0; transform: translateX(24px) scale(0.95); }
.comment .av { border: 0; flex: none; }
.comment b { color: var(--app-text); font-weight: 600; margin-right: 6px; }
.comment span { color: var(--app-text-3); font-size: 11.5px; }
.comment p { margin-top: 2px; color: var(--app-text-2); line-height: 1.45; }

.scene-db { display: flex; flex-direction: column; }
.db-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.db-top .doc-title { margin-bottom: 8px; }
.db-tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.db-tabs span { font-size: 12.5px; padding: 4px 10px; border-radius: 7px; color: var(--app-text-3); transition: background-color .3s, color .3s; }
.db-tabs span.is-on { background: var(--app-hover); color: var(--app-text); box-shadow: inset 0 -2px 0 var(--app-text); border-radius: 7px 7px 2px 2px; }
.dbv { position: absolute; inset: 104px 36px 0 48px; opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility 0s .45s; }
.dbv.is-on { opacity: 1; visibility: visible; transition: opacity .45s var(--ease), visibility 0s; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.col { border-radius: 12px; padding: 10px; background: var(--app-base); border: 1px solid var(--app-line); display: grid; gap: 8px; }
.col-h { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--app-text-2); margin: 2px 4px 2px; }
.col-h em { font-style: normal; color: var(--app-text-3); font-weight: 500; }
.st { width: 8px; height: 8px; border-radius: 50%; }
.st-todo { background: var(--app-text-3); } .st-doing { background: var(--amber); } .st-done { background: var(--green); }
.kcard { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--app-surface); border: 1px solid var(--app-line); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); font-size: 13px; will-change: transform; }
.kcard b { font-weight: 500; color: var(--app-text); }
.kcard.is-lifted { box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.55), 0 0 0 1.5px var(--sky); z-index: 2; position: relative; }
.who { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 700 10px/1 var(--font); color: #fff; }
.who.aa { background: #3b82f6; } .who.mm { background: #f783ac; color: #3a0d20; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; border-radius: 12px; overflow: hidden; border: 1px solid var(--app-line); background: var(--app-line); }
.cal-cell { background: var(--app-surface); min-height: 62px; padding: 6px; display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--app-text-3); }
.cal-cell.is-h { min-height: 0; padding: 6px; font-weight: 600; text-align: center; background: var(--app-base); }
.cal-cell.is-today b { color: #fff; background: var(--sky); border-radius: 999px; padding: 0 6px; }
.cal-ev { display: block; padding: 2px 6px; border-radius: 5px; font-size: 11px; color: var(--app-text); background: var(--app-selected); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 2px solid var(--sky); }
.cal-ev.e2 { background: rgba(247, 131, 172, 0.16); border-left-color: #f783ac; }
.cal-ev.e3 { background: rgba(68, 201, 138, 0.16); border-left-color: var(--green); }
.cal-ev.pop-in { animation: popin .45s var(--spring) both; }
@keyframes popin { from { opacity: 0; transform: scale(0.6); } }

@media (max-width: 899px) {
  .app-body { grid-template-columns: 1fr; }
  .app-side { display: none; }
  .scene { padding: 14px 20px 0; }
  .scene-page { grid-template-columns: 1fr; }
  .comment { position: absolute; right: 20px; bottom: 18px; margin: 0; width: min(250px, 70%); }
  .dbv { inset: 100px 20px 0; }
}
@media (max-width: 599px) {
  .app { height: 470px; border-radius: 14px; }
  .app-sync, .app-tab:not(.is-on), .crumb { display: none; }
  .doc-title { font-size: 24px; }
  .doc-p, .todo { font-size: 13.5px; }
  .board { gap: 6px; }
  .col { padding: 6px; gap: 6px; }
  .col-h { font-size: 10.5px; margin: 2px; }
  .kcard { padding: 7px 8px; font-size: 11.5px; line-height: 1.3; }
  .kcard .who { display: none; }
  .cal-cell { min-height: 46px; padding: 4px; }
  .cal-ev { font-size: 9.5px; padding: 1px 3px; }
  .pop { width: 200px; }
}
.stage-cap { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: center; margin-top: 22px; }
.stage-note { font-size: 0.84rem; color: var(--text-3); }

/* ───────────── Ticker ───────────── */
.ticker { margin-top: 64px; padding: 18px 0; border-block: 1px solid var(--line); overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.ticker-track { display: flex; width: max-content; }
.ticker ul { list-style: none; margin: 0; padding: 0 0 0 0; display: flex; gap: 0; }
.ticker li { display: flex; align-items: center; white-space: nowrap; color: var(--text-2); font-size: 0.98rem; font-weight: 500; padding: 0 22px; }
.ticker li::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--violet); margin-left: 44px; opacity: 0.8; }
@media (prefers-reduced-motion: no-preference) {
  .js .ticker-track { animation: ticker 60s linear infinite; }
  .ticker:hover .ticker-track { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker { -webkit-mask-image: none; mask-image: none; }
  .ticker ul { flex-wrap: wrap; justify-content: center; row-gap: 8px; }
  .ticker-track { width: auto; justify-content: center; }
  .ticker ul[aria-hidden] { display: none; }
}
@keyframes ticker { to { transform: translateX(-50%); } }

/* ───────────── Sections ───────────── */
.section { padding: 128px 0; position: relative; }
@media (max-width: 639px) { .section { padding: 84px 0; } }
.section-head { max-width: 820px; }
.section-head.center { margin: 0 auto; text-align: center; }
.section-head.center .section-lede { margin-left: auto; margin-right: auto; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sky-text); margin-bottom: 16px; }
.kicker::before { content: ""; width: 18px; height: 1.5px; background: currentColor; border-radius: 1px; }
.section-title { font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.04; letter-spacing: -0.038em; font-weight: 720; text-wrap: balance; }
.section-lede { margin-top: 20px; max-width: 660px; font-size: 1.14rem; color: var(--text-2); text-wrap: pretty; }
.br-wide { display: none; }
@media (min-width: 900px) { .br-wide { display: inline; } }

/* reveal on scroll */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms); }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* spotlight cards: --mx / --my set by site.js */
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -40%), var(--spot), transparent 60%);
  opacity: 0; transition: opacity .35s;
}
.spot:hover::before { opacity: 1; }
.spot::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, -40%), color-mix(in srgb, var(--sky) 70%, transparent), transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity .35s;
}
.spot:hover::after { opacity: 1; }

/* halves */
.halves { margin-top: 64px; display: grid; gap: 18px; }
@media (min-width: 900px) { .halves { grid-template-columns: 1fr 1fr; } }
.half { padding: 40px 36px; border-radius: var(--radius); background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 70%, var(--bg))); border: 1px solid var(--line); }
@media (max-width: 479px) { .half { padding: 30px 22px; } }
.half-k { font: 600 0.8rem/1 var(--mono); letter-spacing: 0.06em; color: var(--text-3); text-transform: uppercase; }
.half h3 { margin-top: 14px; font-size: clamp(1.4rem, 2.6vw, 1.85rem); letter-spacing: -0.025em; line-height: 1.15; }
.half-soul { background: linear-gradient(180deg, color-mix(in srgb, var(--violet) 9%, var(--surface)), color-mix(in srgb, var(--surface) 70%, var(--bg))); }
.feat-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 16px; }
.feat-list li { position: relative; padding-left: 28px; color: var(--text-2); line-height: 1.55; }
.feat-list li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 12px; height: 12px; border-radius: 4px; background: linear-gradient(135deg, var(--sky), var(--violet)); transform: rotate(45deg) scale(0.75); }
.feat-list b { color: var(--text); font-weight: 600; }

/* graph */
.graph-section { overflow: clip; }
.graph-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1000px) { .graph-grid { grid-template-columns: 0.8fr 1.2fr; gap: 64px; } }
.hint { margin-top: 24px; display: inline-flex; align-items: center; gap: 10px; font-size: 0.92rem; color: var(--text-3); }
.hint-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 0 0 var(--glow-a); }
@media (prefers-reduced-motion: no-preference) { .hint-dot { animation: ping 2.2s ease-out infinite; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--sky) 55%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.graph-card { position: relative; margin: 0; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: radial-gradient(80% 70% at 50% 45%, color-mix(in srgb, var(--sky) 9%, var(--surface)), var(--surface)); box-shadow: var(--shadow-md); }
.graph { width: 100%; height: clamp(360px, 46vw, 560px); touch-action: pan-y; cursor: grab; }
.graph.is-dragging { cursor: grabbing; }
.graph-legend { position: relative; padding: 4px 16px 14px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.8rem; color: var(--text-3); pointer-events: none; }
.graph-legend span { display: inline-flex; align-items: center; gap: 6px; }
.graph-legend i { width: 9px; height: 9px; border-radius: 50%; }
.lg-project { background: #4f8ff7; } .lg-person { background: #f783ac; } .lg-meeting { background: #44c98a; } .lg-idea { background: #b4a4ce; }

/* views demo */
.views { margin: 56px auto 0; max-width: 1040px; border-radius: var(--radius); background: var(--app-surface); border: 1px solid var(--line); box-shadow: var(--shadow-xl); overflow: hidden; color: var(--app-text); }
.views-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--app-line); background: var(--app-base); flex-wrap: wrap; }
.views-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--app-hover); }
.views-tabs button { position: relative; font: 600 0.88rem/1 var(--font); color: var(--app-text-2); background: transparent; border: 0; padding: 0 14px; min-height: 36px; border-radius: 9px; cursor: pointer; transition: color .2s, background-color .25s, box-shadow .25s; }
.views-tabs button:hover { color: var(--app-text); }
.views-tabs button[aria-selected="true"] { background: var(--app-surface); color: var(--app-text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), 0 0 0 1px var(--app-line); }
.views-meta { font: 500 0.82rem/1 var(--mono); color: var(--app-text-3); }
.views-stage { position: relative; padding: 18px; min-height: 420px; }
@media (max-width: 599px) { .views-tabs button { padding: 0 10px; font-size: 0.84rem; } .views-stage { padding: 12px; } .views-meta { display: none; } }
.vt-fallback { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.vt-fallback th, .vt-fallback td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--app-line); }
.vt-fallback th { color: var(--app-text-3); font-weight: 600; font-size: 0.8rem; }
/* layouts rendered by views.js */
.vlayout { display: grid; gap: 10px; }
.vlayout.table { gap: 0; }
.vhead { display: grid; grid-template-columns: minmax(0, 2.2fr) 1fr 0.9fr 0.7fr; gap: 12px; padding: 0 14px 10px; font-size: 0.78rem; font-weight: 600; color: var(--app-text-3); letter-spacing: 0.02em; border-bottom: 1px solid var(--app-line); }
.vcols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.vcol { border-radius: 12px; background: var(--app-base); border: 1px solid var(--app-line); padding: 10px; display: grid; gap: 8px; min-height: 120px; align-content: start; }
.vcol-h { display: flex; align-items: center; gap: 7px; font-size: 0.82rem; font-weight: 600; color: var(--app-text-2); padding: 2px 4px; }
.vcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--app-line); border: 1px solid var(--app-line); border-radius: 12px; overflow: hidden; }
.vday { background: var(--app-surface); min-height: 92px; padding: 6px; display: grid; gap: 4px; align-content: start; }
.vday-n { font-size: 0.74rem; color: var(--app-text-3); font-weight: 600; }
.vgal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 799px) { .vgal { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 699px) {
  .vcols { grid-template-columns: 1fr; }
  .vhead { grid-template-columns: minmax(0, 1fr) auto; }
  .vhead span:nth-child(n + 3) { display: none; }
  .vday { min-height: 64px; padding: 3px; }
}
.vitem { position: relative; border-radius: 10px; color: var(--app-text); font-size: 0.9rem; will-change: transform; transform-origin: 0 0; }
.vitem .vi-in { transition: opacity .25s; }
.vitem.is-moving .vi-in { opacity: 0; }
.vitem .cover, .vitem .vi-owner, .vitem .vi-date, .vitem .vi-status { display: none; }
.vi-title { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-todo { color: var(--app-text-2); background: var(--app-hover); }
.s-doing { color: #85590a; background: rgba(240, 180, 41, 0.14); }
.s-done { color: #13703f; background: rgba(68, 201, 138, 0.14); }
@media (prefers-color-scheme: dark) { .s-doing { color: #f0b429; } .s-done { color: #5fd6a0; } }
.owner { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--app-text-2); }
.owner i { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font: 700 9.5px/1 var(--font); font-style: normal; color: #fff; }
.vlayout.table .vitem { border-radius: 0; border-bottom: 1px solid var(--app-line); }
.vlayout.table .vitem .vi-in { display: grid; grid-template-columns: minmax(0, 2.2fr) 1fr 0.9fr 0.7fr; gap: 12px; align-items: center; padding: 11px 14px; }
.vlayout.table .vi-status, .vlayout.table .vi-owner, .vlayout.table .vi-date { display: inline-flex; }
.vlayout.table .vi-date { font-size: 0.82rem; color: var(--app-text-3); font-family: var(--mono); }
@media (max-width: 699px) {
  .vlayout.table .vitem .vi-in { grid-template-columns: minmax(0, 1fr) auto; }
  .vlayout.table .vi-owner, .vlayout.table .vi-date { display: none; }
}
.vcol .vitem, .vgal .vitem { background: var(--app-surface); border: 1px solid var(--app-line); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }
.vcol .vitem .vi-in { padding: 10px 12px; display: grid; gap: 8px; }
.vcol .vi-owner, .vcol .vi-date { display: inline-flex; }
.vcol .vi-meta { display: flex; justify-content: space-between; align-items: center; }
.vcol .vi-date { font: 500 0.76rem/1 var(--mono); color: var(--app-text-3); }
.vday .vitem { border-radius: 6px; background: var(--app-selected); border-left: 2px solid var(--sky); }
.vday .vitem .vi-in { padding: 3px 6px; font-size: 0.74rem; }
.vday .vitem[data-s="done"] { background: rgba(68, 201, 138, 0.14); border-left-color: var(--green); }
.vday .vitem[data-s="doing"] { background: rgba(240, 180, 41, 0.14); border-left-color: var(--amber); }
.vgal .vitem { overflow: hidden; }
.vgal .cover { display: block; height: 84px; }
.vgal .vi-in > *:not(.cover) { margin: 0 12px; }
.vgal .vi-title { margin-top: 10px !important; }
.vgal .vi-status { display: inline-flex; margin: 8px 12px 12px !important; }
.vi-meta { display: contents; }
.vcol .vi-meta, .vgal .vi-meta { display: flex; }
.vgal .vi-meta { justify-content: space-between; align-items: center; }

/* bento */
.bento { list-style: none; margin: 56px 0 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
@media (min-width: 1000px) { .bento { grid-template-columns: repeat(3, 1fr); } .tile-wide { grid-column: span 2; } }
.tile { padding: 28px 28px 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.tile h3 { font-size: 1.18rem; letter-spacing: -0.015em; margin-top: 22px; }
.tile p { margin-top: 8px; color: var(--text-2); font-size: 0.97rem; line-height: 1.55; }
.tile-art { height: 120px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; font-size: 0.8rem; color: var(--text-2); }
.art-inbox { flex-direction: column; align-items: stretch; justify-content: center; gap: 7px; }
.msg { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg i { width: 8px; height: 8px; border-radius: 50%; background: var(--sky); flex: none; }
.msg.m2 i { background: var(--pink); } .msg.m3 i { background: var(--green); }
.msg b { color: var(--text); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .tile:hover .msg { animation: nudge .6s var(--spring) both; }
  .tile:hover .msg.m2 { animation-delay: .08s; } .tile:hover .msg.m3 { animation-delay: .16s; }
}
@keyframes nudge { 50% { transform: translateX(6px); } }
.art-history { align-items: flex-end; gap: 10px; }
.art-history i { width: 22%; border-radius: 8px 8px 0 0; background: linear-gradient(var(--sky), transparent); opacity: 0.55; height: 40%; }
.art-history i:nth-child(2) { height: 65%; opacity: 0.7; } .art-history i:nth-child(3) { height: 52%; } .art-history i:nth-child(4) { height: 88%; opacity: 0.9; background: linear-gradient(var(--violet), transparent); }
.art-agent { flex-direction: column; gap: 6px; }
.art-agent span { font: 600 0.9rem/1 var(--font); padding: 8px 14px; border-radius: 999px; background: color-mix(in srgb, #64748b 22%, var(--surface)); border: 1.5px dashed #64748b; color: var(--text); }
.art-agent em { font: 500 0.76rem/1 var(--mono); font-style: normal; color: var(--text-3); }
.art-publish span, .art-io span { padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-family: var(--mono); font-size: 0.74rem; white-space: nowrap; }
.art-publish b, .art-io b { color: var(--sky-text); }
.art-io { flex-wrap: wrap; }
.art-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-content: center; }
.art-cal i { height: 36px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); }
.art-cal i.on { background: color-mix(in srgb, var(--sky) 30%, var(--surface)); border-color: color-mix(in srgb, var(--sky) 60%, transparent); }
.art-cal i.on2 { background: color-mix(in srgb, var(--pink) 26%, var(--surface)); border-color: color-mix(in srgb, var(--pink) 55%, transparent); }

/* compare */
.compare-wrap { margin: 56px auto 0; max-width: 1040px; overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-md); }
.compare { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 0.93rem; }
.compare th, .compare td { padding: 16px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); color: var(--text-2); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare thead th { font: 700 1rem/1.2 var(--font-display); color: var(--text); padding-top: 20px; padding-bottom: 16px; }
.compare tbody th { font-weight: 600; color: var(--text); width: 26%; }
.compare .c-prism { background: color-mix(in srgb, var(--sky) 7%, transparent); color: var(--text); }
.compare thead .c-prism { color: var(--sky-text); }
.compare .y, .compare .p, .compare .n { font-weight: 700; margin-right: 6px; }
.compare .y { color: var(--green); } .compare .p { color: var(--amber); } .compare .n { color: var(--text-3); }
.compare tr { transition: background-color .2s; }
.compare tbody tr:hover { background: var(--surface-2); }
.footnote { margin: 18px auto 0; max-width: 1040px; font-size: 0.82rem; color: var(--text-3); text-align: center; }

/* data flow */
.vault { background: linear-gradient(180deg, transparent, var(--bg-2) 15%, var(--bg-2) 85%, transparent); }
.flow { margin: 64px auto 0; max-width: 1040px; display: grid; grid-template-columns: 1fr 120px 1fr 120px 1fr; align-items: center; }
.flow-col { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.node { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); color: var(--text); font-weight: 600; font-size: 0.95rem; }
.d-ico { width: 18px; height: 14px; border: 1.8px solid var(--text-2); border-radius: 3px; flex: none; }
.d-ico.d-phone { width: 11px; height: 18px; border-radius: 4px; }
.d-ico.d-web { border-radius: 50%; width: 16px; height: 16px; }
.flow-label { font-size: 0.8rem; color: var(--text-3); text-align: center; }
.server, .vaultnode { flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 26px 18px; }
.server b, .vaultnode b { font-size: 1.05rem; }
.server > span, .vaultnode > span { font-size: 0.82rem; font-weight: 400; color: var(--text-3); }
.server { border-color: color-mix(in srgb, var(--sky) 55%, transparent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--sky) 10%, transparent), 0 30px 60px -30px var(--glow-a); }
.vaultnode { background: linear-gradient(140deg, color-mix(in srgb, var(--sky) 14%, var(--surface)), color-mix(in srgb, var(--violet) 18%, var(--surface))); }
.keychip { margin-top: 8px; display: inline-flex !important; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 600 0.76rem/1.2 var(--mono) !important; color: var(--amber) !important; background: color-mix(in srgb, var(--amber) 12%, transparent); border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent); }
.keychip svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.lock { width: 30px; height: 30px; fill: none; stroke: var(--sky-text); stroke-width: 1.8; stroke-linecap: round; margin-bottom: 4px; }
.wire { position: relative; height: 2px; margin: 0 8px; background: linear-gradient(90deg, color-mix(in srgb, var(--sky) 50%, transparent), color-mix(in srgb, var(--violet) 50%, transparent)); container-type: inline-size; border-radius: 1px; }
.pk { position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 12px 2px var(--glow-a); opacity: 0; }
.w2 .pk { background: var(--violet); box-shadow: 0 0 12px 2px var(--glow-b); }
@media (prefers-reduced-motion: no-preference) {
  .pk { animation: flowx 2.6s linear infinite; }
  .pk:nth-child(2) { animation-delay: -0.87s; } .pk:nth-child(3) { animation-delay: -1.73s; }
  .w2 .pk { animation-duration: 2s; animation-direction: alternate; }
  .w2 .pk:nth-child(2) { animation-delay: -1s; }
}
@media (prefers-reduced-motion: reduce) { .pk { opacity: 1; } .pk:nth-child(1) { left: 25%; } .pk:nth-child(2) { left: 55%; } .pk:nth-child(3) { left: 80%; } }
@keyframes flowx { 0% { transform: translateX(0); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translateX(100cqi); opacity: 0; } }
@media (max-width: 859px) {
  .flow { grid-template-columns: 1fr; max-width: 420px; }
  .wire { width: 2px; height: 56px; margin: 8px auto; container-type: normal; background: linear-gradient(180deg, color-mix(in srgb, var(--sky) 50%, transparent), color-mix(in srgb, var(--violet) 50%, transparent)); }
  .pk { left: -3px; top: -4px; }
  @media (prefers-reduced-motion: no-preference) { .pk { animation-name: flowy; } }
  @media (prefers-reduced-motion: reduce) { .pk:nth-child(n) { left: -3px; } .pk:nth-child(1) { top: 20%; } .pk:nth-child(2) { top: 55%; } .pk:nth-child(3) { top: 85%; } }
}
@keyframes flowy { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translateY(56px); opacity: 0; } }
.vault-points { list-style: none; padding: 0; margin: 56px auto 0; max-width: 1040px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.vault-points li { padding: 20px 22px; border-radius: 16px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--text-2); font-size: 0.96rem; }
.vault-points b { color: var(--text); }

/* devices */
.devices { margin: 64px auto 0; max-width: 980px; display: flex; align-items: flex-end; justify-content: center; gap: 0; position: relative; }
.mac { flex: 1; max-width: 760px; }
.mac-screen { aspect-ratio: 16 / 10; border-radius: 14px 14px 4px 4px; border: 10px solid #1d1e22; background: var(--app-surface); display: grid; grid-template-columns: 22% 1fr; overflow: hidden; box-shadow: var(--shadow-xl); }
.mac-base { height: 14px; margin: 0 -6%; border-radius: 0 0 14px 14px; background: linear-gradient(#c9cbd1, #8d9098); }
@media (prefers-color-scheme: dark) { .mac-base { background: linear-gradient(#5c5f67, #2f3136); } }
.mini-side { background: var(--app-base); border-right: 1px solid var(--app-line); padding: 18px 12px; display: grid; gap: 10px; align-content: start; }
.mini-side i { height: 8px; border-radius: 4px; background: var(--app-hover); }
.mini-side i.on { background: var(--app-selected); }
.mini-page { padding: 8% 10% 0; display: flex; flex-direction: column; gap: 10px; color: var(--app-text); min-width: 0; }
.mini-title { font: 700 clamp(14px, 2.6vw, 26px)/1.2 var(--font-display); letter-spacing: -0.02em; }
.mini-props { display: flex; gap: 6px; }
.mini-props em { font-style: normal; font-size: clamp(9px, 1vw, 12px); padding: 2px 8px; border-radius: 999px; background: rgba(240, 180, 41, 0.16); color: var(--amber); font-weight: 600; }
.mini-props em + em { background: var(--app-hover); color: var(--app-text-2); }
.mini-page > i { height: 7px; border-radius: 4px; background: var(--app-hover); }
.mini-page > i.s { width: 70%; }
.mini-todo { display: flex; align-items: center; gap: 8px; font-size: clamp(9px, 1.2vw, 13px); }
.mini-todo::before { content: ""; width: 11px; height: 11px; border-radius: 3px; border: 1.5px solid var(--app-text-3); flex: none; }
.mini-todo.done { color: var(--app-text-3); text-decoration: line-through; }
.mini-todo.done::before { background: var(--sky); border-color: var(--sky); }
.mini-link { font-size: clamp(9px, 1.2vw, 13px); color: var(--app-wiki); text-decoration: underline dotted; text-underline-offset: 3px; }
.phone { width: 30%; max-width: 230px; margin-left: -9%; position: relative; z-index: 2; }
.phone-screen { position: relative; aspect-ratio: 9 / 19.3; border-radius: 34px; border: 8px solid #1d1e22; background: var(--app-surface); overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08); display: flex; flex-direction: column; }
.phone .mini-page { padding: 34px 14px 0; gap: 9px; flex: 1; }
.phone .mini-title { font-size: clamp(12px, 2.4vw, 19px); }
.phone .mini-todo, .phone .mini-link { font-size: clamp(8px, 1.4vw, 12px); }
.notch { position: absolute; left: 50%; top: 8px; width: 34%; height: 16px; border-radius: 10px; background: #1d1e22; transform: translateX(-50%); }
.phone-bar { display: flex; justify-content: space-around; padding: 10px 6px 16px; border-top: 1px solid var(--app-line); background: var(--app-base); }
.phone-bar i { width: 16px; height: 16px; border-radius: 5px; background: var(--app-hover); }
.phone-bar i:first-child { background: var(--app-selected); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .phone { animation: rise linear both; animation-timeline: view(); animation-range: entry 10% cover 50%; }
    @keyframes rise { from { transform: translateY(70px); } to { transform: none; } }
  }
}
.device-notes { list-style: none; margin: 64px 0 0; padding: 0; display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.device-notes h3 { font-size: 1.2rem; letter-spacing: -0.015em; }
.device-notes p { margin-top: 8px; color: var(--text-2); font-size: 0.97rem; }

/* steps */
.steps { list-style: none; padding: 0; margin: 56px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.step { padding: 30px 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step-n { font: 700 0.85rem/1 var(--mono); letter-spacing: 0.05em; background: linear-gradient(90deg, var(--sky-text), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step h3 { margin-top: 16px; font-size: 1.2rem; letter-spacing: -0.015em; }
.step p { margin-top: 8px; color: var(--text-2); font-size: 0.97rem; line-height: 1.55; }
.step pre { margin: 18px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); overflow-x: auto; }
.step code { font: 500 0.86rem/1.4 var(--mono); color: var(--text); }
.step code::before { content: "$ "; color: var(--text-3); }

/* final CTA */
.final { position: relative; padding: 140px 0 120px; overflow: clip; text-align: center; border-top: 1px solid var(--line); }
.final-glow { position: absolute; left: 50%; top: 40%; width: 1000px; height: 700px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, var(--glow-a), transparent), radial-gradient(closest-side at 70% 60%, var(--glow-b), transparent); filter: blur(40px); opacity: 0.7; pointer-events: none; }
.final-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.final-mark { width: 64px; height: auto; filter: drop-shadow(0 10px 30px var(--glow-a)); }
.final h2 { margin-top: 28px; font-size: clamp(2.4rem, 7vw, 5rem); line-height: 1; letter-spacing: -0.048em; font-weight: 750; text-wrap: balance; }
.final-inner > p { margin-top: 22px; color: var(--text-2); font-size: 1.15rem; max-width: 560px; }
.final .cta-row { margin-top: 36px; }
.final-fine { margin-top: 40px !important; font-size: 0.88rem !important; color: var(--text-3) !important; max-width: 640px !important; }
@media (max-width: 479px) { .final .btn { width: 100%; } .final { padding: 96px 0 88px; } }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.footer-row .brand { margin-right: 0; }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.footer-row nav a { color: var(--text-2); font-size: 0.92rem; display: inline-flex; align-items: center; min-height: 44px; }
.footer-row nav a:hover { color: var(--text); }
.footer-row .fine { flex-basis: 100%; font-size: 0.84rem; color: var(--text-3); }

/* film dialog */
.film { padding: 0; border: 0; background: transparent; max-width: min(1200px, 94vw); width: 100%; max-height: 92vh; overflow: visible; color: #f3f3f5; }
.film::backdrop { background: rgba(5, 6, 9, 0.86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.film-inner { position: relative; }
.film video { width: 100%; max-height: 86vh; border-radius: 14px; background: #000; }
.film.portrait { max-width: min(460px, 94vw); }
.film-close { position: absolute; top: -56px; right: 0; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: rgba(255, 255, 255, 0.12); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); }
.film-close:hover { background: rgba(255, 255, 255, 0.22); }

/* late additions */
.vgal .vi-in { display: flex; flex-direction: column; align-items: flex-start; }
.vgal .vi-in > .cover { align-self: stretch; }
.vgal .vi-title { max-width: calc(100% - 24px); }
.vgal .vi-meta { align-self: stretch; }
.vgal .vi-owner, .vgal .vi-date { display: inline-flex; }
.vgal .vi-date { font: 500 0.76rem/1 var(--mono); color: var(--app-text-3); }
.swipe-hint { display: none; margin: 14px 0 0; font-size: 0.82rem; color: var(--text-3); text-align: center; }
@media (max-width: 699px) { .swipe-hint { display: block; } }
.art-search { flex-direction: column; align-items: stretch; gap: 6px; }
.art-search .q { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 9px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--sky) 50%, var(--line)); color: var(--text); font-weight: 500; }
.art-search .q kbd { font-size: 0.72rem; }
.art-search .r { padding: 4px 10px; border-radius: 7px; color: var(--text-2); }
.art-search .r.on { background: color-mix(in srgb, var(--sky) 16%, transparent); color: var(--text); }
.vitem.is-moving { background: var(--app-elev); box-shadow: 0 0 0 1px var(--app-line), 0 10px 24px -14px rgba(0, 0, 0, 0.5); border-radius: 10px; z-index: 2; }
.wl-typing { color: var(--app-wiki); font-family: var(--mono); font-size: 0.92em; }
.vgal .vi-meta { margin: 6px 12px 12px; }
.vgal .vi-status { margin: 8px 12px 0 !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}

/* Privacy and support pages */
.site-header-static { position: static; }
.legal { max-width: 46rem; padding-top: 48px; padding-bottom: 80px; line-height: 1.65; color: var(--text-2); }
.legal h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 8px; }
.legal h2 { font-size: 1.3rem; margin: 40px 0 8px; }
.legal h3 { font-size: 1.05rem; margin: 28px 0 4px; }
.legal b, .legal em { color: var(--text); }
.legal ul { padding-left: 1.2em; }
.legal li { margin: 8px 0; }
.legal-date { color: var(--text-3); font-size: 0.9rem; margin-top: 0; }
