@font-face {
  font-family: "Archivo Var";
  src: url("/assets/archivo-var.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --house: #fff1e4;
  --house-lit: #fff7ee;
  --paper: #ffffff;
  --ink: #2c1810;
  --ink-soft: #5a3d2e;
  --muted: #7a5c4a;
  --hairline: #f3ddc9;
  --hairline-strong: #e8c6a8;
  --flame: #d93e12;
  --flame-deep: #c6360e;
  --ember: #ff6b35;
  --amber: #ffb020;
  --pink: #ff7ba9;
  --backstage: #2a1613;
  --font: "Archivo Var", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --wrap: 76rem;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --r-pill: 999px;
  --r-card: 1.25rem;
  --r-panel: 1.75rem;
  --spine: 0.3125rem;
  --sh-1: 0 1px 2px rgba(90, 45, 15, 0.05), 0 10px 24px -16px rgba(90, 45, 15, 0.3);
  --sh-2: 0 1px 2px rgba(90, 45, 15, 0.06), 0 22px 48px -24px rgba(90, 45, 15, 0.42);
  --sh-3: 0 2px 4px rgba(90, 45, 15, 0.06), 0 36px 72px -30px rgba(90, 45, 15, 0.5);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: clip;
  background: var(--house);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(1rem, 0.25vw + 0.94rem, 1.08rem);
  font-stretch: 98%;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--flame-deep);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}

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

:focus-visible {
  outline: 0.2rem solid var(--amber);
  outline-offset: 0.2rem;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  transform: translateY(-180%);
  border-radius: var(--r-pill);
  background: var(--paper);
  box-shadow: var(--sh-2);
  font-weight: 700;
}

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

.docs-shell {
  display: grid;
  grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  align-self: start;
  flex-direction: column;
  height: 100vh;
  padding: clamp(1.35rem, 3vw, 2.25rem) 1.25rem 1.5rem;
  overflow-y: auto;
  background:
    radial-gradient(circle at 45% -8%, rgba(255, 176, 32, 0.24), transparent 24rem),
    var(--backstage);
  color: var(--house-lit);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), var(--sh-3);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--spine);
  background: linear-gradient(var(--amber), var(--flame) 40%, var(--pink));
}

.wordmark {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 0 0 2.25rem 0.35rem;
  color: var(--paper);
  text-decoration: none;
}

.wordmark:hover {
  color: var(--paper);
}

.wordmark-mark {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: var(--flame);
  box-shadow: 0 0 2.5rem rgba(255, 176, 32, 0.2);
  font-size: 1.05rem;
  font-stretch: 112%;
  font-weight: 800;
}

.wordmark strong,
.wordmark small {
  display: block;
}

.wordmark strong {
  font-size: 1.05rem;
  font-stretch: 112%;
  letter-spacing: -0.02em;
}

.wordmark small {
  color: #d9c2b8;
  font-size: 0.67rem;
  font-stretch: 78%;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.docs-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.docs-nav ul {
  display: grid;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-nav li a,
.nav-external a {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0.7rem;
  border-radius: 0.55rem;
  color: #ead8cf;
  font-size: 0.9rem;
  font-stretch: 92%;
  font-weight: 580;
  text-decoration: none;
}

.docs-nav li a:hover,
.nav-external a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--paper);
}

.docs-nav li a[aria-current="page"] {
  background: var(--paper);
  color: var(--flame-deep);
  box-shadow: var(--sh-1);
}

.nav-external {
  display: grid;
  gap: 0.15rem;
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.page-column {
  min-width: 0;
}

.mobile-nav {
  display: none;
}

.content {
  width: min(100%, 60rem);
  margin-inline: auto;
  padding: clamp(2.5rem, 7vw, 6.5rem) var(--gutter) 3rem;
}

.page-heading {
  position: relative;
  margin-bottom: clamp(2rem, 6vw, 4rem);
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--hairline-strong);
}

.page-heading::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: clamp(3.5rem, 9vw, 6.5rem);
  height: var(--spine);
  border-radius: var(--r-pill);
  background: var(--flame);
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--flame-deep);
  font-size: 0.72rem;
  font-stretch: 75%;
  font-weight: 800;
  letter-spacing: 0.15em;
  line-height: 1.3;
  text-transform: uppercase;
}

.page-heading h1 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5.7rem);
  font-stretch: 116%;
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.decisions-page .page-heading h1 {
  max-width: 22ch;
  font-size: clamp(2.25rem, 5.2vw, 4.6rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.65rem 1.05rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 0.9rem;
  font-stretch: 90%;
  font-weight: 750;
  text-decoration: none;
}

.button--primary,
.button--primary:hover {
  background: var(--flame);
  color: var(--paper);
  box-shadow: var(--sh-1);
}

.button--primary:hover {
  background: var(--flame-deep);
}

.button--secondary {
  border-color: var(--hairline-strong);
  background: var(--paper);
  color: var(--ink);
}

.button--secondary:hover {
  border-color: var(--flame);
  color: var(--flame-deep);
}

.prose {
  min-width: 0;
}

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

.prose h2,
.prose h3,
.prose h4 {
  scroll-margin-top: 2rem;
  color: var(--ink);
  font-stretch: 108%;
  letter-spacing: -0.035em;
  line-height: 1.15;
  text-wrap: balance;
}

.prose h2 {
  margin: clamp(3.5rem, 8vw, 6rem) 0 1.2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline-strong);
  font-size: clamp(1.75rem, 3.8vw, 2.65rem);
  font-weight: 740;
}

.prose h3 {
  margin: 2.8rem 0 0.85rem;
  font-size: clamp(1.35rem, 2.7vw, 1.75rem);
  font-weight: 720;
}

.prose h4 {
  margin: 2rem 0 0.65rem;
  font-size: 1.15rem;
}

.prose p,
.prose ul,
.prose ol {
  max-width: 72ch;
}

.prose p {
  margin: 0.8rem 0 1.2rem;
}

.prose li + li {
  margin-top: 0.5rem;
}

.prose li::marker {
  color: var(--flame);
  font-weight: 750;
}

.prose strong {
  font-weight: 750;
}

.prose blockquote {
  margin: 1.6rem 0;
  padding: 1.15rem clamp(1rem, 3vw, 1.5rem);
  border-left: var(--spine) solid var(--flame);
  border-radius: 0 var(--r-card) var(--r-card) 0;
  background: var(--paper);
  box-shadow: var(--sh-1);
  color: var(--ink-soft);
  font-size: clamp(1.06rem, 1.4vw, 1.2rem);
  font-stretch: 102%;
}

.prose blockquote p {
  margin: 0;
}

.prose img {
  display: block;
  width: 100%;
  height: auto;
  margin: 1.75rem 0;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-card);
  box-shadow: var(--sh-2);
}

.prose :not(pre) > code {
  padding: 0.12em 0.35em;
  border: 1px solid var(--hairline);
  border-radius: 0.35rem;
  background: var(--house-lit);
  color: #7e260d;
  font-family: var(--font-mono);
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

.prose pre {
  max-width: 100%;
  margin: 1.4rem 0 1.8rem;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-card);
  background: var(--backstage);
  box-shadow: var(--sh-2);
  color: #fff7ee;
  font-family: var(--font-mono);
  font-size: clamp(0.76rem, 1.7vw, 0.88rem);
  line-height: 1.6;
  scrollbar-color: var(--ember) rgba(255, 255, 255, 0.08);
}

.prose pre code {
  font: inherit;
  white-space: pre;
}

.prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1.4rem 0 2rem;
  overflow-x: auto;
  border: 1px solid var(--hairline-strong);
  border-spacing: 0;
  border-radius: var(--r-card);
  background: var(--paper);
  box-shadow: var(--sh-1);
  font-size: 0.88rem;
  line-height: 1.5;
  scrollbar-color: var(--flame) var(--hairline);
}

.prose th,
.prose td {
  min-width: 9rem;
  padding: 0.75rem 0.85rem;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--house-lit);
  color: var(--ink-soft);
  font-size: 0.73rem;
  font-stretch: 78%;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.prose th:last-child,
.prose td:last-child {
  border-right: 0;
}

.callout,
.placeholder-card {
  margin: 2rem 0;
  padding: clamp(1.2rem, 4vw, 2rem);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-card);
  background: var(--paper);
  box-shadow: var(--sh-2);
}

.callout blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.placeholder-card {
  position: relative;
  overflow: hidden;
}

.placeholder-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: var(--spine);
  background: linear-gradient(90deg, var(--flame), var(--amber));
}

.placeholder-card h2 {
  margin: 0.25rem 0 0.75rem;
  padding: 0;
  border: 0;
}

.source-footer {
  margin-top: clamp(4rem, 8vw, 7rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline-strong);
  color: var(--muted);
  font-size: 0.78rem;
  font-stretch: 88%;
}

.source-footer p {
  margin: 0;
}

@media (max-width: 52rem) {
  .docs-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .mobile-nav {
    display: block;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--backstage);
    color: var(--paper);
  }

  .mobile-nav summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 3.8rem;
    padding: 0.8rem 1.25rem;
    cursor: pointer;
    font-size: 0.86rem;
    font-stretch: 92%;
    font-weight: 750;
    list-style: none;
  }

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

  .mobile-nav summary span:last-child {
    color: #d9c2b8;
    font-size: 0.7rem;
    font-stretch: 78%;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .mobile-nav[open] summary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .docs-nav--compact {
    padding: 0.75rem 1rem 1rem;
  }

  .docs-nav--compact .nav-external {
    grid-template-columns: 1fr 1fr;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
  }

  .content {
    padding-top: clamp(2.5rem, 10vw, 4.5rem);
  }
}

@media (max-width: 30rem) {
  .content {
    padding-inline: 1rem;
  }

  .page-heading h1 {
    font-size: clamp(2.4rem, 14vw, 3.8rem);
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .prose ul,
  .prose ol {
    padding-left: 1.4rem;
  }

  .prose th,
  .prose td {
    min-width: 8.5rem;
    padding: 0.65rem 0.7rem;
  }
}

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

@media print {
  .sidebar,
  .mobile-nav,
  .hero-actions {
    display: none;
  }

  .docs-shell {
    display: block;
  }

  .content {
    width: 100%;
    padding: 0;
  }

  .prose pre,
  .prose table {
    box-shadow: none;
  }
}
