:root {
  --bg: #050505;
  --panel: #080808;
  --panel-2: #111111;
  --text: #f4f4f4;
  --muted: #a3a3a3;
  --muted-2: #777777;
  --border: #242424;
  --border-strong: #f4f4f4;
  --code: #101010;
  --paper: #f7f7f7;
  --paper-text: #050505;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .055;
  background-image: radial-gradient(#fff 1px, transparent 1px);
  background-size: 5px 5px;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }

.site-header,
footer,
main {
  max-width: 1220px;
  margin: 0 auto;
  padding-inline: 1.35rem;
}
.site-header {
  min-height: 72px;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .75rem;
}
.brand {
  color: var(--text);
  font-weight: 900;
  letter-spacing: .08em;
}
nav { display: flex; gap: 1.35rem; flex-wrap: wrap; }
nav a { color: var(--muted); }
nav a:hover { color: var(--text); }

main { padding-block: 0 4.5rem; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 360px;
  gap: 4rem;
  min-height: 620px;
  align-items: end;
  padding: 5.4rem 0 3.4rem;
  border-bottom: 1px solid var(--border);
}
.guide-hero { max-width: none; }
.eyebrow,
.sidebar-title {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .75rem;
  font-weight: 800;
}
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(4rem, 10vw, 8.9rem);
  line-height: .78;
  letter-spacing: -.085em;
  margin: 1rem 0 1.75rem;
  max-width: 940px;
}
h2 { line-height: 1.1; letter-spacing: -.035em; }
.lede {
  max-width: 800px;
  color: #cfcfcf;
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  line-height: 1.45;
}
.muted { color: var(--muted); }
.callout {
  margin-top: 2.1rem;
  display: inline-flex;
  gap: .8rem;
  align-items: center;
  border: 1px solid var(--border-strong);
  padding: .8rem 1rem;
  background: transparent;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .75rem;
  font-weight: 750;
}
.callout::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--text);
  box-shadow: 0 0 18px var(--text);
}

.node-panel,
.sidebar {
  border: 1px solid var(--border);
  background: rgba(8, 8, 8, .92);
}
.node-panel { padding: 1.35rem; }
.node-panel h2 {
  margin: 0 0 1.5rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .75rem;
}
.node {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}
.node:first-of-type { border-top: 0; }
.num,
.step-number {
  color: var(--muted-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.node strong { display: block; font-size: 1.1rem; }
.node span { display: block; color: var(--muted); font-size: .85rem; margin-top: .25rem; }

.search {
  max-width: 760px;
  margin-top: 1.4rem;
  border: 1px solid #333;
  color: var(--muted);
  background: rgba(8, 8, 8, .82);
  padding: .3rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .85rem;
}

.guide-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 2.65rem;
  align-items: start;
  padding: 3.4rem 0 4.75rem;
}
.home-guide { margin-top: 0; }
.sidebar {
  position: sticky;
  top: 1.25rem;
  padding: 1.1rem;
}
.sidebar-title { margin: 0 0 .9rem; }
.nav-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted-2);
}
.nav-list li { margin: .15rem 0; }
.nav-list a {
  display: block;
  color: #e0e0e0;
  padding: .52rem 0;
  border-top: 1px solid #222222;
  font-size: .95rem;
}
.nav-list li:first-child a { border-top: 0; }
.nav-list a:hover,
.nav-list a.active {
  color: var(--text);
  padding-left: .35rem;
}

.guide-main { min-width: 0; max-width: 820px; }
.section-header { margin-bottom: 2rem; }
.section-header h1,
.content h1 { font-size: clamp(3.2rem, 7vw, 6.2rem); }

.steps {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.steps li { margin: 0; }
.steps li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.steps li a {
  min-height: 185px;
  height: 100%;
  display: block;
  padding: 1.75rem;
  background: var(--bg);
  transition: background .18s ease;
}
.steps li a:hover { background: var(--panel-2); }
.step-number { display: block; margin-bottom: 2rem; }
.steps strong {
  color: var(--text);
  display: block;
  font-size: 1.55rem;
  line-height: 1.05;
  letter-spacing: -.04em;
}
.steps em { color: var(--muted); display: block; font-style: normal; margin-top: .7rem; }

.content {
  padding: .2rem 0 2rem;
  font-size: 1.1rem;
}
.content h2 {
  margin-top: 2.6rem;
  border-top: 1px solid var(--border);
  padding-top: 1.35rem;
}
.content h3 { margin-top: 1.6rem; color: var(--text); }
.content p,
.content li {
  color: #e1e1e1;
  font-size: 1.04rem;
  line-height: 1.72;
}
.content a { border-bottom: 1px solid #777; }
.content a:hover { border-color: var(--text); }
.content code {
  background: var(--code);
  border: 1px solid var(--border);
  padding: .12rem .35rem;
  border-radius: 0;
}
pre {
  overflow-x: auto;
  background: var(--code);
  border: 1px solid var(--border);
  padding: 1rem;
}
pre code { background: transparent; border: 0; padding: 0; }
blockquote { border-left: 3px solid var(--text); margin-left: 0; padding-left: 1rem; color: var(--muted); }
table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 1rem; }
th, td { border: 1px solid #3a3a3a; padding: .75rem .85rem; vertical-align: top; }
th { color: var(--text); text-align: left; background: #151515; font-weight: 800; }
td { color: #e0e0e0; }
tr:nth-child(even) td { background: rgba(255,255,255,.025); }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.pager a {
  border: 1px solid var(--border);
  padding: .75rem .95rem;
  background: rgba(8, 8, 8, .75);
  color: var(--text);
}
.pager a:hover { border-color: var(--text); }

:root {
  --pagefind-ui-primary: var(--text);
  --pagefind-ui-text: var(--text);
  --pagefind-ui-background: var(--panel);
  --pagefind-ui-border: #333;
  --pagefind-ui-tag: var(--panel-2);
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 0;
  --pagefind-ui-font: inherit;
}
.pagefind-ui__search-input { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important; }
.pagefind-ui__result-title a { color: var(--text); }
.pagefind-ui__result-excerpt { color: #c9c9c9; }
.pagefind-ui__message { color: var(--muted); }

footer {
  color: var(--muted-2);
  border-top: 1px solid var(--border);
  padding-block: 1.75rem 2.6rem;
  font-size: .85rem;
}

@media (max-width: 900px) {
  .site-header { align-items: flex-start; flex-direction: column; padding-block: 1rem; }
  .hero,
  .guide-shell { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 3rem; gap: 2rem; }
  .sidebar { position: static; }
  .steps { grid-template-columns: 1fr; }
  h1 { font-size: clamp(3.2rem, 16vw, 5rem); }
}
