:root {
  color-scheme: dark;
  --bg: #151712;
  --raised: #1b1e17;
  --green: #abe983;
  --green-bright: #c4ffa0;
  --line: rgba(171, 233, 131, 0.17);
  --soft-line: rgba(171, 233, 131, 0.08);
  --text: #f2f4ee;
  --muted: #9aa093;
  --quiet: #7a8371;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --header: 82px;
  --sidebar: 302px;
  font-family: var(--sans);
  font-size: 16px;
  font-synthesis: none;
  background: var(--bg);
  color: var(--text);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
h1,
h2,
h3,
p {
  margin: 0;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
  border-radius: 2px;
}
[hidden] {
  display: none !important;
}
::selection {
  color: var(--bg);
  background: var(--green);
}
.site-header {
  height: var(--header);
  position: fixed;
  inset: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(21, 23, 18, 0.98);
  z-index: 30;
}
.brand {
  display: flex;
  align-items: center;
  gap: 23px;
}
.brand img {
  width: 146px;
  height: auto;
  display: block;
}
.brand-separator {
  height: 25px;
  width: 1px;
  background: var(--line);
}
.brand-label {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  font-weight: 500;
}
.header-actions {
  display: flex;
  gap: 18px;
  align-items: center;
}
.launch-link {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 11px 15px;
  border: 1px solid #abe98355;
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--green);
  background: #abe98305;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.launch-link:hover {
  background: #abe98314;
  border-color: var(--green);
}
.launch-link span {
  font-size: 1.05rem;
  line-height: 1;
}
.sidebar {
  position: fixed;
  top: var(--header);
  bottom: 0;
  left: 0;
  width: var(--sidebar);
  background: #12150f;
  border-right: 1px solid var(--line);
  padding: 26px 20px 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #333c2b transparent;
  z-index: 25;
}
.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px 26px;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.075em;
  color: #a8b99a;
}
.rail-count {
  font-size: 0.75rem;
  color: #7f8f72;
}
.nav-group {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 23px 8px 9px;
  color: #c0cdb5;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.7;
}
.nav-group:first-child {
  margin-top: 0;
}
.group-index {
  font-size: 0.75rem;
  color: #8eaa7a;
  border: 1px solid #abe98324;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
}
.nav-link {
  display: flex;
  position: relative;
  align-items: baseline;
  gap: 13px;
  min-height: 44px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #bdc8b3;
  padding: 10px 8px;
  margin: 1px 0;
  border-left: 2px solid transparent;
  transition:
    background 0.15s,
    color 0.15s;
}
.nav-number {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: #98ab88;
  min-width: 17px;
}
.nav-title {
  flex: 1;
}
.nav-arrow {
  color: var(--green);
  font-size: 0.9rem;
  visibility: hidden;
}
.nav-link:hover {
  background: #abe98305;
  color: #e5eddc;
}
.nav-link.active {
  background: linear-gradient(90deg, #abe98314, #abe98303);
  border-left-color: var(--green);
  color: var(--green);
}
.nav-link.active .nav-number {
  color: #b4d39c;
}
.nav-link.active .nav-arrow {
  visibility: visible;
}
.workspace {
  position: relative;
  isolation: isolate;
  margin: var(--header) 0 0 var(--sidebar);
  padding: 0 clamp(32px, 5vw, 88px);
  min-height: calc(100vh - var(--header));
}
.workspace:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(var(--soft-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--soft-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #0005, transparent 350px);
}
main {
  min-width: 0;
  max-width: 910px;
  margin: 0 auto;
  min-height: calc(100vh - var(--header));
  display: flex;
  flex-direction: column;
  outline: none !important;
}
.reading-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #adbea0;
  padding: 29px 0;
  border-bottom: 1px solid var(--soft-line);
  line-height: 1.8;
}
.meta-slash {
  color: #566a48;
  margin: 0 10px;
}
#chapter-position {
  color: #9bb787;
  white-space: nowrap;
}
article {
  min-width: 0;
  padding-top: 57px;
}
.article-kicker {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--green);
  line-height: 1.8;
  margin-bottom: 15px;
}
.title-row {
  display: flex;
  gap: 25px;
  justify-content: space-between;
  align-items: center;
}
h1 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(2rem, 3.3vw, 3rem);
  line-height: 1.3;
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
  max-width: 730px;
}
.chapter-number {
  font-family: var(--sans);
  font-size: clamp(3rem, 5.5vw, 5.8rem);
  font-weight: 400;
  letter-spacing: -0.1em;
  color: #abe98324;
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
  padding-right: 6px;
}
.title-rule {
  height: 1px;
  background: var(--line);
  margin: 35px 0 31px;
  position: relative;
}
.title-rule span {
  position: absolute;
  height: 3px;
  background: var(--green);
  width: 42px;
  top: -1px;
}
.article-body {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #d0d7c9;
}
.page-outline {
  display: flex;
  align-items: baseline;
  gap: 25px;
  border-bottom: 1px solid var(--soft-line);
  padding: 0 0 24px;
  margin-bottom: 28px;
}
.outline-label {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  white-space: nowrap;
  color: #b0c1a0;
}
.page-outline nav {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 22px;
}
.page-outline nav a {
  font-size: 0.82rem;
  line-height: 1.7;
  color: #9eb38e;
  text-decoration: underline;
  text-decoration-color: #abe98333;
  text-underline-offset: 5px;
}
.page-outline nav a:hover,
.page-outline nav a.active {
  color: var(--green);
}
.page-outline nav a.subheading {
  display: block;
}
.article-body h2 {
  font-family: var(--sans);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin: 44px 0 17px;
  line-height: 1.6;
  letter-spacing: -0.02em;
  scroll-margin-top: 105px;
}
.article-body h3 {
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 32px 0 14px;
  scroll-margin-top: 105px;
}
.article-body > p {
  margin: 0 0 21px;
}
.article-body ul,
.article-body ol {
  padding-left: 24px;
  margin: 20px 0;
}
.article-body li {
  padding-left: 5px;
  margin: 10px 0;
}
.article-body li::marker {
  color: #93b87a;
}
.article-body a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-color: #abe98355;
  text-underline-offset: 4px;
}
.article-body blockquote {
  margin: 28px 0;
  padding: 17px 22px;
  border-left: 2px solid var(--green);
  background: #abe98308;
  border-radius: 0 5px 5px 0;
}
.article-body blockquote p {
  margin: 0;
}
.article-body code {
  font-family: var(--sans);
  font-size: 0.86em;
  color: var(--green-bright);
  background: #abe9830b;
  border: 1px solid var(--soft-line);
  border-radius: 4px;
  padding: 2px 5px;
  overflow-wrap: anywhere;
}
.article-body pre {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 21px;
  background: #11140f;
}
.article-body pre code {
  border: 0;
  padding: 0;
  background: none;
  overflow-wrap: normal;
}
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 7px;
}
.article-body .table-wrap {
  overflow-x: auto;
  margin: 24px 0;
}
.article-body table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}
.article-body th,
.article-body td {
  border: 1px solid var(--line);
  padding: 12px 15px;
  text-align: left;
}
.article-body th {
  background: var(--raised);
  color: var(--text);
  font-weight: 550;
}
.article-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 32px 0;
}
.article-body strong {
  color: #d9e1d1;
  font-weight: 600;
}
.page-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin: 33px 0 55px;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
}
.page-navigation a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  transition: color 0.15s;
}
.page-direction {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: #acbd9e;
}
.page-navigation strong {
  font-size: 0.875rem;
  font-weight: 450;
  line-height: 1.55;
  color: #c3d4b5;
  transition: color 0.15s;
}
.page-navigation a:hover strong {
  color: var(--green-bright);
}
.page-arrow {
  position: absolute;
  top: 24px;
  color: var(--green);
  font-size: 1.2rem;
  transition: transform 0.15s;
}
.next-page {
  grid-column: 2;
  text-align: right;
  padding-right: 31px;
}
.next-page .page-arrow {
  right: 0;
}
.next-page:hover .page-arrow {
  transform: translateX(4px);
}
.previous-page {
  padding-left: 31px;
}
.previous-page .page-arrow {
  left: 0;
}
.previous-page:hover .page-arrow {
  transform: translateX(-4px);
}
.article-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
  padding: 23px 0 28px;
  border-top: 1px solid var(--soft-line);
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #a0b091;
  line-height: 1.8;
  margin-top: auto;
}
.article-footer a {
  color: #97a589;
  letter-spacing: 0;
}
.article-footer a:hover {
  color: var(--green);
}
.article-footer a > span {
  margin-left: 8px;
}
.menu-button {
  display: none;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--green);
  padding: 9px;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 20px;
  z-index: 100;
  background: var(--green);
  color: var(--bg);
  padding: 14px 20px;
}
.skip-link:focus {
  top: 15px;
}
@media (min-width: 1550px) {
  .workspace {
    padding-left: 90px;
    padding-right: 90px;
  }
  main {
    max-width: 960px;
  }
  .article-body {
    max-width: 850px;
  }
}
@media (max-width: 1080px) {
  :root {
    --sidebar: 275px;
  }
  .sidebar {
    padding-left: 14px;
    padding-right: 14px;
  }
  .workspace {
    padding: 0 35px;
  }
  .title-row {
    gap: 15px;
  }
  h1 {
    font-size: 2.15rem;
  }
  .chapter-number {
    font-size: 3.4rem;
  }
  .reading-meta {
    font-size: 0.75rem;
  }
  .sidebar-heading {
    font-size: 0.75rem;
  }
  .rail-count {
    font-size: 0.75rem;
  }
}
@media (max-width: 960px) {
  :root {
    --header: 68px;
  }
  .site-header {
    padding: 0 20px;
  }
  .brand {
    gap: 13px;
  }
  .brand img {
    width: 118px;
  }
  .brand-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
  }
  .brand-separator {
    height: 18px;
  }
  .launch-link {
    font-size: 0.75rem;
    padding: 9px 11px;
    gap: 10px;
  }
  .header-actions {
    gap: 11px;
  }
  .menu-button {
    display: block;
  }
  .menu-button svg {
    width: 18px;
    height: 18px;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.18s;
    width: min(310px, 88vw);
    z-index: 40;
    padding-top: 22px;
    box-shadow: 15px 0 40px #0003;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-backdrop {
    position: fixed;
    inset: var(--header) 0 0;
    z-index: 35;
    background: #060a05aa;
  }
  .workspace {
    margin-left: 0;
    padding: 0 25px;
    min-height: calc(100svh - var(--header));
  }
  main {
    min-height: calc(100svh - var(--header));
  }
  .reading-meta {
    font-size: 0.75rem;
    padding: 23px 0;
    gap: 9px;
  }
  .meta-slash {
    margin: 0 5px;
  }
  article {
    padding-top: 36px;
  }
  .article-kicker {
    font-size: 0.75rem;
    margin-bottom: 14px;
  }
  h1 {
    font-size: 1.95rem;
    letter-spacing: -0.025em;
    line-height: 1.4;
  }
  .chapter-number {
    font-size: 2.8rem;
  }
  .title-rule {
    margin: 25px 0;
  }
  .article-body {
    font-size: 1.125rem;
  }
  .page-navigation {
    gap: 20px;
    margin-top: 28px;
    margin-bottom: 37px;
  }
  .page-navigation strong {
    font-size: 0.83rem;
  }
  .next-page {
    padding-right: 25px;
  }
  .previous-page {
    padding-left: 25px;
  }
  .page-outline {
    flex-direction: column;
    gap: 12px;
  }
  .page-outline nav {
    gap: 8px 18px;
  }
  .article-footer {
    font-size: 0.75rem;
  }
  .article-body h2 {
    font-size: 1.25rem;
  }
}
@media (max-width: 440px) {
  .brand img {
    width: 103px;
  }
  .brand {
    gap: 10px;
  }
  .brand-label {
    font-size: 0.75rem;
  }
  .site-header {
    padding: 0 15px;
  }
  .launch-link {
    font-size: 0.75rem;
    gap: 7px;
    padding: 8px;
  }
  .header-actions {
    gap: 8px;
  }
  .workspace {
    padding: 0 21px;
  }
  .menu-button {
    padding: 8px;
  }
  .title-row {
    align-items: flex-start;
    gap: 12px;
  }
  h1 {
    font-size: 1.7rem;
  }
  .chapter-number {
    font-size: 2.1rem;
    padding-top: 5px;
  }
  .reading-meta {
    font-size: 0.75rem;
  }
}
@media (max-width: 355px) {
  .brand-label,
  .brand-separator {
    display: none;
  }
  .chapter-number {
    display: none;
  }
  .page-navigation {
    gap: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Readable type: sans-serif UI; monospace only for technical accents. */
.nav-number,
.chapter-number,
.article-body code {
  font-family: var(--mono);
}
.brand-label,
.launch-link,
.page-outline nav a,
.page-navigation strong {
  font-size: 0.875rem;
}
.sidebar-heading {
  letter-spacing: 0.025em;
  flex-wrap: wrap;
  gap: 8px;
}
.nav-group {
  font-weight: 600;
  letter-spacing: 0;
}
.article-kicker {
  font-size: 0.875rem;
  letter-spacing: 0.045em;
}
.reading-meta {
  flex-wrap: wrap;
  letter-spacing: 0.025em;
}
.page-direction,
.outline-label,
.article-footer {
  letter-spacing: 0.04em;
}
.page-navigation strong {
  font-weight: 500;
  line-height: 1.65;
}
.group-index {
  width: 21px;
  height: 21px;
  color: #adc29b;
}
.article-body h2,
.article-body h3 {
  line-height: 1.45;
}
@media (max-width: 960px) {
  .brand-label,
  .brand-separator {
    display: none;
  }
  .article-kicker {
    font-size: 0.875rem;
  }
  .launch-link {
    font-size: 0.875rem;
  }
  .article-body h2 {
    font-size: 1.4rem;
  }
}

/* Keep long outlines and the supplied section headings readable. */
.page-outline nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex: 1;
  min-width: 0;
  gap: 10px 24px;
}
.page-outline nav a {
  overflow-wrap: anywhere;
}
.article-body h3 {
  font-size: 1.35rem;
  margin-top: 36px;
}
.article-body > :first-child {
  margin-top: 0;
}
.article-body p {
  margin-bottom: 20px;
}
.article-body blockquote p:last-child {
  margin-bottom: 0;
}
@media (max-width: 960px) {
  .page-outline nav {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .article-body h3 {
    font-size: 1.25rem;
  }
}

body.menu-open {
  overflow: hidden;
}

/* Search, copy controls, and accessible small-screen navigation. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.search-button,
.search-close,
.copy-button {
  color: var(--green);
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 4px;
  min-height: 44px;
  padding: 8px 12px;
}
.search-button {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.875rem;
}
.search-button kbd {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--sans);
}
.menu-button,
.launch-link {
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
}
.menu-button {
  align-items: center;
}
input:focus-visible,
.table-wrap:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}
#search-dialog {
  color: var(--text);
  background: var(--bg);
  border: 1px solid #647e53;
  border-radius: 10px;
  padding: 24px;
  width: min(680px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  margin: 16px auto;
}
#search-dialog::backdrop {
  background: #050804d9;
}
.search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.search-header h2 {
  font-size: 1.2rem;
}
.search-close {
  font-size: 1.4rem;
  min-width: 44px;
}
.search-label {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 10px;
  color: var(--muted);
}
#search-input {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: #10130e;
  border: 1px solid #647e53;
  border-radius: 4px;
  padding: 14px;
  min-height: 48px;
}
#search-input::placeholder {
  color: #9aa093;
}
#search-status,
.search-help {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 14px 0;
}
.search-help {
  margin-bottom: 0;
}
#search-results {
  list-style: none;
  padding: 0;
  margin: 0;
}
#search-results a {
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  margin: 10px 0;
}
#search-results a:hover,
#search-results a:focus-visible {
  background: var(--raised);
}
#search-results strong {
  display: block;
  color: var(--green);
  font-size: 1.05rem;
  margin: 5px 0;
}
#search-results p {
  font-size: 0.9rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
  color: #d0d7c9;
}
.search-group {
  font-size: 0.75rem;
  color: var(--muted);
}
.code-example {
  position: relative;
  margin: 24px 0;
}
.code-example pre {
  margin: 0;
  padding-top: 62px;
}
.copy-button {
  position: absolute;
  right: 9px;
  top: 9px;
  font-size: 0.8rem;
}
.section-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin-left: 4px;
  vertical-align: middle;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
}
.section-copy svg {
  width: 17px;
  height: 17px;
}
.section-copy:hover,
.section-copy:focus-visible {
  color: var(--green);
  background: #abe98308;
}
.article-body h2,
.article-body h3 {
  overflow-wrap: anywhere;
}
.table-wrap {
  scrollbar-color: #647e53 #151712;
}
.article-body a {
  overflow-wrap: anywhere;
}
.article-body pre {
  tab-size: 2;
}
@media (max-width: 960px) {
  .search-button kbd {
    display: none;
  }
  .brand-label,
  .brand-separator {
    display: none;
  }
}
@media (max-width: 960px) {
  .search-button > span {
    display: none;
  }
  .search-button {
    width: 44px;
    padding: 10px;
  }
  .menu-button {
    display: flex;
  }
  .page-outline nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .page-outline nav a.subheading {
    display: flex;
  }
  .page-outline nav {
    gap: 2px;
  }
  .section-copy {
    margin-left: 4px;
  }
  .header-actions {
    gap: 8px;
  }
  .search-header h2 {
    font-size: 1.05rem;
  }
}
@media (max-width: 600px) {
  .launch-link .launch-text {
    display: none;
  }
  .launch-link {
    padding: 9px;
  }
  .launch-link > span[aria-hidden] {
    font-size: 1.2rem;
  }
  .brand img {
    width: 103px;
  }
}
@media (max-width: 380px) {
  .site-header {
    padding: 0 12px;
  }
  .header-actions {
    gap: 6px;
  }
  .workspace {
    padding: 0 18px;
  }
  #search-dialog {
    padding: 18px;
  }
}
