:root {
  --bg-app: #f6f5f1;
  --bg-paper: #ffffff;
  --bg-elevated: #faf9f6;
  --bg-muted: #eeece5;
  --bg-hover: #e6e3da;

  --text-primary: #23221e;
  --text-secondary: #5c594f;
  --text-muted: #8a867b;

  --accent: #2f5e4e;
  --accent-hover: #244a3d;
  --accent-soft: rgba(47, 94, 78, 0.1);
  --accent-text: #ffffff;
  --accent-ring: rgba(47, 94, 78, 0.25);

  --amber: #d99b16;
  --amber-soft: rgba(217, 155, 22, 0.14);
  --teal: #248a8c;
  --teal-soft: rgba(36, 138, 140, 0.13);
  --blue: #357fd6;
  --blue-soft: rgba(53, 127, 214, 0.12);
  --rose: #d14d63;
  --rose-soft: rgba(209, 77, 99, 0.12);
  --purple: #845ec9;
  --purple-soft: rgba(132, 94, 201, 0.12);

  --border-subtle: rgba(35, 34, 30, 0.09);
  --border-strong: rgba(35, 34, 30, 0.17);
  --shadow-paper: 0 2px 18px rgba(35, 34, 30, 0.04), 0 1px 3px rgba(35, 34, 30, 0.04);
  --shadow-float: 0 26px 70px rgba(31, 49, 42, 0.16), 0 6px 22px rgba(24, 23, 20, 0.07);
  --shadow-glow: 0 18px 80px rgba(47, 94, 78, 0.22);
  --topbar-bg: rgba(246, 245, 241, 0.84);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei UI", "PingFang SC", "Ubuntu", "Noto Sans CJK SC", "WenQuanYi Micro Hei", sans-serif;
  --font-serif: "Source Serif 4", "Noto Serif SC", "Noto Serif CJK SC", Georgia, "Songti SC", serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, "Ubuntu Mono", "DejaVu Sans Mono", monospace;
}

[data-theme='dark'] {
  --bg-app: #141413;
  --bg-paper: #1b1b19;
  --bg-elevated: #222220;
  --bg-muted: #282825;
  --bg-hover: #31312d;

  --text-primary: #e6e3da;
  --text-secondary: #b1ada2;
  --text-muted: #7c7970;

  --accent: #6ab097;
  --accent-hover: #7ec2aa;
  --accent-soft: rgba(106, 176, 151, 0.14);
  --accent-text: #111614;
  --accent-ring: rgba(106, 176, 151, 0.28);

  --amber: #e0ad36;
  --amber-soft: rgba(224, 173, 54, 0.15);
  --teal: #58b6b4;
  --teal-soft: rgba(88, 182, 180, 0.14);
  --blue: #75a9e6;
  --blue-soft: rgba(117, 169, 230, 0.13);
  --rose: #e37b8d;
  --rose-soft: rgba(227, 123, 141, 0.13);
  --purple: #aa91e2;
  --purple-soft: rgba(170, 145, 226, 0.13);

  --border-subtle: rgba(230, 227, 218, 0.09);
  --border-strong: rgba(230, 227, 218, 0.18);
  --shadow-paper: 0 4px 24px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.22);
  --shadow-float: 0 28px 74px rgba(0, 0, 0, 0.56), 0 5px 18px rgba(0, 0, 0, 0.34);
  --shadow-glow: 0 20px 90px rgba(106, 176, 151, 0.16);
  --topbar-bg: rgba(20, 20, 19, 0.82);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 82px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-app);
  transition: background-color 0.28s ease, color 0.28s ease;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
[role='button']:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}


/* Editorial top rail */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 64px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease, backdrop-filter 0.26s ease;
}

.topbar.is-scrolled,
.topbar.nav-open {
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 4px 20px rgba(24, 23, 20, 0.05);
}

.topbar-inner {
  width: 100%;
  max-width: 1320px;
  height: 64px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text-primary);
  font-size: 15.5px;
  font-weight: 780;
  letter-spacing: -0.015em;
}

.brand-link:hover {
  color: var(--accent);
}

.brand-link img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(24, 23, 20, 0.1);
}

.topbar-right,
.topbar-nav {
  display: flex;
  align-items: center;
}

.topbar-right {
  gap: 13px;
}

.topbar-nav {
  gap: 19px;
}

.topbar-nav a {
  position: relative;
  padding: 5px 0;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 680;
  transition: color 0.18s ease;
}

.topbar-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s ease;
}

.topbar-nav a:hover {
  color: var(--accent);
}

.topbar-nav a:hover::after {
  transform: scaleX(1);
}

.theme-icon-btn,
.mobile-nav-toggle {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-paper) 62%, transparent);
  color: var(--text-secondary);
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.theme-icon-btn:hover,
.mobile-nav-toggle:hover {
  color: var(--accent);
  border-color: var(--accent-ring);
  transform: translateY(-1px);
}

[data-theme='light'] .icon-sun,
[data-theme='dark'] .icon-moon {
  display: none;
}

.github-link {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--bg-paper) 52%, transparent);
  font-size: 12.5px;
  font-weight: 760;
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.github-link:hover {
  color: var(--accent);
  border-color: var(--accent-ring);
  transform: translateY(-1px);
}

.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-toggle span {
  width: 15px;
  height: 1.8px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.topbar.nav-open .mobile-nav-toggle span:nth-child(1) { transform: translateY(5.8px) rotate(45deg); }
.topbar.nav-open .mobile-nav-toggle span:nth-child(2) { opacity: 0; }
.topbar.nav-open .mobile-nav-toggle span:nth-child(3) { transform: translateY(-5.8px) rotate(-45deg); }

.mobile-nav-panel {
  display: none;
}

/* Asymmetric book-spread hero */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  background:
    radial-gradient(circle at 76% 10%, rgba(217, 155, 22, 0.1), transparent 30%),
    radial-gradient(circle at 22% 18%, var(--accent-soft), transparent 35%),
    radial-gradient(circle at 90% 78%, rgba(36, 138, 140, 0.08), transparent 30%),
    linear-gradient(var(--bg-app), var(--bg-app));
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--text-primary) 10%, transparent) 0.8px, transparent 0.8px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.38), rgba(0,0,0,0.2) 52%, transparent 90%);
  opacity: 0.46;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ambient-orb {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0.42;
  animation: drift 14s ease-in-out infinite alternate;
}

.orb-one {
  left: 4%;
  top: 18%;
  background: radial-gradient(circle, rgba(47, 94, 78, 0.18), transparent 66%);
}

.orb-two {
  right: 5%;
  top: 8%;
  background: radial-gradient(circle, rgba(217, 155, 22, 0.15), transparent 68%);
  animation-delay: -5s;
  animation-duration: 17s;
}

@keyframes drift {
  from { transform: translate3d(-16px, 8px, 0) scale(0.96); }
  to { transform: translate3d(18px, -18px, 0) scale(1.05); }
}

.hero-spread {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
  gap: 44px;
  align-items: center;
  align-content: center;
  min-height: calc(100vh - 64px);
  padding: 112px 0 76px;
}

.editorial-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.editorial-eyebrow::after {
  content: '';
  width: 54px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.hero-title {
  margin: 22px 0 20px;
  color: var(--text-primary);
  font-size: clamp(36px, 3.5vw, 50px);
  line-height: 1.16;
  letter-spacing: -0.025em;
  font-weight: 820;
  text-align: left;
}

.hero-title > span {
  display: block;
}

.hero-title > span:first-child {
  white-space: nowrap;
}

.hero-reel-line {
  display: block;
}

.word-reel {
  position: relative;
  display: inline-block;
  margin-left: 0.08em;
  color: var(--accent);
  transition: transform 0.28s ease, opacity 0.28s ease;
  will-change: transform, opacity;
}

.word-reel::after {
  content: '';
  position: absolute;
  left: 0.02em;
  right: 0.02em;
  bottom: 0.04em;
  z-index: -1;
  height: 0.28em;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(217,155,22,0.24), rgba(47,94,78,0.18));
  transform: skewX(-7deg);
}

.word-reel.is-leaving {
  opacity: 0;
  transform: translateY(-0.45em);
}

.word-reel.is-entering {
  opacity: 0;
  transform: translateY(0.45em);
}

.hero-subtitle {
  max-width: 550px;
  margin: 0 0 27px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.88;
  text-align: left;
}

.hero-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
  margin-bottom: 28px;
}

.btn-primary,
.btn-secondary {
  min-height: 41px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 780;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  color: var(--accent-text);
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  box-shadow: 0 12px 28px rgba(47, 94, 78, 0.2);
}

.btn-secondary {
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  background: color-mix(in srgb, var(--bg-paper) 78%, transparent);
  box-shadow: var(--shadow-paper);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
}

.btn-secondary:hover {
  color: var(--accent);
  border-color: var(--accent-ring);
}

.hero-github-text {
  margin-left: 4px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 730;
}

.hero-github-text:hover {
  color: var(--accent);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.hero-facts div {
  min-width: 0;
}

.hero-facts span,
.hero-facts strong {
  display: block;
}

.hero-facts span {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.hero-facts strong {
  margin-top: 3px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

/* Elevated stage with architectural numbered strip */
.showcase-stage {
  position: relative;
  min-width: 0;
}

.stage-glow {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 34px;
  height: 105px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(47, 94, 78, 0.21), transparent 68%);
  filter: blur(18px);
  pointer-events: none;
}

.app-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  background: var(--bg-paper);
  box-shadow: var(--shadow-float), var(--shadow-glow);
  transform-style: preserve-3d;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
  will-change: transform;
}

.app-chrome {
  height: 42px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(var(--bg-elevated), var(--bg-paper));
}

.traffic-dots {
  display: flex;
  align-items: center;
  gap: 7px;
  justify-self: start;
}

.traffic-dots span,
.demo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  opacity: 0.78;
}

.dot-red,
.demo-dot:nth-child(1) { background: #ff5f57; }
.dot-yellow,
.demo-dot:nth-child(2) { background: #febc2e; }
.dot-green,
.demo-dot:nth-child(3) { background: #28c840; }

.app-chrome-title {
  overflow: hidden;
  max-width: 520px;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-chrome-zoom {
  justify-self: end;
  color: var(--text-muted);
  font-size: 11px;
}

.stage-viewport {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2560 / 1354;
  background: var(--bg-muted);
  cursor: zoom-in;
}

.stage-viewport img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  object-position: top center;
  transition: opacity 0.24s ease, transform 0.45s ease;
}

.stage-viewport:hover img {
  transform: scale(1.004);
}

.stage-viewport.is-switching img {
  opacity: 0.24;
}

.scene-index {
  display: flex;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg-paper) 76%, transparent);
  box-shadow: var(--shadow-paper);
}

.stage-tab {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 7px 9px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 730;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease;
}

.stage-tab + .stage-tab {
  border-left: 1px solid var(--border-subtle);
}

.stage-tab::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.stage-tab span {
  margin-right: 6px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.stage-tab:hover,
.stage-tab.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.stage-tab.active::before {
  transform: scaleX(1);
}

/* Unified three-chapter workbench */
.workbench-section,
.capabilities-section,
.download-section {
  position: relative;
  padding: 96px 0;
}

.workbench-head,
.folio-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.workbench-head h2,
.folio-head h2,
.sheet-head h2,
.oss-ledger h2 {
  margin: 15px 0 0;
  font-size: clamp(30px, 3.8vw, 48px);
  line-height: 1.14;
  letter-spacing: -0.04em;
  font-weight: 810;
}

.workbench-tabs {
  display: flex;
  border: 1px solid var(--border-subtle);
  border-radius: 13px;
  overflow: hidden;
  background: var(--bg-paper);
  box-shadow: var(--shadow-paper);
}

.workbench-tab {
  padding: 10px 14px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.workbench-tab + .workbench-tab {
  border-left: 1px solid var(--border-subtle);
}

.workbench-tab span {
  margin-right: 6px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.workbench-tab.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.workbench-spread {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  background: var(--bg-paper);
  box-shadow: var(--shadow-float);
}

.workbench-narrative {
  position: relative;
  min-height: 520px;
  padding: clamp(26px, 4vw, 42px);
  border-right: 1px solid var(--border-subtle);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent-soft) 55%, transparent), transparent 48%),
    var(--bg-elevated);
}

.workbench-copy-pane {
  position: absolute;
  inset: clamp(26px, 4vw, 42px);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.workbench-copy-pane.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.chapter-numeral {
  display: block;
  color: color-mix(in srgb, var(--accent) 22%, transparent);
  font-family: var(--font-serif);
  font-size: 92px;
  line-height: 0.9;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.workbench-copy-pane h3 {
  margin: 20px 0 12px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.16;
  letter-spacing: -0.045em;
}

.workbench-copy-pane p {
  margin: 0 0 20px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.workbench-copy-pane ul {
  display: grid;
  gap: 9px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.workbench-copy-pane li {
  position: relative;
  padding: 10px 12px 10px 28px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-paper) 72%, transparent);
  color: var(--text-secondary);
  font-size: 12.5px;
}

.workbench-copy-pane li::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 17px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.next-chapter {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bg-paper);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.next-chapter:hover {
  border-color: var(--accent-ring);
}

.workbench-demo-pane {
  position: relative;
  min-width: 0;
  padding: clamp(18px, 3vw, 30px);
  background: var(--bg-paper);
}

.workbench-demo {
  display: none;
  height: 100%;
}

.workbench-demo.active {
  display: block;
  animation: demoIn 0.32s ease;
}

@keyframes demoIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.workbench-demo .demo-window {
  height: 100%;
  box-shadow: var(--shadow-paper);
}

.workbench-demo .paper-document,
.workbench-demo .reader-dock-demo {
  min-height: 456px;
}

/* Capabilities editorial folio */
.capabilities-section {
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--bg-muted) 28%, transparent) 22%, color-mix(in srgb, var(--bg-muted) 28%, transparent) 82%, transparent);
}

.folio-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.folio-links a,
.download-actions a,
.ledger-links a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.folio-links a:hover,
.download-actions a:hover,
.ledger-links a:hover {
  color: var(--accent-hover);
}

.folio-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.48fr);
  gap: 18px;
  align-items: stretch;
}

.folio-left,
.folio-right {
  min-width: 0;
}

.folio-left,
.folio-right,
.folio-right .provider-card {
  display: flex;
  flex-direction: column;
}

.folio-right {
  gap: 18px;
}

.folio-local-card {
  flex: 1;
  min-height: 100%;
  background:
    linear-gradient(160deg, rgba(217,155,22,0.06), transparent 42%),
    var(--bg-paper);
}

.folio-local-card .format-tiles {
  margin-top: 22px;
}

.local-checklist {
  display: grid;
  gap: 8px;
  margin: 22px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--border-subtle);
  list-style: none;
}

.local-checklist li {
  position: relative;
  padding-left: 19px;
  color: var(--text-secondary);
  font-size: 12.5px;
}

.local-checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 900;
}

.folio-bottom-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.vision-key {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.vision-key kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  box-shadow: 0 1px 0 var(--border-strong);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
}

.bento-card p {
  position: relative;
  z-index: 1;
  color: var(--text-secondary);
  line-height: 1.72;
}

/* Unified download sheet + open-source ledger */
.download-ledger-spread {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  gap: 22px;
  align-items: stretch;
}

.download-sheet,
.oss-ledger {
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  background:
    radial-gradient(circle at 10% 0%, rgba(217,155,22,0.07), transparent 38%),
    linear-gradient(145deg, var(--bg-paper), var(--bg-elevated));
  box-shadow: var(--shadow-float);
}

.download-sheet {
  padding: clamp(26px, 4vw, 42px);
}

.oss-ledger {
  padding: clamp(24px, 3.4vw, 36px);
}

.sheet-head p,
.oss-ledger > p {
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: 13.5px;
}

#downloadVersionTag {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 850;
}

.installer-list {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.installer-row {
  display: block;
  border: 1px solid var(--border-subtle);
  border-radius: 15px;
  background: color-mix(in srgb, var(--bg-paper) 84%, transparent);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

a.installer-row,
.installer-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
}

a.installer-row:hover,
.mac-card:hover {
  transform: translateY(-1px);
  border-color: var(--accent-ring);
  box-shadow: 0 10px 28px rgba(24,23,20,0.08);
}

.installer-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.installer-main strong {
  font-size: 15px;
}

.installer-main em {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-style: normal;
}

.recommend-badge {
  display: none;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 9.5px;
  font-weight: 850;
}

.installer-row.is-recommended {
  border-color: var(--accent-ring);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.installer-row.is-recommended .recommend-badge {
  display: inline-flex;
}

.installer-action {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.mac-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.mac-chevron {
  transition: transform 0.2s ease;
}

.mac-card.is-open .mac-chevron {
  transform: rotate(180deg);
}

.mac-arch-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.24s ease;
}

.mac-card.is-open .mac-arch-list {
  max-height: 104px;
}

.mac-arch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-height: 38px;
  margin: 0 10px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.mac-card.is-open .mac-arch-item {
  opacity: 1;
}

.mac-arch-item:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.mac-arch-tag {
  font-family: var(--font-mono);
  font-size: 10px;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid var(--border-subtle);
}

.ledger-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 25px;
  border-top: 1px solid var(--border-subtle);
  border-left: 1px solid var(--border-subtle);
}

.ledger-cell {
  min-height: 104px;
  padding: 18px 14px;
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.ledger-cell strong {
  display: block;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: clamp(25px, 3vw, 35px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.ledger-cell span {
  display: block;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 720;
}

.contributors-block {
  margin-top: 19px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.contributors-label {
  display: block;
  margin-bottom: 9px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 820;
}

.contributors-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.contrib-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px 4px 4px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bg-paper);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 720;
}

.contrib-pill:hover {
  color: var(--accent);
  border-color: var(--accent-ring);
}

.contrib-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-muted);
}

.ledger-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 16px;
}

/* Editorial colophon footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

.footer-colophon {
  padding-top: 28px;
}

.footer-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-row-main {
  justify-content: space-between;
  flex-wrap: wrap;
  padding-bottom: 20px;
}

.footer-tagline {
  margin-right: auto;
  color: var(--text-secondary);
  font-size: 12.5px;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a,
.footer-row-bottom a {
  color: var(--text-secondary);
  font-size: 12px;
}

.footer-links a:hover,
.footer-row-bottom a:hover {
  color: var(--accent);
}

.footer-row-bottom {
  justify-content: space-between;
  padding: 15px 0 19px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 12px;
}

/* Demo windows */
.demo-window {
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 21px;
  background: var(--bg-paper);
  box-shadow: var(--shadow-float);
}

.demo-window-bar {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 15px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

.demo-window-title {
  margin-left: 7px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.paper-demo-window {
  transform: rotate(0.2deg);
}

.paper-document {
  position: relative;
  min-height: 470px;
  padding: clamp(24px, 4vw, 42px);
  background:
    linear-gradient(90deg, transparent 0, transparent 34px, rgba(209, 77, 99, 0.08) 34px, transparent 35px),
    repeating-linear-gradient(to bottom, transparent 0, transparent 32px, rgba(35, 34, 30, 0.028) 32px, rgba(35, 34, 30, 0.028) 33px),
    var(--bg-paper);
}

.paper-kicker {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.paper-heading h3 {
  margin: 6px 0 22px;
  font-family: var(--font-serif);
  font-size: 25px;
  letter-spacing: -0.03em;
}

.paper-serif {
  max-width: 560px;
  margin: 0;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 2.05;
  color: color-mix(in srgb, var(--text-primary) 88%, var(--text-secondary));
}

.paper-highlight {
  position: relative;
  padding: 2px 4px;
  border-radius: 4px;
  color: inherit;
  white-space: nowrap;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.paper-highlight::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transform-origin: left center;
  animation: highlighterSweep 2.8s ease-in-out infinite;
  pointer-events: none;
}

.hl-amber { background: rgba(217, 155, 22, 0.25); box-shadow: inset 0 -0.45em rgba(217, 155, 22, 0.18); }
.hl-green { background: rgba(47, 94, 78, 0.2); box-shadow: inset 0 -0.45em rgba(47, 94, 78, 0.14); }
.hl-blue { background: rgba(53, 127, 214, 0.2); box-shadow: inset 0 -0.45em rgba(53, 127, 214, 0.14); }
.hl-rose { background: rgba(209, 77, 99, 0.19); box-shadow: inset 0 -0.45em rgba(209, 77, 99, 0.13); }
.hl-purple { background: rgba(132, 94, 201, 0.2); box-shadow: inset 0 -0.45em rgba(132, 94, 201, 0.14); }

@keyframes highlighterSweep {
  0%, 100% { transform: scaleX(0.96); opacity: 0.28; }
  50% { transform: scaleX(1.03); opacity: 0.55; }
}

.selection-popover-demo {
  width: min(420px, calc(100% - 18px));
  margin: 32px 0 0 clamp(18px, 8vw, 90px);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg-elevated) 92%, var(--bg-paper));
  box-shadow: 0 18px 46px rgba(24, 23, 20, 0.14);
}

.popover-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border-subtle);
}

.popover-tab {
  padding: 10px 4px;
  color: var(--text-secondary);
  font-size: 12px;
  transition: color 0.2s ease, background 0.2s ease;
}

.popover-tab b {
  color: var(--accent);
  font-weight: 800;
}

.popover-tab.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.popover-output {
  min-height: 92px;
  padding: 14px 15px;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.72;
}

.popover-output::after {
  content: '▍';
  margin-left: 2px;
  color: var(--accent);
  animation: caretBlink 1s step-end infinite;
}

.popover-color-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 15px 13px;
}

.color-dot {
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-radius: 50%;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.color-dot:hover,
.color-dot.active {
  transform: scale(1.12);
  border-color: var(--bg-paper);
  box-shadow: 0 0 0 2px currentColor;
}

.color-dot[data-highlight-color='amber'] { background: #d99b16; color: #d99b16; }
.color-dot[data-highlight-color='green'] { background: #2f5e4e; color: #2f5e4e; }
.color-dot[data-highlight-color='blue'] { background: #357fd6; color: #357fd6; }
.color-dot[data-highlight-color='rose'] { background: #d14d63; color: #d14d63; }
.color-dot[data-highlight-color='purple'] { background: #845ec9; color: #845ec9; }

/* Reader dock demo */
.dock-demo-window {
  transform: rotate(-0.2deg);
}

.reader-dock-demo {
  min-height: 470px;
  padding: 20px;
  background: var(--bg-elevated);
}

.dock-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.dock-tab {
  position: relative;
  padding: 9px 14px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.dock-tab::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  border-radius: 4px;
  background: transparent;
}

.dock-tab.active {
  color: var(--accent);
}

.dock-tab.active::after {
  background: var(--accent);
}

.dock-panel {
  display: none;
}

.dock-panel.active {
  display: block;
  animation: panelIn 0.24s ease;
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.calendar-head strong {
  font-size: 15px;
}

.calendar-head span {
  color: var(--text-muted);
  font-size: 11px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.calendar-weekdays {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 10px;
  text-align: center;
}

.calendar-day {
  position: relative;
  height: 39px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 12px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.calendar-day.has-reading {
  color: var(--text-primary);
  background: var(--bg-paper);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

.calendar-day.has-reading::after {
  content: '';
  position: absolute;
  bottom: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.calendar-day.has-reading:hover {
  transform: translateY(-1px);
  border-color: var(--accent-ring);
}

.calendar-day.active {
  color: var(--accent-text);
  background: var(--accent);
  border-color: var(--accent);
}

.calendar-day.active::after {
  background: currentColor;
}

.calendar-day.dim {
  opacity: 0.28;
}

.reading-day-card {
  margin-top: 15px;
  padding: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: var(--bg-paper);
}

.reading-day-card span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
}

.reading-day-card strong {
  display: block;
  margin: 3px 0 8px;
  color: var(--accent);
  font-size: 15px;
}

.reading-day-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.reading-day-card li {
  position: relative;
  padding-left: 14px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.9;
}

.reading-day-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
}

.outline-tree {
  padding: 9px;
  border: 1px solid var(--border-subtle);
  border-radius: 15px;
  background: var(--bg-paper);
}

.outline-node {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 39px;
  padding: 0 10px;
  color: var(--text-secondary);
  font-size: 12.5px;
  border-radius: 9px;
}

.outline-node span {
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  flex: 0 0 auto;
}

.outline-node::before {
  content: '';
  position: absolute;
  left: 17px;
  top: -7px;
  bottom: 50%;
  width: 1px;
  background: var(--border-strong);
}

.outline-node.root::before {
  display: none;
}

.outline-node.level-1 { margin-left: 18px; }
.outline-node.level-2 { margin-left: 42px; }

.outline-node.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 760;
}

/* Appearance/plugin studio */
.studio-demo-window {
  padding: 18px;
  transition: background 0.3s ease, color 0.3s ease;
  --studio-accent: #2f5e4e;
  --studio-bg: #fffdf7;
  --studio-text: #28261f;
  --studio-muted: #756f60;
  background: linear-gradient(145deg, color-mix(in srgb, var(--studio-bg) 88%, var(--bg-paper)), var(--studio-bg));
}

.studio-demo-window[data-tone='warm'] {
  --studio-bg: #f7ead7;
  --studio-text: #332b20;
  --studio-muted: #82715d;
}

.studio-demo-window[data-tone='ink'] {
  --studio-bg: #191a19;
  --studio-text: #e4e1d7;
  --studio-muted: #979389;
  background: linear-gradient(145deg, #20211f, var(--studio-bg));
}

.studio-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.tone-group,
.accent-group {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: color-mix(in srgb, var(--studio-bg) 70%, transparent);
}

.tone-pill {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--studio-muted);
  font-size: 11px;
  font-weight: 700;
}

.tone-pill.active {
  color: var(--studio-bg);
  background: var(--studio-accent);
}

.accent-swatch {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--swatch);
}

.accent-swatch.active {
  border-color: var(--studio-bg);
  box-shadow: 0 0 0 2px var(--swatch);
}

.studio-preview {
  min-height: 390px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--studio-text) 11%, transparent);
  border-radius: 17px;
  background: var(--studio-bg);
  color: var(--studio-text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 16px 38px rgba(24, 23, 20, 0.1);
  transition: background 0.3s ease, color 0.3s ease;
}

.studio-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.studio-preview-head strong {
  font-size: 16px;
}

.studio-preview-head a,
.studio-links a {
  color: var(--studio-accent);
  font-size: 12px;
  font-weight: 760;
}

.plugin-card-demo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 11px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--studio-text) 10%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--studio-bg) 86%, white 8%);
}

.studio-demo-window[data-tone='ink'] .plugin-card-demo {
  background: rgba(255,255,255,0.035);
}

.plugin-card-demo strong,
.plugin-card-demo span {
  display: block;
}

.plugin-card-demo strong {
  font-size: 13px;
}

.plugin-card-demo > div > span {
  margin: 2px 0 8px;
  color: var(--studio-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.permission-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.permission-row code {
  padding: 2px 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--studio-accent) 12%, transparent);
  color: var(--studio-accent);
  font-family: var(--font-mono);
  font-size: 10px;
}

.demo-switch {
  position: relative;
  width: 39px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: color-mix(in srgb, var(--studio-muted) 28%, transparent);
  transition: background 0.2s ease;
}

.demo-switch span {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}

.demo-switch.active {
  background: var(--studio-accent);
}

.demo-switch.active span {
  transform: translateX(17px);
}

.studio-links {
  display: flex;
  gap: 16px;
  margin-top: 15px;
}


/* Bento capabilities */
.section-heading {
  max-width: 680px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-heading h2 {
  margin-bottom: 12px;
}

.section-heading p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.82;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.bento-card {
  position: relative;
  overflow: hidden;
  min-height: 206px;
  padding: 24px;
  border: 1px solid var(--border-subtle);
  border-radius: 21px;
  background: var(--bg-paper);
  box-shadow: var(--shadow-paper);
}

.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 48%);
  transition: opacity 0.24s ease;
  pointer-events: none;
}

.bento-card:hover::before {
  opacity: 1;
}

.bento-wide {
  grid-column: span 4;
}

.bento-compact {
  grid-column: span 2;
}

.bento-card strong {
  position: relative;
  z-index: 1;
  font-size: 17px;
  margin-bottom: 8px;
}

.provider-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.provider-marquee-stack {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
}

.provider-track.is-reverse {
  animation-direction: reverse;
  animation-duration: 30s;
}

.bento-copy strong {
  display: block;
  margin-bottom: 6px;
}

.bento-copy span {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.65;
}

.provider-marquee {
  position: relative;
  z-index: 1;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 7%, black 93%, transparent);
}

.provider-track {
  display: flex;
  width: max-content;
  gap: 9px;
  animation: marquee 26s linear infinite;
}

.provider-marquee:hover .provider-track {
  animation-play-state: paused;
}

.provider-track span {
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

@keyframes marquee {
  to { transform: translateX(calc(-50% - 4.5px)); }
}

.format-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin: 20px 0 15px;
}

.format-tiles span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 850;
}

.format-tiles span:nth-child(2) { background: var(--amber-soft); color: var(--amber); }
.format-tiles span:nth-child(3) { background: var(--blue-soft); color: var(--blue); }
.format-tiles span:nth-child(4) { background: var(--rose-soft); color: var(--rose); }

.markdown-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.markdown-feature-list span,
.privacy-badges span {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
}

.privacy-card p {
  position: relative;
  z-index: 1;
  max-width: 740px;
  margin: 8px 0 20px;
  font-size: 13.5px;
}

.privacy-badges {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.capability-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 28px;
}

.capability-links a,
.download-actions a {
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 800;
}

.capability-links a:hover,
.download-actions a:hover {
  color: var(--accent-hover);
}


/* Lightbox */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(12, 12, 10, 0.78);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
  backdrop-filter: blur(8px);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: min(1180px, 96vw);
  max-height: 88vh;
  border-radius: 14px;
  box-shadow: 0 34px 100px rgba(0,0,0,0.5);
  transform: scale(0.94);
  transition: transform 0.24s ease;
}

.modal-backdrop.open .lightbox-img {
  transform: scale(1);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.68s ease, transform 0.68s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}



/* Responsive editorial layout */
@media (max-width: 1120px) {
  .hero-spread {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 30px;
  }

  .workbench-spread {
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  }
}

@media (max-width: 980px) {
  .hero {
    min-height: 0;
  }

  .hero-spread {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 108px;
  }

  .hero-copy {
    max-width: 680px;
  }

  .workbench-head,
  .folio-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .workbench-spread {
    grid-template-columns: 1fr;
  }

  .workbench-narrative {
    min-height: 430px;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .folio-grid,
  .download-ledger-spread {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .topbar-inner {
    padding: 0 16px;
  }

  .topbar-nav,
  .github-link {
    display: none;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  .mobile-nav-panel {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 69px;
    display: grid;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    background: var(--topbar-bg);
    box-shadow: var(--shadow-float);
    backdrop-filter: blur(16px);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
  }

  .topbar.nav-open .mobile-nav-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .mobile-nav-panel a {
    padding: 11px 12px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 720;
  }

  .mobile-nav-panel a:hover {
    color: var(--accent);
    background: var(--accent-soft);
  }
}

@media (max-width: 680px) {
  .container {
    padding: 0 16px;
  }

  .hero-spread {
    padding-top: 100px;
    padding-bottom: 58px;
  }

  .hero-title {
    font-size: clamp(31px, 8.7vw, 34px);
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .hero-facts {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .app-chrome {
    padding: 0 10px;
  }

  .app-chrome-title {
    max-width: 180px;
    font-size: 11px;
  }

  .app-chrome-zoom {
    display: none;
  }

  .scene-index {
    flex-wrap: wrap;
    border-radius: 15px;
  }

  .stage-tab {
    flex: 1 1 31%;
    padding: 9px 5px;
    font-size: 11.5px;
  }

  .stage-tab + .stage-tab {
    border-left: none;
  }

  .stage-tab:nth-child(n+2)::before {
    left: 0;
  }

  .workbench-section,
  .capabilities-section,
  .download-section {
    padding: 70px 0;
  }

  .workbench-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .workbench-tab {
    flex: 1 0 auto;
    padding: 9px 11px;
  }

  .workbench-spread {
    border-radius: 19px;
  }

  .workbench-narrative {
    min-height: 465px;
    padding: 24px 18px;
  }

  .workbench-copy-pane {
    inset: 24px 18px;
  }

  .chapter-numeral {
    font-size: 66px;
  }

  .workbench-demo-pane {
    padding: 13px;
  }

  .paper-document {
    min-height: 0;
    padding: 22px 15px;
  }

  .paper-serif {
    font-size: 14.5px;
  }

  .selection-popover-demo {
    width: 100%;
    margin-left: 0;
  }

  .reader-dock-demo {
    min-height: 0;
    padding: 13px;
  }

  .studio-demo-window {
    padding: 12px;
  }

  .studio-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .folio-bottom-split {
    grid-template-columns: 1fr;
  }

  a.installer-row,
  .installer-row-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .footer-row-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-tagline {
    margin-right: 0;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
