/* Linkeia Knowledge - own styles for the knowledge base pages, independent of the WHMCS theme.
   Everything lives under #lkk; light by default, dark by the device or the button (html[data-lkk-theme]). */

#lkk {
    --lkk-bg: #f5f7fa;
    --lkk-surface: #ffffff;
    --lkk-surface-2: #f3f6f9;
    --lkk-line: #e3e8ee;
    --lkk-line-strong: #cfd8e2;
    --lkk-text: #1d2b38;
    --lkk-head: #0f2a44;
    --lkk-muted: #5b6b7a;
    --lkk-accent: #0a1720;
    --lkk-brand: #0a1720;
    --lkk-brand-hover: #1c3242;
    --lkk-accent-soft: #eef1f4;
    --lkk-accent-text: #0a1720;
    --lkk-mark: #fff1b8;
    --lkk-code: #eef2f6;
    --lkk-pre: #0f2233;
    --lkk-pre-text: #e6edf3;
    --lkk-shadow: 0 10px 30px rgba(15, 42, 68, .08);
    --lkk-radius: 0;
    --lkk-font: "Open Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --lkk-head-font: "Bai Jamjuree", "Open Sans", "Segoe UI", system-ui, sans-serif;
    --lkk-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color-scheme: light;
}
html[data-lkk-theme="dark"] #lkk, html.lk-dark:not([data-lkk-theme="light"]) #lkk {
    --lkk-bg: #0b1620;
    --lkk-surface: #111f2b;
    --lkk-surface-2: #16273550;
    --lkk-line: #223444;
    --lkk-line-strong: #2e4458;
    --lkk-text: #d7e1ea;
    --lkk-head: #f1f6fa;
    --lkk-muted: #93a6b8;
    --lkk-accent: #c3d0db;
    --lkk-brand: #1c3242;
    --lkk-brand-hover: #2a4a63;
    --lkk-accent-soft: #1c3242;
    --lkk-accent-text: #dbe4ec;
    --lkk-mark: #5a4a12;
    --lkk-code: #1a2c3b;
    --lkk-pre: #07111a;
    --lkk-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
    html:not([data-lkk-theme="light"]) #lkk {
        --lkk-bg: #0b1620;
        --lkk-surface: #111f2b;
        --lkk-surface-2: #16273550;
        --lkk-line: #223444;
        --lkk-line-strong: #2e4458;
        --lkk-text: #d7e1ea;
        --lkk-head: #f1f6fa;
        --lkk-muted: #93a6b8;
        --lkk-accent: #c3d0db;
        --lkk-brand: #1c3242;
        --lkk-brand-hover: #2a4a63;
        --lkk-accent-soft: #1c3242;
        --lkk-accent-text: #dbe4ec;
        --lkk-mark: #5a4a12;
        --lkk-code: #1a2c3b;
        --lkk-pre: #07111a;
        --lkk-shadow: 0 10px 30px rgba(0, 0, 0, .35);
        color-scheme: dark;
    }
}

/* the theme's own page title, breadcrumb and body background step aside on these pages */
body:has(#lkk) .main-header, body:has(#lkk) .header-lined, body:has(#lkk) .master-breadcrumb, body:has(#lkk) section#main-body .header-lined { display: none !important; }
html[data-lkk-theme="dark"] body:has(#lkk) .main-body, html[data-lkk-theme="dark"] body:has(#lkk) .app-main,
html[data-lkk-theme="dark"] body:has(#lkk) #main-body, html[data-lkk-theme="dark"] body:has(#lkk) section#main-body { background: #0b1620 !important; }
@media (prefers-color-scheme: dark) {
    html:not([data-lkk-theme="light"]) body:has(#lkk) .main-body, html:not([data-lkk-theme="light"]) body:has(#lkk) .app-main,
    html:not([data-lkk-theme="light"]) body:has(#lkk) #main-body { background: #0b1620 !important; }
}
body:has(#lkk) .main-content, body:has(#lkk) .primary-content { width: 100%; max-width: 100%; flex: 1 1 100%; }

/* ---------------------------------------------------------------- base */
#lkk { position: relative; font-family: var(--lkk-font); font-size: 15px; line-height: 1.6; color: var(--lkk-text); padding: 8px 0 40px; -webkit-font-smoothing: antialiased; }
#lkk *, #lkk *::before, #lkk *::after { box-sizing: border-box; }
#lkk a { color: var(--lkk-accent-text); text-decoration: none; }
#lkk a:hover { text-decoration: underline; }
#lkk a.lkk-card, #lkk a.lkk-card:hover, #lkk .lkk-links a:hover, #lkk .lkk-quick a:hover { text-decoration: none; }
#lkk :focus-visible { outline: 2px solid var(--lkk-accent); outline-offset: 2px; border-radius: 6px; }
#lkk .lkk-i { width: 20px; height: 20px; flex: none; vertical-align: middle; }
#lkk .lkk-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#lkk h1, #lkk h2, #lkk h3, #lkk h4, #lkk p, #lkk ol, #lkk ul { margin: 0; padding: 0; }
#lkk .lkk-h1 { font-family: var(--lkk-head-font); font-size: clamp(28px, 4vw, 40px); line-height: 1.15; font-weight: 600; letter-spacing: -.02em; color: var(--lkk-head); }
#lkk .lkk-h2 { font-family: var(--lkk-head-font); font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; color: var(--lkk-head); margin: 0 0 16px; }
#lkk .lkk-lead { font-size: 15px; color: var(--lkk-muted); margin-top: 10px; max-width: 720px; }
#lkk .lkk-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lkk-accent-text); margin-bottom: 10px; }
#lkk .lkk-section { margin-top: 48px; }
#lkk .lkk-empty, #lkk .lkk-count { color: var(--lkk-muted); }
#lkk .lkk-count { margin-bottom: 14px; font-size: 14px; }

/* theme button */
#lkk .lkk-theme { position: absolute; top: 18px; right: 18px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--lkk-line); border-radius: 12px; background: var(--lkk-surface); color: var(--lkk-head); cursor: pointer; }
#lkk .lkk-theme:hover { border-color: var(--lkk-accent); color: var(--lkk-accent-text); }
#lkk .lkk-i-sun { display: none; }
html[data-lkk-theme="dark"] #lkk .lkk-i-sun { display: block; }
html[data-lkk-theme="dark"] #lkk .lkk-i-moon { display: none; }
@media (prefers-color-scheme: dark) {
    html:not([data-lkk-theme="light"]) #lkk .lkk-i-sun { display: block; }
    html:not([data-lkk-theme="light"]) #lkk .lkk-i-moon { display: none; }
}

/* ---------------------------------------------------------------- hero and search */
#lkk .lkk-hero { padding: 48px 40px; border-radius: 0; background: radial-gradient(1200px 300px at 10% -20%, var(--lkk-accent-soft), transparent 60%), var(--lkk-surface); border: 1px solid var(--lkk-line); }
#lkk .lkk-hero-sm { padding: 32px 36px; }
#lkk .lkk-hero .lkk-h1 { padding-right: 56px; }
#lkk .lkk-search { display: flex; align-items: center; gap: 8px; margin-top: 24px; max-width: 760px; padding: 6px 6px 6px 16px; border: 1px solid var(--lkk-line-strong); border-radius: 14px; background: var(--lkk-surface); box-shadow: var(--lkk-shadow); }
#lkk .lkk-search:focus-within { border-color: var(--lkk-accent); }
#lkk .lkk-search-ico { color: var(--lkk-muted); display: flex; }
#lkk .lkk-search input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; color: var(--lkk-text); font: inherit; font-size: 16px; box-shadow: none; padding: 0; }
#lkk .lkk-search input::placeholder { color: var(--lkk-muted); opacity: .85; }
#lkk .lkk-search-lg { max-width: 820px; }
#lkk .lkk-search-lg input { height: 52px; font-size: 17px; }

/* buttons */
#lkk .lkk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border: 1px solid var(--lkk-accent); border-radius: 10px; background: var(--lkk-accent); color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; }
#lkk .lkk-btn:hover { filter: brightness(1.06); text-decoration: none; color: #fff; }
#lkk .lkk-btn-ghost { background: transparent; color: var(--lkk-accent-text); border-color: var(--lkk-line-strong); }
#lkk .lkk-btn-ghost:hover { border-color: var(--lkk-accent); background: var(--lkk-accent-soft); color: var(--lkk-accent-text); filter: none; }
#lkk .lkk-btn .lkk-i { width: 18px; height: 18px; }

/* breadcrumb and chips */
#lkk .lkk-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 14px; font-size: 14px; color: var(--lkk-muted); }
#lkk .lkk-crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
#lkk .lkk-crumbs a { color: var(--lkk-muted); }
#lkk .lkk-crumbs a:hover { color: var(--lkk-accent-text); }
#lkk .lkk-crumbs [aria-current] { color: var(--lkk-text); max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#lkk .lkk-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 14px; font-size: 14px; color: var(--lkk-muted); }
#lkk .lkk-meta span { display: inline-flex; align-items: center; gap: 6px; }
#lkk .lkk-meta .lkk-i { width: 16px; height: 16px; }
#lkk .lkk-chip { display: inline-flex; padding: 4px 12px; border-radius: 99px; background: var(--lkk-accent-soft); color: var(--lkk-accent-text); font-weight: 600; font-size: 13px; }

/* ---------------------------------------------------------------- cards */
#lkk .lkk-grid { display: grid; gap: 24px; }
#lkk .lkk-grid-cats, #lkk .lkk-grid-articles { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
#lkk .lkk-grid-help { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
#lkk .lkk-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 24px 22px; border: 1px solid var(--lkk-line); border-radius: var(--lkk-radius); background: var(--lkk-surface); color: var(--lkk-text); transition: border-color .15s, box-shadow .15s, transform .15s; min-height: 100%; }
#lkk a.lkk-card:hover { border-color: var(--lkk-line-strong); box-shadow: var(--lkk-shadow); transform: translateY(-2px); }
#lkk .lkk-ico { display: flex; color: var(--lkk-accent); margin-bottom: 8px; }
#lkk .lkk-ico .lkk-i { width: 32px; height: 32px; stroke-width: 1.5; }
#lkk .lkk-ico-sm .lkk-i { width: 24px; height: 24px; }
#lkk .lkk-card-title { font-family: var(--lkk-head-font); font-size: 17px; line-height: 1.35; font-weight: 600; color: var(--lkk-head); }
#lkk .lkk-card-text { font-size: 15px; line-height: 1.6; color: var(--lkk-muted); }
#lkk .lkk-card-meta { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--lkk-accent-text); }
#lkk .lkk-card-meta .lkk-i { width: 16px; height: 16px; transition: transform .15s; }
#lkk a.lkk-card:hover .lkk-card-meta .lkk-i { transform: translateX(3px); }
#lkk .lkk-art-top { display: flex; width: 100%; justify-content: space-between; align-items: flex-start; }
#lkk .lkk-num { font-size: 13px; font-weight: 700; color: var(--lkk-muted); opacity: .7; }

/* latest + quick links, common topics */
#lkk .lkk-split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; margin-top: 48px; }
#lkk .lkk-split .lkk-section { margin-top: 0; }
#lkk .lkk-panel { padding: 24px; border: 1px solid var(--lkk-line); border-radius: var(--lkk-radius); background: var(--lkk-surface); }
#lkk .lkk-links { list-style: none; }
#lkk .lkk-links li + li { border-top: 1px solid var(--lkk-line); }
#lkk .lkk-links a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; color: var(--lkk-text); }
#lkk .lkk-links a:hover .lkk-links-title { color: var(--lkk-accent-text); }
#lkk .lkk-links-title { font-weight: 600; }
#lkk .lkk-links-cat { flex: none; font-size: 13px; color: var(--lkk-muted); }
#lkk .lkk-quick { list-style: none; display: grid; gap: 4px; }
#lkk .lkk-quick a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin: 0 -10px; border-radius: 10px; color: var(--lkk-text); font-weight: 500; }
#lkk .lkk-quick a:hover { background: var(--lkk-accent-soft); color: var(--lkk-accent-text); }
#lkk .lkk-quick .lkk-i { width: 18px; height: 18px; color: var(--lkk-accent); }
#lkk .lkk-mostread { padding: 32px 36px; border: 1px solid color-mix(in srgb, var(--lkk-accent) 22%, var(--lkk-line)); border-radius: var(--lkk-radius); background: var(--lkk-accent-soft); }
#lkk .lkk-mostread .lkk-h2 { text-align: left; margin-bottom: 22px; }
#lkk .lkk-toplist { display: grid; grid-auto-flow: column; grid-template-rows: repeat(var(--lkk-rows, 5), auto); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 40px; padding-left: 26px; counter-reset: none; }
#lkk .lkk-toplist li { padding-left: 4px; line-height: 1.45; }
#lkk .lkk-toplist li::marker { color: var(--lkk-head); font-weight: 600; }
#lkk .lkk-toplist a { color: var(--lkk-accent-text); font-weight: 500; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--lkk-accent) 45%, transparent); text-underline-offset: 3px; }
#lkk .lkk-toplist a:hover { text-decoration-color: currentColor; }
#lkk .lkk-toplist-cat { display: inline-block; margin-left: 6px; font-size: 12.5px; color: var(--lkk-muted); white-space: nowrap; }

/* support cards */
#lkk .lkk-help { padding-top: 8px; }
#lkk .lkk-help-head { margin-bottom: 20px; }
#lkk .lkk-help-head .lkk-h2 { margin: 0; }
#lkk .lkk-help-head .lkk-lead { margin-top: 4px; font-size: 15px; }
#lkk .lkk-action .lkk-btn { margin-top: auto; }

/* ---------------------------------------------------------------- article */
#lkk .lkk-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start; margin-top: 32px; }
#lkk .lkk-aside { position: sticky; top: 96px; display: grid; gap: 14px; }
#lkk .lkk-search-side { margin: 0; max-width: none; padding: 2px 4px 2px 12px; border-radius: 0; box-shadow: none; }
#lkk .lkk-search-side input { height: 42px; font-size: 14.5px; }
#lkk .lkk-search-side .lkk-i { width: 18px; height: 18px; }
#lkk .lkk-toc { padding: 18px 16px; border: 1px solid var(--lkk-line); border-radius: var(--lkk-radius); background: var(--lkk-surface); max-height: calc(100vh - 190px); overflow: auto; }
#lkk .lkk-toc summary { list-style: none; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lkk-muted); margin-bottom: 10px; cursor: default; }
#lkk .lkk-toc summary::-webkit-details-marker { display: none; }
#lkk .lkk-toc ol { list-style: none; }
#lkk .lkk-toc a { display: block; padding: 6px 10px; border-left: 2px solid var(--lkk-line); font-size: 14px; line-height: 1.4; color: var(--lkk-muted); }
#lkk .lkk-toc .lkk-toc-h3 a { padding-left: 22px; font-size: 13px; }
#lkk .lkk-toc a:hover { color: var(--lkk-head); text-decoration: none; border-left-color: var(--lkk-line-strong); }
#lkk .lkk-toc a.is-active { color: var(--lkk-accent-text); border-left-color: var(--lkk-accent); font-weight: 600; background: var(--lkk-accent-soft); }
#lkk .lkk-main { min-width: 0; }
#lkk .lkk-prose { padding: 36px 40px; border: 1px solid var(--lkk-line); border-radius: var(--lkk-radius); background: var(--lkk-surface); font-size: 15px; line-height: 1.75; color: var(--lkk-text); }
#lkk .lkk-prose > :first-child { margin-top: 0; }
#lkk .lkk-prose p, #lkk .lkk-prose ul, #lkk .lkk-prose ol, #lkk .lkk-prose .lkk-table, #lkk .lkk-prose pre, #lkk .lkk-prose blockquote { margin: 0 0 18px; }
#lkk .lkk-prose h2 { font-family: var(--lkk-head-font); font-size: 24px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; color: var(--lkk-head); margin: 40px 0 14px; scroll-margin-top: 110px; }
#lkk .lkk-prose h3 { font-family: var(--lkk-head-font); font-size: 19px; line-height: 1.35; font-weight: 600; color: var(--lkk-head); margin: 28px 0 10px; scroll-margin-top: 110px; }
#lkk .lkk-prose h4 { font-family: var(--lkk-head-font); font-size: 16px; font-weight: 600; color: var(--lkk-head); margin: 22px 0 8px; }
#lkk .lkk-prose ul, #lkk .lkk-prose ol { padding-left: 24px; }
#lkk .lkk-prose li { margin: 6px 0; }
#lkk .lkk-prose li::marker { color: var(--lkk-accent); font-weight: 700; }
#lkk .lkk-prose strong { color: var(--lkk-head); font-weight: 600; }
#lkk .lkk-prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--lkk-accent) 40%, transparent); text-underline-offset: 3px; }
#lkk .lkk-prose code { padding: 2px 6px; border-radius: 6px; background: var(--lkk-code); font-family: var(--lkk-mono); font-size: .86em; color: var(--lkk-head); }
#lkk .lkk-prose pre { padding: 16px 18px; border-radius: 12px; background: var(--lkk-pre); color: var(--lkk-pre-text); overflow: auto; font-size: 13.5px; line-height: 1.6; }
#lkk .lkk-prose pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
#lkk .lkk-prose img { max-width: 100%; height: auto; border-radius: 10px; }
#lkk .lkk-prose blockquote { padding: 12px 18px; border-left: 3px solid var(--lkk-accent); background: var(--lkk-accent-soft); border-radius: 0 10px 10px 0; }
#lkk .lkk-table { overflow-x: auto; border: 1px solid var(--lkk-line); }
#lkk .lkk-prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
#lkk .lkk-prose th, #lkk .lkk-prose td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--lkk-line); }
#lkk .lkk-prose th { background: var(--lkk-surface-2); color: var(--lkk-head); font-weight: 600; }
#lkk .lkk-prose tr:last-child td { border-bottom: 0; }
#lkk mark { background: var(--lkk-mark); color: inherit; padding: 0 2px; border-radius: 3px; }

/* rating and share */
#lkk .lkk-rate { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; padding: 20px 24px; border: 1px solid var(--lkk-line); border-radius: var(--lkk-radius); background: var(--lkk-surface); }
#lkk .lkk-rate-q { font-family: var(--lkk-head-font); font-weight: 600; color: var(--lkk-head); }
#lkk .lkk-rate-btns { display: flex; gap: 10px; }
#lkk .lkk-rate-btns .lkk-btn { height: 40px; }
#lkk .lkk-rate-n { width: 100%; font-size: 14px; color: var(--lkk-muted); }
#lkk .lkk-rate.is-done .lkk-rate-btns { display: none; }
#lkk .lkk-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
#lkk .lkk-share-label { font-size: 14px; font-weight: 700; color: var(--lkk-muted); margin-right: 4px; }
#lkk .lkk-share-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--lkk-line); border-radius: 12px; background: var(--lkk-surface); color: var(--lkk-muted); cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
#lkk .lkk-share-btn .lkk-i { width: 18px; height: 18px; }
#lkk .lkk-share-btn:hover { color: #fff; border-color: transparent; text-decoration: none; }
#lkk .lkk-share-facebook:hover { background: #1877f2; }
#lkk .lkk-share-linkedin:hover { background: #0a66c2; }
#lkk .lkk-share-whatsapp:hover { background: #25d366; }
#lkk .lkk-share-telegram:hover { background: #229ed9; }
#lkk .lkk-share-mail:hover, #lkk button.lkk-share-btn:hover { background: var(--lkk-accent); }
#lkk .lkk-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); padding: 10px 18px; border-radius: 10px; background: var(--lkk-head); color: var(--lkk-surface); font-size: 14px; font-weight: 600; box-shadow: var(--lkk-shadow); z-index: 1000; }

/* previous / next */
#lkk .lkk-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; }
#lkk .lkk-pager-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lkk-muted); }
#lkk .lkk-pager-label .lkk-i { width: 16px; height: 16px; }
#lkk .lkk-pager strong { font-family: var(--lkk-head-font); font-weight: 600; font-size: 16px; line-height: 1.4; color: var(--lkk-head); }
#lkk .lkk-pager-next { align-items: flex-end; text-align: right; }

/* search results and notices */
#lkk .lkk-results { list-style: none; display: grid; gap: 14px; }
#lkk .lkk-result { gap: 6px; }
#lkk .lkk-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 24px; padding: 22px 24px; border: 1px solid var(--lkk-line); border-radius: var(--lkk-radius); background: var(--lkk-surface); }
#lkk .lkk-notice .lkk-i { width: 28px; height: 28px; color: var(--lkk-accent); }
#lkk .lkk-notice p { flex: 1; min-width: 200px; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 991px) {
    #lkk .lkk-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    #lkk .lkk-aside { position: static; }
    #lkk .lkk-toc { max-height: none; }
    #lkk .lkk-toc summary { cursor: pointer; margin: 0; }
    #lkk .lkk-toc details[open] summary { margin-bottom: 10px; }
    #lkk .lkk-toc summary::after { content: " +"; }
    #lkk .lkk-toc details[open] summary::after { content: " −"; }
    #lkk .lkk-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
    #lkk .lkk-hero, #lkk .lkk-hero-sm { padding: 28px 20px; }
    #lkk .lkk-theme { top: 12px; right: 12px; }
    #lkk .lkk-search { padding-left: 12px; }
    #lkk .lkk-search .lkk-btn { padding: 0 14px; }
    #lkk .lkk-prose { padding: 22px 18px; font-size: 15px; }
    #lkk .lkk-toplist { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: minmax(0, 1fr); }
    #lkk .lkk-mostread { padding: 24px 20px; }
    #lkk .lkk-pager { grid-template-columns: minmax(0, 1fr); }
    #lkk .lkk-grid { gap: 16px; }
    #lkk .lkk-section { margin-top: 36px; }
}
@media (prefers-reduced-motion: reduce) {
    #lkk * { transition: none !important; }
}
@media print {
    #lkk .lkk-aside, #lkk .lkk-share, #lkk .lkk-rate, #lkk .lkk-help, #lkk .lkk-theme, #lkk .lkk-pager, #lkk .lkk-search { display: none !important; }
    #lkk .lkk-layout { display: block; }
}
#lkk .lkk-article-head .lkk-chip { margin-bottom: 14px; }
#lkk .lkk-hero .lkk-crumbs { padding-right: 52px; }

/* ---------------------------------------------------------------- article as documentation: nav | text | on this page */
#lkk .lkk-doc-grid { display: grid; grid-template-columns: 370px minmax(0, 1fr) 240px; gap: 0; align-items: start; border-top: 1px solid var(--lkk-line); }
#lkk .lkk-nav { position: sticky; top: 90px; max-height: calc(100vh - 100px); overflow: auto; padding: 24px 20px 24px 0; border-right: 1px solid var(--lkk-line); display: grid; gap: 16px; align-content: start; }
#lkk .lkk-doc-main { min-width: 0; padding: 24px 44px 0; }
#lkk .lkk-onpage { position: sticky; top: 90px; max-height: calc(100vh - 100px); overflow: auto; padding: 24px 0 24px 20px; border-left: 1px solid var(--lkk-line); }
#lkk .lkk-onpage-title { font-size: 13px; font-weight: 600; color: var(--lkk-head); margin-bottom: 12px; }
#lkk .lkk-toc-side { padding: 0; border: 0; background: none; max-height: none; }
#lkk .lkk-toc-side a { border-left: 0; padding: 5px 0; font-size: 13.5px; color: var(--lkk-accent-text); background: none; }
#lkk .lkk-toc-side .lkk-toc-h3 a { padding-left: 12px; font-size: 13px; }
#lkk .lkk-toc-side a.is-active { background: none; color: var(--lkk-head); font-weight: 600; }
#lkk .lkk-toc-inline { display: none; margin: 18px 0 0; }

/* left navigation */
#lkk .lkk-sidenav { display: grid; gap: 2px; font-size: 14px; }
#lkk .lkk-sidenav-home { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0 12px; margin-bottom: 6px; border-bottom: 1px solid var(--lkk-line); color: var(--lkk-muted); }
#lkk .lkk-sidenav-home .lkk-i { width: 16px; height: 16px; }
#lkk .lkk-sidenav summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 8px 8px 0; font-family: var(--lkk-head-font); font-weight: 600; color: var(--lkk-head); cursor: pointer; list-style: none; }
#lkk .lkk-sidenav summary::-webkit-details-marker { display: none; }
#lkk .lkk-sidenav summary::after { content: ""; width: 7px; height: 7px; border-right: 1.75px solid currentColor; border-bottom: 1.75px solid currentColor; transform: rotate(-45deg); transition: transform .15s; flex: none; }
#lkk .lkk-sidenav details[open] > summary::after { transform: rotate(45deg); }
#lkk .lkk-sidenav ul { list-style: none; margin: 0 0 8px; }
#lkk .lkk-sidenav li a { display: block; padding: 6px 10px; margin: 1px 0; color: var(--lkk-text); line-height: 1.4; }
#lkk .lkk-sidenav li a:hover { color: var(--lkk-accent-text); background: var(--lkk-surface-2); text-decoration: none; }
#lkk .lkk-sidenav li a[aria-current] { background: var(--lkk-accent-soft); color: var(--lkk-accent-text); font-weight: 600; }

/* top line: breadcrumb and thumbs */
#lkk .lkk-doc-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 10px; }
#lkk .lkk-doc-top .lkk-crumbs ol { margin: 0; }
#lkk .lkk-doc .lkk-h1 { font-size: clamp(28px, 3.4vw, 38px); }
#lkk .lkk-doc .lkk-meta { margin: 12px 0 0; padding-bottom: 20px; border-bottom: 1px solid var(--lkk-line); }
#lkk .lkk-rate-top { margin: 0; padding: 0; border: 0; background: none; flex: none; }
#lkk .lkk-thumb { display: grid; place-items: center; width: 40px; height: 32px; padding: 0; border: 0; background: var(--lkk-brand); color: #fff; cursor: pointer; }
#lkk .lkk-thumb .lkk-i { width: 17px; height: 17px; }
#lkk .lkk-thumb:hover { background: var(--lkk-brand-hover); }
#lkk .lkk-rate-top .lkk-rate-btns { gap: 6px; }
#lkk .lkk-rate-top.is-done .lkk-rate-btns { display: flex; }
#lkk .lkk-rate-top.is-done .lkk-thumb { background: var(--lkk-surface-2); color: var(--lkk-muted); cursor: default; }
#lkk .lkk-rate-top.is-done .lkk-thumb.is-picked { background: var(--lkk-brand); color: #fff; }

/* the text without a box, as in documentation */
#lkk .lkk-prose-doc { padding: 24px 0 0; border: 0; background: none; }
#lkk .lkk-doc .lkk-grid-related { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1399px) { #lkk .lkk-doc .lkk-grid-related { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) { #lkk .lkk-doc .lkk-grid-related { grid-template-columns: minmax(0, 1fr); } }
#lkk .lkk-doc .lkk-pager { margin-top: 32px; }

@media (max-width: 1199px) {
    #lkk .lkk-doc-grid { grid-template-columns: 320px minmax(0, 1fr); }
    #lkk .lkk-onpage { display: none; }
    #lkk .lkk-toc-inline { display: block; }
    #lkk .lkk-doc-main { padding: 24px 0 0 32px; }
}
@media (max-width: 991px) {
    #lkk .lkk-doc-grid { grid-template-columns: minmax(0, 1fr); border-top: 0; }
    #lkk .lkk-nav { position: static; max-height: none; padding: 0 0 16px; border-right: 0; border-bottom: 1px solid var(--lkk-line); }
    #lkk .lkk-sidenav details:not([open]) ul { display: none; }
    #lkk .lkk-doc-main { padding: 20px 0 0; }
    #lkk .lkk-doc-top { flex-wrap: wrap; }
}
/* the documentation page sits on one white sheet, like the reference */
/* no box: the article spans the whole width of the window on the page colour, columns kept to a readable width */
#lkk .lkk-doc { position: relative; width: 100vw; margin-left: calc(50% - 50vw); background: var(--lkk-surface); border-top: 1px solid var(--lkk-line); border-bottom: 1px solid var(--lkk-line); padding: 0 32px 40px; }
#lkk .lkk-doc > .lkk-doc-grid { max-width: 1920px; margin: 0 auto; }
#lkk .lkk-doc .lkk-doc-grid { border-top: 0; }
#lkk .lkk-doc .lkk-pager .lkk-card, #lkk .lkk-doc .lkk-grid-related .lkk-card { background: var(--lkk-surface); }
@media (max-width: 991px) { #lkk .lkk-doc { padding: 16px 16px 24px; } }
body:has(.lkk-doc) { overflow-x: hidden; }
/* the whole article page on white, the help cards keep the page colour below */
/* the article starts right under the menu: no gap above */
#lkk:has(.lkk-doc) { padding-top: 0; }
body:has(.lkk-doc) .main-body, body:has(.lkk-doc) #main-body, body:has(.lkk-doc) section#main-body { padding-top: 0 !important; margin-top: 0 !important; }
body:has(.lkk-doc) .main-body > .container, body:has(.lkk-doc) #main-body > .container { padding-top: 0 !important; }
#lkk .lkk-doc { border-top: 0; }

/* left navigation: each topic on its own line, separated, so the list reads as a list */
#lkk .lkk-sidenav details { border-bottom: 1px solid var(--lkk-line); }
#lkk .lkk-sidenav summary { padding: 12px 8px 12px 0; }
#lkk .lkk-sidenav ul { margin: 0 0 12px; border: 1px solid var(--lkk-line); }
#lkk .lkk-sidenav li + li { border-top: 1px solid var(--lkk-line); }
#lkk .lkk-sidenav li a { margin: 0; padding: 10px 14px; border-left: 3px solid transparent; }
#lkk .lkk-sidenav li a[aria-current] { border-left-color: var(--lkk-accent); }

/* after voting, the box turns a very soft green */
#lkk { --lkk-ok-bg: #f3fbf5; --lkk-ok-line: #d9f0e0; }
html[data-lkk-theme="dark"] #lkk { --lkk-ok-bg: #11251a; --lkk-ok-line: #1f4430; }
@media (prefers-color-scheme: dark) { html:not([data-lkk-theme="light"]) #lkk { --lkk-ok-bg: #11251a; --lkk-ok-line: #1f4430; } }
#lkk .lkk-rate.is-done:not(.lkk-rate-top) { background: var(--lkk-ok-bg); border-color: var(--lkk-ok-line); transition: background .3s, border-color .3s; }

/* thin Linkeia-blue scrollbars on the side columns, a little shorter than the column */
#lkk .lkk-nav, #lkk .lkk-onpage { max-height: calc(100vh - 140px); }
/* Chrome / Edge / Safari draw the custom bar below; standard properties only where those are missing (Firefox),
   because setting them in Chrome would switch off the custom bar */
@supports not selector(::-webkit-scrollbar) {
    #lkk .lkk-nav, #lkk .lkk-onpage { scrollbar-width: thin; scrollbar-color: var(--lkk-brand) transparent; }
}
#lkk .lkk-nav::-webkit-scrollbar, #lkk .lkk-onpage::-webkit-scrollbar { width: 5px; }
#lkk .lkk-nav::-webkit-scrollbar-track, #lkk .lkk-onpage::-webkit-scrollbar-track { background: transparent; margin: 28px 0; }
#lkk .lkk-nav::-webkit-scrollbar-thumb, #lkk .lkk-onpage::-webkit-scrollbar-thumb { background: var(--lkk-brand); border-radius: 99px; }
#lkk .lkk-nav::-webkit-scrollbar-thumb:hover, #lkk .lkk-onpage::-webkit-scrollbar-thumb:hover { background: var(--lkk-brand-hover); }
#lkk .lkk-nav::-webkit-scrollbar-button, #lkk .lkk-onpage::-webkit-scrollbar-button { display: none; height: 0; }
html[data-lkk-theme="dark"] #lkk .lkk-nav::-webkit-scrollbar-thumb, html[data-lkk-theme="dark"] #lkk .lkk-onpage::-webkit-scrollbar-thumb { background: #c3d0db; }
@media (prefers-color-scheme: dark) {
    html:not([data-lkk-theme="light"]) #lkk .lkk-nav::-webkit-scrollbar-thumb, html:not([data-lkk-theme="light"]) #lkk .lkk-onpage::-webkit-scrollbar-thumb { background: #c3d0db; }
}

/* left column: the sticky box is the wrapper; the list scrolls inside with its own short Linkeia-blue bar (drawn by knowledge.js) */
#lkk .lkk-navwrap { position: sticky; top: 90px; align-self: start; border-right: 1px solid var(--lkk-line); }
#lkk .lkk-navwrap > .lkk-nav { position: static; border-right: 0; max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: none; padding-right: 32px; }
#lkk .lkk-navwrap > .lkk-nav::-webkit-scrollbar { display: none; width: 0; }
/* the bar: arrow buttons at both ends, a thin grey rail and a blue handle with grip lines */
#lkk .lkk-scroll { position: absolute; right: 6px; top: 24px; bottom: 24px; width: 16px; display: none; flex-direction: column; align-items: center; gap: 6px; }
#lkk .lkk-scroll.is-on { display: flex; }
#lkk .lkk-scroll-btn { flex: none; width: 16px; height: 16px; padding: 0; border: 0; border-radius: 4px; background: var(--lkk-brand); cursor: pointer; position: relative; }
#lkk .lkk-scroll-btn::after { content: ""; position: absolute; left: 50%; top: 50%; border: 4px solid transparent; transform: translate(-50%, -75%); border-bottom-color: #fff; }
#lkk .lkk-scroll-btn[data-dir="1"]::after { transform: translate(-50%, -25%); border-bottom-color: transparent; border-top-color: #fff; }
#lkk .lkk-scroll-btn:hover { background: var(--lkk-brand-hover); }
#lkk .lkk-scroll-track { position: relative; flex: 1; width: 16px; }
#lkk .lkk-scroll-track::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; transform: translateX(-50%); border-radius: 99px; background: var(--lkk-line-strong); }
#lkk .lkk-sbar { position: absolute; left: 1px; top: 0; width: 14px; height: 110px; border-radius: 5px; background: var(--lkk-brand); cursor: grab; touch-action: none; transition: background .15s;
    background-image: linear-gradient(#fff, #fff), linear-gradient(#fff, #fff), linear-gradient(#fff, #fff);
    background-size: 6px 1.5px; background-repeat: no-repeat; background-position: center calc(50% - 3px), center 50%, center calc(50% + 3px); }
#lkk .lkk-sbar:hover, #lkk .lkk-sbar.is-drag { background-color: var(--lkk-brand-hover); cursor: grabbing; }
html[data-lkk-theme="dark"] #lkk .lkk-sbar, html[data-lkk-theme="dark"] #lkk .lkk-scroll-btn { background-color: #c3d0db; }
@media (prefers-color-scheme: dark) { html:not([data-lkk-theme="light"]) #lkk .lkk-sbar, html:not([data-lkk-theme="light"]) #lkk .lkk-scroll-btn { background-color: #c3d0db; } }
@media (max-width: 991px) {
    #lkk .lkk-navwrap { position: static; border-right: 0; }
    #lkk .lkk-navwrap > .lkk-nav { max-height: none; overflow: visible; padding-right: 0; }
    #lkk .lkk-scroll { display: none !important; }
}

#lkk .lkk-sidenav details.is-here > summary { color: var(--lkk-accent-text); }
#lkk .lkk-sidenav li a { font-size: 14px; line-height: 1.45; }

/* side columns stick to the very top (the theme header scrolls away) and the dividers belong to the middle column,
   so they run the whole height without breaking where the sticky boxes end */
@media (min-width: 992px) {
    #lkk .lkk-navwrap { top: 0; border-right: 0; }
    #lkk .lkk-navwrap > .lkk-nav { max-height: 100vh; }
    #lkk .lkk-onpage { top: 0; max-height: 100vh; border-left: 0; }
    #lkk .lkk-doc-main { border-left: 1px solid var(--lkk-line); align-self: stretch; padding-bottom: 24px; }
}
@media (min-width: 1200px) {
    #lkk .lkk-doc-main { border-right: 1px solid var(--lkk-line); }
}

/* subcategories fold inside their category in the left column */
#lkk .lkk-sidenav details.lkk-subnav { margin: 0 0 8px 12px; border-bottom: 0; border-left: 2px solid var(--lkk-line); padding-left: 10px; }
#lkk .lkk-sidenav details.lkk-subnav > summary { padding: 7px 8px 7px 0; font-family: var(--lkk-font); font-size: 14px; font-weight: 600; }
#lkk .lkk-sidenav details.lkk-subnav.is-here { border-left-color: var(--lkk-accent); }
