*, *::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;
  --rig-primary: #84cc16;
  --rig-secondary: #4d7c0f;
  --page-bg: #0a0c10;
  --text: #e8e8ec;
  --text-muted: #8b92a0;
  --surface: #12151c;
  --surface-border: #252a36;
  --surface-divider: #1e232d;

  --vk-color-primary: #84cc16;
  --vk-color-primary-hover: #a3e635;
  --vk-color-primary-active: #65a30d;
  --vk-color-primary-light: color-mix(in srgb, #84cc16 35%, transparent);
  --vk-color-primary-subtle: color-mix(in srgb, #84cc16 12%, var(--surface));
  --vk-color-on-primary: #1a2e05;
  --vk-color-accent: #4d7c0f;
  --vk-gradient-brand-end: var(--rig-secondary);
  --vk-font-display: var(--font-display);
  --vk-navbar-max-width: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-vk-theme="light"]) {
    --vk-color-primary: #84cc16;
    --vk-color-primary-hover: #a3e635;
    --vk-color-primary-active: #65a30d;
    --vk-color-on-primary: #1a2e05;
    --vk-color-accent: #4d7c0f;
  }
}

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

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

.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);
  color: var(--text-muted);
  font-size: 0.72rem;
  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(--rig-primary) 40%, var(--surface-border));
}

.hero .copy-wrap {
  margin: 1.25rem 0 0;
}

.hero .copy-wrap .install-cmd {
  margin: 0;
}

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

.bom > a {
  text-decoration: none;
  color: inherit;
}

.bom > a:hover {
  border-color: color-mix(in srgb, var(--rig-primary) 40%, var(--surface-border));
}

.transcript {
  margin: 0 0 1.5rem;
  max-width: 44rem;
}

.transcript summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.transcript summary:hover {
  color: var(--text);
}

.transcript pre {
  margin-top: 0.75rem;
}

html {
  overflow-x: clip;
}

body {
  font-family: var(--vk-font-family, ui-sans-serif, system-ui, sans-serif);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--vk-color-text, var(--text));
  background:
    radial-gradient(ellipse 80% 45% at 50% -8%, color-mix(in srgb, var(--rig-primary) 18%, transparent), transparent 60%),
    var(--page-bg);
}

a {
  color: inherit;
}

code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
}

.page {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.75rem 5rem;
}

.brand-slot {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-slot svg {
  width: 2.1rem;
  height: 2.1rem;
  display: block;
  filter: drop-shadow(0 8px 18px color-mix(in srgb, var(--rig-primary) 35%, transparent));
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.35rem 0.55rem;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--text);
}

.nav-link[aria-current="page"] {
  color: var(--rig-primary);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
  padding: clamp(3rem, 8vw, 5.5rem) 0 3rem;
}

.eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rig-primary);
}

.hero h1,
.section h2,
.close h2,
.start-body h1,
.start-body h2,
.docs-body h1,
.docs-body h2 {
  font-family: var(--font-display);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.hero h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2rem, 4.2vw + 0.4rem, 3.4rem);
  font-weight: 800;
  max-width: 22ch;
}

.cmd-lede {
  margin: 0 0 2rem;
  display: grid;
  gap: 0.95rem;
}

.cmd-lede div {
  display: grid;
  grid-template-columns: 8.6rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: baseline;
}

.cmd-lede dt {
  margin: 0;
}

.cmd-lede dt code {
  font-size: 0.95rem;
  color: var(--text);
}

.cmd-lede dd {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.lede {
  margin: 0 0 2.15rem;
  max-width: 40rem;
  font-size: 1.15rem;
  color: var(--text-muted);
}

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

.install-cmd,
.share-cmd,
.pty pre,
.start-body pre,
.docs-body pre,
.works pre {
  scrollbar-width: thin;
  scrollbar-color: #3a4150 transparent;
}

.install-cmd {
  margin: 1.25rem 0 0;
  padding: 0.95rem 1.15rem;
  background: #0e1016;
  border: 1px solid var(--surface-border);
  border-radius: 0.9rem;
  overflow-x: auto;
  color: #c4cad4;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}

.pty {
  border: 1px solid color-mix(in srgb, var(--rig-primary) 28%, var(--surface-border));
  border-radius: 1.1rem;
  background: #0e1016;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--rig-primary) 8%, transparent) inset,
    0 28px 60px rgb(0 0 0 / 28%);
  overflow: hidden;
}

.pty-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--surface-divider);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rig-primary);
}

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

.pty-dots span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text-muted) 55%, transparent);
}

.pty pre {
  margin: 0;
  padding: 1.1rem 1.15rem 1.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #c4cad4;
  white-space: pre-wrap;
}

.pty pre.pty-rec {
  font-size: 0.7rem;
  line-height: 1.42;
  height: calc(1.1rem + 1.25rem + 26lh);
  overflow: hidden;
}

.pty .cast {
  padding: 0.85rem 1rem 1rem;
  caret-color: transparent;
  overflow: hidden;
}

.pty .cast .ap-wrapper {
  width: 100%;
  height: auto;
  max-width: 100%;
  justify-content: flex-start;
}

.pty .cast,
.pty .cast .ap-wrapper,
.pty .cast .ap-player,
.pty .cast .ap-term,
.pty .cast .ap-terminal {
  background: #0e1016;
  background-color: #0e1016;
}

.pty .cast .ap-player {
  border-radius: 0;
}

.pty .cast .ap-term {
  border-width: 0;
  border-color: #0e1016;
}

.pty .cast .ap-control-bar,
.pty .cast .ap-overlay-start {
  display: none;
}

.pty-guide {
  margin: 0 0 1.5rem;
  max-width: 44rem;
  box-shadow: none;
}

/* Vars must live on .ap-player. The player sets its own --term-color-* there,
   which otherwise wins over a theme class on the wrapper and paints #000. */
.pty .cast .ap-player,
.asciinema-player-theme-rig,
.asciinema-player-theme-rig .ap-player {
  --term-color-foreground: #c4cad4;
  --term-color-background: #0e1016;
  --term-color-0: #0e1016;
  --term-color-1: #f87171;
  --term-color-2: #84cc16;
  --term-color-3: #facc15;
  --term-color-4: #60a5fa;
  --term-color-5: #c084fc;
  --term-color-6: #22d3ee;
  --term-color-7: #c4cad4;
  --term-color-8: #5c6478;
  --term-color-9: #fca5a5;
  --term-color-10: #a3e635;
  --term-color-11: #fde047;
  --term-color-12: #93c5fd;
  --term-color-13: #d8b4fe;
  --term-color-14: #67e8f9;
  --term-color-15: #e8e8ec;
}

.pty .tui {
  display: block;
  white-space: pre;
}

.pty .prompt { color: var(--rig-primary); }
.pty .ok { color: #a3e635; }
.pty .dim { color: #5c6478; }
.pty .spin { color: var(--rig-primary); }

.pty .caret {
  display: inline-block;
  width: 0.55ch;
  height: 1.05em;
  margin-left: 0.05ch;
  background: var(--rig-primary);
  vertical-align: -0.18em;
  animation: pty-caret 1.05s step-end infinite;
}

@keyframes pty-caret {
  50% { background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .pty .caret { animation: none; }
}

.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--rig-primary);
}

.icon-tile svg {
  width: 24px;
  height: 24px;
}

.bom .icon-tile {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.85rem;
}

.bom .icon-tile svg {
  width: 28px;
  height: 28px;
}

.facts,
.share {
  display: grid;
  gap: 1.2rem;
  margin-top: 0;
}

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

.share {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 2.75rem;
}

.repo-stats {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 1.25rem;
  border-top: 1px solid var(--surface-border);
  border-bottom: 1px solid var(--surface-border);
  background: color-mix(in srgb, var(--surface) 92%, var(--page-bg));
}

.repo-stats-inner {
  display: grid;
  grid-template-columns: minmax(10rem, 13.5rem) minmax(0, 1fr);
  gap: 2.25rem;
  align-items: center;
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.6rem 1.75rem;
}

.repo-stats-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.repo-stats-copy p {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
}

.repo-stats-copy a {
  color: var(--text-muted);
  text-decoration: none;
}

.repo-stats-copy a:hover {
  color: var(--rig-primary);
  text-decoration: underline;
}

.repo-stats-grid {
  display: grid;
  grid-template-columns: auto auto minmax(12.5rem, 1fr) minmax(12.5rem, 1fr);
  align-items: center;
  min-width: 0;
}

.stat-count,
.stat-profile {
  min-width: 0;
  padding: 0.15rem 1.6rem;
}

.stat-count:first-child {
  padding-left: 0;
}

.stat-count + .stat-count,
.stat-count + .stat-profile,
.stat-profile + .stat-profile {
  border-left: 1px solid var(--surface-divider);
}

.stat-number {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 3.4vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.95;
  color: var(--rig-primary);
}

.stat-label {
  margin: 0.55rem 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.stat-profile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.stat-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--surface-border);
  background: #0e1016;
  flex: none;
  transition: box-shadow 0.15s ease;
}

.stat-profile-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.stat-profile-name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--rig-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-profile-meta {
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--text-muted);
  white-space: nowrap;
}

.stat-profile:hover .stat-profile-name {
  text-decoration: underline;
}

.stat-profile:hover .stat-avatar {
  box-shadow: 0 0 0 2px var(--rig-primary);
}

.fact {
  padding: 1.45rem 1.5rem;
  border: 1px solid var(--surface-border);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  text-decoration: none;
  color: inherit;
}

a.fact:hover {
  border-color: color-mix(in srgb, var(--rig-primary) 40%, var(--surface-border));
}

.fact .icon-tile {
  margin-bottom: 0.9rem;
}

.fact p {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.fact .kicker {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--rig-primary);
}

.bom {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.2rem;
  box-sizing: border-box;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding-inline: max(1.5rem, calc((100vw - 90rem) / 2));
  margin-bottom: 2.75rem;
}

.bom article,
.bom > a,
.works article {
  padding: 1.45rem 1.5rem;
  border: 1px solid var(--surface-border);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.works article {
  display: flex;
  flex-direction: column;
}

.bom h3,
.works h3 {
  margin: 0.9rem 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.bom p,
.works p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.works p {
  margin-bottom: 1.1rem;
}

.share-example {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.35rem;
  margin-top: 1.25rem;
  align-items: start;
}

.share-example > div > .kicker {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--rig-primary);
}

.share-pull + .kicker {
  margin-top: 1.75rem;
}

.example-code {
  position: sticky;
  top: 4.75rem;
}

.share-cmd {
  margin: 0;
  padding: 1.2rem 1.25rem;
  background: #0e1016;
  border: 1px solid var(--surface-border);
  border-radius: 0.9rem;
  overflow-x: auto;
  color: #c4cad4;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  line-height: 1.5;
}

.share-cmd .cmt {
  color: #6b7380;
}

.share-cmd .str {
  color: var(--rig-primary);
}

.share-cmd .code-step {
  border-radius: 0.2rem;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.share-example.is-wired .share-cmd .code-step:not(.is-active) {
  opacity: 0.5;
}

.share-cmd .code-step.is-active {
  background: color-mix(in srgb, var(--rig-primary) 18%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--rig-primary) 42%, transparent);
  opacity: 1;
}

.share-pull {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.share-pull > li {
  padding: 0.8rem 1rem;
  border: 1px solid var(--surface-border);
  border-radius: 0.7rem;
  background: #0e1016;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.share-pull > li[data-step],
.share-pull-deps > li[data-step] {
  cursor: pointer;
}

.share-pull > li.is-active {
  border-color: color-mix(in srgb, var(--rig-primary) 50%, var(--surface-border));
  background: color-mix(in srgb, var(--rig-primary) 10%, #0e1016);
}

.share-pull > li:has(.share-pull-kind) {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
}

.share-pull-kind {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  padding: 0.1rem 0.7rem 0.1rem 0;
  border-right: 1px solid var(--surface-divider);
  text-align: center;
}

.share-pull-kind .icon-tile {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
}

.share-pull-kind .icon-tile svg {
  width: 15px;
  height: 15px;
}

.share-pull-kind > span:last-child {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #8b92a0;
  line-height: 1.15;
}

.share-pull > li.is-active .share-pull-kind > span:last-child {
  color: var(--rig-primary);
}

.share-pull > li.is-active .share-pull-kind .icon-tile {
  border-color: color-mix(in srgb, var(--rig-primary) 40%, var(--surface-border));
  background: color-mix(in srgb, var(--rig-primary) 12%, var(--surface));
}

.share-pull-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.share-pull-head code {
  color: var(--rig-primary);
  font-size: 0.85rem;
}

.share-pull-head span {
  color: #6b7380;
  font-size: 0.75rem;
}

.share-pull p {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.share-pull-deps {
  list-style: none;
  margin: 0.55rem 0 0.1rem;
  padding: 0.2rem 0 0 0.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.share-pull-deps li {
  padding: 0.2rem 0.35rem 0.25rem 0;
  border: 0;
  background: transparent;
}

.share-pull-deps .share-pull-head {
  justify-content: flex-start;
  gap: 0.4rem;
}

.share-pull-deps .dep-branch {
  flex: none;
  color: #6b7380;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
}

.share-pull-deps .share-pull-head code {
  font-size: 0.8rem;
  color: color-mix(in srgb, var(--rig-primary) 70%, #8b92a0);
}

.share-pull-deps p {
  margin: 0.1rem 0 0 1.35rem;
  font-size: 0.8rem;
}

.share-pull-deps li.is-active .dep-branch,
.share-pull-deps li.is-active .share-pull-head code {
  color: var(--rig-primary);
}

.share-pull-deps li.is-active p {
  color: var(--text);
}

.share a {
  color: var(--rig-primary);
  text-decoration: none;
}

.share a:hover {
  text-decoration: underline;
}

.works {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.works pre {
  margin: auto 0 0;
  padding: 0.7rem 0.85rem;
  background: #0e1016;
  border: 1px solid var(--surface-border);
  border-radius: 0.7rem;
  overflow-x: auto;
  color: #c4cad4;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
}

.section {
  padding: 4.25rem 0 1.25rem;
}

.section h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 2vw + 0.8rem, 2.1rem);
  font-weight: 750;
}

.section-lede {
  margin: 0 0 2rem;
  max-width: 40rem;
  color: var(--text-muted);
}

.close {
  margin-top: 4.5rem;
  padding: 2.6rem 2.1rem;
  border-radius: 1.25rem;
  border: 1px solid color-mix(in srgb, var(--rig-primary) 35%, var(--surface-border));
  background:
    radial-gradient(ellipse 80% 80% at 0% 0%, color-mix(in srgb, var(--rig-primary) 18%, transparent), transparent 55%),
    var(--surface);
}

.close h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.close p {
  margin: 0 0 1.5rem;
  max-width: 36rem;
  color: var(--text-muted);
}

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

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

.footer-links a {
  text-decoration: none;
}

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

.gitlab-icon {
  display: inline-block;
  vertical-align: -2px;
  margin-right: 0.25rem;
}

.docs-layout,
.start-layout {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 3rem;
  padding-top: 2.75rem;
}

.side-nav {
  position: sticky;
  top: 4.5rem;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.start-layout .side-nav {
  gap: 1.15rem;
}

.side-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.side-nav-label {
  margin: 0 0 0.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text-muted) 75%, var(--rig-primary));
}

.side-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  padding: 0.2rem 0 0.2rem 0.7rem;
  border-left: 2px solid transparent;
}

.side-nav a:hover {
  color: var(--text);
}

.side-nav a.is-current {
  color: var(--rig-primary);
  border-left-color: var(--rig-primary);
}

.docs-body h1,
.start-body h1 {
  margin: 0 0 1.15rem;
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 800;
}

.docs-body h2,
.start-body h2 {
  margin: 3.1rem 0 0.95rem;
  font-size: 1.4rem;
  font-weight: 750;
  scroll-margin-top: 5rem;
}

.docs-body h3 {
  margin: 1.85rem 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  scroll-margin-top: 5rem;
}

.docs-body h2:first-of-type,
.start-body h2:first-of-type {
  margin-top: 2.25rem;
}

.docs-body p,
.start-body p,
.docs-body li,
.start-body li {
  color: var(--text-muted);
}

.docs-body p,
.start-body p {
  margin: 0 0 1rem;
  max-width: 44rem;
}

.docs-body a,
.start-body a {
  color: var(--rig-primary);
  text-decoration: none;
}

.docs-body a:hover,
.start-body a:hover {
  text-decoration: underline;
}

.docs-body ul,
.start-body ul,
.docs-body ol,
.start-body ol {
  margin: 0 0 1.5rem;
  padding-left: 1.2rem;
  max-width: 44rem;
}

.docs-body li + li,
.start-body li + li {
  margin-top: 0.35rem;
}

.lede-guide {
  max-width: 40rem;
  font-size: 1.12rem;
  line-height: 1.55;
}

.docs-body pre,
.start-body pre,
.docs-body .code,
.start-body .code {
  margin: 0 0 0.7rem;
  padding: 1.15rem 1.25rem;
  background: #0e1016;
  border: 1px solid var(--surface-border);
  border-radius: 0.9rem;
  overflow-x: auto;
  color: #c4cad4;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  line-height: 1.55;
}

.start-body .str { color: var(--rig-primary); }
.start-body .cmt { color: #6b7380; }

.trigger-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  font-size: 0.92rem;
}

.trigger-table th,
.trigger-table td {
  text-align: left;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--surface-divider);
}

.trigger-table th {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
}

.trigger-table td {
  color: var(--text-muted);
}

.trigger-table td code {
  color: var(--rig-primary);
}

.expect {
  margin: 0 0 1.7rem;
  max-width: 44rem;
  font-size: 0.92rem;
  color: color-mix(in srgb, var(--text-muted) 80%, var(--rig-primary));
}

.expect code {
  color: var(--text);
}

.step-title {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.step-title::before {
  counter-increment: guide-step;
  content: counter(guide-step);
  flex: none;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--rig-primary) 45%, var(--surface-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--rig-primary) 10%, var(--surface));
  color: var(--rig-primary);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
}

.start-body {
  counter-reset: guide-step;
}

.start-shot {
  display: block;
  width: 100%;
  max-width: 48rem;
  margin: 0.4rem 0 1.4rem;
  border: 1px solid var(--surface-border);
  border-radius: 0.9rem;
}

.docs-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 1.75rem 0 0.5rem;
}

.docs-map a {
  display: grid;
  gap: 0.55rem;
  padding: 1.15rem 1.2rem 1.25rem;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 1rem;
}

.docs-map a:hover {
  text-decoration: none;
  border-color: color-mix(in srgb, var(--rig-primary) 40%, var(--surface-border));
}

.docs-map .kicker {
  margin: 0;
  color: var(--text);
}

.docs-map p:last-child {
  margin: 0;
  font-size: 0.95rem;
}

.callout {
  margin: 0 0 1.6rem;
  padding: 1.05rem 1.2rem;
  max-width: 44rem;
  border-radius: 0.9rem;
  border: 1px solid color-mix(in srgb, var(--rig-primary) 28%, var(--surface-border));
  background: color-mix(in srgb, var(--rig-primary) 8%, var(--surface));
}

.callout p {
  margin: 0;
}

.callout p + p {
  margin-top: 0.7rem;
}

.fields {
  width: 100%;
  max-width: 56rem;
  margin: 0 0 1.6rem;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.docs-body h2 code,
.start-body h2 code {
  font-size: 0.92em;
  font-weight: 750;
  color: var(--text);
}

.synopsis {
  color: var(--text);
}

.fields th,
.fields td {
  padding: 0.65rem 0.75rem 0.65rem 0;
  border-bottom: 1px solid var(--surface-divider);
  text-align: left;
  vertical-align: top;
}

.fields th {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fields td:first-child {
  width: 11.5rem;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
}

.fields th:nth-child(n+2),
.fields td:nth-child(n+2) {
  padding-right: 0.85rem;
}

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

.cmd-index {
  margin: 0 0 1.6rem;
  display: grid;
  gap: 0.85rem;
  max-width: 48rem;
}

.cmd-index div {
  display: grid;
  grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
  gap: 0.75rem 1rem;
  align-items: baseline;
}

.cmd-index dt {
  margin: 0;
}

.cmd-index dt code {
  font-size: 0.88rem;
  color: var(--text);
}

.cmd-index dd {
  margin: 0;
  color: var(--text-muted);
}

@media (max-width: 860px) {
  .page {
    padding: 0 1.25rem 3.25rem;
  }

  .section {
    padding: 3.25rem 0 1rem;
  }

  .hero,
  .facts,
  .share,
  .share-example,
  .works,
  .docs-layout,
  .start-layout,
  .docs-map,
  .cmd-index div {
    grid-template-columns: minmax(0, 1fr);
  }

  .repo-stats-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    padding: 2.1rem 1.25rem;
  }

  .repo-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 1.4rem;
  }

  .stat-count,
  .stat-profile {
    padding: 0.15rem 1.1rem;
  }

  .stat-count:nth-child(odd),
  .stat-profile:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .stat-count:nth-child(even),
  .stat-profile:nth-child(even) {
    border-left: 1px solid var(--surface-divider);
  }

  .hero > *,
  .share-example > *,
  .docs-layout > *,
  .start-layout > *,
  .example-code,
  .pty,
  .install-cmd,
  .copy-wrap,
  .share-cmd,
  .start-body pre,
  .docs-body pre,
  .works pre {
    min-width: 0;
    max-width: 100%;
  }

  .bom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: auto;
    margin-left: 0;
    padding-inline: 0;
  }

  .example-code {
    position: static;
    top: auto;
  }

  .hero {
    padding-top: 1.75rem;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(1.85rem, 8vw, 2.4rem);
  }

  .cmd-lede div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .install-cmd,
  .start-body pre,
  .docs-body pre,
  .works pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .pty pre.pty-rec,
  .pty .cast {
    height: auto;
    overflow-x: auto;
  }

  .share-cmd,
  .start-body pre,
  .docs-body pre,
  .works pre {
    font-size: 0.78rem;
  }

  .share-pull > li:has(.share-pull-kind) {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.45rem;
  }

  .share-pull-kind {
    flex-direction: row;
    justify-content: flex-start;
    padding: 0 0 0.45rem;
    border-right: 0;
    border-bottom: 1px solid var(--surface-divider);
    text-align: left;
  }

  .close {
    padding: 1.5rem 1.15rem;
  }

  .side-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.85rem 1.25rem;
    margin: 0 -1.25rem;
    padding: 0.1rem 1.25rem 0.85rem;
    border-bottom: 1px solid var(--surface-divider);
  }

  .side-nav-group {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.45rem;
  }

  .side-nav-label {
    width: 100%;
    margin: 0;
  }

  .side-nav a {
    flex: none;
    white-space: nowrap;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--surface-border);
    border-left-width: 1px;
    border-radius: 0.65rem;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    font-weight: 600;
  }

  .side-nav a.is-current {
    border-color: color-mix(in srgb, var(--rig-primary) 45%, var(--surface-border));
    background: color-mix(in srgb, var(--rig-primary) 10%, var(--surface));
  }

  .fields td:first-child {
    width: auto;
  }
}

@media (max-width: 768px) {
  .nav-link {
    display: block;
    padding: 0.7rem 0.55rem;
    font-size: 1rem;
  }
}

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

@media (max-width: 520px) {
  .page {
    padding: 0 1.1rem 3rem;
  }

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

  .repo-stats-inner {
    padding: 1.85rem 1.1rem;
  }

  .repo-stats-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1.15rem;
  }

  .stat-count,
  .stat-profile,
  .stat-count:nth-child(even),
  .stat-profile:nth-child(even) {
    padding: 0.85rem 0;
    border-left: 0;
  }

  .stat-count + .stat-count,
  .stat-count + .stat-profile,
  .stat-profile + .stat-profile {
    border-top: 1px solid var(--surface-divider);
  }

  .side-nav {
    margin: 0 -1.1rem;
    padding-inline: 1.1rem;
  }

  .lede,
  .cmd-lede dd,
  .section-lede {
    font-size: 1rem;
  }
}
