:root { --bg: #fffdf8; --side: #faf5ea; --text: #20302b; --soft: #66746e; --line: #e8dfc9; --link: #0e6b57; --mark: #e9f2ee; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #12161a; --side: #171c21; --text: #dfe5e2; --soft: #93a09b; --line: #29312f; --link: #5cc3a6; --mark: #1d2b28; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--link); }
header { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 1rem; height: 3.5rem; padding: 0 1.25rem; background: var(--bg); border-bottom: 1px solid var(--line); }
header .name { font-weight: 700; color: var(--text); text-decoration: none; white-space: nowrap; }
#menu { display: none; background: none; border: 0; color: var(--text); font-size: 1.25rem; cursor: pointer; }
.search { position: relative; margin-left: auto; width: min(20rem, 100%); }
.search input { width: 100%; padding: .4rem .7rem; font: inherit; font-size: .9rem; color: var(--text); background: var(--side); border: 1px solid var(--line); border-radius: 8px; }
#hits { position: absolute; right: 0; top: calc(100% + .4rem); width: min(26rem, 92vw); max-height: 70vh; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgb(0 0 0 / .18); }
#hits a, #hits p { display: block; margin: 0; padding: .55rem .85rem; text-decoration: none; color: var(--text); font-size: .9rem; border-bottom: 1px solid var(--line); }
#hits a:hover, #hits a:focus { background: var(--mark); }
#hits small { display: block; color: var(--soft); }
.layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr) 14rem; max-width: 86rem; margin: 0 auto; }
nav, aside { position: sticky; top: 3.5rem; align-self: start; max-height: calc(100vh - 3.5rem); overflow: auto; padding: 1.5rem 1rem; }
nav { background: var(--side); border-right: 1px solid var(--line); min-height: calc(100vh - 3.5rem); }
nav p { margin: 1rem 0 .25rem; padding: 0 .7rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); }
nav p:first-child { margin-top: 0; }
nav a { display: block; padding: .35rem .7rem; border-radius: 7px; color: var(--text); text-decoration: none; font-size: .93rem; }
nav a:hover { background: var(--mark); }
nav a[aria-current] { background: var(--mark); color: var(--link); font-weight: 600; }
aside p { margin: 0 0 .5rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); }
aside a { display: block; padding: .2rem 0; font-size: .85rem; color: var(--soft); text-decoration: none; }
aside a:hover { color: var(--link); }
main { padding: 2rem clamp(1.25rem, 4vw, 3rem) 4rem; max-width: 52rem; width: 100%; margin: 0 auto; }
h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 1rem; }
h2 { font-size: 1.25rem; margin: 2.2rem 0 .6rem; padding-top: .4rem; }
h3 { font-size: 1rem; margin: 1.4rem 0 .4rem; }
li { margin: .25rem 0; }
b { font-weight: 650; }
code { background: var(--side); border: 1px solid var(--line); border-radius: 5px; padding: .05em .35em; font-size: .88em; overflow-wrap: anywhere; }
pre { background: var(--side); border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; overflow-x: auto; }
pre code { background: none; border: 0; padding: 0; overflow-wrap: normal; }
.table { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; vertical-align: top; padding: .45rem .7rem; border: 1px solid var(--line); }
th { background: var(--side); }
figure { margin: 1.2rem 0; }
figure img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; display: block; }
figcaption { margin-top: .4rem; font-size: .83rem; color: var(--soft); }
.note { margin: 1.2rem 0; padding: .7rem 1rem; border-left: 3px solid var(--link); background: var(--mark); border-radius: 0 8px 8px 0; }
.note p { margin: 0; }
.steps { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; }
.steps a { flex: 0 1 48%; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-weight: 600; }
.steps a:hover { border-color: var(--link); }
.steps small { display: block; color: var(--soft); font-weight: 400; }
.steps .next { text-align: right; }
@media (max-width: 70rem) { .layout { grid-template-columns: 14rem minmax(0, 1fr); } aside { display: none; } }
@media (max-width: 48rem) {
  .layout { display: block; }
  #menu { display: block; }
  nav { display: none; position: fixed; inset: 3.5rem 0 0 0; z-index: 2; max-height: none; }
  nav.open { display: block; }
}
