@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-latin-ext-variable.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1EFF, U+2000-206F, U+2074,
    U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-latin-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-mono-latin-ext-variable.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1EFF, U+2000-206F, U+2074,
    U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-mono-latin-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #fdfdf9;
  --panel: #ffffff;
  --panel-subtle: #f0f6ef;
  --text: #202218;
  --text-secondary: #414b3e;
  --muted: #5f6b5d;
  --faint: #7a8376;
  --line: #dfe6dc;
  --accent: #07512f;
  --accent-hover: #0b6039;
  --accent-soft: #e2f1e5;
  --code-bg: #f2f0e5;
  --code-fg: #23241b;
  --code-muted: #93937e;
  --code-keyword: #005229;
  --code-function: #b06a1f;
  --code-type: #2c6a47;
  --code-string: #4f7a3a;
  --code-number: #b45309;
  --code-punctuation: #8a8a76;
  --danger: #dc2626;
  --shadow-card: 0 1px 0 rgba(32, 34, 24, 0.05), 0 18px 45px -42px rgba(32, 44, 24, 0.22);
  --font-sans: "Geist", "Inter Variable", "Inter", "Noto Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-mono: "Geist Mono", "IBM Plex Mono", "Fira Code", "JetBrains Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.65 var(--font-sans);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

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

code,
pre,
kbd {
  font-family: var(--font-mono);
}

::selection {
  background: color-mix(in oklab, var(--accent) 18%, transparent);
  color: var(--text);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(253, 253, 249, 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}

.brand img {
  height: 28px;
  width: auto;
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.topbar nav a {
  border-radius: 4px;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 13px;
  line-height: 1.2;
}

.topbar nav a:hover {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}

.shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

.sidebar {
  position: sticky;
  top: 64px;
  max-height: calc(100vh - 64px);
  overflow: auto;
  border-right: 1px solid var(--line);
  padding: 24px 18px;
  background: #fafbf6;
}

.nav-group {
  margin-bottom: 24px;
}

.nav-group h2 {
  margin: 0 0 8px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 650;
}

.nav-subtitle {
  margin: 12px 0 4px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.nav-link {
  display: block;
  border-radius: 4px;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
  background: #dceee0;
  color: #102719;
  text-decoration: none;
}

.content {
  width: min(100%, 920px);
  padding: 42px 48px 96px;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--muted);
  font: 12px/1.4 var(--font-mono);
}

h1,
h2,
h3,
h4,
h5 {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.05;
}

h2 {
  margin: 44px 0 12px;
  font-size: 1.75rem;
  line-height: 1.22;
}

h3 {
  margin: 32px 0 10px;
  font-size: 1.3rem;
}

h4,
h5 {
  margin: 24px 0 8px;
  font-size: 1.05rem;
}

.description {
  margin: 0 0 34px;
  max-width: 68ch;
  color: var(--text-secondary);
  font-size: 1.08rem;
}

article {
  color: var(--text);
}

p,
ul,
ol,
table,
pre,
.callout {
  margin: 16px 0;
}

p,
li,
td {
  max-width: 72ch;
}

ul,
ol {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.35rem;
}

strong {
  color: var(--text);
  font-weight: 650;
}

code {
  border: 1px solid #c6dbc8;
  border-radius: 4px;
  background: #eef5ed;
  color: #123821;
  padding: 1px 5px;
  font-size: 0.92em;
}

pre {
  overflow: auto;
  border: 1px solid #d8dbce;
  border-radius: 8px;
  background: var(--code-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
  padding: 16px;
}

pre code {
  border: 0;
  background: transparent;
  color: var(--code-fg);
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: var(--code-muted);
  font-style: italic;
}

.token.keyword,
.token.operator,
.token.atrule {
  color: var(--code-keyword);
}

.token.function,
.token.class-name {
  color: var(--code-function);
}

.token.tag,
.token.selector,
.token.attr-name {
  color: var(--code-type);
}

.token.string,
.token.attr-value,
.token.regex {
  color: var(--code-string);
}

.token.number,
.token.boolean,
.token.constant {
  color: var(--code-number);
}

.token.punctuation {
  color: var(--code-punctuation);
}

.token.deleted,
.token.important {
  color: var(--danger);
}

table {
  display: block;
  width: 100%;
  overflow: auto;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
}

th {
  background: var(--panel-subtle);
  color: var(--text);
  font-weight: 650;
}

.callout {
  max-width: 72ch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-card);
  padding: 12px 14px;
}

.callout strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(32, 34, 24, 0.16);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(32, 34, 24, 0.28);
}

@media (max-width: 900px) {
  .topbar {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .topbar nav {
    justify-content: flex-start;
  }

  .shell {
    display: block;
  }

  .sidebar {
    position: relative;
    top: 0;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .content {
    padding: 28px 22px 72px;
  }

  h1 {
    font-size: 2.1rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
