/* help.lords-bot.com: the guide, on top of the main site's site.css (same tokens, header, footer). */

/* ── Header search ────────────────────────────────────────────────────── */
.search-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 11px; border: 1px solid var(--line2); border-radius: 7px; background: var(--panel); color: var(--dim); font: 500 14px var(--ui); cursor: pointer; }
.search-btn:hover { color: var(--text); border-color: #4a5266; }
.search-btn .icon { width: 16px; height: 16px; }
.search-btn kbd, .g-search kbd { font: 600 11.5px var(--ui); color: var(--label); border: 1px solid var(--line2); border-radius: 5px; padding: 2px 6px; background: var(--bg); }
.search-btn-sm { display: none; width: 42px; height: 42px; padding: 0; justify-content: center; margin-left: auto; }
.search-btn-sm .icon { width: 18px; height: 18px; }

/* ── Home ─────────────────────────────────────────────────────────────── */
.g-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.g-hero h1 { margin-top: 10px; font-size: clamp(2.3rem, 5vw, 3.6rem); }
.g-search { margin-top: 26px; width: 100%; max-width: 640px; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 14px 0 18px; border: 1px solid var(--line2); border-radius: 10px; background: var(--panel); color: var(--label); font: 400 16px var(--ui); cursor: text; text-align: left; transition: border-color .15s, box-shadow .15s; }
.g-search:hover { border-color: #4a5266; }
.g-search:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58, 168, 216, .22); }
.g-search span { flex: 1; }
.g-search .icon { color: var(--dim); }
.g-sections { margin-top: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.g-card { border: 1px solid var(--line2); border-radius: 12px; background: var(--panel); padding: 22px 22px 18px; display: flex; flex-direction: column; }
.g-card-head { display: flex; gap: 14px; align-items: flex-start; color: var(--text); text-decoration: none; }
.g-card-head > .icon { flex: none; width: 40px; height: 40px; padding: 9px; border-radius: 9px; background: var(--inset); border: 1px solid var(--line2); color: var(--accent); }
.g-card-head b { display: block; font-size: 17px; letter-spacing: -0.01em; }
.g-card-head small { display: block; margin-top: 4px; color: var(--dim); font-size: 14px; line-height: 1.5; }
.g-card-head:hover b { color: var(--accent-hi); }
.g-card ul { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); }
.g-card li a { display: block; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--dim); text-decoration: none; font-size: 15px; }
.g-card li a:hover { color: var(--text); }
.g-more { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14.5px; text-decoration: none; }
.g-more .icon { width: 15px; height: 15px; }
.g-faq { margin-top: clamp(48px, 7vw, 80px); }
.g-faq .art-list { margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); column-gap: 24px; }
.g-help { margin-top: clamp(48px, 7vw, 80px); margin-bottom: clamp(56px, 8vw, 96px); display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 26px 28px; border: 1px solid var(--line2); border-radius: 12px; background: var(--panel); }
.g-help > div { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; }
.g-help > div .icon { grid-row: span 2; width: 28px; height: 28px; color: var(--accent); }
.g-help h2 { font-size: 1.25rem; }
.g-help p { margin: 2px 0 0; color: var(--dim); }

/* ── Article list (section pages, FAQ) ────────────────────────────────── */
.art-list { list-style: none; margin: 24px 0 0; padding: 0; }
.art-list a { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.art-list a > .icon { color: var(--label); flex: none; }
.art-list a > .chev { margin-left: auto; width: 16px; height: 16px; color: var(--faint); transition: transform .2s var(--ease), color .2s; }
.art-list a:hover > .chev { color: var(--accent); transform: translateX(3px); }
.art-list b { display: block; font-weight: 600; }
.art-list small { display: block; margin-top: 3px; color: var(--dim); font-size: 14px; line-height: 1.5; }

/* ── Article layout: sections | article | on this page ───────────────── */
.doc-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr) 200px; gap: clamp(24px, 3.4vw, 48px); align-items: start; padding-top: clamp(28px, 4vw, 48px); padding-bottom: clamp(56px, 8vw, 96px); }
.side { position: sticky; top: 86px; max-height: calc(100vh - 106px); overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }
.side-group { border-bottom: 1px solid var(--line); }
.side-group summary { display: flex; align-items: center; gap: 10px; padding: 11px 4px; cursor: pointer; list-style: none; color: var(--text); font-weight: 600; font-size: 14.5px; }
.side-group summary::-webkit-details-marker { display: none; }
.side-group summary .icon { width: 16px; height: 16px; color: var(--label); flex: none; }
.side-group summary .chev { margin-left: auto; transition: transform .2s var(--ease); }
.side-group[open] summary .chev { transform: rotate(180deg); }
.side-group ul { list-style: none; margin: 0 0 10px; padding: 0 0 0 30px; }
.side-group li a { display: block; padding: 5px 8px; margin-left: -8px; border-radius: 6px; color: var(--dim); text-decoration: none; font-size: 14px; line-height: 1.4; }
.side-group li a:hover { color: var(--text); background: var(--panel); }
.side-group li a[aria-current] { color: var(--text); background: var(--inset); box-shadow: inset 2px 0 0 var(--accent); }

.doc { min-width: 0; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 13.5px; }
.crumbs a { color: var(--label); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs .icon { width: 14px; height: 14px; color: var(--faint); }
.doc h1 { margin-top: 12px; font-size: clamp(2rem, 3.6vw, 2.8rem); }
.doc-lede { margin-top: 12px; }
.doc-meta { margin: 14px 0 0; display: inline-flex; align-items: center; gap: 7px; color: var(--label); font-size: 13.5px; }
.doc-meta .icon { width: 14px; height: 14px; }

.toc { position: sticky; top: 86px; max-height: calc(100vh - 106px); overflow-y: auto; scrollbar-width: thin; }
.toc ol { list-style: none; margin: 12px 0 0; padding: 0; border-left: 1px solid var(--line2); }
.toc li a { display: block; padding: 4px 0 4px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--dim); text-decoration: none; font-size: 13.5px; line-height: 1.4; }
.toc li.h3 a { padding-left: 26px; font-size: 13px; }
.toc li a:hover { color: var(--text); }
.toc li a.active { color: var(--text); border-left-color: var(--accent); }

/* ── Article text ─────────────────────────────────────────────────────── */
.prose { margin-top: 28px; color: var(--text); font-size: 16.5px; line-height: 1.7; }
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 2.2em; padding-top: 1.2em; border-top: 1px solid var(--line); font-size: 1.6rem; letter-spacing: -0.02em; scroll-margin-top: 90px; }
.prose h3 { margin-top: 1.8em; font-size: 1.2rem; letter-spacing: -0.01em; scroll-margin-top: 90px; }
.prose h4 { margin-top: 1.5em; font-size: 1rem; }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose .h-anchor { margin-left: 8px; color: var(--faint); text-decoration: none; opacity: 0; transition: opacity .15s; }
.prose h2:hover .h-anchor, .prose h3:hover .h-anchor, .prose .h-anchor:focus { opacity: 1; }
.prose p, .prose li { color: #c9ced8; }
.prose strong { color: var(--text); font-weight: 650; }
.prose a { color: var(--accent-hi); text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--label); }
.prose code { padding: .12em .4em; border-radius: 5px; background: var(--inset); border: 1px solid var(--line2); font-size: .9em; font-family: ui-monospace, Consolas, monospace; color: var(--text); }
.prose pre { padding: 14px 16px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line2); overflow-x: auto; }
.prose pre code { padding: 0; border: 0; background: none; }
.prose blockquote { margin-left: 0; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--panel); border-radius: 0 8px 8px 0; }
.prose blockquote > :first-child { margin-top: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose th { text-align: left; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--label); padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.prose td { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: #c9ced8; }
.prose img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line2); border-radius: 8px; background: var(--bg); }
.prose .shot-link { display: inline-block; max-width: 100%; }
.prose .shot-link:hover img { border-color: #4a5266; }
.prose p > em:only-child, .prose img + em { display: block; margin-top: 6px; color: var(--label); font-size: 14px; font-style: normal; }
.prose details { border: 1px solid var(--line2); border-radius: 8px; background: var(--panel); padding: 0 16px; }
.prose details > summary { padding: 12px 0; cursor: pointer; font-weight: 600; color: var(--text); }
.prose details[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.prose details > :last-child { margin-bottom: 14px; }

.pager { margin-top: 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pager a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line2); border-radius: 10px; text-decoration: none; color: var(--text); transition: border-color .15s, background-color .15s; }
.pager a:hover { border-color: #4a5266; background: var(--panel); }
.pager-next { text-align: right; }
.pager b { font-weight: 600; }
.doc-help { margin-top: 20px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--dim); font-size: 14.5px; }
.doc-help .icon { color: var(--accent); flex: none; }
.doc-help p { margin: 0; }

/* ── Search dialog ────────────────────────────────────────────────────── */
.search-dlg { width: calc(100% - 32px); max-width: 680px; margin: 10vh auto auto; padding: 0; border: 1px solid var(--line2); border-radius: 12px; background: var(--panel); color: var(--text); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); }
.search-dlg::backdrop { background: rgba(6, 7, 10, .72); }
.search-box { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line2); }
.search-box > .icon { color: var(--dim); }
.search-box input { flex: 1; min-width: 0; height: 40px; border: 0; background: none; color: var(--text); font: 400 17px var(--ui); outline: none; }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-results { max-height: min(60vh, 560px); overflow-y: auto; padding: 8px; }
.search-results:empty { display: none; }
.sr-item { display: block; padding: 11px 12px; border-radius: 8px; color: var(--text); text-decoration: none; }
.sr-item:hover, .sr-item[aria-selected="true"] { background: var(--inset); }
.sr-item b { display: block; font-weight: 600; }
.sr-item small { display: block; margin-top: 2px; color: var(--label); font-size: 12.5px; }
.sr-item p { margin: 5px 0 0; color: var(--dim); font-size: 14px; line-height: 1.5; }
.sr-item mark { background: rgba(58, 168, 216, .22); color: var(--text); border-radius: 3px; padding: 0 2px; }
.sr-empty { padding: 22px 12px; color: var(--dim); text-align: center; }

/* ── 404 ──────────────────────────────────────────────────────────────── */
.g-404 { padding-top: clamp(56px, 9vw, 120px); padding-bottom: clamp(56px, 9vw, 120px); }
.g-404 .lede { margin-top: 14px; }
.g-404 .btn-row { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Responsive ───────────────────────────────────────────────────────── */
.g-popular { margin-top: clamp(32px, 5vw, 48px); }
.g-pop-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.g-pop { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 40px 14px 14px; border: 1px solid var(--line2); border-radius: 10px; background: var(--panel); color: var(--text); text-decoration: none; transition: border-color .15s, background-color .15s; }
.g-pop > .icon:first-child { flex: none; width: 34px; height: 34px; padding: 8px; border-radius: 8px; background: var(--inset); border: 1px solid var(--line2); color: var(--accent); }
.g-pop b { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; }
.g-pop small { display: block; margin-top: 4px; color: var(--dim); font-size: 14px; line-height: 1.5; }
.g-pop-go { position: absolute; right: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--faint); transition: color .15s, transform .2s var(--ease); }
.g-pop:hover { border-color: #4a5266; background: var(--inset); }
.g-pop:hover .g-pop-go { color: var(--accent-hi); transform: translateX(3px); }
.g-pop-lg { grid-column: span 2; align-items: flex-start; padding: 20px 44px 20px 20px; border-color: color-mix(in srgb, var(--accent) 35%, var(--line2)); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 9%, var(--panel)), var(--panel) 70%); }
.g-pop-lg > .icon:first-child { width: 42px; height: 42px; padding: 10px; }
.g-pop-lg b { font-size: 17px; }
.g-pop-lg:hover { border-color: var(--accent); }

/* Numbered steps */
.prose ol { list-style: none; padding-left: 0; counter-reset: step; }
.prose ol > li { position: relative; padding-left: 40px; counter-increment: step; }
.prose ol > li + li { margin-top: .75em; }
.prose ol > li::before { content: counter(step); position: absolute; left: 0; top: .1em; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--inset); border: 1px solid var(--line2); color: var(--accent-hi); font-size: 13px; font-weight: 650; line-height: 1; }

/* Command lists (```commands blocks) */
.prose .cmds { border: 1px solid var(--line2); border-radius: 10px; background: var(--panel); overflow: hidden; }
.prose .cmds + * { margin-top: 1.4em; }
.cmd { position: relative; display: grid; gap: 6px; padding: 14px 52px 14px 16px; }
.cmd + .cmd { border-top: 1px solid var(--line); }
.cmd { scroll-margin-top: 96px; }
.cmd:target { background: color-mix(in srgb, var(--accent) 9%, var(--panel)); box-shadow: inset 3px 0 0 var(--accent); animation: cmd-flash 1.6s var(--ease); }
@keyframes cmd-flash { from { background: color-mix(in srgb, var(--accent) 22%, var(--panel)); } }
.opt-row { scroll-margin-top: 96px; }
tr.opt-row:target > td { background: color-mix(in srgb, var(--accent) 9%, transparent); animation: cmd-flash 1.6s var(--ease); }
tr.opt-row:target > td:first-child { box-shadow: inset 3px 0 0 var(--accent); padding-left: 10px; }
li.opt-row:target { background: color-mix(in srgb, var(--accent) 9%, transparent); box-shadow: -10px 0 0 color-mix(in srgb, var(--accent) 9%, transparent), -13px 0 0 var(--accent); border-radius: 0 6px 6px 0; animation: cmd-flash 1.6s var(--ease); }
@media (prefers-reduced-motion: reduce) { .cmd:target, .opt-row:target > td, li.opt-row:target { animation: none; } }
.cmd-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.cmd-syntax { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.prose .cmd-syntax code { padding: .18em .5em; background: var(--inset); border-color: var(--line2); color: var(--accent-hi); font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.cmd-syntax i { font-style: normal; font-weight: 500; color: var(--dim); }
.cmd-syntax i::before { content: "<"; color: var(--faint); }
.cmd-syntax i::after { content: ">"; color: var(--faint); }
.cmd-syntax b { font-weight: 600; color: var(--accent-hi); }
.cmd-syntax .opt { color: var(--faint); font-weight: 500; }
.cmd-syntax .opt i { color: #7d8597; }
.cmd-syntax .opt b { color: #6fa9c4; }
.cmd-syntax .opt i::before, .cmd-syntax .opt i::after { content: none; }
.cmd-pipe { margin: 0 1px; color: var(--faint); font-weight: 400; }
.cmd-or { font-size: 12.5px; color: var(--faint); }
.rank { font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; border: 1px solid; line-height: 1.5; cursor: help; }
.rank-member { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); background: color-mix(in srgb, var(--good) 10%, transparent); }
.rank-r4 { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.rank-admin { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.cmd-body p { margin: 0; font-size: 15.5px; line-height: 1.6; }
.prose .cmd-body p + p { margin-top: 6px; }
.prose .cmd-ex { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 6px 10px; margin-top: 8px; font-size: 14px; }
.cmd-ex > span { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.prose .cmd-ex ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.prose .cmd-ex li { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.prose .cmd-ex code { font-size: 13.5px; }
.cmd-ex small { color: var(--dim); font-size: 13.5px; }
.prose .syntax-key { display: grid; gap: 8px; padding: 0; list-style: none; }
.prose .syntax-key li { display: grid; grid-template-columns: 6.5rem 1fr; align-items: baseline; gap: 12px; margin: 0; }
.cmd-copy { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; border: 1px solid transparent; background: none; color: var(--faint); cursor: pointer; transition: color .15s, border-color .15s, background-color .15s; }
.cmd-copy .icon { width: 15px; height: 15px; }
.cmd-copy:hover, .cmd-copy:focus-visible { color: var(--text); border-color: var(--line2); background: var(--inset); }
.cmd-copy.copied { color: var(--good); }
.prose .rank-legend { display: grid; gap: 10px; padding: 0; list-style: none; }
.prose .rank-legend li { display: grid; grid-template-columns: 5.5rem 1fr; align-items: baseline; gap: 12px; margin: 0; }
.rank-legend .rank { justify-self: start; cursor: default; }
@media (max-width: 760px) {
  .g-pop-grid { grid-template-columns: 1fr; }
  .g-pop-lg { grid-column: auto; }
  .cmd { padding-right: 48px; }
}

@media (max-width: 1100px) and (min-width: 761px) {
  .g-pop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .doc-wrap { grid-template-columns: 220px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 900px) {
  .search-btn-sm { display: inline-flex; }
  .search-btn-sm + .menu-btn { margin-left: 8px; }
  .doc-wrap { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .g-faq .art-list { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .prose { font-size: 16px; }
  .pager { grid-template-columns: 1fr; }
  .pager-next { text-align: left; }
  .search-dlg { margin-top: 0; max-width: none; width: 100%; border-radius: 0; border: 0; border-bottom: 1px solid var(--line2); }
}
