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

:root,
[data-vk-theme="dark"],
:root:not([data-vk-theme="light"]) {
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --pot-primary: #d946ef;
  --pot-primary-bright: #e879f9;
  --pot-primary-deep: #a21caf;
  --page-bg: #0a0c10;
  --text: #e8e8ec;
  --text-muted: #9aa0ae;
  --text-dim: #7f8696;
  --surface: #12151c;
  --surface-raised: #171b24;
  --surface-border: #252a36;
  --surface-divider: #1e232d;

  --vk-color-primary: #d946ef;
  --vk-color-primary-hover: #e879f9;
  --vk-color-primary-active: #a21caf;
  --vk-color-primary-light: #5c1b63;
  --vk-color-primary-subtle: #240b28;
  --vk-color-on-primary: #20051f;
  --vk-color-accent: #a21caf;
  --vk-gradient-brand-end: var(--pot-primary-deep);
  --vk-font-display: var(--font-display);
  --vk-navbar-max-width: 72rem;

  color-scheme: dark;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--vk-font-family, ui-sans-serif, system-ui, sans-serif);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--page-bg);
  background-image:
    radial-gradient(ellipse 70% 34% at 48% -6%, color-mix(in srgb, var(--pot-primary) 15%, transparent), transparent 70%);
}

::selection {
  background: color-mix(in srgb, var(--pot-primary) 35%, transparent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--pot-primary-bright);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, var(--pot-primary) 45%, transparent);
  text-underline-offset: 0.18em;
}

.start-body a:hover,
.docs-body a:hover {
  color: var(--pot-primary-bright);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0;
  z-index: 100;
  padding: 0.55rem 0.9rem;
  background: var(--pot-primary);
  color: var(--vk-color-on-primary);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 0.55rem 0.55rem;
  transform: translateY(-130%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page {
  width: min(72rem, calc(100vw - 3rem));
  margin: 0 auto;
  padding: 0 0 4rem;
}

.brand-slot {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-slot svg {
  width: 2rem;
  height: 2rem;
  display: block;
}

.nav-link {
  padding: 0.35rem 0.65rem;
  border-radius: 0.45rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.2;
  text-decoration: none;
  transition:
    color 0.16s ease,
    background 0.16s ease;
}

.nav-link:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--pot-primary) 8%, transparent);
}

.nav-link[aria-current="page"] {
  color: var(--pot-primary-bright);
  background: color-mix(in srgb, var(--pot-primary) 12%, transparent);
}

.nav-link:focus-visible {
  outline-offset: 1px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(22rem, 0.88fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero h1 {
  margin: 0 0 1.35rem;
  max-width: 14ch;
  font-family: var(--font-display);
  font-size: clamp(2.55rem, 5.2vw, 4.7rem);
  font-weight: 760;
  line-height: 0.99;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lede {
  max-width: 56ch;
  margin: 0 0 1.6rem;
  color: var(--text-muted);
  font-size: clamp(1.02rem, 1.4vw, 1.16rem);
  line-height: 1.62;
}

.hero .lede {
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.55;
}

.lede strong {
  color: var(--text);
  font-weight: 600;
}

.copy-wrap {
  position: relative;
}

.copy-wrap .copy-btn {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 1;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--surface-border);
  border-radius: 0.45rem;
  background: var(--surface-raised);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.copy-wrap .copy-btn:hover,
.copy-wrap .copy-btn:focus-visible {
  color: var(--text);
  border-color: color-mix(in srgb, var(--pot-primary) 42%, var(--surface-border));
}

.copy-wrap pre[data-copy] {
  padding-right: 4.6rem;
}

.install-cmd {
  display: block;
  margin: 0 0 1.4rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--surface-border);
  border-radius: 0.75rem;
  background: var(--surface);
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
  line-height: 1.55;
  overflow-wrap: break-word;
  word-break: normal;
  white-space: pre-wrap;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.vk-btn {
  text-decoration: none;
  font-weight: 700;
}

.vk-btn:hover,
.vk-btn:focus-visible {
  color: var(--vk-color-on-primary);
}

/* Thread board */

.board {
  position: relative;
  padding: 1rem;
  border: 1px solid var(--surface-border);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--pot-primary) 4%, transparent), transparent 36%),
    var(--surface);
}

.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.1rem 0.2rem 0.75rem;
  color: var(--text-dim);
  font-size: 0.76rem;
}

.board-file {
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.board-manifest {
  display: grid;
  gap: 0.42rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid var(--surface-border);
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--page-bg) 65%, var(--surface));
}

.manifest-row {
  display: grid;
  grid-template-columns: 4.4rem 1fr;
  align-items: baseline;
  gap: 0.7rem;
  font-size: 0.78rem;
}

.manifest-row > span {
  color: var(--text-dim);
}

.manifest-row code,
.repo code,
.thread-branch {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.manifest-row code {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.board-threads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.65rem;
}

.thread {
  appearance: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--surface-border);
  border-radius: 0.7rem;
  background: color-mix(in srgb, var(--page-bg) 45%, var(--surface));
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.thread:hover {
  border-color: color-mix(in srgb, var(--pot-primary) 38%, var(--surface-border));
}

.thread.is-active {
  border-color: color-mix(in srgb, var(--pot-primary) 72%, var(--surface-border));
  background: color-mix(in srgb, var(--pot-primary) 10%, var(--surface));
}

.thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.thread-name {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.thread-state {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  color: var(--text-dim);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.thread-state::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--text-dim);
}

.thread.is-active .thread-state {
  color: var(--pot-primary-bright);
}

.thread.is-active .thread-state::before {
  background: var(--pot-primary-bright);
}

.thread-branch {
  color: var(--text-dim);
  font-size: 0.7rem;
}

.repo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--surface-divider);
  color: var(--text-muted);
  font-size: 0.76rem;
}

.repo .port {
  color: var(--text-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
}

.thread.is-active .repo .port {
  color: var(--pot-primary-bright);
}

.thread-project .project-path {
  max-width: 11rem;
  overflow: hidden;
  color: var(--text-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread.is-active .thread-project .project-path {
  color: var(--pot-primary-bright);
}

.repo .build {
  color: var(--text-dim);
  font-size: 0.7rem;
}

.board-note {
  margin: 0.8rem 0 0;
  padding: 0 0.2rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.5;
}

/* Sections */

.section {
  padding-top: 5.5rem;
  padding-bottom: 5.5rem;
  border-top: 1px solid var(--surface-divider);
}

@media (max-width: 1257px) {
  .section {
    padding-top: 7vw;
    padding-bottom: 7vw;
  }
}

@media (max-width: 731px) {
  .section {
    padding-top: 3.2rem;
    padding-bottom: 3.2rem;
  }
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section h2 {
  margin: 0;
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.1vw, 2.8rem);
  font-weight: 720;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.section-intro p {
  margin: 0;
  max-width: 52ch;
  color: var(--text-muted);
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.55;
}

.value-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 3rem;
}

.value {
  padding: 1.5rem 0;
  border-top: 1px solid var(--surface-divider);
}

.value h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.value p {
  margin: 0;
  max-width: 46ch;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.demo-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.demo-copy p {
  margin: 1rem 0 1.2rem;
  max-width: 48ch;
  color: var(--text-muted);
}

.demo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  font-size: 0.86rem;
}

.demo-links a {
  color: var(--text-muted);
}

.demo-links a:hover {
  color: var(--pot-primary-bright);
}

.terminal {
  border: 1px solid var(--surface-border);
  border-radius: 0.8rem;
  background: color-mix(in srgb, var(--page-bg) 70%, var(--surface));
  overflow: hidden;
}

.terminal-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--surface-divider);
  color: var(--text-dim);
  font-size: 0.7rem;
}

.terminal-dots {
  display: inline-flex;
  gap: 0.3rem;
}

.terminal-dots span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--surface-border);
}

.terminal pre {
  margin: 0;
  padding: 0.9rem 1rem 1rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.7;
}

.terminal .prompt {
  color: var(--pot-primary-bright);
}

.terminal .terminal-note {
  color: var(--text-dim);
}

.agent-section {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.agent-copy p {
  margin: 1rem 0 0;
  max-width: 50ch;
  color: var(--text-muted);
}

.agent-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--surface-divider);
}

.agent-list li {
  display: flex;
  gap: 0.75rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--surface-divider);
  color: var(--text-muted);
  font-size: 0.92rem;
}

.agent-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.55rem;
  border-radius: 50%;
  background: var(--pot-primary);
}

.close {
  padding-top: 5rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--surface-divider);
}

@media (max-width: 1333px) {
  .close {
    padding-top: 6vw;
  }
}

@media (max-width: 1200px) {
  .close {
    padding-bottom: 4vw;
  }
}

@media (max-width: 800px) {
  .close {
    padding-top: 3rem;
    padding-bottom: 2rem;
  }
}

.brand-word {
  color: var(--pot-primary-bright);
}

.close h2 {
  margin: 0 0 1rem;
  max-width: 20ch;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  font-weight: 720;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.close p {
  margin: 0 0 1.4rem;
  max-width: 56ch;
  color: var(--text-muted);
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.55;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--surface-divider);
  color: var(--text-dim);
  font-size: 0.82rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-brand a:hover {
  color: var(--pot-primary-bright);
}

.footer-ai {
  display: inline-flex;
  line-height: 0;
  opacity: 0.72;
}

.footer-ai:hover {
  opacity: 1;
}

.footer-ai img {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--pot-primary-bright);
}

/* Start and docs */

.start-page,
.docs-page {
  padding-top: clamp(2.5rem, 5vw, 4rem);
}

.start-body {
  max-width: 70ch;
}

.start-body h1,
.docs-head h1 {
  margin: 0 0 0.8rem;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  font-weight: 740;
  line-height: 1.03;
  letter-spacing: -0.03em;
}

.start-body .lede {
  margin-bottom: 2rem;
}

.docs-head .lede {
  margin-bottom: 0;
}

.start-body h2,
.docs-body h2 {
  margin: 2.8rem 0 0.9rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--surface-divider);
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  font-weight: 680;
  line-height: 1.1;
  letter-spacing: -0.02em;
  scroll-margin-top: 5rem;
}

.start-body h3,
.docs-body h3 {
  margin: 1.8rem 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 650;
  scroll-margin-top: 5rem;
}

.start-body p,
.docs-body p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.start-body li,
.docs-body li {
  margin-bottom: 0.45rem;
  color: var(--text-muted);
}

.start-body code,
.docs-body code {
  padding: 0.12rem 0.32rem;
  border: 1px solid var(--surface-divider);
  border-radius: 0.3rem;
  background: var(--surface);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
}

.start-body pre,
.docs-body pre {
  max-width: 100%;
  margin: 0 0 1.15rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--surface-border);
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--page-bg) 70%, var(--surface));
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
  overflow-x: auto;
  white-space: pre-wrap;
}

.start-body table.status-sample {
  width: 100%;
  margin: 0 0 1rem;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.start-body table.status-sample th,
.start-body table.status-sample td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--surface-divider);
  text-align: left;
}

.start-body table.status-sample th {
  color: var(--text);
  font-weight: 650;
}

.start-body table.status-sample td {
  color: var(--text-muted);
}

.start-body pre code,
.docs-body pre code {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: inherit;
}

.start-body .step {
  padding: 1.4rem 0;
  border-top: 1px solid var(--surface-divider);
}

.start-body .step:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.step h3 {
  margin-top: 0;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.55rem;
  border: 1px solid color-mix(in srgb, var(--pot-primary) 45%, var(--surface-border));
  border-radius: 50%;
  color: var(--pot-primary-bright);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  vertical-align: 0.08em;
}

.docs-head {
  max-width: 74ch;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.docs-layout {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.docs-toc {
  position: sticky;
  top: 5.2rem;
  align-self: start;
  min-width: 0;
}

.docs-toc > summary {
  display: none;
}

.side-nav {
  position: static;
  display: grid;
  gap: 1.4rem;
  padding-bottom: 2rem;
}

.side-nav-group {
  display: grid;
  gap: 0.25rem;
}

.side-nav-label {
  margin: 0 0 0.35rem;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.side-nav a {
  padding: 0.18rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.side-nav a:hover {
  color: var(--pot-primary-bright);
}

.side-nav a.is-active {
  margin-left: -0.4rem;
  padding-left: 0.4rem;
  border-radius: 0.35rem;
  background: color-mix(in srgb, var(--pot-primary) 12%, transparent);
  color: var(--pot-primary-bright);
  font-weight: 650;
}

.docs-body {
  min-width: 0;
  max-width: 74ch;
}

.qa-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin: 0 0 1rem;
}

.qa-search {
  flex: 1 1 18rem;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--surface-border);
  border-radius: 0.55rem;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}

.qa-search::placeholder {
  color: var(--text-dim);
}

.qa-search:focus-visible {
  border-color: var(--pot-primary);
}

.qa-count {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.78rem;
}

.qa-list {
  border-top: 1px solid var(--surface-divider);
}

.qa {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--surface-divider);
}

.qa summary {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  list-style: none;
  cursor: pointer;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
}

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

.qa summary::before {
  content: "";
  flex: 0 0 auto;
  width: 0.42rem;
  height: 0.42rem;
  margin-top: 0.48rem;
  border-right: 1px solid var(--pot-primary-bright);
  border-bottom: 1px solid var(--pot-primary-bright);
  transform: rotate(-45deg);
  transition: transform 0.16s ease;
}

.qa[open] summary::before {
  transform: rotate(45deg);
}

.qa-q {
  min-width: 0;
}

.qa p {
  margin: 0.6rem 0 0 1.05rem;
  max-width: 68ch;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.qa-empty {
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

mark.qa-hit {
  padding: 0 0.05rem;
  border-radius: 0.15rem;
  background: color-mix(in srgb, var(--pot-primary) 32%, transparent);
  color: var(--text);
}

.docs-body table {
  display: block;
  width: 100%;
  margin: 0 0 1.25rem;
  border-collapse: collapse;
  font-size: 0.86rem;
  overflow-x: auto;
}

.docs-body th,
.docs-body td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--surface-divider);
  text-align: left;
  vertical-align: top;
}

.docs-body th {
  color: var(--text);
  font-weight: 650;
}

.docs-body td {
  color: var(--text-muted);
}

.docs-body td code {
  white-space: nowrap;
}

.note {
  padding: 0.8rem 1rem;
  border: 1px solid color-mix(in srgb, var(--pot-primary) 30%, var(--surface-border));
  border-radius: 0.6rem;
  background: color-mix(in srgb, var(--pot-primary) 7%, var(--surface));
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.4rem;
    padding-top: 3rem;
  }

  .hero h1 {
    max-width: 16ch;
  }

  .board {
    max-width: 38rem;
  }

  .section-intro,
  .demo-section,
  .agent-section {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }

  .value-list {
    grid-template-columns: 1fr;
  }

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-body {
    max-width: none;
  }

  .docs-toc {
    position: static;
    border-bottom: 1px solid var(--surface-divider);
  }

  .docs-toc > summary {
    display: block;
    padding: 0.35rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 650;
    cursor: pointer;
    list-style: none;
  }

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

  .docs-toc > summary::after {
    content: "";
    display: inline-block;
    width: 0.4rem;
    height: 0.4rem;
    margin-left: 0.45rem;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg) translateY(-0.1rem);
  }

  .docs-toc[open] > summary::after {
    transform: rotate(-135deg) translateY(-0.1rem);
  }

  .docs-toc[open] > summary {
    margin-bottom: 0.75rem;
  }

  .side-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1.4rem;
    padding-bottom: 1rem;
  }

  .docs-body > h2:first-child {
    margin-top: 1.6rem;
  }

  .side-nav-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.75rem;
  }

  .side-nav-label {
    width: 100%;
    margin-bottom: 0.1rem;
  }
}

@media (max-width: 560px) {
  .page {
    width: min(100% - 2rem, 72rem);
  }

  .board-threads {
    grid-template-columns: 1fr;
  }

  .manifest-row {
    grid-template-columns: 3.9rem 1fr;
  }

  .install-cmd {
    font-size: 0.74rem;
  }

  .copy-wrap pre[data-copy] {
    padding-right: 3.4rem;
  }

  .copy-wrap .copy-btn {
    top: 0.4rem;
    right: 0.4rem;
    padding: 0.2rem 0.4rem;
    font-size: 0.62rem;
  }

  .actions .vk-btn {
    width: 100%;
    justify-content: center;
  }
}

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