.docs-page {
  background:
    radial-gradient(800px 500px at 90% 4%, rgba(219, 192, 108, 0.1), transparent 72%), var(--ink);
}
.docs-header-inner {
  grid-template-columns: 1fr auto 1fr;
}
.docs-hero {
  padding: clamp(5.5rem, 12vw, 10rem) 0 clamp(4rem, 8vw, 6.5rem);
  border-bottom: 1px solid var(--line-soft);
}
.docs-hero h1 {
  max-width: 11ch;
  margin: 1rem 0 0;
  font-family: var(--display);
  font-size: clamp(3rem, 6.3vw, 6.5rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.94;
}
.docs-hero > .container > p:not(.section-label) {
  max-width: 42rem;
  margin: 1.65rem 0 0;
  color: var(--paper-muted);
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  line-height: 1.7;
}
.docs-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
  margin-top: 2.2rem;
}
.docs-page .button-brass {
  background: var(--brass);
  color: var(--brass-ink);
  box-shadow: inset 0 0 0 1px rgba(32, 27, 8, 0.16);
}
.docs-page .button-brass:hover {
  background: var(--brass-bright);
  box-shadow: 0 0.65rem 1.4rem rgba(219, 192, 108, 0.16);
}
.docs-layout {
  display: grid;
  grid-template-columns: 12rem minmax(0, 48rem);
  justify-content: space-between;
  gap: clamp(3rem, 7vw, 8rem);
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(5rem, 10vw, 9rem);
}
.docs-toc {
  position: sticky;
  top: 7rem;
  align-self: start;
  display: grid;
  gap: 0.72rem;
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}
.docs-toc p {
  margin: 0 0 0.5rem;
  color: var(--paper-faint);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.09em;
}
.docs-toc a {
  color: var(--paper-muted);
  font-size: 0.84rem;
  transition: color 160ms var(--ease);
}
.docs-toc a:hover {
  color: var(--brass-bright);
}
.docs-content {
  display: grid;
  gap: clamp(4.8rem, 10vw, 8rem);
}
.docs-content section {
  scroll-margin-top: 8rem;
}
.docs-content h2 {
  max-width: 15ch;
  margin: 1rem 0 0;
  font-family: var(--display);
  font-size: clamp(2.2rem, 4vw, 3.7rem);
  font-weight: 580;
  letter-spacing: -0.045em;
  line-height: 1;
}
.docs-content > section > p:not(.section-label),
.docs-note {
  max-width: 44rem;
  margin: 1.25rem 0 0;
  color: var(--paper-muted);
  line-height: 1.72;
}
.docs-steps {
  display: grid;
  gap: 0;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.docs-steps li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 1rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line-soft);
}
.docs-steps li > span {
  color: var(--brass);
  font-family: var(--mono);
  font-size: 0.68rem;
}
.docs-steps strong {
  font-size: 0.94rem;
}
.docs-steps p {
  margin: 0.35rem 0 0;
  color: var(--paper-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.docs-steps p.docs-plan-details {
  margin-top: 0.15rem;
  color: var(--paper-faint);
  font-size: 0.78rem;
}
.docs-callout {
  margin-top: 1.5rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid rgba(165, 215, 131, 0.28);
  border-radius: 0.7rem;
  background: rgba(165, 215, 131, 0.07);
}
.docs-callout strong {
  color: var(--green);
  font-size: 0.88rem;
}
.docs-callout p {
  margin: 0.4rem 0 0;
  color: var(--paper-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}
.code-block {
  margin-top: 1.9rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.72rem;
  background: #090a08;
  box-shadow: 0 1.4rem 3rem rgba(0, 0, 0, 0.18);
}
.code-block-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 0.7rem 0.5rem 1rem;
  border-bottom: 1px solid var(--line-soft);
  color: var(--paper-faint);
  font-family: var(--mono);
  font-size: 0.65rem;
}
.code-block-bar button {
  padding: 0.36rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: transparent;
  color: var(--paper-muted);
  font: inherit;
  cursor: pointer;
}
.code-block-bar button:hover {
  border-color: rgba(219, 192, 108, 0.48);
  color: var(--brass-bright);
}
.code-block pre {
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
  color: #e6dfbe;
  font-family: var(--mono);
  font-size: clamp(0.69rem, 1.4vw, 0.79rem);
  line-height: 1.7;
  tab-size: 2;
}
.docs-note {
  color: var(--paper-faint);
  font-size: 0.84rem;
}
.docs-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 2rem;
}
.docs-links a {
  color: var(--brass-bright);
  font-size: 0.88rem;
  font-weight: 600;
}
.copy-status {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 20;
  margin: 0;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.72rem;
}

@media (max-width: 860px) {
  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }
  .docs-toc {
    position: static;
    grid-template-columns: repeat(5, max-content);
    gap: 0.7rem 1.25rem;
    padding: 0 0 1rem;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    border-left: 0;
    min-width: 0;
  }
  .docs-content {
    min-width: 0;
  }
  .docs-content > section {
    min-width: 0;
    max-width: 100%;
  }
  .docs-toc p {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .docs-header-inner .site-nav {
    display: none;
  }
  .docs-header-inner {
    grid-template-columns: 1fr auto;
  }
  .docs-hero {
    padding-top: calc(var(--safe-top) + 5.25rem);
  }
  .docs-hero h1 {
    max-width: 12ch;
    font-size: clamp(2.15rem, 9vw, 2.75rem);
    line-height: 1.04;
  }
  .docs-toc {
    grid-template-columns: repeat(3, max-content);
  }
  .code-block pre {
    padding: 1rem;
  }
}

html[data-theme="light"] .docs-page {
  background:
    radial-gradient(800px 500px at 90% 4%, rgba(134, 101, 43, 0.13), transparent 72%), var(--ink);
}
html[data-theme="light"] .docs-page .button-brass {
  background: var(--paper);
  color: var(--ink);
  box-shadow: none;
}
html[data-theme="light"] .docs-page .button-brass:hover {
  background: #30352f;
}
html[data-theme="light"] .code-block {
  border-color: rgba(29, 30, 25, 0.52);
  background: #24251f;
  box-shadow: 0 1.2rem 2.5rem rgba(53, 47, 37, 0.22);
}
html[data-theme="light"] .code-block pre {
  color: #eee2c6;
}
html[data-theme="light"] .code-block-bar button:hover {
  border-color: rgba(138, 106, 50, 0.6);
  color: var(--brass);
}

/* Long commands scroll inside the article instead of widening its grid track. */
.docs-content {
  min-width: 0;
}

.docs-content > section {
  min-width: 0;
}

/* Reading surfaces use the same sage palette as the landing page. */
.docs-page,
html[data-theme="light"] .docs-page {
  background: var(--ink);
}
.docs-hero {
  padding-top: clamp(6rem, 10vw, 9rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  background: radial-gradient(
    ellipse at 85% 30%,
    color-mix(in srgb, var(--green) 7%, transparent),
    transparent 60%
  );
}
.docs-hero h1 {
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  max-width: 13ch;
  line-height: 1;
}
.docs-layout {
  grid-template-columns: 13rem minmax(0, 48rem);
  gap: clamp(2rem, 5vw, 5rem);
}
.docs-toc {
  border-left: 0;
  padding: 0.7rem;
  gap: 0.2rem;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  top: calc(var(--header-height, 80px) + 1.5rem);
}
.docs-toc p {
  padding: 0.65rem;
  margin: 0;
}
.docs-toc a {
  padding: 0.65rem;
  border-radius: 10px;
}
.docs-toc a:hover,
.docs-toc a[aria-current="location"] {
  background: color-mix(in srgb, var(--green) 9%, transparent);
  color: var(--paper);
}
.docs-content {
  gap: clamp(3.5rem, 6vw, 5rem);
}
.docs-content h2 {
  max-width: 22ch;
  font-size: clamp(1.9rem, 3.2vw, 3rem);
  line-height: 1.1;
}
.docs-callout {
  border-radius: 16px;
  border-color: color-mix(in srgb, var(--green) 22%, transparent);
  background: color-mix(in srgb, var(--green) 5%, transparent);
}
.docs-steps li > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--green) 10%, transparent);
}
.docs-manual {
  margin-top: 1.5rem;
  padding: 1rem clamp(1rem, 2vw, 1.4rem);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.docs-manual > summary {
  font-weight: 600;
  cursor: pointer;
  padding-block: 0.25rem;
  color: var(--paper);
}
.docs-manual > p {
  color: var(--paper-muted);
  line-height: 1.7;
  margin-top: 1rem;
}
.code-block,
html[data-theme="light"] .code-block {
  border-radius: 16px;
  background: #19221c;
  border-color: #3a4a3f;
  box-shadow: none;
}
.code-block-bar {
  color: #becbbc;
  border-color: #3a4a3f;
  gap: 1rem;
}
.code-block pre,
html[data-theme="light"] .code-block pre {
  color: #e0e9dc;
}
.code-block-bar button {
  color: #e0e9dc;
  border-color: #4f6254;
  border-radius: 8px;
  min-width: 50px;
  min-height: 36px;
}
.code-block-bar button:hover,
html[data-theme="light"] .code-block-bar button:hover {
  color: #fff;
  border-color: #b5d4a6;
}
.copy-status:not(:empty) {
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--ink);
  box-shadow: 0 4px 20px #0002;
  max-width: calc(100% - 2rem);
}
.docs-page .button {
  border-radius: 12px;
}
@media (max-width: 860px) {
  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .docs-toc {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.25rem;
  }
  .docs-toc a {
    font-size: 0.8rem;
    padding: 0.55rem;
  }
}
@media (max-width: 400px) {
  .docs-toc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
