:root {
  --ink: #16222e; --amber: #e0a458; --muted: #5d6b79; --line: #dde2e8; --soft: #f3f5f7;
  --link: #8a5a10; --text: #26343f; --nav-w: 250px; --toc-w: 210px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: #fff; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 20; background: var(--ink); padding: 12px 20px; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; }
.top-help { color: rgba(255,255,255,.8); text-decoration: none; font-size: 14px; padding: 4px 10px; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; }
.top-help:hover { color: #fff; border-color: var(--amber); }
.top .spacer { flex: 1; }
.top .app { color: var(--amber); text-decoration: none; font-size: 14px; font-weight: 600; }
.search { position: relative; flex: 0 1 420px; min-width: 160px; }
.search input { width: 100%; padding: 7px 12px 7px 34px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: 14px; }
.search input::placeholder { color: rgba(255,255,255,.55); }
.search input:focus { outline: none; border-color: var(--amber); background: rgba(255,255,255,.14); }
.search svg { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: rgba(255,255,255,.6); pointer-events: none; }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 320px; max-height: 70vh; overflow-y: auto; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.25); z-index: 40; }
.search-results[hidden] { display: none; }
.sr { display: block; padding: 9px 14px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.sr:last-child { border-bottom: 0; }
.sr:hover, .sr.active { background: #fbf4ea; }
.sr-where { display: block; font-size: 13px; font-weight: 600; }
.sr-text { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.sr mark { background: #fde9c4; color: inherit; padding: 0 1px; border-radius: 2px; }
.sr-empty { padding: 12px 14px; font-size: 13px; color: var(--muted); }
.nav-toggle { display: none; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; padding: 6px 10px; font: inherit; font-size: 14px; cursor: pointer; }

/* Layout */
.layout { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr) var(--toc-w); gap: 32px; max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.side { position: sticky; top: 58px; align-self: start; max-height: calc(100vh - 58px); overflow-y: auto; padding: 24px 0 40px; border-right: 1px solid var(--line); font-size: 14px; }
.side h3 { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 18px 12px 6px; }
.side h3:first-child { margin-top: 0; }
.side a { display: block; padding: 5px 12px; color: var(--text); text-decoration: none; border-left: 3px solid transparent; border-radius: 0 6px 6px 0; }
.side a:hover { background: var(--soft); }
.side a.current { border-left-color: var(--amber); background: #fbf4ea; font-weight: 600; color: var(--ink); }
.toc { position: sticky; top: 58px; align-self: start; max-height: calc(100vh - 58px); overflow-y: auto; padding: 32px 0 40px; font-size: 13px; }
.toc h4 { margin: 0 0 8px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.toc a { display: block; color: var(--muted); text-decoration: none; padding: 3px 0 3px 10px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--ink); }
.toc a.h3 { padding-left: 22px; font-size: 12px; }
main { padding: 32px 0 64px; min-width: 0; }
article { max-width: 820px; }

/* Typography */
h1 { font-size: 34px; letter-spacing: -0.02em; margin: 0 0 6px; line-height: 1.2; }
.lede { font-size: 18px; color: var(--muted); margin: 0 0 28px; }
h2 { font-size: 22px; margin: 40px 0 10px; padding-top: 10px; border-top: 1px solid var(--line); }
h3 { font-size: 17px; margin: 26px 0 6px; }
h4 { font-size: 15px; margin: 18px 0 4px; }
p, li { color: var(--text); }
li { margin: 4px 0; }
a { color: var(--link); }
a:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }
code { background: var(--soft); padding: 1px 5px; border-radius: 4px; }
pre { background: #1d2a37; color: #e8edf2; padding: 14px 16px; border-radius: 8px; overflow-x: auto; font-size: 14px; line-height: 1.5; }
pre code { background: none; padding: 0; color: inherit; }
kbd { background: #fff; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
table { border-collapse: collapse; width: 100%; margin: 12px 0 18px; font-size: 14.5px; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border: 1px solid var(--line); }
th { background: var(--soft); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.wrap { overflow-x: auto; }

/* Pieces */
.where { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.where span { background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--ink); }
.where .sep { background: none; border: 0; padding: 0; color: var(--muted); }
.callout { border-left: 4px solid var(--amber); background: #fbf4ea; padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 14px 0; }
.callout.tip { border-color: #2f855a; background: #eef8f1; }
.callout.warn { border-color: #c53030; background: #fdf0f0; }
.callout.note { border-color: #2b6cb0; background: #edf3fb; }
.callout p:first-child, .callout ul:first-child { margin-top: 0; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout > strong:first-child { display: block; margin-bottom: 2px; }
.badge { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 20px; color: #fff; background: #5d6b79; white-space: nowrap; }
.b-blue { background: #2b6cb0; } .b-yellow { background: #b7791f; } .b-purple { background: #6b46c1; } .b-orange { background: #c05621; }
.b-amber { background: #b7791f; } .b-green { background: #2f855a; } .b-red { background: #c53030; } .b-teal { background: #2c7a7b; } .b-gray { background: #718096; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 16px 0 24px; }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: #fff; }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0; font-size: 14px; color: var(--muted); }
.card a { text-decoration: none; }
.card a:hover { text-decoration: underline; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 14px 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 18px 44px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 14px; }
.steps > li::after { content: ""; position: absolute; left: 14px; top: 32px; bottom: 0; border-left: 2px solid var(--line); }
.steps > li:last-child::after { display: none; }
.steps > li > strong { display: block; font-size: 16px; margin-bottom: 2px; }
.flow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 18px; }
.flow .st { padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); font-weight: 600; font-size: 14px; }
.flow .arrow { color: var(--muted); }
.faq details { border: 1px solid var(--line); border-radius: 8px; padding: 0 14px; margin: 8px 0; background: #fff; }
.faq summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
.faq details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.faq details p:last-child { margin-bottom: 12px; }
.mock { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: #fff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; white-space: pre; overflow-x: auto; line-height: 1.45; color: var(--ink); }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }
.pager a { text-decoration: none; }
.pager small { display: block; color: var(--muted); }
.pager .next { text-align: right; }
dl.defs dt { font-weight: 600; margin-top: 12px; }
dl.defs dd { margin: 2px 0 0 0; color: var(--text); }
footer { border-top: 1px solid var(--line); padding: 20px; text-align: center; font-size: 14px; color: var(--muted); }
footer a { margin: 0 8px; }

/* Install guide: step list in the article, details panel on the right (install.js) */
body.install .layout { grid-template-columns: var(--nav-w) minmax(0, 1fr) minmax(360px, 460px); max-width: 1480px; }
body.install article { max-width: none; }
.igroup { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 26px 0 8px; }
.isteps { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.istep { margin: 0; border-top: 1px solid var(--line); }
.istep:first-child { border-top: 0; }
.ihead { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; gap: 4px 12px; align-items: center; padding: 11px 14px; color: var(--ink); text-decoration: none; border-left: 3px solid transparent; }
.ihead:hover { background: var(--soft); }
.istep.active > .ihead { background: #fbf4ea; border-left-color: var(--amber); }
.ihead .n { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.istep.done .ihead .n { background: #2f855a; }
.ihead .t { min-width: 0; }
.ihead h2 { font-size: 15.5px; margin: 0; padding: 0; border: 0; line-height: 1.35; }
.ihead .sum { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.istep.done .ihead h2 { color: var(--muted); }
.tag, .who { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border-radius: 4px; padding: 2px 7px; white-space: nowrap; line-height: 1.5; }
.tag { color: #fff; background: #718096; }
.t-req { background: #b7791f; } .t-auto { background: #2f855a; } .t-rec { background: #2b6cb0; } .t-opt { background: #718096; } .t-check { background: #6b46c1; }
.who { color: var(--muted); border: 1px solid var(--line); background: #fff; }
.ihead .who { grid-column: 4; }
.ihead .tag { grid-column: 3; }
.idetail { padding: 2px 16px 14px 59px; }
.idetail > :first-child { margin-top: 6px; }
.iprogress { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); margin: -10px 0 8px; }
.iprogress[hidden] { display: none; }
.iprogress .bar { flex: 0 1 220px; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.iprogress .bar span { display: block; height: 100%; background: #2f855a; transition: width .2s; }
.ireset { border: 0; background: none; color: var(--link); font: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.inote { margin-top: 22px; color: var(--muted); }
.ipanel { position: sticky; top: 90px; align-self: start; max-height: calc(100vh - 114px); overflow-y: auto; margin: 32px 0 24px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 6px 24px rgba(22,34,46,.08); }
.ipanel:empty { display: none; }
.ip-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 14px 18px 0; }
.ip-n { font-size: 12px; font-weight: 600; color: var(--muted); margin-right: auto; }
.ip-title { font-size: 21px; margin: 6px 18px 0; padding: 0; border: 0; }
.ip-body { padding: 4px 18px 8px; font-size: 15px; }
.ip-body table { font-size: 14px; }
.ip-foot { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); background: #fff; }
.ip-foot > :first-child { justify-self: start; }
.ip-foot > :last-child { justify-self: end; }
.ibtn { font: inherit; font-size: 14px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.ibtn:hover { border-color: var(--amber); }
.ibtn.tick { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }
.ibtn.tick.on { background: #2f855a; border-color: #2f855a; }
@media (min-width: 1101px) { .idetail { display: none; } }
@media (max-width: 1100px) {
  body.install .layout { grid-template-columns: var(--nav-w) minmax(0, 1fr); }
  .ipanel { display: none; }
  .idetail { display: none; }
  .istep.active > .idetail { display: block; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 124px; }
  body.install .layout { display: block; }
  .ihead { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .ihead .who { display: none; }
  .idetail { padding-left: 16px; }
}
@media print {
  .ipanel, .iprogress { display: none !important; }
  .idetail { display: block !important; }
}

@media (max-width: 1100px) {
  .layout { grid-template-columns: var(--nav-w) minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 760px) {
  .layout { display: block; padding: 0 16px; }
  .nav-toggle { display: inline-block; }
  .top { flex-wrap: wrap; }
  .search { order: 5; flex-basis: 100%; }
  .search-results { position: fixed; left: 12px; right: 12px; top: 100px; }
  .side { display: none; position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 0; }
  .side.open { display: block; }
  h1 { font-size: 28px; }
  .top { padding: 10px 16px; }
}
@media print {
  .top, .side, .toc, .pager, footer, .nav-toggle { display: none !important; }
  .layout { display: block; }
  a { color: inherit; text-decoration: none; }
}
