@import url("./assets/headings.css");

: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;
  scroll-padding-top: 84px;
  -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: a floating glass bar */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding: 14px var(--gutter) 0;
  pointer-events: none;
}
.nav-bar {
  --nav-tint: 38%;
  --nav-blur: 6px;
  position: relative;
  isolation: isolate;
  max-width: calc(var(--max) - 2 * var(--gutter) + 24px);
  height: 56px;
  margin: 0 auto;
  padding: 0 10px 0 22px;
  display: flex;
  align-items: center;
  gap: 28px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line-strong) 55%, transparent);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 55%, transparent),
    0 1px 2px rgba(20, 20, 19, 0.03),
    0 10px 30px -12px rgba(20, 20, 19, 0.1);
  pointer-events: auto;
  transition:
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}
/* The glass lives on its own layer so the blur keeps the rounded edge and
   never becomes the containing block for the bar's content. */
.nav-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    linear-gradient(
      to bottom,
      color-mix(in srgb, var(--surface) 10%, transparent),
      transparent 70%
    ),
    color-mix(in srgb, var(--canvas) var(--nav-tint), transparent);
  -webkit-backdrop-filter: saturate(1.8) blur(var(--nav-blur));
  backdrop-filter: saturate(1.8) blur(var(--nav-blur));
  transition:
    background-color 0.35s ease,
    backdrop-filter 0.35s ease;
}
.nav.scrolled .nav-bar {
  --nav-tint: 56%;
  --nav-blur: 12px;
  border-color: var(--line);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 55%, transparent),
    0 1px 2px rgba(20, 20, 19, 0.04),
    0 16px 40px -14px rgba(20, 20, 19, 0.18);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav-bar::before {
    background: color-mix(in srgb, var(--canvas) 96%, transparent);
  }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav-bar {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 10px 30px -12px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] .nav-bar {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 30px -12px rgba(0, 0, 0, 0.6);
}
.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 .brand,
.menu-sheet .brand {
  font-family: "Caveat", var(--serif);
  font-size: 22px;
  line-height: 1;
}
.nav .brand > span,
.menu-sheet .brand > span,
.hero-brand > span {
  transform: translateY(2px);
}
.nav-links {
  display: flex;
  gap: 4px;
  margin: 0 auto;
  font-size: 14px;
  color: var(--muted);
}
.nav-links a {
  padding: 6px 12px;
  border-radius: 999px;
  transition:
    color 0.2s,
    background-color 0.2s;
}
.nav-links a:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}
.nav-links a[aria-current="page"] {
  color: var(--ink);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-actions .nav-download {
  height: 34px;
  margin-left: 6px;
  padding: 0 16px;
  border-radius: 999px;
}
.gh-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  margin-right: 4px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 500;
  color: var(--copy);
  font-variant-numeric: tabular-nums;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.gh-pill .icon {
  font-size: 15px;
}
.gh-pill:hover {
  border-color: var(--faint);
  color: var(--ink);
}
.gh-stars::before {
  content: "★ ";
  color: var(--accent);
}
.nav-actions .nav-menu-btn {
  display: none;
}

/* Mobile menu sheet */
.menu-sheet {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(340px, 86vw);
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 18px 18px 24px;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--canvas);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  flex-direction: column;
  gap: 22px;
  transform: translateX(100%);
  transition:
    transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1),
    display 0.32s allow-discrete,
    overlay 0.32s allow-discrete;
}
.menu-sheet[open] {
  display: flex;
  transform: none;
}
@starting-style {
  .menu-sheet[open] {
    transform: translateX(100%);
  }
}
.menu-sheet::backdrop {
  background: rgba(20, 20, 19, 0);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  transition:
    background-color 0.32s ease,
    backdrop-filter 0.32s ease,
    display 0.32s allow-discrete,
    overlay 0.32s allow-discrete;
}
.menu-sheet[open]::backdrop {
  background: rgba(20, 20, 19, 0.28);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
@starting-style {
  .menu-sheet[open]::backdrop {
    background: rgba(20, 20, 19, 0);
    backdrop-filter: blur(0);
  }
}
.menu-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.menu-sheet-head form {
  margin: 0;
}
.menu-sheet-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.menu-sheet-links a {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 16px;
  color: var(--copy);
}
.menu-sheet-links a:hover,
.menu-sheet-links a[aria-current="page"] {
  background: var(--bone);
  color: var(--ink);
}
.menu-sheet-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.menu-sheet-toggles {
  display: flex;
  gap: 4px;
}
@media (max-width: 900px) {
  .nav-links,
  .nav-actions .nav-wide {
    display: none;
  }
  .nav-bar {
    justify-content: space-between;
    padding-left: 18px;
    padding-right: 8px;
  }
  .nav-actions {
    margin-left: auto;
  }
  .nav-actions .nav-menu-btn {
    display: inline-grid;
  }
}
.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);
}
.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;
  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-copy {
  position: relative;
  padding-top: calc(84px + 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: "IBM Plex Serif", var(--serif);
  font-weight: 700;
  font-size: 1.875rem;
  line-height: 1.375;
  letter-spacing: normal;
  margin: 32px 0 34px;
}
@media (min-width: 640px) {
  .hero h1 { font-size: 2.25rem; }
}
@media (min-width: 1024px) {
  .hero h1 { font-size: 3rem; }
}
.hero h1 em {
  position: relative;
  display: inline-block;
  margin-top: 0.55em;
  padding-bottom: 0.25em;
  font-size: clamp(1.125rem, 0.625rem + 2vw, 1.75rem);
  line-height: 1.3;
  letter-spacing: 0;
  font-style: italic;
  color: var(--accent);
}
.hero h1 em::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 0.22em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 C48 3 91 9 146 6 S241 3 298 6' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 C48 3 91 9 146 6 S241 3 298 6' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .hero h1.reveal:not(.in) em::after {
    clip-path: inset(0 100% 0 0);
  }
  .hero h1.reveal.in em::after {
    animation: hero-underline-draw 1.1s ease-out 0.45s both;
  }
}
@keyframes hero-underline-draw {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
: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 .hero-cta .btn {
  min-width: 156px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 14px;
  gap: 8px;
}
.hero .hero-cta .btn-primary {
  background: var(--ink);
  color: var(--canvas);
}
.hero .hero-cta .btn-ghost {
  background: #fff;
  color: #1c1c1c;
  border-color: #dedede;
}
.hero-meta {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--faint);
}
.hero-demo {
  margin-top: clamp(40px, 6vw, 64px);
  padding-bottom: clamp(56px, 8vw, 96px);
}

/* 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: 700;
  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: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 720px;
  margin: 18px auto 0;
}
.step {
  position: relative;
  height: 56px;
  padding: 0 12px 6px;
  border: 0;
  background: none;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.3s;
}
.step b {
  font-weight: 500;
}
.step:hover,
.step[aria-selected="true"] {
  color: var(--ink);
}
.step:active {
  transform: scale(0.98);
}
.step:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 8px;
}
.step-bar {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--line);
}
.step-bar i {
  display: block;
  height: 100%;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition-property: transform;
  transition-timing-function: linear;
}
.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: 700;
  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: 700;
}
.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;
}

/* Base UI island: scope its styles so the static site's tokens stay intact. */
.faq [data-slot="accordion"] { display: flex; flex-direction: column; width: 100%; }
.faq [data-slot="accordion-item"]:not(:last-child) { border-bottom: 1px solid var(--line); }
.faq [data-slot="accordion-item"] h3 { margin: 0; }
.faq [data-slot="accordion-trigger"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 20px;
  padding: 22px 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}
.faq [data-slot="accordion-trigger"]:hover { text-decoration: underline; text-underline-offset: 4px; }
.faq [data-slot="accordion-trigger"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.faq [data-slot="accordion-trigger-icon"] { width: 16px; height: 16px; flex-shrink: 0; color: var(--muted); }
.faq [data-slot="accordion-trigger"] [data-slot="accordion-trigger-icon"]:last-child { display: none; }
.faq [data-slot="accordion-trigger"][aria-expanded="true"] [data-slot="accordion-trigger-icon"]:first-of-type { display: none; }
.faq [data-slot="accordion-trigger"][aria-expanded="true"] [data-slot="accordion-trigger-icon"]:last-child { display: block; }
.faq [data-slot="accordion-content"] {
  height: var(--accordion-panel-height);
  overflow: hidden;
  transition: height 200ms ease;
}
.faq [data-slot="accordion-content"][data-starting-style],
.faq [data-slot="accordion-content"][data-ending-style] { height: 0; }
.faq [data-slot="accordion-content"] > div { padding-bottom: 22px; }
.faq [data-slot="accordion-content"] p { margin: 0; max-width: 680px; font-size: 15px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .faq [data-slot="accordion-content"] { transition: none; }
}

/* Keep the adjacent FAQ and download sections visually connected. */
#faq {
  padding-bottom: clamp(24px, 6vw, 75px);
}
#faq + .download-section {
  padding-top: clamp(32px, 6vw, 75px);
}

/* Download */
.download-section {
  padding: clamp(90px, 12vw, 150px) 0;
  background: radial-gradient(
    70% 70% at 50% 50%,
    var(--accent-soft),
    transparent 70%
  );
}
.download-heading {
  text-align: center;
  margin-bottom: 48px;
}
.download-heading h2 {
  font-size: clamp(36px, 5vw, 60px);
}
.download-panel {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.download-panel h3,
.download-card h4 {
  margin: 0;
  font-size: 18px;
}
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.download-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.download-card h4 {
  margin-bottom: 14px;
  font-size: 16px;
}
.download-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 84px;
  padding: 12px 0;
}
.download-row + .download-row {
  border-top: 1px solid var(--line);
}
.download-platform-icon {
  flex: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.download-platform {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}
.download-platform span,
.download-note {
  color: var(--muted);
  font-size: 13px;
}
.download-note {
  margin: 16px 0 0;
}
@media (max-width: 700px) {
  .download-grid {
    grid-template-columns: 1fr;
  }
  .download-card {
    padding: 18px;
  }
  .download-row {
    flex-wrap: wrap;
  }
}
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-brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-brand .brand {
  color: var(--ink);
}
footer nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
footer a:hover {
  color: var(--ink);
}

/* Pricing */
.page-hero {
  position: relative;
  padding: calc(84px + clamp(40px, 8vw, 88px)) 0 clamp(56px, 8vw, 96px);
  isolation: isolate;
}
.pricing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(55% 45% at 50% 0%, var(--accent-soft), transparent 70%),
    radial-gradient(
      35% 35% at 12% 30%,
      color-mix(in srgb, var(--green-soft) 60%, transparent),
      transparent 70%
    );
}
.page-hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  text-wrap: balance;
}
.page-hero .section-head {
  margin-bottom: clamp(32px, 5vw, 48px);
}
.billing {
  --w: 300px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: var(--w);
  margin: 32px auto 0;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bone);
}
.billing-thumb {
  position: absolute;
  inset: 4px auto 4px 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.28s cubic-bezier(0.77, 0, 0.175, 1);
}
.billing[data-period="monthly"] .billing-thumb {
  transform: translateX(100%);
}
.billing button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  border: 0;
  background: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
}
.billing button[aria-pressed="true"],
.billing button:hover {
  color: var(--ink);
}
.billing-save {
  white-space: nowrap;
  font-size: 11px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
}
.plans {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 24px 24px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition:
    border-color 0.25s,
    box-shadow 0.25s,
    transform 0.25s;
}
.plan:hover {
  box-shadow: var(--shadow);
}
.plan:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.plan.is-selected {
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px var(--accent),
    var(--shadow-lg);
}
.plan-badge {
  position: absolute;
  top: 22px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.plan-badge .icon {
  fill: currentColor;
}
.plan.is-selected .plan-badge {
  opacity: 1;
  transform: none;
}
.plan-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  stroke-width: 1.25;
  color: var(--ink);
}
.plan h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.01em;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 14px;
}
.plan-price .amount {
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.plan-price .per {
  font-size: 14px;
  color: var(--muted);
}
.plan-daily {
  margin: 2px 0 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--accent);
}
.plan-was {
  margin: 2px 0 0;
  min-height: 1.6em;
  font-size: 13.5px;
  color: var(--faint);
}
.plan-was.on {
  text-decoration: line-through;
}
.plan-blurb {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--copy);
  text-wrap: pretty;
}
.plan-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bone);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s,
    border-color 0.2s;
}
.plan .plan-blurb {
  margin-bottom: 24px;
}
.plan-cta:hover {
  border-color: var(--line-strong);
}
.plan.is-selected .plan-cta {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--canvas);
}
.plan-cta[aria-disabled="true"] {
  cursor: default;
}
.plans-note {
  margin: 22px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--faint);
}

/* Plan comparison */
.cmp-section {
  padding-top: 0;
}
.cmp {
  --cols: minmax(220px, 1.5fr) repeat(4, minmax(130px, 1fr));
}
.cmp-row {
  display: grid;
  grid-template-columns: var(--cols);
}
.cmp-row[hidden] {
  display: none;
}
.cmp-label {
  padding: 22px 20px 22px 4px;
  border-top: 1px solid var(--line);
}
.cmp-head .cmp-label {
  border-top: 0;
  padding-bottom: 24px;
}
.cmp-head h2 {
  font-size: clamp(26px, 3vw, 34px);
  margin: 0;
}
.cmp-picker {
  display: none;
}
.cmp-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 22px 16px;
  border-top: 1px solid var(--line);
  text-align: center;
  transition: background-color 0.25s;
}
.cmp-cell.is-selected {
  background: var(--accent-soft);
  border-top-color: transparent;
}
.cmp-head .cmp-cell {
  justify-content: flex-start;
  border-top: 0;
  padding-top: 18px;
  cursor: pointer;
}
.cmp-head .cmp-cell.is-selected {
  border-radius: 16px 16px 0 0;
}
.cmp-row:last-child .cmp-cell.is-selected {
  border-radius: 0 0 16px 16px;
}
.cmp-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 21px;
}
.cmp-head .cmp-cell p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cmp-title {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}
.cmp-desc {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}
.cmp-models {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 13.5px;
  color: var(--copy);
}
.cmp-models li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cmp-models svg {
  width: 15px;
  height: 15px;
}
.cmp-model-icon {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
}
.cmp-cell .icon {
  font-size: 20px;
}
.cmp-cell .icon.yes {
  color: var(--ink);
  stroke-width: 2.25;
}
.cmp-cell .icon.no {
  color: var(--faint);
}
.cmp-value {
  font-weight: 600;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.cmp-text {
  font-size: 14px;
  font-weight: 500;
}
.cmp-tag {
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 6px;
  background: var(--bone);
  color: var(--muted);
}
.cmp-cell.is-selected .cmp-tag {
  background: var(--surface);
}
@media (max-width: 1020px) {
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .plans {
    grid-template-columns: 1fr;
  }
  /* Compare one plan at a time instead of scrolling sideways. */
  .cmp {
    --cols: minmax(0, 1fr) 116px;
  }
  .cmp-cell:not(.is-selected) {
    display: none;
  }
  .cmp-head .cmp-cell {
    justify-content: flex-end;
    padding-bottom: 18px;
  }
  .cmp-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    font-family: var(--serif);
    font-size: 26px;
    cursor: pointer;
  }
  .cmp-picker select {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    font-size: 16px;
  }
}

/* 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-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: 0 4px 6px;
    font-size: 13px;
  }
}

@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;
}

/* Home story: scroll-driven parts (story.js) */
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
.hero {
  min-height: 100vh;
  min-height: 100svh;
  justify-content: center;
}
.hero .hero-copy {
  padding-top: 84px;
  padding-bottom: 40px;
}
.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(28px, 5vh, 48px);
  font-family: "Caveat", var(--serif);
  font-weight: 600;
  font-size: clamp(46px, 5.8vw, 70px);
  line-height: 1;
  color: var(--ink);
}
.hero-brand svg {
  width: 1em;
  height: 1em;
}
.story {
  position: relative;
}
.part {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.part-in {
  box-sizing: border-box;
  height: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 92px var(--gutter) 40px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}
.part--flip .part-copy {
  order: 2;
}
.part-copy {
  position: relative;
  z-index: 2;
}
.part-stage {
  position: relative;
  align-self: stretch;
  min-height: 0;
}
.part h2 {
  font-size: clamp(32px, 4.2vw, 58px);
  margin-bottom: 18px;
}
.part h2 em {
  font-style: italic;
  color: var(--accent);
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='10' viewBox='0 0 120 10' preserveAspectRatio='none'><path d='M2 6.5C22 2.5 38 8.5 58 5S98 2.5 118 5.5' fill='none' stroke='%23c2643f' stroke-width='2.2' stroke-linecap='round'/></svg>")
    no-repeat 0 100% / var(--u, 0%) 0.24em;
  padding-bottom: 0.1em;
}
html[lang^="zh"] .part h2 em {
  font-style: normal;
}
.part-sub {
  font-size: clamp(15px, 1.3vw, 17px);
  color: var(--muted);
  margin: 0;
  max-width: 460px;
  text-wrap: pretty;
}
.part-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.sv-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--copy);
  white-space: nowrap;
}
.sv-chip > svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.sv-chip b {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* wide parts: heading row above a full-width stage */
.part--wide .part-in {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  gap: 24px;
}
.part--wide .part-copy {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}
.part--wide h2 {
  margin-bottom: 0;
}
.part-aside {
  max-width: 520px;
}
.part-aside .part-chips {
  margin-top: 0;
}
.part-caps {
  position: relative;
  flex: 0 1 440px;
  height: 3.2em;
  font-size: 17px;
  line-height: 1.5;
  color: var(--copy);
}
.part-caps p {
  position: absolute;
  right: 0;
  bottom: 0;
  margin: 0;
  text-align: right;
  text-wrap: pretty;
}

/* hand-drawn links between parts */
.part-link {
  position: relative;
  z-index: 3;
  height: 46vh;
  margin-bottom: -72px;
  pointer-events: none;
}
.part-link svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.part-trail {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  width: 100%;
  overflow: visible;
  pointer-events: none;
}
.part-link path,
.part-trail path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.part-link circle,
.part-trail circle {
  fill: var(--accent);
  transform-box: fill-box;
  transform-origin: center;
}
.part-link--end {
  margin-bottom: 0;
  height: 26vh;
}

/* scaled canvases: fixed design size, fitted into .part-stage by story.js */
.sv {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(var(--k, 1));
  transform-origin: center;
  color: var(--ink);
  font-family: var(--sans);
}
.sv > *,
.sv-deck > * {
  position: absolute;
}
.sv-cursor {
  left: 0;
  top: 0;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
}
.sv-cursor svg {
  display: block;
  width: 30px;
  height: 30px;
  transform-origin: 0 0;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25));
}
.sv-cursor path {
  fill: #141413;
  stroke: #fff;
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.sv-ripple {
  position: absolute;
  left: -30px;
  top: -30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  opacity: 0;
}
.sv-btn {
  height: 44px;
  padding: 0 22px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--canvas);
  display: flex;
  align-items: center;
  font-size: 17px;
  font-weight: 500;
}

/* 01 library */
.sv-lib {
  width: 856px;
  height: 720px;
}
.sv-import {
  left: 0;
  top: 0;
  width: 856px;
  height: 66px;
  box-sizing: border-box;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  padding: 0 12px 0 22px;
  gap: 14px;
  color: var(--muted);
}
.sv-ph {
  font-family: var(--mono);
  font-size: 21px;
  color: var(--ink);
  flex: 1;
  display: flex;
  align-items: center;
}
.sv-caret {
  display: inline-block;
  width: 2px;
  height: 26px;
  background: var(--accent);
  margin-left: 2px;
}
.sv-grid {
  left: 0;
  top: 104px;
  display: grid;
  grid-template-columns: repeat(4, 190px);
  gap: 30px 32px;
}
.sv-cover {
  width: 190px;
}
.sv-art {
  position: relative;
  height: 250px;
  box-sizing: border-box;
  border-radius: 10px;
  background: var(--c);
  padding: 20px 18px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(20, 20, 19, 0.06), 0 14px 30px -14px rgba(20, 20, 19, 0.3);
}
.sv-art::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 7px;
  background: rgba(0, 0, 0, 0.06);
}
.sv-ttl {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: rgba(20, 20, 19, 0.86);
}
.sv-cover.dark .sv-ttl {
  color: #f4f1ea;
}
.sv-fmt {
  position: absolute;
  left: 18px;
  bottom: 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.6);
  color: #3d3d3a;
}
.sv-meta {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  height: 20px;
  white-space: nowrap;
}
.sv-slot {
  position: absolute;
  left: 0;
  top: 0;
  width: 190px;
  height: 250px;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1.5px dashed var(--line-strong);
}
.sv-proc {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: 64px;
  box-sizing: border-box;
  border-radius: 9px;
  background: rgba(20, 20, 19, 0.78);
  color: #fff;
  padding: 11px 13px;
}
.sv-lb {
  position: relative;
  height: 20px;
  font-size: 14px;
}
.sv-lb span {
  position: absolute;
  left: 0;
  top: 0;
}
.sv-lb .sv-pct {
  left: auto;
  right: 0;
  font-family: var(--mono);
  font-size: 13px;
  opacity: 0.8;
}
.sv-bar {
  margin-top: 12px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}
.sv-bar i {
  display: block;
  height: 100%;
  background: #f0b38f;
  transform-origin: left;
  transform: scaleX(0);
}
.sv-okt {
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  color: var(--green);
  background: var(--green-soft);
  padding: 1px 7px;
  border-radius: 5px;
}

/* paper page (shared by layout, focus and AI) */
.sv-paper {
  position: absolute;
  left: 0;
  top: 0;
  width: 600px;
  height: 849px;
  box-sizing: border-box;
  background: #fff;
  transform-origin: 0 0;
  padding: 50px 46px 40px;
  font-family: var(--serif);
  font-size: 10.6px;
  line-height: 1.46;
  color: #222;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 10px 30px -10px rgba(0, 0, 0, 0.18);
}
.sv-paper .ptitle {
  font-size: 18.5px;
  line-height: 1.2;
  text-align: center;
  letter-spacing: -0.01em;
  padding: 0 30px;
}
.sv-paper .pauth {
  text-align: center;
  font-size: 10px;
  color: #555;
  margin-top: 8px;
  font-style: italic;
}
.sv-paper .pabs {
  margin: 14px 18px 0;
  font-size: 9.8px;
  text-align: justify;
}
.sv-paper b {
  font-weight: 500;
}
.sv-paper .cols {
  display: flex;
  gap: 24px;
  margin-top: 16px;
}
.sv-paper .col {
  width: 242px;
}
.sv-paper h5 {
  font-size: 11.6px;
  font-weight: 500;
  margin: 10px 0 5px;
}
.sv-paper h5:first-child {
  margin-top: 0;
}
.sv-paper p {
  margin: 0 0 7px;
  text-align: justify;
  hyphens: auto;
}
.sv-paper .eq {
  padding: 8px 0 10px;
  text-align: center;
  font-size: 13px;
  position: relative;
}
.sv-paper .eq .n {
  position: absolute;
  right: 0;
  top: 9px;
  font-size: 10.6px;
}
.sv-paper .fig {
  padding: 2px 0 8px;
}
.sv-paper .fig svg {
  display: block;
  width: 242px;
  height: 132px;
}
.sv-paper .fig .cap {
  font-size: 9.6px;
  margin-top: 4px;
}
.sv-paper .pno {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  text-align: center;
  font-size: 10px;
  color: #777;
}
.story .s {
  border-radius: 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.sv-sel {
  background-image: linear-gradient(rgba(70, 120, 220, 0.24), rgba(70, 120, 220, 0.24));
  background-repeat: no-repeat;
  background-size: 0% 100%;
}
.sv-ring {
  position: absolute;
  border-radius: 3px;
  pointer-events: none;
  opacity: 0;
}
.sv-ringL {
  border: 1px solid rgba(194, 100, 63, 0.62);
  background: rgba(194, 100, 63, 0.06);
  box-shadow: 0 0 0 3px rgba(194, 100, 63, 0.09);
}
.sv-hoverL {
  border: 0.6px solid rgba(128, 128, 128, 0.4);
  background: rgba(128, 128, 128, 0.06);
}

/* 02 layout */
.sv-layout {
  width: 680px;
  height: 900px;
}
.sv-layout .sv-paper {
  left: 40px;
  top: 26px;
}
.sv-det {
  position: absolute;
  border: 1px solid var(--k);
  background: color-mix(in srgb, var(--k) 7%, transparent);
  border-radius: 2px;
  opacity: 0;
}
.sv-det span {
  position: absolute;
  left: -1px;
  top: -13px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  background: var(--k);
  color: #fff;
  padding: 1px 4px;
  border-radius: 2px 2px 2px 0;
  line-height: 11px;
  white-space: nowrap;
}
.sv-scan {
  position: absolute;
  left: -20px;
  right: -20px;
  top: 0;
  height: 90px;
  background: linear-gradient(rgba(194, 100, 63, 0), rgba(194, 100, 63, 0.14));
  border-bottom: 2px solid #c2643f;
}
.sv-latex {
  right: 0;
  top: 0;
  padding: 14px 18px;
  border-radius: 12px;
  background: #1d1d1b;
  color: #f1efe8;
  font-family: var(--mono);
  font-size: 14px;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  opacity: 0;
}
.sv-latex .t {
  color: #df8a64;
  font-size: 11px;
  letter-spacing: 0.14em;
  display: block;
  margin-bottom: 6px;
}

/* app window (focus, AI) */
.sv-focus {
  width: 1600px;
  height: 820px;
}
.sv-ai {
  width: 1300px;
  height: 760px;
}
.sv-win {
  inset: 0;
  border-radius: 14px;
  background: var(--app-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.sv-tb {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 46px;
  box-sizing: border-box;
  background: var(--app-chrome);
  border-bottom: 1px solid var(--app-line);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
  font-size: 13.5px;
  color: var(--app-text);
}
.sv-tb .tl {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--line-strong);
}
.sv-tb .tt {
  margin-left: 18px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
}
.sv-tb .pill {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--app-line);
  color: var(--app-muted);
}
.sv-tb .seg {
  margin-left: auto;
  display: flex;
  background: var(--app-line);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.sv-tb .seg span {
  padding: 4px 12px;
  border-radius: 6px;
  color: var(--app-muted);
  font-size: 12.5px;
}
.sv-tb .seg span.on {
  background: var(--app-bg);
  color: var(--app-text);
}
.sv-wbody {
  position: absolute;
  left: 0;
  right: 0;
  top: 46px;
  bottom: 0;
  display: flex;
}
.sv-toc {
  width: 210px;
  flex: none;
  box-sizing: border-box;
  background: var(--app-chrome);
  border-right: 1px solid var(--app-line);
  padding: 14px 10px;
  font-size: 13px;
  color: var(--app-text);
}
.sv-toc .tabs {
  display: flex;
  gap: 14px;
  padding: 0 8px 12px;
  color: var(--app-muted);
  font-size: 12.5px;
}
.sv-toc .tabs b {
  color: var(--app-text);
  font-weight: 500;
}
.sv-toc .it {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
}
.sv-toc .it.nest {
  padding-left: 20px;
  color: var(--app-muted);
}
.sv-toc .it i {
  font-style: normal;
  color: var(--app-muted);
  font-size: 11.5px;
}
.sv-toc .it.on {
  background: var(--app-line);
}
.sv-pane {
  position: relative;
  overflow: hidden;
  flex: none;
}
.sv-paneL {
  width: 695px;
  background: color-mix(in srgb, var(--app-chrome) 70%, #d8d6cf);
}
.sv-paneR {
  width: 695px;
  background: var(--app-bg);
  border-left: 1px solid var(--app-line);
}
.sv-doc {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 34px 44px 420px;
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--app-text);
}
.sv-doc h4 {
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 600;
  margin: 16px 0 4px;
}
.sv-doc .dt {
  font-size: 22px;
  line-height: 1.35;
  font-weight: 500;
  margin-bottom: 10px;
}
.sv-doc section {
  position: relative;
  padding: 7px 14px;
  margin: 0 -14px 8px;
  border-radius: 6px;
}
.sv-doc .dabs {
  font-size: 14.5px;
  color: var(--app-muted);
}
.sv-doc .deq {
  text-align: center;
  font-size: 21px;
  font-style: italic;
}
.sv-doc .deq code {
  display: block;
  font-style: normal;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--app-muted);
  margin-top: 2px;
}
.sv-doc .dfig svg {
  display: block;
  width: 300px;
  height: 150px;
  margin: 4px 0 6px;
}
.sv-doc .dfig .cap {
  font-size: 15px;
}
.sv-ringR {
  border: 1px solid rgba(194, 100, 63, 0.5);
  background: rgba(194, 100, 63, 0.055);
  box-shadow: 0 0 0 4px rgba(194, 100, 63, 0.07);
  border-radius: 7px;
}
.sv-link {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.sv-link path {
  fill: none;
  stroke: #c2643f;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.sv-linktag {
  left: 0;
  top: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #c2643f;
  background: var(--app-bg);
  padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid var(--accent-soft);
  opacity: 0;
}

/* 04 AI */
.sv-aip {
  position: relative;
  flex: 1;
  min-width: 0;
  background: var(--app-bg);
  border-left: 1px solid var(--app-line);
  display: flex;
  flex-direction: column;
  color: var(--app-text);
}
.sv-aip .hd {
  height: 50px;
  box-sizing: border-box;
  border-bottom: 1px solid var(--app-line);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 22px;
  font-size: 14px;
  color: var(--app-muted);
  flex: none;
}
.sv-aip .hd b {
  color: var(--app-text);
  font-weight: 500;
}
.sv-aip .msgs {
  position: relative;
  flex: 1;
  padding: 24px 26px;
  font-size: 15.5px;
  line-height: 1.65;
}
.sv-aip .hint {
  color: var(--app-muted);
  font-size: 15px;
}
.sv-ub {
  position: absolute;
  right: 26px;
  top: 24px;
  width: 440px;
  max-width: calc(100% - 52px);
  box-sizing: border-box;
  background: var(--app-chrome);
  border-radius: 14px;
  padding: 12px 16px;
}
.sv-ub .q {
  margin-top: 8px;
}
.sv-qt {
  border-left: 2.5px solid #c2643f;
  padding: 2px 0 2px 10px;
  font-size: 13px;
  color: var(--app-muted);
  font-family: var(--serif);
  font-style: italic;
  line-height: 1.45;
}
.sv-qt small {
  display: block;
  font-style: normal;
  font-family: var(--sans);
  font-size: 11.5px;
  margin-bottom: 2px;
}
.sv-ans {
  position: absolute;
  left: 26px;
  right: 26px;
  top: 190px;
}
.sv-ans .who {
  font-size: 12.5px;
  color: var(--app-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.sv-ans .who svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.sv-ans .w {
  display: inline-block;
  white-space: pre;
}
.sv-cite {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-left: 4px;
}
.sv-dots {
  position: absolute;
  left: 26px;
  top: 222px;
  display: flex;
  gap: 5px;
}
.sv-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
}
.sv-composer {
  margin: 0 18px 18px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  padding: 12px 14px;
  flex: none;
  position: relative;
}
.sv-qchip {
  display: inline-flex;
  flex-direction: column;
  background: var(--app-chrome);
  border-radius: 9px;
  padding: 7px 10px;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 8px;
}
.sv-composer .in {
  font-size: 15.5px;
  min-height: 26px;
  display: flex;
  align-items: center;
}
.sv-phx {
  color: var(--faint);
  position: absolute;
}
.sv-composer .ft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.sv-composer .model {
  font-size: 12.5px;
  color: var(--app-muted);
  display: flex;
  gap: 6px;
}
.sv-composer .model svg {
  width: 14px;
  height: 14px;
  flex: none;
}
.sv-composer .model span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--app-chrome);
}
.sv-send {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--canvas);
  display: grid;
  place-items: center;
}
.sv-seltool {
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 7px 9px;
  background: var(--app-bg);
  color: var(--app-text);
  border: 1px solid var(--app-line);
  border-radius: 11px;
  box-shadow: 0 6px 25px #00000015;
  opacity: 0;
  z-index: 5;
}
.sv-colors {
  display: inline-flex;
  align-items: center;
}
.sv-colors i {
  width: 14px;
  height: 14px;
  margin: 5px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 12%);
}
.sv-tool-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
}
.sv-tool-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sv-ghost {
  left: 0;
  top: 0;
  padding: 6px 12px;
  border-radius: 8px;
  background: #c2643f;
  color: #fff;
  font-size: 13px;
  opacity: 0;
  white-space: nowrap;
  z-index: 6;
}

/* 05 notes */
.sv-notes {
  width: 1600px;
  height: 520px;
}
.sv-deck {
  left: 0;
  top: 0;
  width: 1600px;
  height: 520px;
}
.sv-card {
  width: 500px;
  height: 500px;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.sv-cardA {
  left: 0;
}
.sv-cardB {
  left: 550px;
}
.sv-cardC {
  left: 1100px;
}
.sv-ctitle {
  height: 52px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 22px;
  gap: 10px;
  font-size: 15px;
  color: var(--copy);
  font-weight: 500;
}
.sv-ctitle .m {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  font-weight: 400;
}
.sv-anns {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sv-ann {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.sv-ann .ty {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}
.sv-ann .ty i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--k);
}
.sv-ann .tx {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.45;
}
.sv-ann .tx span {
  background-image: linear-gradient(var(--k2), var(--k2));
  background-repeat: no-repeat;
  background-size: 0% 100%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.sv-ann .nt {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--copy);
}
.sv-ann .tg {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 1px 7px;
  border-radius: 5px;
}
.sv-md {
  padding: 22px 24px;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 2.05;
  color: var(--copy);
}
.sv-md div {
  white-space: nowrap;
  overflow: hidden;
}
.sv-md .h {
  color: var(--ink);
  font-weight: 500;
}
.sv-md .q {
  color: var(--muted);
}
.sv-md .k {
  color: var(--accent);
}
.sv-cseg {
  display: flex;
  margin: 20px 22px 0;
  background: var(--bone);
  border-radius: 10px;
  padding: 4px;
  position: relative;
}
.sv-cseg span {
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
  padding: 8px 0;
  font-size: 14px;
  color: var(--muted);
}
.sv-cseg .ind {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.sv-cfmt {
  position: relative;
  margin: 18px 22px 0;
  height: 250px;
}
.sv-cfmt > div {
  position: absolute;
  inset: 0;
  font-size: 16px;
  line-height: 1.65;
  white-space: pre-wrap;
}
.sv-cfmt .mono {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
}
.sv-cbtn {
  position: absolute;
  left: 22px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sv-cbtn .sv-btn {
  height: 42px;
  font-size: 15px;
}
.sv-toast {
  font-size: 14px;
  color: var(--green);
  background: var(--green-soft);
  padding: 7px 12px;
  border-radius: 8px;
  opacity: 0;
}
.sv-arrow {
  left: 0;
  top: 0;
  overflow: visible;
}
.sv-arrow path {
  fill: none;
  stroke: #c2643f;
  stroke-width: 2.5;
  stroke-linecap: round;
}

/* 06 local-first */
.sv-local {
  width: 760px;
  height: 470px;
}
.sv-tree {
  left: 30px;
  top: 0;
  width: 700px;
  height: auto;
  padding: 26px 32px;
  font-family: var(--mono);
  font-size: 19px;
  line-height: 1.95;
  color: var(--copy);
}
.sv-tree div {
  white-space: pre;
}
.sv-tree .c {
  color: var(--faint);
}
.sv-tree .r {
  color: var(--ink);
  font-weight: 500;
}
.sv-tree-seal {
  position: absolute;
  inset: 0;
  border: 2px solid var(--green);
  border-radius: inherit;
  background: var(--green-soft);
  opacity: 0;
  pointer-events: none;
}
.sv-lock {
  left: 50%;
  top: 312px;
  width: 104px;
  height: 104px;
  margin-left: -52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  color: var(--green);
}
.sv-lock svg {
  width: 48px;
  height: 48px;
  overflow: visible;
}
.sv-lock-ring {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 2px solid var(--green);
  opacity: 0;
}

@media (max-width: 760px) {
  .hero .hero-copy {
    padding-top: 76px;
    padding-bottom: 32px;
  }
  .hero-brand {
    gap: 10px;
    font-size: 44px;
  }
  .part-in,
  .part--wide .part-in {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    align-items: stretch;
    gap: 14px;
    padding: 76px 20px 20px;
  }
  .part--flip .part-copy {
    order: 0;
  }
  .part h2 {
    font-size: clamp(26px, 7.4vw, 34px);
    margin-bottom: 10px;
  }
  .part--wide .part-copy {
    display: block;
  }
  .part--wide h2 {
    margin-bottom: 10px;
  }
  .part-sub {
    font-size: 14.5px;
  }
  .part-chips {
    display: none;
  }
  .part-caps {
    height: 3em;
    font-size: 14.5px;
  }
  .part-caps p {
    left: 0;
    right: auto;
    top: 0;
    bottom: auto;
    text-align: left;
  }
  .part-link {
    height: 28vh;
    margin-bottom: -56px;
  }
  /* canvas hangs right under the heading; story.js centres the pair via --dy */
  .part-in > * {
    translate: 0 var(--dy, 0px);
  }
  .sv {
    top: 0;
    transform: translate(-50%, 0) scale(var(--k, 1));
    transform-origin: 50% 0;
  }
  .sv-focus {
    width: 560px;
    height: 1060px;
  }
  .sv-ai {
    width: 560px;
    height: 1080px;
  }
  .sv-toc,
  .sv-tb .seg {
    display: none;
  }
  .sv-wbody {
    flex-direction: column;
  }
  .sv-pane.sv-paneL {
    width: auto;
    height: 470px;
  }
  .sv-ai .sv-pane.sv-paneL {
    height: 400px;
  }
  .sv-pane.sv-paneR {
    width: auto;
    flex: 1;
    border-left: 0;
    border-top: 1px solid var(--app-line);
  }
  .sv-aip {
    border-left: 0;
    border-top: 1px solid var(--app-line);
  }
  .sv-doc {
    padding: 26px 34px 420px;
  }
  .sv-notes {
    width: 500px;
    overflow: hidden;
    border-radius: 16px;
  }
  .sv-arrow {
    display: none;
  }
  .sv-local {
    width: 560px;
    height: 520px;
  }
  .sv-tree {
    left: 0;
    width: 560px;
    font-size: 16px;
    padding: 22px 24px;
  }
  .sv-lock {
    top: 290px;
  }
}
@media (max-width: 760px) and (max-height: 640px) {
  .part-sub {
    display: none;
  }
}
.story .cap {
  display: block;
  padding: 0;
  margin: 0;
  background: none;
  border-radius: 0;
  color: inherit;
  text-align: left;
}
.sv-paper .fig .cap {
  margin-top: 4px;
}
.sv-tb .seg span,
.sv-toc .it {
  white-space: nowrap;
}
@media (max-width: 760px) {
  .sv-doc {
    font-size: 19px;
  }
  .sv-aip .msgs,
  .sv-composer .in {
    font-size: 20px;
  }
  .sv-aip .hd,
  .sv-qt small {
    font-size: 16px;
  }
  .sv-qt {
    font-size: 16px;
  }
  .sv-ub {
    width: auto;
    left: 26px;
  }
  .sv-ans .who,
  .sv-cite {
    font-size: 15px;
  }
}

/* Shared heading weight, equivalent to font-bold. */
h1, h2, h3 {
  font-weight: 700;
}

/* Incoming #fragment on the home page: stay hidden until story.js has jumped there
   (the 2s animation is a fallback in case scripts never run). */
html[data-anchor] body {
  visibility: hidden;
  animation: anchor-reveal 0s 2s forwards;
}
@keyframes anchor-reveal {
  to {
    visibility: visible;
  }
}
