:root {
  color-scheme: light;
  --canvas: #faf9f5;
  --surface: #ffffff;
  --bone: #f2f0e8;
  --ink: #141413;
  --copy: #3d3d3a;
  --muted: #73726c;
  --faint: #a8a59d;
  --line: #e7e4da;
  --line-strong: #d9d5c8;
  --accent: #c2643f;
  --accent-soft: rgba(194, 100, 63, 0.12);
  --green: #3f7a4a;
  --green-soft: rgba(63, 122, 74, 0.14);
  --mark: rgba(240, 196, 76, 0.42);
  --select: rgba(70, 120, 220, 0.2);
  --shadow: 0 1px 2px rgba(20, 20, 19, 0.04), 0 8px 24px rgba(20, 20, 19, 0.06);
  --shadow-lg:
    0 2px 6px rgba(20, 20, 19, 0.05), 0 30px 80px -20px rgba(20, 20, 19, 0.22);
  --app-bg: #ffffff;
  --app-chrome: #f7f7f6;
  --app-line: #ebebea;
  --app-muted: #8a8a88;
  --app-text: #2b2b2a;
  --cover-a: #e8e3d8;
  --cover-b: #d9e1e3;
  --serif:
    "Newsreader", "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia,
    serif;
  --sans:
    "Geist", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "Geist Mono", "SF Mono", ui-monospace, Menlo, monospace;
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1160px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --canvas: #151514;
    --surface: #1d1d1b;
    --bone: #1a1a18;
    --ink: #f1efe8;
    --copy: #cfccc3;
    --muted: #9a978f;
    --faint: #6d6b65;
    --line: #2c2b28;
    --line-strong: #3a3935;
    --accent: #df8a64;
    --accent-soft: rgba(223, 138, 100, 0.14);
    --green: #7fbf89;
    --green-soft: rgba(127, 191, 137, 0.14);
    --mark: rgba(240, 196, 76, 0.3);
    --select: rgba(110, 150, 240, 0.28);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-lg:
      0 2px 6px rgba(0, 0, 0, 0.3), 0 30px 80px -20px rgba(0, 0, 0, 0.7);
    --app-bg: #191919;
    --app-chrome: #1f1f1f;
    --app-line: #2c2c2c;
    --app-muted: #8c8c8c;
    --app-text: #e3e3e3;
    --cover-a: #3c3b33;
    --cover-b: #2f3b40;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #151514;
  --surface: #1d1d1b;
  --bone: #1a1a18;
  --ink: #f1efe8;
  --copy: #cfccc3;
  --muted: #9a978f;
  --faint: #6d6b65;
  --line: #2c2b28;
  --line-strong: #3a3935;
  --accent: #df8a64;
  --accent-soft: rgba(223, 138, 100, 0.14);
  --green: #7fbf89;
  --green-soft: rgba(127, 191, 137, 0.14);
  --mark: rgba(240, 196, 76, 0.3);
  --select: rgba(110, 150, 240, 0.28);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-lg:
    0 2px 6px rgba(0, 0, 0, 0.3), 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  --app-bg: #191919;
  --app-chrome: #1f1f1f;
  --app-line: #2c2c2c;
  --app-muted: #8c8c8c;
  --app-text: #e3e3e3;
  --cover-a: #3c3b33;
  --cover-b: #2f3b40;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
button {
  font: inherit;
  color: inherit;
}
.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
::selection {
  background: var(--accent-soft);
}

/* Navigation */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 15px;
}
.brand svg {
  width: 22px;
  height: 22px;
}
.nav-links {
  display: flex;
  gap: 22px;
  font-size: 14px;
  color: var(--muted);
}
.nav-links a:hover {
  color: var(--ink);
}
.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 17px;
  transition:
    background-color 0.2s,
    color 0.2s;
}
.icon-btn:hover {
  background: var(--bone);
  color: var(--ink);
}
.lang-btn {
  width: auto;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 500;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 0.2s ease,
    background-color 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}
.btn .icon {
  font-size: 16px;
}
.btn:active {
  transform: scale(0.98);
}
.btn-primary {
  background: var(--ink);
  color: var(--canvas);
}
.btn-primary:hover {
  box-shadow: 0 6px 20px -6px color-mix(in srgb, var(--ink) 50%, transparent);
}
.btn-ghost {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.btn-ghost:hover {
  border-color: var(--faint);
}
.btn-sm {
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 50% 72%, var(--accent-soft), transparent 70%),
    radial-gradient(
      40% 40% at 20% 20%,
      color-mix(in srgb, var(--green-soft) 60%, transparent),
      transparent 70%
    );
  opacity: 0.9;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 98%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 98%);
}
.hero-copy {
  position: relative;
  padding-top: calc(60px + clamp(36px, 8vh, 96px));
  text-align: center;
  max-width: 820px;
  pointer-events: none;
}
.hero-copy > * {
  pointer-events: auto;
}
.hero-copy::before {
  content: "";
  position: absolute;
  inset: 40px -12% -30px;
  z-index: -1;
  background: radial-gradient(
    closest-side,
    color-mix(in srgb, var(--canvas) 88%, transparent),
    transparent
  );
  pointer-events: none;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
:lang(zh) .hero h1 em,
html[lang^="zh"] .hero h1 em {
  font-style: normal;
}
.hero-sub {
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
  text-wrap: pretty;
}
.hero-cta {
  margin-top: 30px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--faint);
}
.hero-scroll {
  position: absolute;
  bottom: 22px;
  left: 50%;
  translate: -50% 0;
  width: 22px;
  height: 34px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
}
.hero-scroll::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 3px;
  height: 7px;
  border-radius: 2px;
  background: var(--faint);
  translate: -50% 0;
  animation: scrollhint 2s ease-in-out infinite;
}
@keyframes scrollhint {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
  }
  80% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 0;
  }
}
.hero-fallback {
  display: none;
}
.hero.no-webgl .hero-fallback {
  display: block;
  position: absolute;
  bottom: 8vh;
  left: 50%;
  translate: -50% 0;
  width: min(560px, 86vw);
  z-index: -1;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Sections */
section {
  position: relative;
}
.section {
  padding: clamp(80px, 12vw, 150px) 0;
}
.section-head {
  max-width: 680px;
  margin-bottom: clamp(36px, 5vw, 60px);
}
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  text-wrap: balance;
}
.lead {
  font-size: 17px;
  color: var(--muted);
  margin: 0;
  text-wrap: pretty;
}

/* App window mock */
.showcase {
  padding-top: clamp(40px, 6vw, 80px);
}
.steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 26px;
  flex-wrap: wrap;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--faint);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  transition:
    color 0.4s,
    border-color 0.4s,
    background-color 0.4s;
}
.step b {
  font-weight: 500;
}
.step span {
  font-family: var(--mono);
  font-size: 11px;
}
.step:hover {
  color: var(--muted);
}
.step[aria-selected="true"] {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.step:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.stage {
  position: relative;
  width: 100%;
}
.stage-scale {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1120px;
  transform-origin: top center;
}
.window {
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --pdf-serif: "Times New Roman", Times, "Newsreader", Georgia, serif;
  --zh-serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", serif;
  --linked: rgb(128 128 128 / 22%);
  --swatch: rgb(230 185 76 / 40%);
  width: 1120px;
  height: 700px;
  border-radius: 14px;
  background: var(--app-bg);
  color: var(--app-text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: grid;
  grid-template-rows: 46px 1fr;
  font-size: 13px;
  position: relative;
  text-align: left;
}
.win-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  background: var(--app-chrome);
  border-bottom: 1px solid var(--app-line);
  color: var(--app-muted);
  font-size: 15px;
}
.lights {
  display: flex;
  gap: 8px;
  margin-right: 8px;
}
.lights i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fe5f57;
}
.lights i:nth-child(2) {
  background: #febc2e;
}
.lights i:nth-child(3) {
  background: #28c840;
}
.win-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 360px;
  margin-left: 4px;
  color: var(--app-text);
  font-size: 13px;
  font-weight: 500;
}
.win-title > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge {
  flex: none;
  font-size: 11px;
  font-weight: 500;
  padding: 1px 7px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--app-muted) 14%, transparent);
  color: var(--app-text);
}
.view-seg {
  display: flex;
  gap: 2px;
  margin-left: auto;
  padding: 2px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--app-muted) 10%, transparent);
  font-size: 12.5px;
}
.view-seg span {
  padding: 3px 9px;
  border-radius: 6px;
  transition:
    background-color 0.25s,
    color 0.25s,
    box-shadow 0.25s;
}
.window[data-view="src"] .view-seg [data-view="src"],
.window[data-view="both"] .view-seg [data-view="both"] {
  background: var(--app-bg);
  color: var(--app-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.view-seg span.hit {
  background: color-mix(in srgb, var(--app-muted) 18%, transparent);
}
.tr-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
}
.win-tools {
  display: flex;
  gap: 14px;
  padding-left: 14px;
  border-left: 1px solid var(--app-line);
}

/* Each scene keeps only the panes its task needs. */
.win-body {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 330px;
  min-height: 0;
  transition: grid-template-columns 0.6s var(--ease);
}
.window[data-scene="translate"] .win-body {
  grid-template-columns: 0px minmax(0, 1fr) 0px;
}
.window[data-scene="ask"] .win-body {
  grid-template-columns: 0px minmax(0, 1fr) 330px;
}
.side {
  min-width: 0;
  overflow: hidden;
  transition: border-color 0.6s;
}
.side-left {
  border-right: 1px solid var(--app-line);
}
.side-right {
  border-left: 1px solid var(--app-line);
}
.window[data-scene="translate"] .side,
.window[data-scene="ask"] .side-left {
  border-color: transparent;
}
.side-in {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.side-left .side-in {
  width: 210px;
  padding: 10px;
}
.side-right .side-in {
  width: 330px;
  padding: 10px 12px 12px;
}
.seg {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--app-muted) 9%, transparent);
  margin-bottom: 12px;
}
.seg span {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--app-muted);
}
.seg small {
  font-size: 11px;
  color: var(--app-muted);
}
.seg span.on,
.window[data-scene="notes"] .tab-notes,
.window:not([data-scene="notes"]) .tab-ai {
  background: var(--app-bg);
  color: var(--app-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.toc a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--app-muted);
}
.toc a.sub {
  padding-left: 20px;
}
.toc a small {
  font-size: 11px;
  color: var(--faint);
}
.toc a.on {
  background: color-mix(in srgb, var(--app-muted) 12%, transparent);
  color: var(--app-text);
}

/* Document: original PDF, with the translation pane opening beside it */
.doc {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 0px minmax(0, 0fr);
  overflow: hidden;
  transition: grid-template-columns 0.6s var(--ease);
}
.window[data-view="both"] .doc {
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
}
.sheet {
  min-width: 0;
  overflow: hidden;
}
.flow {
  padding: 40px 64px 80px;
  color: var(--app-text);
  transition:
    transform 0.9s var(--ease),
    padding 0.6s var(--ease);
}
.window[data-view="both"] .flow {
  padding: 32px 36px 80px;
}
.sheet-src .flow {
  font-family: var(--pdf-serif);
  font-size: 15.5px;
  line-height: 1.55;
  text-align: justify;
  hyphens: auto;
}
.window[data-view="both"] .sheet-src .flow {
  font-size: 14.5px;
}
.sheet-tr .flow {
  width: 559px;
  font-family: var(--zh-serif);
  font-size: 14.5px;
  line-height: 1.95;
}
.flow h4 {
  margin: 0 0 12px;
  font-size: 1.15em;
  font-weight: 700;
}
.flow h4:not(:first-child) {
  margin-top: 22px;
}
.flow p {
  margin: 0 -7px 8px;
  padding: 3px 7px;
  border: 0.5px solid transparent;
  border-radius: 4px;
  transition:
    background-color 0.2s,
    border-color 0.2s;
}
.flow p[data-hover] {
  background: rgb(128 128 128 / 5%);
  border-color: rgb(128 128 128 / 22%);
}
.flow [data-s] {
  border-radius: 2px;
  background-repeat: no-repeat;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-color 0.3s;
}
.flow [data-sel] {
  background-image: linear-gradient(var(--select), var(--select));
  background-size: 0% 100%;
  transition: background-size 0.9s cubic-bezier(0.6, 0, 0.3, 1);
}
.flow [data-sel="on"] {
  background-size: 100% 100%;
}
.flow [data-mark="hl"] {
  background-color: var(--swatch);
}
.flow [data-mark="q"] {
  text-decoration: underline wavy rgb(91 159 232 / 75%) 1px;
  text-underline-offset: 4px;
}
.sheet-src [data-linked] {
  background-color: var(--linked);
}
.sheet-tr [data-linked] {
  background-color: color-mix(in srgb, var(--app-text) 13%, transparent);
}
.flow [data-pulse] {
  animation: pulse 1.2s ease;
}
@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
  30% {
    box-shadow: 0 0 0 4px var(--mark);
  }
}
.swap {
  position: relative;
  background: var(--app-line);
}
.swap .icon {
  position: absolute;
  top: 14px;
  left: 50%;
  width: 26px;
  height: 26px;
  padding: 5px;
  border-radius: 7px;
  border: 1px solid var(--app-line);
  background: var(--app-bg);
  color: var(--app-muted);
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s 0.3s;
}
.window[data-view="both"] .swap .icon {
  opacity: 1;
}
.pager {
  position: absolute;
  bottom: 14px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  border: 1px solid var(--app-line);
  border-radius: 10px;
  background: var(--app-bg);
  color: var(--app-muted);
  font-size: 12px;
  transform: translateX(-50%);
  transition: left 0.6s var(--ease);
}
.window[data-view="both"] .pager {
  left: 25%;
}
.pager span {
  min-width: 34px;
  padding: 1px 0;
  border: 1px solid var(--app-line);
  border-radius: 6px;
  color: var(--app-text);
  text-align: center;
}

/* Selection toolbar and note popover, as in the app */
.sel-bar,
.note-pop,
.ref-pop {
  position: absolute;
  z-index: 3;
  border: 1px solid var(--app-line);
  background: var(--app-bg);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.25);
  font-family: var(--sans);
  opacity: 0;
  transform: translateY(6px) scale(0.97);
  transition:
    opacity 0.25s,
    transform 0.25s;
  pointer-events: none;
}
.sel-bar.on,
.note-pop.on,
.ref-pop.on {
  opacity: 1;
  transform: none;
}
.sel-bar {
  display: flex;
  gap: 1px;
  padding: 3px;
  border-radius: 10px;
}
.sel-bar span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: var(--app-text);
  font-size: 15px;
  transition: background-color 0.2s;
}
.sel-bar .swatch::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--c);
}
.sel-bar span.hit {
  background: color-mix(in srgb, var(--app-muted) 16%, transparent);
}
.note-pop {
  width: 300px;
  padding: 12px;
  border-radius: 12px;
  font-size: 13px;
}
.note-pop b {
  font-weight: 600;
}
.np-input {
  min-height: 62px;
  margin: 10px 0;
  padding: 8px 10px;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.6;
}
.np-foot {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--app-text);
  color: var(--app-bg);
  font-size: 12px;
  transition: opacity 0.2s;
}
.btn.ghost {
  background: none;
  color: var(--app-muted);
}
.btn.hit {
  opacity: 0.8;
}
.caret {
  display: inline-block;
  width: 7px;
  height: 14px;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--accent);
  border-radius: 1px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.cursor {
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  z-index: 5;
  pointer-events: none;
  transition: transform 0.9s cubic-bezier(0.5, 0, 0.2, 1);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
}
.cursor.click::after {
  content: "";
  position: absolute;
  left: -9px;
  top: -9px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: ripple 0.5s ease-out forwards;
}
@keyframes ripple {
  from {
    transform: scale(0.3);
    opacity: 1;
  }
  to {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* Right sidebar: notes or AI, never both */
.panel {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}
.window[data-scene="notes"] .panel-notes,
.window:not([data-scene="notes"]) .panel-ai {
  display: flex;
}
.filters {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--app-muted);
}
.filters span {
  padding: 2px 9px;
  border-radius: 999px;
}
.filters span.on {
  background: color-mix(in srgb, var(--app-muted) 12%, transparent);
  color: var(--app-text);
}
.cards {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.note-card {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid var(--app-line);
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.6;
  overflow: hidden;
  max-height: 220px;
  transition:
    max-height 0.5s var(--ease),
    padding 0.5s var(--ease),
    margin 0.5s var(--ease),
    border-width 0.5s,
    opacity 0.4s,
    background-color 0.6s;
}
.note-card.fresh:not(.on) {
  max-height: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  opacity: 0;
}
.note-card.flash,
.note-card.hit {
  background: color-mix(in srgb, var(--app-muted) 8%, transparent);
}
.nc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nc-badge {
  padding: 0 7px;
  border: 1px solid var(--app-line);
  border-radius: 6px;
  font-size: 11px;
}
.nc-tools {
  display: flex;
  gap: 9px;
  color: var(--app-muted);
}
.nc-quote {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  padding-left: 8px;
  border-left: 3px solid #e6b94c;
  color: var(--app-muted);
  font-family: var(--pdf-serif);
  font-size: 13px;
}
.nc-text {
  margin: 0;
}
.nc-tags {
  font-size: 11.5px;
  color: var(--app-muted);
}
.nc-answer {
  display: flex;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--app-muted) 7%, transparent);
  color: var(--app-muted);
  font-size: 12px;
}
.nc-answer .icon {
  margin-top: 4px;
}

.thread {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 13px;
  line-height: 1.7;
}
.ai-empty p {
  margin: 2px 2px 14px;
  color: var(--app-muted);
  font-size: 12.5px;
}
.ai-empty .privacy {
  margin-top: 18px;
  font-size: 11.5px;
}
.suggest {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid var(--app-line);
  border-radius: 10px;
  color: var(--app-text);
  font-size: 12.5px;
}
.suggest .icon:last-child {
  margin-left: auto;
}
.m-user,
.m-wait,
.m-ai {
  display: none;
}
.m-user.on,
.m-ai.on {
  display: block;
  animation: msg-in 0.4s ease both;
}
.m-wait.on {
  display: flex;
}
@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.m-user {
  position: relative;
}
.bubble {
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--app-muted) 9%, transparent);
  font-size: 12.5px;
}
.ref-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  margin-top: 8px;
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 12px;
  transition: background-color 0.2s;
}
.ref-btn.hit,
.ref-card.hit {
  background: color-mix(in srgb, var(--app-muted) 14%, transparent);
}
.ref-pop {
  top: calc(100% + 6px);
  right: 0;
  width: 270px;
  padding: 6px;
  border-radius: 10px;
}
.ref-pop small {
  display: block;
  padding: 2px 6px 4px;
  color: var(--app-muted);
  font-size: 11.5px;
}
.ref-card {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border-radius: 8px;
  transition: background-color 0.2s;
}
.rc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
}
.rc-text {
  color: var(--app-muted);
  font-size: 11.5px;
  line-height: 1.5;
}
.claude-glyph {
  width: 16px;
  height: 16px;
  color: var(--app-muted);
  animation: glyph-spin 2.4s linear infinite;
}
@keyframes glyph-spin {
  to {
    transform: rotate(360deg);
  }
}
.answer p {
  margin: 0 0 8px;
}
.answer b {
  font-weight: 600;
}
.m-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--app-muted);
  font-size: 11.5px;
  opacity: 0;
  transition: opacity 0.4s;
}
.m-actions.on {
  opacity: 1;
}
.compose {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
}
.compose .ph {
  margin: 2px 2px 30px;
  color: var(--app-muted);
  font-size: 12.5px;
}
.compose-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.model-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 4px 9px 4px 5px;
  border: 0.5px solid var(--app-line);
  border-radius: 8px;
  font-size: 12.5px;
}
.effort {
  color: var(--app-muted);
}
.send {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--app-text);
  color: var(--app-bg);
  font-size: 13px;
}
/* Provider avatars: lobehub mark on its brand color, as the app renders them */
.brand-avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg);
  color: #fff;
}
.brand-avatar svg {
  width: 75%;
  height: 75%;
}
.brand-avatar.brand-kimi svg {
  width: 60%;
  height: 60%;
}

/* Bento */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}
.card.span-2 {
  grid-column: span 2;
}
.card h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  text-wrap: pretty;
}
.card .viz {
  flex: 1;
  margin-top: 22px;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 200px;
}

/* Cover processing */
.cover {
  position: relative;
  width: 200px;
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--cover-a);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-family: var(--serif);
}
.cover::before {
  content: "";
  position: absolute;
  right: -60px;
  top: 30px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 28px solid color-mix(in srgb, var(--ink) 6%, transparent);
}
.cover .fmt {
  position: absolute;
  left: 16px;
  top: 14px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--muted);
}
.cover .ttl {
  position: absolute;
  left: 16px;
  top: 82px;
  font-size: 21px;
  color: var(--copy);
}
.stage-panel {
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 9px;
  padding: 9px 11px 11px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  font-family: var(--sans);
  font-size: 11px;
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.stage-panel.out {
  opacity: 0;
  transform: translateY(-14px);
}
.stage-panel .lab {
  display: flex;
  justify-content: space-between;
  color: var(--copy);
  margin-bottom: 7px;
}
.bar {
  height: 3px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--ink) 9%, transparent);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--green);
  border-radius: inherit;
}
.covers {
  display: flex;
  gap: 18px;
  align-items: center;
}
.cover.second {
  background: var(--cover-b);
  width: 150px;
  opacity: 0.85;
}
.cover.second .ttl {
  font-size: 17px;
  top: 60px;
}

/* PDF figure detection */
.pdf {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 1.45;
  background: var(--app-bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 22px 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.pdf .col {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ln {
  height: 5px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
}
.ln.s {
  width: 60%;
}
.ln.m {
  width: 82%;
}
.ln.h {
  height: 9px;
  width: 70%;
  background: color-mix(in srgb, var(--ink) 18%, transparent);
  margin-bottom: 6px;
}
.fig {
  position: relative;
  border-radius: 4px;
  padding: 8px;
  margin: 6px 0;
  outline: 1.5px solid transparent;
  outline-offset: 2px;
  animation: figure 6s ease-in-out infinite;
}
.fig svg {
  width: 100%;
  height: auto;
  display: block;
}
.fig.formula {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  text-align: center;
  color: var(--copy);
  animation-delay: 3s;
}
@keyframes figure {
  0%,
  8%,
  46%,
  100% {
    outline-color: transparent;
    background: transparent;
  }
  14%,
  40% {
    outline-color: var(--accent);
    background: var(--accent-soft);
  }
}
.transcript {
  position: absolute;
  right: -6px;
  bottom: -18px;
  width: 230px;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  color: var(--copy);
  line-height: 1.55;
  animation: transcript 6s ease-in-out infinite;
}
.transcript b {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 4px;
}
@keyframes transcript {
  0%,
  16% {
    opacity: 0;
    transform: translateY(8px);
  }
  22%,
  40% {
    opacity: 1;
    transform: none;
  }
  48%,
  100% {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* Annotations */
.annot {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  width: 100%;
  align-items: stretch;
}
.annot .text {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 2;
  color: var(--copy);
  background: var(--app-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
}
.hl,
.ul {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hl {
  background-image: linear-gradient(var(--mark), var(--mark));
  background-repeat: no-repeat;
  background-size: 0 100%;
  animation: hl 7s ease infinite;
}
.ul {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 95%;
  background-size: 0 1.5px;
  animation: ul 7s ease infinite;
}
@keyframes hl {
  0%,
  6% {
    background-size: 0 100%;
  }
  20%,
  88% {
    background-size: 100% 100%;
  }
  96%,
  100% {
    background-size: 0 100%;
  }
}
@keyframes ul {
  0%,
  24% {
    background-size: 0 1.5px;
  }
  38%,
  88% {
    background-size: 100% 1.5px;
  }
  96%,
  100% {
    background-size: 0 1.5px;
  }
}
.note-pin {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  vertical-align: 1px;
  margin-left: 3px;
  opacity: 0;
  animation: pin 7s ease infinite;
}
@keyframes pin {
  0%,
  40% {
    opacity: 0;
    transform: scale(0.6);
  }
  46%,
  88% {
    opacity: 1;
    transform: none;
  }
  96%,
  100% {
    opacity: 0;
  }
}
.md {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--muted);
  background: var(--bone);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  white-space: pre-wrap;
  overflow: hidden;
}
.md .k {
  color: var(--accent);
}
.md .row-in {
  opacity: 0;
  animation: mdrow 7s ease infinite;
}
.md .r2 {
  animation-delay: 0.4s;
}
.md .r3 {
  animation-delay: 0.8s;
}
@keyframes mdrow {
  0%,
  50% {
    opacity: 0;
  }
  58%,
  90% {
    opacity: 1;
  }
  98%,
  100% {
    opacity: 0;
  }
}

/* Providers */
.providers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.prov {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--canvas);
}
.prov .brand-avatar {
  width: 28px;
  height: 28px;
}
.prov .name {
  font-weight: 500;
  font-size: 14px;
}
.prov .caps {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.cap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--bone);
  transition:
    color 0.4s,
    background-color 0.4s;
}
.cap .spin {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}
.cap .icon {
  display: none;
  font-size: 11px;
  stroke-width: 2.5;
}
.cap.ok {
  color: var(--green);
  background: var(--green-soft);
}
.cap.ok .spin {
  display: none;
}
.cap.ok .icon {
  display: inline;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.term {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bone);
}
.term::before {
  content: "$ ";
  color: var(--accent);
}

/* Search */
.search-viz {
  width: 100%;
}
.sbox {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--canvas);
  font-size: 13.5px;
  color: var(--muted);
}
.sbox .typed {
  color: var(--ink);
}
.sbox .typed::after {
  content: "";
  display: inline-block;
  width: 1.5px;
  height: 15px;
  background: var(--ink);
  vertical-align: -3px;
  margin-left: 1px;
  animation: blink 1s steps(2) infinite;
}
.results {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.res {
  font-size: 12.5px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--copy);
  background: var(--bone);
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.35s,
    transform 0.35s;
}
.res.on {
  opacity: 1;
  transform: none;
}
.res small {
  display: block;
  color: var(--faint);
  font-size: 11px;
}
.res mark {
  background: var(--mark);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

/* Theme mini */
.themes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}
.mini {
  border-radius: 10px;
  border: 1px solid var(--line);
  overflow: hidden;
  aspect-ratio: 1.25;
  display: grid;
  grid-template-columns: 30% 1fr;
}
.mini .sb {
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mini .mn {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mini .ln {
  height: 4px;
}
.mini.light {
  background: #fff;
}
.mini.light .sb {
  background: #f7f7f6;
}
.mini.light .ln {
  background: #e2e2df;
}
.mini.dark {
  background: #191919;
  border-color: #333;
}
.mini.dark .sb {
  background: #1f1f1f;
}
.mini.dark .ln {
  background: #383836;
}
.seg-theme {
  grid-column: span 2;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: var(--bone);
  font-size: 12px;
  width: fit-content;
  margin: 4px auto 0;
}
.seg-theme span {
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--muted);
}
.seg-theme span.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Engines */
.engines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.engine {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--canvas);
}
.engine .tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
}
.engine .tag-pdf {
  background: var(--green-soft);
  color: var(--green);
}
.engine div {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.engine div b {
  display: block;
  color: var(--ink);
  font-weight: 500;
  font-size: 14px;
}

/* Paper library */
.plib {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.plib .pid {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12.5px;
}
.plib .pgo {
  margin-left: auto;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--canvas);
}
.ptable {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--canvas);
  overflow: hidden;
}
.prow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px 96px 48px;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.prow.phead {
  border-top: 0;
  padding-block: 8px;
  font-size: 11.5px;
  color: var(--faint);
}
.prow .pt {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  column-gap: 8px;
  align-items: center;
  min-width: 0;
}
.prow .pt i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.prow .pt b,
.prow .pt small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prow .pt b {
  color: var(--ink);
  font-weight: 500;
  font-size: 13px;
}
.prow .pt small {
  grid-column: 2;
  color: var(--faint);
  font-size: 11px;
}
.chip {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bone);
  color: var(--copy);
}
.prow .st {
  font-size: 11.5px;
}
.prow .st.on {
  color: var(--accent);
}
.prow .st.done {
  color: var(--green);
}
.prow.pnew {
  animation: pnew 7s ease infinite;
}
@keyframes pnew {
  0%,
  10% {
    opacity: 0;
    transform: translateY(-6px);
    background: transparent;
  }
  18% {
    opacity: 1;
    transform: none;
    background: var(--accent-soft);
  }
  40%,
  92% {
    opacity: 1;
    transform: none;
    background: transparent;
  }
  100% {
    opacity: 0;
  }
}

/* Citations */
.cite {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cite .fmts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cite .fmts span {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--bone);
  transition:
    color 0.3s,
    background-color 0.3s;
}
.cite .fmts span.on {
  color: var(--accent);
  background: var(--accent-soft);
}
.cite .md {
  min-height: 132px;
  overflow-wrap: anywhere;
}

/* Formats table */
.formats {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.formats th,
.formats td {
  text-align: left;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.formats th {
  font-weight: 500;
  color: var(--muted);
  font-size: 13px;
}
.formats td:first-child {
  color: var(--muted);
  width: 22%;
}
.formats thead th:not(:first-child) {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
  font-weight: 400;
}
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  overflow-x: auto;
}
.formats tr:last-child td {
  border-bottom: 0;
}

/* Gallery */
.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--bone);
  width: fit-content;
  margin: 0 auto 26px;
  border: 1px solid var(--line);
}
.gallery-tabs button {
  border: 0;
  background: transparent;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
}
.gallery-tabs button[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.shot-frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  background: var(--surface);
  aspect-ratio: 1440 / 900;
}
.shot-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.shot-frame img.on {
  opacity: 1;
}
.shot-caption {
  text-align: center;
  font-size: 13px;
  color: var(--faint);
  margin-top: 16px;
}
.video {
  margin: 22px 0 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  background: var(--surface);
}
.video video {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
}
.video figcaption {
  padding: 12px 16px;
  color: var(--muted);
  font-size: 13px;
}

/* Local data */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.list li {
  display: flex;
  gap: 14px;
  color: var(--muted);
  font-size: 15px;
}
.list li .icon {
  font-size: 18px;
  margin-top: 3px;
  color: var(--ink);
}
.list li b {
  display: block;
  color: var(--ink);
  font-weight: 500;
}
.tree {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 2.05;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 28px;
  box-shadow: var(--shadow);
  color: var(--copy);
  overflow-x: auto;
}
.tree .row {
  display: flex;
  gap: 10px;
  white-space: pre;
  opacity: 0;
  transform: translateX(-6px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}
.tree.in .row {
  opacity: 1;
  transform: none;
}
.tree .c {
  color: var(--faint);
}
.tree .host {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.tree .host i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

/* Quick start */
.qs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.qs-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qs-card .n {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
  color: var(--accent);
}
.qs-card h3 {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 600;
}
.qs-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.code {
  position: relative;
  margin-top: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.8;
  padding: 14px 44px 14px 16px;
  border-radius: 12px;
  background: var(--bone);
  border: 1px solid var(--line);
  white-space: pre;
  overflow-x: auto;
  color: var(--copy);
}
.code .c {
  color: var(--faint);
}
.copy {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  font-size: 14px;
}

/* FAQ */
.faq {
  max-width: 760px;
  margin: 0 auto;
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  font-size: 17px;
  font-weight: 500;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  font-weight: 300;
  font-size: 22px;
  line-height: 1;
  color: var(--faint);
  transition: transform 0.3s;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  margin: -6px 0 22px;
  color: var(--muted);
  font-size: 15px;
  max-width: 680px;
}

/* Final CTA */
.final {
  text-align: center;
  padding: clamp(90px, 12vw, 150px) 0;
  border-top: 1px solid var(--line);
  background: radial-gradient(
    50% 60% at 50% 100%,
    var(--accent-soft),
    transparent 70%
  );
}
.final h2 {
  font-size: clamp(36px, 5vw, 60px);
}
footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  font-size: 13px;
  color: var(--faint);
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
footer nav {
  display: flex;
  gap: 18px;
}
footer a:hover {
  color: var(--ink);
}

/* Responsive */
@media (max-width: 960px) {
  .bento {
    grid-template-columns: 1fr 1fr;
  }
  .card.span-2 {
    grid-column: span 2;
  }
  .qs {
    grid-template-columns: 1fr;
  }
  .split {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .nav-links {
    display: none;
  }
  .nav-download {
    display: none;
  }
  .bento {
    grid-template-columns: 1fr;
  }
  .card.span-2 {
    grid-column: auto;
  }
  .card {
    padding: 22px;
    min-height: 0;
  }
  .annot {
    grid-template-columns: 1fr;
  }
  .transcript {
    position: static;
    width: auto;
    margin-top: 12px;
  }
  .pdf {
    grid-template-columns: 1fr;
    aspect-ratio: auto;
  }
  .pdf .col.extra {
    display: none;
  }
  .prow {
    grid-template-columns: minmax(0, 1fr) 84px;
  }
  .prow > :nth-child(2),
  .prow > :nth-child(4) {
    display: none;
  }
  .prov .caps .cap:first-child {
    display: none;
  }
  .formats td,
  .formats th {
    padding: 12px;
    font-size: 13.5px;
  }
  .formats thead th:not(:first-child) {
    font-size: 18px;
  }
  .step {
    padding: 6px 10px;
    font-size: 12.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .hl {
    background-size: 100% 100%;
  }
  .ul {
    background-size: 100% 1.5px;
  }
  .note-pin,
  .md .row-in {
    opacity: 1;
  }
  .prow.pnew {
    animation: none;
  }
}
.qs > *,
.bento > *,
.split > * {
  min-width: 0;
}
