:root {
  --paper: #fffdf8;
  --paper-soft: #f8f1e6;
  --ink: #2f271d;
  --ink-soft: #4f473a;
  --ink-muted: #6a5d49;
  --accent: #a76b2a;
  --line: #d9cfbf;
  --line-soft: #e9dfcf;
  --copy-button-size: 2rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--ink);
}

button,
input,
textarea,
select {
  font: inherit;
}

code,
pre {
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
}

.site-shell {
  width: min(calc(100% - 2rem), 52rem);
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem 1rem;
  margin-bottom: 1.6rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.site-brand {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav,
.site-footer-nav,
.page-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.site-nav-link,
.site-footer-nav a,
.page-section-link,
.button-link {
  color: var(--ink-muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav-link.is-active,
.site-nav-link:hover,
.site-footer-nav a:hover,
.page-section-link:hover,
.button-link:hover {
  color: var(--ink);
  text-decoration: underline;
}

.site-main {
  display: block;
}

.page-section-nav {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.92rem;
}

.doc-shell > :first-child {
  margin-top: 0;
}

.doc-shell > :last-child {
  margin-bottom: 0;
}

.doc-shell h1,
.doc-shell h2,
.doc-shell h3 {
  margin: 0 0 0.75rem;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
}

.doc-shell h1 {
  font-size: 2.15rem;
}

.doc-shell h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
}

.doc-shell h3 {
  margin-top: 1.4rem;
  font-size: 1.05rem;
}

.doc-shell p,
.doc-shell li {
  color: var(--ink-soft);
  font-size: 1rem;
}

.doc-shell ul,
.doc-shell ol {
  margin: 0.9rem 0 0;
  padding-left: 1.25rem;
}

.doc-shell li + li {
  margin-top: 0.25rem;
}

.doc-shell hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.doc-shell :not(pre) > code {
  padding: 0.08rem 0.28rem;
  border: 1px solid var(--line-soft);
  border-radius: 0.2rem;
  background: var(--paper-soft);
  color: var(--ink);
  font-size: 0.92em;
}

.doc-shell pre,
.doc-shell .highlighter-rouge {
  margin: 1rem 0 0;
}

.doc-shell pre {
  overflow-x: auto;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: var(--paper);
}

.doc-shell pre code {
  display: block;
  font-size: 0.88rem;
  line-height: 1.55;
}

.hero-kicker,
.section-kicker {
  display: none;
}

.hero-lede,
.section-lede {
  max-width: 42rem;
  margin-top: 0;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0.75rem 0 0;
}

.button-link {
  font-weight: 400;
}

.button-link-primary {
  color: var(--ink);
  font-weight: 600;
}

.command-rail,
.catalog-copyable {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 0.4rem;
  margin: 0.5rem 0;
  padding: 0.22rem 0.32rem 0.22rem 0.5rem;
  border: 1px solid var(--line-soft);
  border-radius: 0.28rem;
  background: var(--paper-soft);
  vertical-align: top;
}

.command-rail code,
.catalog-copyable code {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow-x: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.81rem;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: auto;
  min-height: auto;
  padding: 0.05rem 0 0.05rem 0.4rem;
  border: 0;
  border-left: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 0.78rem;
  line-height: 1.2;
  flex: 0 0 auto;
}

.copy-button:hover {
  color: var(--ink);
}

.copy-button[data-copy-state="copied"] {
  color: #35523b;
}

.copy-button[data-copy-state="error"] {
  color: #8f3e2b;
}

.feature-grid,
.summary-grid,
.split-layout,
.stack-list {
  display: block;
}

.feature-card,
.note-card,
.split-callout,
.stack-list-item {
  margin: 1rem 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.small-note {
  margin-top: 0.6rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.site-shell-block {
  position: relative;
}

.site-shell-command {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 0.4rem;
  margin: 0.45rem 0 0.75rem;
  padding: 0.22rem 0.32rem 0.22rem 0.5rem;
  border: 1px solid var(--line-soft);
  border-radius: 0.28rem;
  background: var(--paper-soft);
  vertical-align: top;
}

.site-shell-command pre,
.site-shell-command .highlighter-rouge {
  margin: 0;
}

.site-shell-command pre {
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.site-shell-command pre code {
  display: block;
  max-width: 100%;
  font-size: 0.81rem;
  line-height: 1.4;
}

.site-shell-command .copy-button {
  position: static;
}

.site-footer {
  margin-top: 2.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.site-footer-credit {
  margin: 0 0 0.35rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.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;
}

.copy-button:focus-visible,
.site-nav-link:focus-visible,
.site-footer-nav a:focus-visible,
.page-section-link:focus-visible,
.doc-shell a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .site-shell {
    width: min(calc(100% - 1rem), 52rem);
    padding-top: 1rem;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .command-rail,
  .catalog-copyable,
  .site-shell-command {
    display: flex;
    width: 100%;
  }

  .command-rail code,
  .catalog-copyable code,
  .site-shell-command pre code {
    white-space: normal;
    word-break: break-word;
  }
}
