/* vyberun's manual: the page is a vyberun window (like the website): chapters are spaces in the sidebar, topics are
   cards, the topics you open are tabs; the page in a readable column, "On this page" as a split pane on the right */
:root {
  --bg: #0b0b0c; --win: #121213; --side: #141416; --bar: #18181a; --card: #1b1b1e; --line: #2a2a2e;
  --text: #e6e6e6; --body: #d2d2d6; --muted: #8d8d93; --dim: #5c5c62; --green: #4ec98a; --amber: #e8b04a; --blue: #6ea8fe; --link: #8ab4ff;
  --mono: "Cascadia Code", "Cascadia Mono", Consolas, monospace; --ui: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; height: 100vh; height: 100dvh; overflow: hidden; background: var(--bg); color: var(--text); font: 14px/1.6 var(--ui); display: flex; padding: 20px; }
a { color: inherit; text-decoration: none; }
.win { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--win); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }

/* title bar */
.titlebar { flex: none; height: 40px; display: flex; align-items: center; gap: 18px; padding: 0 14px; background: var(--bar); border-bottom: 1px solid var(--line); font-size: 13px; }
.titlebar .brand { display: flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.titlebar img { width: 20px; height: 20px; }
.titlebar .brand span { color: var(--dim); font-weight: 400; }
.titlebar .menu { display: flex; gap: 16px; color: var(--muted); }
.titlebar .menu a:hover { color: var(--text); }
.titlebar .get { padding: 3px 10px; border-radius: 6px; background: var(--text); color: #111; font-weight: 600; white-space: nowrap; }
.titlebar .get:hover { background: #fff; }
.titlebar .controls { display: flex; align-items: center; gap: 6px; color: var(--dim); }
.titlebar .controls > span { letter-spacing: 12px; }
/* the window's close: back to the website, red under the mouse as Windows' own */
.titlebar .close { display: grid; place-items: center; width: 34px; height: 28px; border-radius: 4px; color: var(--muted); }
.titlebar .close:hover { background: #c42b1c; color: #fff; }
.contents-btn { display: none; }

/* search: the box, and its results like vyberun's own search popup */
.search { position: relative; margin: 0 auto; width: min(420px, 36%); padding: 0 10px; height: 28px; border-radius: 6px; background: var(--win); border: 1px solid var(--line); color: var(--dim); font-size: 12px; display: flex; align-items: center; gap: 8px; }
.search:focus-within { border-color: #4a4a52; }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); font: 13px var(--ui); }
.search input::placeholder { color: var(--dim); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { font: 11px var(--mono); color: var(--dim); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; min-width: 0; background: transparent; }
.search:focus-within kbd { display: none; }
.results { position: absolute; z-index: 10; top: 34px; left: -1px; width: max(100%, 520px); max-height: min(70vh, 560px); overflow-y: auto; padding: 6px; background: var(--bar); border: 1px solid #3a3a40; border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.55); scrollbar-width: thin; scrollbar-color: #333 transparent; }
.results[hidden] { display: none; }
.results .grp { padding: 8px 10px 4px; color: var(--dim); font: 11.5px var(--mono); }
.results .r { display: block; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.results .r.sel { background: #2a2a30; }
.results .r .t { color: var(--text); font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.results .r .t .d { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.results .r .t .where { color: var(--dim); font-size: 12px; margin-left: auto; white-space: nowrap; }
.results .r .s { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin: 2px 0 0 15px; }
.results mark { background: rgba(232,176,74,.22); color: var(--text); border-radius: 3px; padding: 0 1px; }
.results .none { padding: 14px 12px; color: var(--muted); font-size: 13px; }
.results .foot { padding: 6px 10px 2px; color: var(--dim); font-size: 11.5px; border-top: 1px solid var(--line); margin-top: 6px; }
.results .foot kbd { min-width: 0; padding: 0 4px; font-size: 10.5px; }

.body { flex: 1; min-height: 0; display: grid; grid-template-columns: 270px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }

/* the sidebar: a chapter is a space with its own colour, a topic is a card */
.side { background: var(--side); border-right: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.space { flex: none; border-radius: 10px; background: var(--card); border: 1px solid color-mix(in srgb, var(--c) 32%, var(--line)); overflow: hidden; }
.space-head { width: 100%; padding: 7px 12px; font: 600 12.5px var(--ui); color: var(--text); display: flex; align-items: center; gap: 8px; background: color-mix(in srgb, var(--c) 20%, transparent); border: 0; cursor: pointer; text-align: left; }
.space-head .chev { color: var(--muted); font-weight: 400; width: 10px; }
.space-head .sum { margin-left: auto; font-weight: 400; color: rgba(255,255,255,.55); }
.space.folded .item, .space.folded .subs { display: none; }
/* the current page's sections, under it (as a Claude's subagents under its tab) */
.subs { padding: 2px 0 6px; border-top: 1px solid var(--line); }
.sub { display: flex; gap: 7px; padding: 3px 12px 3px 26px; font-size: 12.5px; color: var(--muted); border-left: 2px solid transparent; }
.sub .arrow { color: var(--dim); }
.sub:hover { color: var(--text); background: #202024; }
.sub.on { color: var(--text); border-left-color: var(--c); background: #202024; }
.item { display: flex; align-items: center; gap: 9px; padding: 6px 12px; font-size: 13px; color: #c4c4c8; }
.item + .item { border-top: 1px solid var(--line); }
.item:hover { background: #222226; }
.item.open { color: var(--text); }
.item.sel { background: #26262b; color: var(--text); font-weight: 600; }
.item .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; border: 1px solid var(--dim); }
/* as the tabs: green for the page you're on, grey for the others open as tabs, an empty ring for the rest */
.item.open .dot { background: var(--dim); border-color: var(--dim); }
.item.sel .dot { background: var(--green); border-color: var(--green); }

/* the tab row: the topics you've opened */
.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.tabrow { flex: none; display: flex; align-items: center; gap: 6px; padding: 7px 12px; min-height: 42px; border-bottom: 1px solid var(--line); font-size: 13px; overflow-x: auto; scrollbar-width: none; }
.tab { color: var(--muted); padding: 4px 8px 4px 10px; border-radius: 6px; border: 1px solid transparent; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); background: var(--bar); border-color: var(--line); }
/* the tab's dot: green for the page you're on, grey for the others (as a tab that's running, or waiting, in vyberun) */
.tab .d { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.tab.on .d { background: var(--green); }
.tab .role { color: var(--muted); font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; line-height: 1.5; }
.tab .x { color: var(--dim); font-size: 11px; padding: 0 2px; background: none; border: 0; cursor: pointer; font-family: inherit; }
.tab .x:hover { color: var(--text); }
.tabrow .plus { color: var(--dim); padding: 0 6px; }
.tabrow .plus:hover { color: var(--text); }

/* the page and "On this page", side by side like split panes */
.panes { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.page { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #333 transparent; padding: 22px 40px 60px; }
.cmd { font: 13px/1.6 var(--mono); color: var(--dim); margin-bottom: 18px; }
.cmd .c { color: var(--muted); }
.cursor { display: inline-block; width: .55em; height: 1.05em; background: var(--muted); vertical-align: -0.18em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
article { max-width: 700px; font-size: 15.5px; line-height: 1.7; }
.crumbs { font-size: 12.5px; color: var(--dim); margin-bottom: 4px; }
.crumbs a:hover { color: var(--text); }
h1 { font-size: 30px; line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.01em; }
.lead { font-size: 17px; color: var(--muted); margin: 0 0 22px; }
h2 { font-size: 19px; margin: 34px 0 8px; scroll-margin-top: 12px; }
h3 { font-size: 16px; margin: 24px 0 6px; scroll-margin-top: 12px; }
p { margin: 0 0 12px; color: var(--body); }
ol.steps { list-style: none; counter-reset: s; padding: 0; margin: 14px 0; }
ol.steps > li { counter-increment: s; position: relative; padding: 0 0 12px 40px; color: var(--body); }
ol.steps > li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); font: 600 12px/1 var(--mono); color: var(--muted); }
ul { padding-left: 20px; color: var(--body); margin: 0 0 12px; } li { margin-bottom: 4px; }
kbd { display: inline-block; padding: 0 6px; min-width: 22px; text-align: center; border: 1px solid #3a3a40; border-bottom-width: 2px; border-radius: 5px; background: var(--card); font: 12.5px/1.6 var(--mono); color: var(--text); }
.ui { font-weight: 600; color: var(--text); }
code { font: 13.5px var(--mono); background: var(--card); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; overflow-wrap: anywhere; }
article a.link { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
figure { margin: 18px 0 22px; }
figure img { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 8px; }
figcaption { font-size: 12.5px; color: var(--dim); margin-top: 6px; }
.note { margin: 16px 0; padding: 10px 14px; border-left: 3px solid var(--blue); background: rgba(110,168,254,.07); border-radius: 0 8px 8px 0; font-size: 14.5px; color: var(--body); }
.note.warn { border-left-color: var(--amber); background: rgba(232,176,74,.07); }
.note p { margin: 0 0 6px; } .note p:last-child { margin: 0; }
.note .k { font-weight: 600; color: var(--blue); } .note.warn .k { color: var(--amber); }
.tablewrap { overflow-x: auto; margin: 12px 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--body); }
th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.term { margin: 16px 0; padding: 12px 14px; background: #08080a; border: 1px solid var(--line); border-radius: 8px; font: 13.5px/1.6 var(--mono); color: #cfcfcf; overflow-x: auto; white-space: pre; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 44px; }
.pager a { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.pager a:hover { background: var(--card); }
.pager small { display: block; color: var(--dim); font-size: 12px; }
.pager .next { text-align: right; grid-column: 2; }
/* the contents page */
.chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 26px; }
.chapters .space .item { font-size: 14px; }
/* where a search led: the words found stay marked a moment */
article mark.hit { background: rgba(232,176,74,.3); color: inherit; border-radius: 3px; transition: background 1.2s; }
article mark.hit.fade { background: transparent; }


.status { flex: none; height: 30px; display: flex; align-items: center; gap: 18px; padding: 0 14px; border-top: 1px solid var(--line); background: var(--bar); color: var(--dim); font-size: 12px; }
.status a:hover { color: var(--text); }
.status .r { margin-left: auto; }

@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }
@media (max-width: 820px) {
  body { padding: 0; }
  .win { border: 0; border-radius: 0; }
  .titlebar { gap: 10px; padding: 0 10px; }
  .titlebar .menu, .titlebar .controls, .titlebar .brand span, .search kbd { display: none; }
  .search { flex: 1; width: auto; margin: 0; }
  .results { position: fixed; top: 46px; left: 8px; right: 8px; width: auto; }
  .contents-btn { display: inline-block; flex: none; font: 13px var(--ui); color: var(--text); background: var(--win); border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; }
  .body { grid-template-columns: 1fr; }
  .side { display: none; position: absolute; inset: 40px 0 0; z-index: 3; border-right: 0; }
  body.toc .side { display: flex; }
  .page { padding: 18px 16px 48px; }
  h1 { font-size: 26px; }
  .pager { grid-template-columns: 1fr; } .pager .next { grid-column: 1; }
  .status .hide-sm { display: none; }
}

/* ---- scenes: small drawn pieces of vyberun's window, animated on a loop (like Help's), so a step is seen
   happening. Sized by the figure's width (container units), so they scale down on a phone. ---- */
figure.scene { margin: 18px 0 22px; }
.sc-stage { container-type: inline-size; position: relative; width: 100%; aspect-ratio: 16 / 7; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: radial-gradient(120% 90% at 20% 0%, #1d2230 0%, #101014 60%) #101014; color: var(--text); user-select: none; }
.sc-stage > * { font: 1.85cqw/1.45 var(--ui); }   /* (on the container itself, cqw would measure the window) */
.sc-stage * { box-sizing: border-box; }
.sc-anim, .sc-anim * { animation-duration: 8s; animation-iteration-count: infinite; animation-timing-function: ease; animation-fill-mode: both; }
/* a vyberun window */
.sc-win { position: absolute; inset: 5% 6% 16% 6%; background: #121213; border: 1px solid #2a2a2e; border-radius: .6em; overflow: hidden; display: grid; grid-template-rows: 2.1em 1fr; box-shadow: 0 1em 3em rgba(0,0,0,.5); }
.sc-bar { display: flex; align-items: center; gap: 1em; padding: 0 .8em; background: #18181a; border-bottom: 1px solid #2a2a2e; font-size: .85em; color: #8d8d93; }
.sc-bar b { color: #e6e6e6; font-weight: 600; display: flex; align-items: center; gap: .45em; }
.sc-bar .logo { width: 1.1em; height: 1.1em; border-radius: .25em; background: linear-gradient(135deg, #b14cff, #ff5ca8); }
.sc-bar .ctl { margin-left: auto; letter-spacing: .9em; color: #5c5c62; }
.sc-body { display: grid; grid-template-columns: 30% 1fr; min-height: 0; }
.sc-side { background: #141416; border-right: 1px solid #2a2a2e; padding: .6em; display: flex; flex-direction: column; gap: .5em; }
.sc-space { border-radius: .45em; border: 1px solid #2a2a2e; overflow: hidden; background: #1b1b1e; font-size: .78em; }
.sc-space .h { display: flex; gap: .5em; align-items: center; white-space: nowrap; padding: .3em .6em; font-weight: 600; background: color-mix(in srgb, var(--c, #e5484d) 22%, transparent); }
.sc-space .r { padding: .25em .6em; color: #b9b9be; border-top: 1px solid #2a2a2e; display: flex; gap: .4em; align-items: center; }
.sc-space .r i { width: .5em; height: .5em; border-radius: 50%; background: var(--d, #5c5c62); display: inline-block; }
.sc-main { display: grid; grid-template-rows: 2em 1fr; min-width: 0; }
.sc-tabs { display: flex; align-items: center; gap: .35em; padding: 0 .6em; border-bottom: 1px solid #2a2a2e; font-size: .82em; color: #8d8d93; position: relative; }
.sc-tab { display: inline-flex; align-items: center; gap: .4em; padding: .15em .6em; border-radius: .35em; border: 1px solid transparent; white-space: nowrap; }
.sc-tab.on { background: #18181a; border-color: #2a2a2e; color: #e6e6e6; }
.sc-tab i { width: .5em; height: .5em; border-radius: 50%; background: var(--d, #8d8d93); }
.sc-tab .role { font-size: .85em; border: 1px solid #2a2a2e; border-radius: 99em; padding: 0 .5em; color: #8d8d93; }
.sc-term { padding: .7em .9em; font: .8em/1.6 var(--mono); color: #b9b9be; white-space: pre; overflow: hidden; }
.sc-term .p { color: #5c5c62; } .sc-term .g { color: #4ec98a; } .sc-term .y { color: #e8b04a; }
/* dialogs, menus, keys, the pointer */
.sc-dialog { position: absolute; left: 50%; top: 50%; width: 52%; transform: translate(-50%, -50%); background: #1b1b1e; border: 1px solid #3a3a40; border-radius: .5em; box-shadow: 0 1.2em 3em rgba(0,0,0,.6); font-size: .9em; }
.sc-dialog .t { display: flex; justify-content: space-between; padding: .45em .8em; font-size: .85em; color: #e6e6e6; }
.sc-dialog .t span:last-child { color: #8d8d93; }
.sc-dialog .c { padding: .2em 1.4em 1.1em; }
.sc-dialog .sum { color: #e6e6e6; }
.sc-dialog .sub { color: #9a9aa0; font-size: .85em; margin-top: .4em; }
.sc-dialog .chk { color: #9a9aa0; font-size: .85em; margin-top: .9em; display: flex; gap: .5em; align-items: center; }
.sc-dialog .chk i { width: .9em; height: .9em; border: 1px solid #5c5c62; border-radius: .2em; }
.sc-dialog .btns { display: flex; justify-content: flex-end; gap: .5em; margin-top: 1.1em; }
.sc-btn { padding: .3em .9em; border-radius: .35em; border: 1px solid #3a3a40; background: #232327; color: #e6e6e6; font-size: .9em; }
.sc-btn.pri { background: #e6e6e6; color: #111; border-color: #e6e6e6; font-weight: 600; }
.sc-menu { position: absolute; background: #2b2b2b; border: 1px solid #444; border-radius: .4em; padding: .3em 0; box-shadow: 0 .8em 2em rgba(0,0,0,.55); font-size: .82em; min-width: 14em; }
.sc-menu div { padding: .22em 1.2em; color: #e6e6e6; white-space: nowrap; }
.sc-menu .g { color: #8d8d93; } .sc-menu .in { padding-left: 2.2em; color: #8d8d93; }
.sc-menu .sep { height: 1px; padding: 0; margin: .3em 0; background: #444; }
.sc-menu .b { font-weight: 700; }
.sc-menu .hl { background: #3d3d42; }
.sc-keys { position: absolute; display: flex; gap: .3em; align-items: center; font-size: 1em; color: #8d8d93; }
.sc-keys kbd { font-size: .85em; }
.sc-ptr { position: absolute; width: 1.3em; height: 1.3em; left: 0; top: 0; z-index: 5; }
.sc-ptr::before { content: ""; position: absolute; inset: 0; background: #fff; clip-path: polygon(0 0, 0 85%, 24% 66%, 42% 100%, 56% 93%, 39% 60%, 70% 60%); filter: drop-shadow(0 0 1px #000); }
.sc-taskbar { position: absolute; left: 0; right: 0; bottom: 0; height: 10%; background: rgba(32,32,36,.92); border-top: 1px solid #333; display: flex; align-items: center; justify-content: flex-end; gap: 1.1em; padding: 0 1.4em; font-size: .8em; color: #c8c8c8; }
.sc-taskbar .ico { width: 1.15em; height: 1.15em; border-radius: .25em; background: linear-gradient(135deg, #b14cff, #ff5ca8); position: relative; }
.sc-taskbar .dim { color: #8d8d93; }
.sc-toast { position: absolute; right: 2%; bottom: 13%; width: 36%; background: #2b2b2b; border: 1px solid #444; border-radius: .5em; padding: .7em .9em; font-size: .82em; box-shadow: 0 .8em 2em rgba(0,0,0,.5); }
.sc-toast b { display: flex; gap: .5em; align-items: center; } .sc-toast b i { width: 1em; height: 1em; border-radius: .2em; background: linear-gradient(135deg, #b14cff, #ff5ca8); }
.sc-toast span { color: #9a9aa0; }
@media (prefers-reduced-motion: reduce) { .sc-anim, .sc-anim * { animation: none !important; } }
.sc-field { display: grid; grid-template-columns: 6em 1fr; align-items: center; gap: .6em; margin: .35em 0; font-size: .85em; color: #9a9aa0; }
.sc-input { background: #121213; border: 1px solid #3a3a40; border-radius: .3em; padding: .15em .5em; color: #e6e6e6; min-height: 1.6em; font-family: var(--mono); font-size: .95em; white-space: nowrap; overflow: hidden; }
.sc-radio { display: inline-flex; align-items: center; gap: .35em; margin-right: 1em; color: #e6e6e6; }
.sc-radio i { width: .85em; height: .85em; border-radius: 50%; border: 1px solid #8d8d93; display: inline-grid; place-items: center; }
.sc-radio.on i::after { content: ""; width: .45em; height: .45em; border-radius: 50%; background: #e6e6e6; }
.sc-toggle { width: 2.2em; height: 1.15em; border-radius: 99em; background: #3a3a40; position: relative; display: inline-block; }
.sc-toggle::after { content: ""; position: absolute; top: .15em; left: .15em; width: .85em; height: .85em; border-radius: 50%; background: #e6e6e6; }
.sc-find { position: absolute; right: .6em; top: .25em; display: flex; gap: .4em; align-items: center; background: #232327; border: 1px solid #3a3a40; border-radius: .35em; padding: .1em .5em; font-size: .9em; }
.sc-hit { background: rgba(232,176,74,.35); color: #fff; border-radius: .15em; }
.sc-sel { background: rgba(110,168,254,.35); }
.sc-panel { position: absolute; background: #17171a; border-left: 1px solid #2a2a2e; padding: .7em .9em; font-size: .8em; color: #b9b9be; }
.sc-panel b { color: #e6e6e6; }
.sc-label { position: absolute; display: flex; align-items: center; gap: .4em; font-size: .85em; font-weight: 600; color: #fff; background: #6ea8fe; padding: .1em .55em; border-radius: 99em; white-space: nowrap; box-shadow: 0 .3em 1em rgba(0,0,0,.5); }
.sc-label b { width: 1.3em; height: 1.3em; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.25); font-size: .85em; }
.sc-blink { animation: sc-blink 1s steps(1) infinite !important; }
@keyframes sc-blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .sc-blink { animation: none !important; } }
