/* YOUJI — site v2
   White paper, one deep green signal, thin rules, real product shots. */

:root {
  --paper: #ffffff;
  --canvas: #ffffff;
  --paper-2: #f7f8f5;
  --paper-3: #eff2ed;
  --ink: #101410;
  --ink-2: #2c322b;
  --muted: #5d655b;
  --faint: #6f766c;
  --line: #e5e8e1;
  --line-strong: #ccd2c8;
  --accent: #0d6b4f;
  --accent-deep: #0a4f3a;
  --accent-soft: #edf5f1;
  --warn: #8a5a12;
  --warn-soft: #fbf4e7;
  --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC",
    "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "IBM Plex Mono", Menlo, Consolas, monospace;
  --shell: 1180px;
  --gutter: 40px;
  --radius: 4px;
  --head: 64px;
  --shadow-shot: 0 24px 64px -32px rgba(16, 20, 16, 0.28), 0 2px 8px rgba(16, 20, 16, 0.04);
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --canvas: #0f1412;
  --paper: #171d19;
  --paper-2: #131915;
  --paper-3: #1e2721;
  --ink: #e8eee9;
  --ink-2: #c4cec6;
  --muted: #95a097;
  --faint: #89958b;
  --line: #26322b;
  --line-strong: #3a4a3f;
  --accent: #58b894;
  --accent-deep: #7bcfad;
  --accent-soft: #16241d;
  --warn: #e3b56a;
  --warn-soft: #2a2418;
  --shadow-shot: 0 24px 64px -32px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.35);
}

:root[data-theme='dark'] .site-head {
  background: rgba(15, 20, 18, 0.92);
}

:root[data-theme='dark'] .btn-primary,
:root[data-theme='dark'] .site-nav a.btn-primary,
:root[data-theme='dark'] .mobile-menu a.btn-primary {
  color: #0f1412;
}

:root[data-theme='dark'] .btn-primary:hover,
:root[data-theme='dark'] .site-nav a.btn-primary:hover,
:root[data-theme='dark'] .mobile-menu a.btn-primary:hover {
  color: #0f1412;
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

:root[data-theme='dark'] .text-link,
:root[data-theme='dark'] .shot-open {
  border-bottom-color: rgba(88, 184, 148, 0.35);
}

:root[data-theme='dark'] .code-card pre,
:root[data-theme='dark'] .docs-body pre {
  background: #0b100d;
}

:root[data-theme='dark'] ::selection {
  background: var(--accent);
  color: #0f1412;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head) + 24px);
  -webkit-text-size-adjust: 100%;
}

html:has(.loop) {
  scroll-padding-top: 160px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
}

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

p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-wrap: balance;
}

ul,
ol,
dl,
dd,
dt {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: var(--accent);
  color: #fff;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
}

.skip:focus {
  left: 16px;
  top: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- type helpers ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.accent {
  color: var(--accent);
}

.lede {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
  max-width: 34em;
}

.small {
  font-size: 13px;
  line-height: 1.7;
  color: var(--faint);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

.btn-ghost {
  background: var(--paper);
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.btn[aria-disabled="true"] {
  background: var(--paper-3);
  border-color: var(--line);
  color: var(--faint);
  cursor: not-allowed;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid rgba(13, 107, 79, 0.28);
  padding-bottom: 1px;
}

.text-link:hover {
  border-bottom-color: var(--accent);
}

.br-mobile {
  display: none;
}

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid transparent;
  backdrop-filter: saturate(180%) blur(12px);
  transition: border-color 0.2s ease;
}

.site-head.is-scrolled {
  border-bottom-color: var(--line);
}

.head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--head);
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  line-height: 1;
}

.brand-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-en {
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: #0d6b4f;
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-cn {
  color: var(--faint);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

.site-nav a {
  position: relative;
  padding: 6px 0;
  font-size: 14px;
  color: var(--ink-2);
  transition: color 0.15s ease;
}

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

.site-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 500;
}

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -21px;
  height: 2px;
  background: var(--accent);
}

.head-cta {
  margin-left: 8px;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 0 auto;
  background: var(--ink);
  content: "";
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span {
  position: relative;
}

.nav-toggle span::before {
  position: absolute;
  top: -5px;
}

.nav-toggle span::after {
  position: absolute;
  top: 5px;
}

.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] span::before {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
  transform: translateY(-5px) rotate(-45deg);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  color: var(--accent);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

.theme-icon-sun {
  display: none;
}

:root[data-theme='dark'] .theme-icon-sun {
  display: block;
}

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

.site-nav a.btn-primary,
.mobile-menu a.btn-primary {
  padding: 0 14px;
  color: #fff;
}

.site-nav a.btn-primary:hover,
.mobile-menu a.btn-primary:hover {
  color: #fff;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  padding: 8px 0 20px;
}

.mobile-menu a {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.mobile-menu .btn {
  margin-top: 16px;
}

/* ---------- hero ---------- */

.hero {
  padding: 74px 0 68px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: 48px;
  align-items: center;
}

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

.hero h1 {
  margin: 22px 0 24px;
  font-size: clamp(40px, 4.6vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.hero h1 .dot-accent {
  color: var(--accent);
}

.hero .lede {
  max-width: 30em;
  font-size: 17px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-meta span + span::before {
  content: "";
  width: 3px;
  height: 3px;
  margin: 0 14px;
  border-radius: 50%;
  background: var(--line-strong);
}

.hero-meta svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.hero-visual {
  position: relative;
}

.shot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
  box-shadow: var(--shadow-shot);
}

.shot-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--faint);
}

.shot-bar b {
  color: var(--ink-2);
  font-weight: 500;
  white-space: nowrap;
}

.shot-bar .dots {
  display: inline-flex;
  gap: 5px;
  margin-right: 8px;
}

.shot-bar .dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
}

.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  cursor: zoom-in;
}

.shot-link {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper);
}

.shot .shot-img-dark {
  display: none;
}

:root[data-theme='dark'] .shot .shot-img-light {
  display: none;
}

:root[data-theme='dark'] .shot .shot-img-dark {
  display: block;
}

.shot-open {
  margin-left: 10px;
  color: var(--accent);
  border-bottom: 1px solid rgba(13, 107, 79, 0.28);
  white-space: nowrap;
}

.shot-open:hover {
  border-bottom-color: var(--accent);
}

.shot-link:focus-visible,
.shot-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(14px, 4vw, 44px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 10, 0.74);
  backdrop-filter: blur(5px);
}

:root[data-theme='dark'] .lightbox-backdrop {
  background: rgba(3, 6, 4, 0.84);
}

.lightbox-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: min(1160px, 94vw);
  max-height: 92vh;
  margin: 0;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 180ms ease, transform 180ms ease;
}

.lightbox.is-open .lightbox-panel {
  opacity: 1;
  transform: none;
}

.lightbox-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(92vh - 52px);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12.5px;
  line-height: 1.6;
  text-align: center;
}

.lightbox-caption:empty {
  display: none;
}

.lightbox-close {
  position: absolute;
  top: -16px;
  right: -16px;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(16, 20, 16, 0.88);
  color: #fff;
  cursor: pointer;
  transition: background 150ms ease;
}

.lightbox-close svg {
  width: 18px;
  height: 18px;
}

.lightbox-close:hover {
  background: rgba(16, 20, 16, 1);
}

.lightbox-close:focus-visible {
  outline: 2px solid #7bcfad;
  outline-offset: 2px;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .lightbox {
    padding: 12px;
  }

  .lightbox-close {
    top: 6px;
    right: 6px;
  }

  .lightbox-img {
    max-height: calc(90vh - 44px);
  }

  .lightbox-caption {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox-panel {
    transition: none;
  }
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.video-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: inherit;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.video-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 20px 44px -34px rgba(16, 20, 16, 0.45);
}

.video-card-wide {
  grid-column: 1 / -1;
  flex-direction: row;
}

.video-card-wide .video-thumb {
  flex: 1 1 64%;
}

.video-card-wide .video-meta {
  flex: 1 1 36%;
  justify-content: center;
  gap: 8px;
  padding: 26px 30px;
}

.video-card-wide .video-meta b {
  font-size: 19px;
}

.video-card-wide .video-meta small {
  font-size: 13.5px;
}

.video-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.video-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--paper-2);
}

.video-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.video-play svg {
  width: 54px;
  height: 54px;
  padding: 12px;
  border-radius: 50%;
  background: rgba(12, 16, 13, 0.72);
  color: #fff;
  backdrop-filter: blur(4px);
  transition: transform 180ms ease, background 180ms ease;
}

.video-card:hover .video-play svg {
  transform: scale(1.06);
  background: var(--accent);
}

.video-time {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(12, 16, 13, 0.74);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.video-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px 16px;
}

.video-meta b {
  color: var(--ink);
  font-size: 14px;
}

.video-meta small {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(14px, 4vw, 44px);
}

.video-modal[hidden] {
  display: none;
}

.video-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 10, 0.8);
  backdrop-filter: blur(5px);
}

:root[data-theme='dark'] .video-backdrop {
  background: rgba(3, 6, 4, 0.88);
}

.video-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(1160px, 94vw);
  margin: 0;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 180ms ease, transform 180ms ease;
}

.video-modal.is-open .video-panel {
  opacity: 1;
  transform: none;
}

.video-player {
  display: block;
  width: 100%;
  max-height: calc(92vh - 56px);
  border-radius: 10px;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.video-caption {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12.5px;
  line-height: 1.6;
  text-align: center;
}

.video-caption:empty {
  display: none;
}

@media (max-width: 820px) {
  .video-grid {
    grid-template-columns: 1fr;
  }

  .video-card-wide {
    flex-direction: column;
  }

  .video-card-wide .video-thumb {
    flex: none;
  }

  .video-card-wide .video-meta {
    padding: 14px 16px 16px;
  }

  .video-card-wide .video-meta b {
    font-size: 15px;
  }
}

@media (max-width: 640px) {
  .video-player {
    max-height: calc(88vh - 48px);
  }

  .video-caption {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .video-card,
  .video-play svg,
  .video-panel {
    transition: none;
  }
}

.shot figcaption {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
  background: var(--paper);
}

.hero-visual .shot figcaption {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.hero-visual .shot figcaption::before {
  content: "01";
  flex: none;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--accent);
  padding-top: 2px;
}

/* ---------- loop ---------- */

.loop {
  position: sticky;
  top: var(--head);
  z-index: 40;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.loop-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.loop-step {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 18px;
  border-left: 1px solid var(--line);
  transition: background 0.15s ease;
}

.loop-step:first-child {
  border-left: 0;
  padding-left: 0;
}

.loop-step:hover {
  background: var(--paper-2);
}

.loop-no {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
}

.loop-step b {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.loop-step small {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--faint);
}

/* ---------- sections ---------- */

.section {
  padding: 88px 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  margin-bottom: 48px;
}

.section-no {
  padding-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--faint);
  text-transform: uppercase;
}

.section-head h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  max-width: 16em;
}

.section-head .lede {
  margin-top: 14px;
  max-width: 40em;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.split.wide-left {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

.split.wide-right {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.split-top {
  align-items: start;
}

.stack > * + * {
  margin-top: 18px;
}

.stack-lg > * + * {
  margin-top: 26px;
}

/* ---------- lists ---------- */

.checks {
  display: grid;
  gap: 16px;
}

.checks li {
  position: relative;
  padding-left: 26px;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: var(--accent);
}

.checks b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 3px;
}

.checks p {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}

.checks.tight {
  gap: 12px;
}

.checks.tight b {
  font-size: 14px;
}

.checks p,
.note,
.lede,
.faq-answer,
.detail p,
.module p,
.metric p,
.trio-card p {
  text-wrap: pretty;
}

.note {
  padding: 14px 16px;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
}

.note.warn {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}

.code-inline {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-2);
  color: var(--ink);
}

/* ---------- connection chain ---------- */

.chain {
  display: grid;
  gap: 8px;
}

.chain-node {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.chain-node:hover {
  border-color: var(--line-strong);
  background: var(--paper-2);
}

.chain-node + .chain-node::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 66px;
  width: 1px;
  height: 9px;
  background: var(--line-strong);
}

.chain-key {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}

.chain-node b {
  grid-column: 2;
  font-size: 14px;
  font-weight: 600;
}

.chain-node p {
  grid-column: 2;
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
}

.chain-node > div {
  grid-row: 1 / span 2;
}

/* ---------- screenshot grid ---------- */

.shots {
  display: grid;
  gap: 24px;
}

.shots.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shots .shot figcaption b {
  color: var(--ink-2);
  font-weight: 500;
}

.shot-caption {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--faint);
}

/* ---------- permission ladder ---------- */

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

.perm {
  position: relative;
  padding: 26px 24px 24px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
}

.perm.is-active {
  border-top-color: var(--accent);
  background: var(--accent-soft);
}

.perm-no {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

.perm h3 {
  margin: 10px 0 8px;
  font-size: 18px;
}

.perm p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.perm .tags {
  margin-top: 16px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  background: var(--paper);
}

.tag.green {
  border-color: rgba(13, 107, 79, 0.28);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

/* ---------- code ---------- */

.code-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
}

.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
}

.code-card pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  background: var(--paper-2);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.85;
}

.code-card code {
  font-family: inherit;
}

.code-card .c-cmd {
  color: var(--ink);
}

.code-card .c-allow {
  color: var(--accent);
}

.code-card .c-ask {
  color: var(--warn);
}

.code-card .c-deny {
  color: #b23b2b;
}

.code-card .c-dim {
  color: var(--muted);
}

:root[data-theme='dark'] .code-card pre {
  background: #101410;
  color: #d9e3dc;
}

:root[data-theme='dark'] .code-card .c-cmd {
  color: #eef4ef;
}

:root[data-theme='dark'] .code-card .c-allow {
  color: #86d6b0;
}

:root[data-theme='dark'] .code-card .c-ask {
  color: #e6c37a;
}

:root[data-theme='dark'] .code-card .c-deny {
  color: #e79b8a;
}

:root[data-theme='dark'] .code-card .c-dim {
  color: #7d8a81;
}

/* ---------- event list ---------- */

.events {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
}

.event-row {
  display: grid;
  grid-template-columns: 52px 74px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.event-row:first-child {
  border-top: 0;
}

.event-row.is-ask {
  background: var(--warn-soft);
  box-shadow: inset 2px 0 0 var(--warn);
}

.event-seq {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
}

.event-time {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
}

.event-body b {
  font-weight: 500;
  color: var(--ink);
}

.event-body span {
  display: block;
  margin-top: 1px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 20px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  white-space: nowrap;
}

.pill.ok {
  border-color: rgba(13, 107, 79, 0.25);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.pill.ask {
  border-color: rgba(138, 90, 18, 0.28);
  background: var(--warn-soft);
  color: var(--warn);
}

/* ---------- matrix ---------- */

.matrix-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.matrix {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13.5px;
}

.matrix th,
.matrix td {
  padding: 15px 18px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line);
}

.matrix thead th {
  border-top: 0;
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.matrix td:first-child {
  width: 176px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.matrix td:last-child {
  color: var(--muted);
}

.matrix .tags {
  margin-top: 0;
}

/* ---------- metrics ---------- */

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric {
  padding: 26px 22px;
  border-left: 1px solid var(--line);
}

.metric:first-child {
  border-left: 0;
  padding-left: 0;
}

.metric strong {
  display: block;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--ink);
}

.metric strong small {
  font-size: 0.5em;
  font-weight: 500;
  color: var(--faint);
  letter-spacing: 0;
}

.metric .metric-label {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.metric p {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
}

/* ---------- module grid ---------- */

.modules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.module {
  padding: 24px;
  background: var(--paper);
}

.module-no {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
}

.module h3 {
  margin: 8px 0 6px;
  font-size: 15.5px;
}

.module p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.subsection {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.subsection > h3 {
  font-size: 20px;
}

.subsection > .lede {
  margin-top: 8px;
  font-size: 14.5px;
}

.subsection .shots {
  margin-top: 24px;
}

.mt-40 {
  margin-top: 40px;
}

.mt-24 {
  margin-top: 24px;
}

/* ---------- FAQ ---------- */

.faq {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary h3 {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.faq-item summary span {
  flex: none;
  position: relative;
  width: 18px;
  height: 18px;
  margin-top: 3px;
}

.faq-item summary span::before,
.faq-item summary span::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 2px;
  width: 14px;
  height: 1.5px;
  background: var(--ink-2);
  transition: transform 0.2s ease;
}

.faq-item summary span::after {
  transform: rotate(90deg);
}

.faq-item[open] summary span::after {
  transform: rotate(0deg);
}

.faq-answer {
  padding: 0 44px 24px 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 62em;
}

/* ---------- CTA / footer ---------- */

.cta-band {
  padding: 64px 0;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.cta-inner h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.cta-inner p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14.5px;
}

.cta-actions {
  display: flex;
  gap: 12px;
  flex: none;
}

.site-foot {
  padding: 56px 0 28px;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}

.foot-note {
  margin-top: 14px;
  max-width: 30em;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--faint);
}

.foot-col h3 {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.foot-col a {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-2);
}

.foot-col a:hover {
  color: var(--accent);
}

.foot-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--faint);
}

/* ---------- page hero ---------- */

.page-hero {
  padding: 62px 0 46px;
  border-bottom: 1px solid var(--line);
}

.page-hero .eyebrow {
  margin-bottom: 16px;
}

.page-hero h1 {
  max-width: 18em;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.12;
}

.page-hero .lede {
  margin-top: 16px;
  max-width: 42em;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

/* ---------- features layout ---------- */

.feature-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding: 48px var(--gutter) 88px;
}

.side-nav {
  position: sticky;
  top: calc(var(--head) + 28px);
}

.side-nav .mono {
  display: block;
  margin-bottom: 12px;
}

.side-nav a {
  display: block;
  padding: 8px 0 8px 14px;
  border-left: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.side-nav a:hover,
.side-nav a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
}

.feature-group {
  padding: 46px 0;
  border-top: 1px solid var(--line);
}

.feature-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.feature-group-head {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 28px;
}

.feature-group-no {
  padding-top: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.feature-group h2 {
  font-size: clamp(24px, 2.6vw, 32px);
}

.feature-group .lede {
  margin-top: 10px;
  font-size: 15px;
  max-width: 46em;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
  margin-top: 26px;
}

.detail {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.detail b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}

.detail p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.feature-shot {
  margin-top: 28px;
}

/* ---------- security ---------- */

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

.trio-card {
  position: relative;
  padding: 30px 26px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  background: var(--paper);
}

.trio-no {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.trio-card h3 {
  margin: 10px 0 10px;
  font-size: 19px;
}

.trio-card p {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}

.trio-card ul {
  margin-top: 16px;
  display: grid;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.trio-card li {
  padding-left: 14px;
  position: relative;
}

.trio-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  background: var(--accent);
}

.security-block {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.security-block:first-of-type {
  border-top: 0;
}

.security-block h2 {
  font-size: clamp(24px, 2.8vw, 34px);
}

.security-block .lede {
  margin-top: 10px;
  font-size: 15px;
}

/* ---------- download ---------- */

.dl-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.8fr);
  gap: 24px;
  align-items: start;
  padding: 36px 0 24px;
}

.dl-platforms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  padding: 36px 0 24px;
}

.dl-platforms .dl-card {
  display: flex;
  flex-direction: column;
}

.dl-platforms .dl-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.dl-sha {
  display: block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--faint);
  word-break: break-all;
}

@media (max-width: 980px) {
  .dl-platforms {
    grid-template-columns: minmax(0, 1fr);
  }
}

.dl-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.dl-card.primary {
  border-color: var(--line-strong);
  box-shadow: 0 18px 48px -36px rgba(16, 20, 16, 0.3);
}

.dl-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.dl-head h2 {
  font-size: 22px;
}

.dl-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.dl-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(138, 90, 18, 0.25);
  background: var(--warn-soft);
  color: var(--warn);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.dl-status.ok {
  border-color: rgba(13, 107, 79, 0.25);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.dl-specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 24px 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.dl-spec {
  padding: 14px 16px;
  background: var(--paper-2);
}

.dl-spec dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.dl-spec dd {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-2);
}

.dl-card .btn {
  width: 100%;
}

.dl-note {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--faint);
}

.dl-side {
  display: grid;
  gap: 16px;
}

.dl-mini {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
}

.dl-mini h3 {
  font-size: 15px;
}

.dl-mini p {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

.dl-mini .txt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}

.dl-mini .txt + .txt {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.dl-mini .txt span:last-child {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
}

.install {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.install h2 {
  font-size: clamp(24px, 2.8vw, 34px);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 28px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.step {
  padding: 24px;
  background: var(--paper);
}

.step-no {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-family: var(--mono);
  font-size: 10.5px;
}

.step h3 {
  margin: 12px 0 6px;
  font-size: 15px;
}

.step p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- docs ---------- */

.docs-shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 180px;
  gap: 48px;
  align-items: start;
  max-width: 1280px;
  padding: 40px var(--gutter) 88px;
}

.docs-side {
  position: sticky;
  top: calc(var(--head) + 24px);
  max-height: calc(100vh - var(--head) - 48px);
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
}

.docs-close {
  display: none;
}

.docs-side .mono {
  display: block;
  margin-bottom: 8px;
}

.docs-side details {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.docs-side summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.docs-side summary::-webkit-details-marker {
  display: none;
}

.docs-side summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}

.docs-side details[open] summary::after {
  content: "−";
}

.docs-side a {
  display: block;
  padding: 5px 0 5px 12px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

.docs-side a:hover,
.docs-side a.is-active {
  color: var(--accent);
}

.docs-toggle {
  display: none;
  width: 100%;
  margin-top: 20px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.docs-toggle::after {
  content: "＋";
  float: right;
  font-family: var(--mono);
  color: var(--faint);
}

.docs-toggle[aria-expanded="true"]::after {
  content: "−";
}

.docs-body {
  min-width: 0;
  max-width: 760px;
}

.docs-body h1 {
  font-size: clamp(32px, 4vw, 44px);
}

.docs-body .doc-lede {
  margin-top: 14px;
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--muted);
}

.docs-body section {
  padding-top: 40px;
}

.docs-body section:first-of-type {
  padding-top: 32px;
}

.docs-body h2 {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 24px;
}

.docs-body h3 {
  margin-top: 28px;
  font-size: 17px;
  letter-spacing: -0.015em;
}

.docs-body p {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-2);
}

.docs-body ul,
.docs-body ol {
  margin-top: 12px;
  display: grid;
  gap: 7px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-2);
}

.docs-body ul li {
  position: relative;
  padding-left: 18px;
}

.docs-body ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 5px;
  height: 5px;
  background: var(--accent);
}

.docs-body ol {
  counter-reset: item;
  list-style: none;
}

.docs-body ol li {
  counter-increment: item;
  position: relative;
  padding-left: 26px;
}

.docs-body ol li::before {
  content: counter(item) ".";
  position: absolute;
  left: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
}

.docs-body code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
}

.docs-body pre {
  margin: 16px 0 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  color: var(--ink-2);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.8;
}

.docs-body pre code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
}

.docs-table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  font-size: 13px;
}

.docs-table th,
.docs-table td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.docs-table th {
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
}

.docs-toc {
  position: sticky;
  top: calc(var(--head) + 24px);
}

.docs-toc .mono {
  display: block;
  margin-bottom: 10px;
}

.docs-toc a {
  display: block;
  padding: 5px 0 5px 12px;
  border-left: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.5;
  color: var(--faint);
}

.docs-toc a:hover,
.docs-toc a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
}

.docs-body .callout {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent-soft);
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-2);
}

.docs-body .callout.warn {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal {
  opacity: 0;
}

.reveal.in,
.js .reveal.in {
  opacity: 1;
  transform: none;
}

html:not(.js) .reveal {
  opacity: 1;
  transform: none;
}

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

  .reveal,
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  :root {
    --gutter: 28px;
  }

  .hero-grid {
    gap: 36px;
  }

  .section-head {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 28px;
  }

  .split,
  .split.wide-left,
  .split.wide-right {
    gap: 36px;
  }

  .split.wide-left,
  .split.wide-right {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .docs-shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .docs-toc {
    display: none;
  }

  .feature-layout {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 36px;
  }

  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric {
    border-top: 1px solid var(--line);
  }

  .metric:nth-child(-n + 3) {
    border-top: 0;
  }

  .metric:nth-child(3n + 1) {
    border-left: 0;
    padding-left: 0;
  }

  .modules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .site-nav,
  .head-cta {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .brand-cn {
    display: none;
  }

  .loop {
    position: static;
  }

  html:has(.loop) {
    scroll-padding-top: calc(var(--head) + 24px);
  }

  .hero {
    padding: 48px 0 44px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .hero-copy {
    max-width: none;
  }

  .hero h1 {
    font-size: clamp(36px, 9vw, 46px);
  }

  .hero-visual {
    max-width: 640px;
  }

  .loop-inner {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .loop-inner::-webkit-scrollbar {
    display: none;
  }

  .loop-step {
    flex: 0 0 auto;
    min-width: 160px;
    border-left: 1px solid var(--line);
    padding: 14px 16px;
  }

  .loop-step:first-child {
    padding-left: 16px;
  }

  .section {
    padding: 64px 0;
  }

  .section-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 32px;
  }

  .section-no {
    padding-top: 0;
  }

  .split,
  .split.wide-left,
  .split.wide-right {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .split.reverse-mobile > .shot-wrap,
  .split.reverse-mobile > figure {
    order: 2;
  }

  .shots.two {
    grid-template-columns: minmax(0, 1fr);
  }

  .perms {
    grid-template-columns: minmax(0, 1fr);
  }

  .trio {
    grid-template-columns: minmax(0, 1fr);
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }

  .foot-grid > div:first-child {
    grid-column: 1 / -1;
  }

  .feature-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .side-nav {
    position: static;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
  }

  .side-nav::-webkit-scrollbar {
    display: none;
  }

  .side-nav .mono,
  .side-nav .side-title {
    display: none;
  }

  .side-nav a {
    flex: 0 0 auto;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    font-size: 12px;
  }

  .side-nav a.is-active {
    border-color: var(--accent);
    background: var(--accent-soft);
  }

  .feature-group {
    padding: 34px 0;
  }

  .feature-group-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .feature-group-no {
    padding-top: 0;
  }

  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dl-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .docs-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-top: 28px;
  }

  .docs-side {
    position: static;
    display: none;
  }

  .docs-side.is-open {
    position: fixed;
    top: var(--head);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    display: block;
    max-height: none;
    overflow-y: auto;
    padding: 16px var(--gutter) 48px;
    background: var(--paper);
    border: 0;
    border-radius: 0;
  }

  .docs-close {
    display: block;
    margin: 0 0 10px auto;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper-2);
    font-size: 12px;
    cursor: pointer;
  }

  body.docs-drawer-open {
    overflow: hidden;
  }

  .docs-toggle {
    display: block;
  }

  .docs-body section {
    padding-top: 32px;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 20px;
  }

  .shot-context {
    display: none;
  }

  .shot-bar {
    gap: 8px;
  }

  .br-mobile {
    display: inline;
  }

  body {
    font-size: 15px;
  }

  .hero-meta {
    gap: 10px 0;
  }

  .hero-meta span + span::before {
    margin: 0 10px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .loop-step {
    min-width: 150px;
  }

  .section {
    padding: 52px 0;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric:nth-child(3n + 1) {
    border-left: 1px solid var(--line);
    padding-left: 22px;
  }

  .metric:nth-child(2n + 1) {
    border-left: 0;
    padding-left: 0;
  }

  .metric:nth-child(-n + 2) {
    border-top: 0;
  }

  .modules {
    grid-template-columns: minmax(0, 1fr);
  }

  .event-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px;
  }

  .event-time {
    display: none;
  }

  .event-body span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dl-specs {
    grid-template-columns: minmax(0, 1fr);
  }

  .dl-head {
    flex-direction: column;
    gap: 10px;
  }

  .foot-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .foot-bottom {
    flex-direction: column;
    gap: 8px;
  }

  .cta-actions {
    flex-wrap: wrap;
    width: 100%;
  }

  .cta-actions .btn {
    flex: 1 1 auto;
  }

  .faq-answer {
    padding-right: 0;
  }

  .chain-node {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }

  .chain-node + .chain-node::before {
    left: 52px;
  }

  .docs-body h2 {
    font-size: 21px;
  }

  .docs-table {
    display: block;
    overflow-x: auto;
  }
}
@media (max-width: 360px) {
  .hero h1 {
    font-size: 32px;
  }
}
/* ---------- changelog ---------- */

.log {
  border-top: 1px solid var(--line);
}

.log-entry {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 48px;
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
}

.log-side {
  position: sticky;
  top: calc(var(--head) + 24px);
  align-self: start;
}

.log-version {
  display: block;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.log-date {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.log-status {
  margin-top: 14px;
}

.log-body h2 {
  font-size: 24px;
}

.log-body > p {
  margin-top: 8px;
  max-width: 46em;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

.log-group {
  margin-top: 24px;
}

.log-group h3 {
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.log-group ul {
  display: grid;
  gap: 7px;
}

.log-group li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-2);
}

.log-group li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--accent);
}

.log-foot {
  padding-top: 28px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--faint);
}

@media (max-width: 900px) {
  .log-entry {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 32px 0;
  }

  .log-side {
    position: static;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px 14px;
  }

  .log-date {
    margin-top: 0;
  }

  .log-status {
    margin-top: 0;
  }

  .log-body h2 {
    font-size: 21px;
  }
}

.section--tight {
  padding-top: 56px;
}

@media (max-width: 900px) {
  .section--tight {
    padding-top: 40px;
  }
}
