/* POSMaster help site — plain CSS, no build step. */
:root { --brand: #4f46e5; --brand-50: #eef2ff; --ink: #0f172a; --text: #334155; --muted: #64748b; --line: #e2e8f0; --bg: #f8fafc; }
* { box-sizing: border-box; }
html { scroll-padding-top: 76px; }
body { margin: 0; font: 15px/1.65 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--text); background: #fff; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; height: 60px; padding: 0 20px; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); font-size: 18px; white-space: nowrap; }
.brand b { color: var(--brand); }
.brand small { font-weight: 600; color: var(--muted); font-size: 13px; margin-inline-start: 2px; }
.brand:hover { text-decoration: none; }
.mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff; }
.version { color: var(--muted); font-size: 12px; margin-inline-start: auto; }
.menu-btn { display: none; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--ink); }

.search { position: relative; flex: 1; max-width: 520px; }
.search input { width: 100%; height: 40px; padding: 0 14px; border: 1px solid #cbd5e1; border-radius: 10px; font: inherit; background: var(--bg); }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); background: #fff; }
.results { position: absolute; top: 46px; inset-inline: 0; max-height: 70vh; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(15,23,42,.14); padding: 6px; }
.results a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); }
.results a:hover, .results a.active { background: var(--brand-50); text-decoration: none; }
.results .r-title { font-weight: 600; color: var(--ink); }
.results .r-path { font-size: 12px; color: var(--muted); }
.results .r-text { font-size: 13px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results mark { background: #fef08a; color: inherit; border-radius: 2px; }
.results .empty { padding: 10px 12px; color: var(--muted); }

.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr) 220px; max-width: 1400px; margin: 0 auto; }
.sidebar, .toc { position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; padding: 20px 14px; }
.sidebar { border-inline-end: 1px solid var(--line); }
.sidebar a, .toc a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--text); font-size: 14px; }
.sidebar a:hover, .toc a:hover { background: var(--bg); text-decoration: none; }
.sidebar a.active { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.nav-section { margin: 16px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #94a3b8; }
.nav-section:first-child { margin-top: 0; }
.toc a { font-size: 13px; color: var(--muted); }

.content { padding: 28px 44px 40px; min-width: 0; }
.crumbs { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
article h1 { font-size: 32px; line-height: 1.2; color: var(--ink); margin: 0 0 16px; }
article h2 { font-size: 22px; color: var(--ink); margin: 40px 0 12px; padding-top: 8px; border-top: 1px solid var(--line); }
article h3 { font-size: 17px; color: var(--ink); margin: 28px 0 8px; }
article h2 .anchor, article h3 .anchor { opacity: 0; margin-inline-end: 6px; color: #94a3b8; }
article h2:hover .anchor, article h3:hover .anchor { opacity: 1; text-decoration: none; }
article img { display: block; max-width: 100%; height: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(15,23,42,.08); }
article code { font: 13px/1.5 ui-monospace, 'Cascadia Code', Consolas, monospace; background: #f1f5f9; padding: 2px 6px; border-radius: 6px; color: #0f172a; }
article pre { position: relative; background: #0f172a; color: #e2e8f0; padding: 14px 16px; border-radius: 12px; overflow-x: auto; }
article pre code { background: none; color: inherit; padding: 0; }
article pre .copy { position: absolute; top: 8px; inset-inline-end: 8px; border: 0; border-radius: 6px; padding: 3px 8px; font-size: 12px; background: #334155; color: #e2e8f0; cursor: pointer; }
article table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; display: block; overflow-x: auto; }
article th, article td { border: 1px solid var(--line); padding: 8px 10px; text-align: start; vertical-align: top; }
article th { background: var(--bg); color: var(--ink); }
article kbd { font: 12px ui-monospace, Consolas, monospace; border: 1px solid #cbd5e1; border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; background: #fff; }
article ol, article ul { padding-inline-start: 22px; }
article li { margin: 4px 0; }
article blockquote { margin: 16px 0; padding: 12px 16px; border-inline-start: 4px solid #cbd5e1; background: var(--bg); border-radius: 0 10px 10px 0; }
article blockquote p { margin: 4px 0; }
.callout-tip { border-color: #10b981 !important; background: #ecfdf5 !important; }
.callout-note { border-color: var(--brand) !important; background: var(--brand-50) !important; }
.callout-warning, .callout-important { border-color: #f59e0b !important; background: #fffbeb !important; }
:target { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: #fef9c3; } to { background: transparent; } }

.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; }
.pager a { flex: 1; max-width: 48%; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font-weight: 600; }
.pager a:hover { border-color: var(--brand); text-decoration: none; }
.pager .next { text-align: end; margin-inline-start: auto; }
.pager small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
footer { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

@media (max-width: 1100px) { .layout { grid-template-columns: 240px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 760px) {
    .layout { grid-template-columns: 1fr; }
    .menu-btn { display: block; }
    .sidebar { position: fixed; top: 60px; inset-inline-start: 0; width: 280px; z-index: 15; background: #fff; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 10px 30px rgba(15,23,42,.15); }
    body.menu-open .sidebar { transform: none; }
    .content { padding: 20px 16px 32px; }
    .version, .brand small { display: none; }
    article h1 { font-size: 26px; }
}
@media print { .topbar, .sidebar, .toc, .pager { display: none; } .layout { display: block; } }
