/* veylo.css: Win98-style UI kit extracted from wispweb.dev/changelog (.veylo scope).
   Utility first, beauty last. No images, no rounding.
   Themes: data-theme="graphite|midnight|classic|lilac|paper" on .veylo (default graphite). */

/* ================= tokens ================= */
.veylo {
  --ui: Tahoma, Verdana, "Segoe UI", sans-serif;
  --mono: "Courier New", Courier, ui-monospace, monospace;
  --fs: 13px; --fs-sm: 12px; --fs-h2: 17px; --fs-h3: 14px; --lh: 1.4;
  --measure: 58rem;
  --acc-text: #fff;
  --raise: inset -1px -1px var(--b4), inset 1px 1px var(--b1), inset -2px -2px var(--b3), inset 2px 2px var(--b2);
  --sink:  inset -1px -1px var(--b1), inset 1px 1px var(--b4), inset -2px -2px var(--b2), inset 2px 2px var(--b3);
  --flat-raise: inset -1px -1px var(--b4), inset 1px 1px var(--b1);
  --flat-sink:  inset -1px -1px var(--b1), inset 1px 1px var(--b4);
  --box: inset 0 0 0 1px var(--rule);
  --etch: inset 0 0 0 1px var(--b3), 1px 1px 0 var(--b1);
  --cur: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='20' shape-rendering='crispEdges'%3E%3Cpath d='M1.5 1.5v14l3.5-3.5 2.5 6 2-1-2.5-5.5h5z' stroke='%23000' stroke-width='1' fill='%23fff'/%3E%3C/svg%3E") 1 1, default;
  --cur-hand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='22' shape-rendering='crispEdges'%3E%3Cpath d='M6.5 1.5h2v7h1v-2h2v2h1v-1h2v6l-1 5h-7l-3-5 1-1 2 1.5z' stroke='%23000' stroke-width='1' fill='%23fff'/%3E%3C/svg%3E") 7 1, pointer;
  --cur-text: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='20' shape-rendering='crispEdges'%3E%3Cpath d='M2 1.5h7M5.5 1.5v17M2 18.5h7' stroke='%23fff' stroke-width='3' fill='none'/%3E%3Cpath d='M2 1.5h7M5.5 1.5v17M2 18.5h7' stroke='%23000' stroke-width='1' fill='none'/%3E%3C/svg%3E") 5 10, text;
  --cur-wait: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='22' shape-rendering='crispEdges'%3E%3Cpath d='M3.5 1.5h11M3.5 20.5h11M4.5 1.5c0 5 4 6 4 9.500s-4 4.500-4 9.500M13.500 1.500c0 5-4 6-4 9.500s4 4.500 4 9.500z' stroke='%23000' stroke-width='1' fill='%23fff'/%3E%3Cpath d='M6 4h6l-3 5zM9 14l3 5H6z' fill='%23000' stroke='none'/%3E%3C/svg%3E") 9 11, wait;
  --cur-no: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' shape-rendering='crispEdges'%3E%3Ccircle cx='11' cy='11' r='8.500' fill='%23fff' stroke='%23000' stroke-width='3'/%3E%3Ccircle cx='11' cy='11' r='8.500' fill='none' stroke='%23c00' stroke-width='1.500'/%3E%3Cpath d='M5 17L17 5' stroke='%23c00' stroke-width='2'/%3E%3C/svg%3E") 11 11, not-allowed;
  --cur-move: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' shape-rendering='crispEdges'%3E%3Cpath d='M12 1.5l3.500 4h-2.500v5.500h5.500v-2.500l4 3.500-4 3.500v-2.500h-5.500v5.500h2.500l-3.500 4-3.500-4h2.500v-5.500h-5.500v2.500l-4-3.500 4-3.500v2.500h5.500v-5.500h-2.500z' stroke='%23000' stroke-width='1' fill='%23fff'/%3E%3C/svg%3E") 12 12, move;
  --cur-cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' shape-rendering='crispEdges'%3E%3Cpath d='M11 2v18M2 11h18' stroke='%23fff' stroke-width='3'/%3E%3Cpath d='M11 2v18M2 11h18' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E") 11 11, crosshair;
  --cur-ns: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='24' shape-rendering='crispEdges'%3E%3Cpath d='M7 1.500l4.500 5h-3v11h3l-4.500 5-4.500-5h3v-11h-3z' stroke='%23000' stroke-width='1' fill='%23fff'/%3E%3C/svg%3E") 7 12, ns-resize;
  --cur-ew: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='14' shape-rendering='crispEdges'%3E%3Cpath d='M1.500 7l5-4.500v3h11v-3l5 4.500-5 4.500v-3h-11v3z' stroke='%23000' stroke-width='1' fill='%23fff'/%3E%3C/svg%3E") 12 7, ew-resize;
  --cur-help: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='24' shape-rendering='crispEdges'%3E%3Cpath d='M1.500 1.500v14l3.500-3.500 2.500 6 2-1-2.500-5.500h5z' stroke='%23000' stroke-width='1' fill='%23fff'/%3E%3Ctext x='13' y='20' font-family='Arial' font-weight='bold' font-size='13' fill='%23000' stroke='%23fff' stroke-width='.4'%3E?%3C/text%3E%3C/svg%3E") 1 1, help;
}
.veylo, .veylo[data-theme=graphite] {
  color-scheme: dark;
  --face: #383838; --field: #232323; --desk: #2b2b2b; --code-bg: #141414; --stripe: #292929;
  --text: #ececec; --text-dim: #a0a0a0; --link: oklch(0.82 0.1 295); --visited: oklch(0.76 0.1 320);
  --ok: #7fe08f; --no: #f2b46b; --err: #ff8b8b;
  --b1: #848484; --b2: #505050; --b3: #1c1c1c; --b4: #080808; --rule: #6a6a6a;
  --acc-a: #2e1a66; --acc-b: #8d68e8; --acc: #6b45d6;
  --ar-u: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4' shape-rendering='crispEdges'%3E%3Cpath d='M0 4L3.500 0 7 4z' fill='%23ddd'/%3E%3C/svg%3E");
  --ar-d: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h7L3.500 4z' fill='%23ddd'/%3E%3C/svg%3E");
  --ar-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7' shape-rendering='crispEdges'%3E%3Cpath d='M4 0v7L0 3.500z' fill='%23ddd'/%3E%3C/svg%3E");
  --ar-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7' shape-rendering='crispEdges'%3E%3Cpath d='M0 0v7L4 3.500z' fill='%23ddd'/%3E%3C/svg%3E");
}
.veylo[data-theme=midnight] {
  color-scheme: dark;
  --face: #2a3040; --field: #161b26; --desk: #0f131b; --code-bg: #0d1119; --stripe: #1b2130;
  --text: #e4e9f5; --text-dim: #9aa5bd; --link: #8fb4ff; --visited: #b79bff;
  --ok: #7fe0a0; --no: #f2c27b; --err: #ff8f8f;
  --b1: #6a7691; --b2: #444d63; --b3: #151a26; --b4: #05070b; --rule: #4a546b;
  --acc-a: #14295c; --acc-b: #4b86e8; --acc: #3d6fd1;
  --ar-u: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4' shape-rendering='crispEdges'%3E%3Cpath d='M0 4L3.500 0 7 4z' fill='%23ddd'/%3E%3C/svg%3E");
  --ar-d: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h7L3.500 4z' fill='%23ddd'/%3E%3C/svg%3E");
  --ar-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7' shape-rendering='crispEdges'%3E%3Cpath d='M4 0v7L0 3.500z' fill='%23ddd'/%3E%3C/svg%3E");
  --ar-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7' shape-rendering='crispEdges'%3E%3Cpath d='M0 0v7L4 3.500z' fill='%23ddd'/%3E%3C/svg%3E");
}
.veylo[data-theme=classic] {
  color-scheme: light;
  --face: #c0c0c0; --field: #fff; --desk: #008080; --code-bg: #fff; --stripe: #f0f0f0;
  --text: #000; --text-dim: #555; --link: #0000ee; --visited: #551a8b;
  --ok: #006400; --no: #8a4b00; --err: #b00000;
  --b1: #fff; --b2: #dfdfdf; --b3: #808080; --b4: #000; --rule: #808080;
  --acc-a: #000080; --acc-b: #1084d0; --acc: #000080;
  --ar-u: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4' shape-rendering='crispEdges'%3E%3Cpath d='M0 4L3.500 0 7 4z' fill='%23000'/%3E%3C/svg%3E");
  --ar-d: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h7L3.500 4z' fill='%23000'/%3E%3C/svg%3E");
  --ar-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7' shape-rendering='crispEdges'%3E%3Cpath d='M4 0v7L0 3.500z' fill='%23000'/%3E%3C/svg%3E");
  --ar-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7' shape-rendering='crispEdges'%3E%3Cpath d='M0 0v7L4 3.500z' fill='%23000'/%3E%3C/svg%3E");
}
.veylo[data-theme=lilac] {
  color-scheme: light;
  --face: #cdc8dc; --field: #fff; --desk: #5b4a8f; --code-bg: #fff; --stripe: #f3f0fb;
  --text: #000; --text-dim: #555; --link: #3b1fb5; --visited: #7a1f8c;
  --ok: #006400; --no: #8a4b00; --err: #b00000;
  --b1: #fff; --b2: #e8e4f2; --b3: #8a85a0; --b4: #000; --rule: #8a85a0;
  --acc-a: #2e1a66; --acc-b: #8d68e8; --acc: #5b3fc0;
  --ar-u: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4' shape-rendering='crispEdges'%3E%3Cpath d='M0 4L3.500 0 7 4z' fill='%23000'/%3E%3C/svg%3E");
  --ar-d: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h7L3.500 4z' fill='%23000'/%3E%3C/svg%3E");
  --ar-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7' shape-rendering='crispEdges'%3E%3Cpath d='M4 0v7L0 3.500z' fill='%23000'/%3E%3C/svg%3E");
  --ar-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7' shape-rendering='crispEdges'%3E%3Cpath d='M0 0v7L4 3.500z' fill='%23000'/%3E%3C/svg%3E");
}
.veylo[data-theme=paper] {
  color-scheme: light;
  --face: #e8eaee; --field: #fff; --desk: #d9dde4; --code-bg: #f8f9fa; --stripe: #f8f9fa;
  --text: #202122; --text-dim: #54595d; --link: #0645ad; --visited: #0b0080;
  --ok: #14866d; --no: #8a5a00; --err: #b32424;
  --b1: #fff; --b2: #f4f5f7; --b3: #8a919a; --b4: #3d4248; --rule: #8a919a;
  --acc-a: #2a4b8d; --acc-b: #3366cc; --acc: #3366cc;
  --ar-u: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4' shape-rendering='crispEdges'%3E%3Cpath d='M0 4L3.500 0 7 4z' fill='%23000'/%3E%3C/svg%3E");
  --ar-d: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h7L3.500 4z' fill='%23000'/%3E%3C/svg%3E");
  --ar-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7' shape-rendering='crispEdges'%3E%3Cpath d='M4 0v7L0 3.500z' fill='%23000'/%3E%3C/svg%3E");
  --ar-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7' shape-rendering='crispEdges'%3E%3Cpath d='M0 0v7L4 3.500z' fill='%23000'/%3E%3C/svg%3E");
}

/* ================= base ================= */
.veylo-desk { background: var(--desk, #2b2b2b); margin: 0; }
.veylo {
  font: var(--fs)/var(--lh) var(--ui); color: var(--text);
  max-width: var(--measure); margin: 0 auto; padding: 8px; box-sizing: border-box;
  cursor: var(--cur); caret-color: var(--acc-b); caret-shape: var(--caret, block);
}
.veylo *, .veylo ::before, .veylo ::after { box-sizing: border-box; }
.veylo a { color: var(--link); text-decoration: underline; cursor: var(--cur-hand); }
.veylo a:visited { color: var(--visited); }
.veylo a:active { color: var(--err); }
.veylo :focus-visible { outline: 1px dotted var(--text); outline-offset: 2px; }
.veylo ::selection { background: var(--acc); color: var(--acc-text); }
.veylo p { margin: 0 0 .75em; }
.veylo h1, .veylo h2, .veylo h3, .veylo h4 { font: 700 var(--fs)/var(--lh) var(--ui); margin: 1.1em 0 .4em; overflow-wrap: anywhere; }
.veylo h2 { font-size: var(--fs-h2); border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.veylo h3 { font-size: var(--fs-h3); }
.veylo h4 { color: var(--text-dim); }
.veylo hr { height: 2px; margin: 1em 0; border: 0; box-shadow: var(--etch); background: none; }
/* :where() keeps these at zero specificity so component classes can override padding/margin */
.veylo :where(ul, ol) { margin: 0 0 .75em; padding-left: 1.6em; }
.veylo :where(li) { margin: 1px 0; }
.veylo :where(dl, dd) { margin: 0; }
.veylo small, .veylo .sm { font-size: var(--fs-sm); }
.veylo code, .veylo kbd, .veylo samp, .veylo pre { font: 13px/1.3 var(--mono); overflow-wrap: anywhere; }
.veylo :not(pre) > code { padding: 0 3px; background: var(--code-bg); box-shadow: var(--flat-sink); }
.veylo kbd { padding: 0 5px; background: var(--face); box-shadow: var(--raise); }
.veylo mark { background: var(--acc); color: var(--acc-text); }
.veylo abbr[title] { cursor: var(--cur-help); text-decoration: underline dotted; }
.veylo time { margin-left: 0; }
.veylo blockquote { margin: 0 0 .75em; padding: 4px 10px; border-left: 3px solid var(--acc); background: var(--stripe); }
.veylo sup { font-size: .75em; line-height: 0; }
.veylo img { max-width: 100%; }

/* ================= window ================= */
.veylo-win { display: flex; flex-direction: column; padding: 3px; background: var(--face); box-shadow: var(--raise); }
.veylo .veylo-title {
  margin: 0 0 3px; padding: 3px 6px; color: #fff; min-height: 22px;
  background: linear-gradient(90deg, var(--acc-a), var(--acc-b));
  font: 700 var(--fs)/16px var(--ui); display: flex; align-items: center; justify-content: space-between; gap: 8px;
  user-select: none;
}
.veylo-win.off .veylo-title { background: linear-gradient(90deg, #4a4a4a, #7a7a7a); color: #d0d0d0; }
.veylo-body { padding: 10px 8px 6px; }
.veylo-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 4px; margin: 0 0 8px; box-shadow: var(--flat-raise); }
.veylo-toolbar .sep { width: 2px; align-self: stretch; margin: 0 2px; box-shadow: var(--etch); }
.veylo-status { display: flex; flex-wrap: wrap; gap: 2px; margin: 4px 0 0; }
.veylo-status span { flex: 1 1 auto; padding: 2px 8px; font: var(--fs-sm)/var(--lh) var(--ui); background: var(--face); box-shadow: var(--flat-sink); }

/* ================= panels ================= */
.veylo-sheet { overflow: auto; background: var(--field); box-shadow: var(--sink); padding: 2px; }
.veylo-panel { padding: 8px 12px; background: var(--field); }
/* fieldset keeps the native border so the legend cuts the line cleanly */
.veylo-group { margin: 0 0 .75em; padding: 6px 10px 6px; border: 2px groove var(--b2); border-color: var(--b3) var(--b1) var(--b1) var(--b3); min-width: 0; }
.veylo-group > legend { padding: 0 4px; margin-left: 4px; background: var(--field); }
.veylo-well { padding: 6px 8px; background: var(--field); box-shadow: var(--sink); margin: 0 0 .75em; }
.veylo-note { padding: 5px 8px 5px 30px; margin: 0 0 .75em; background: var(--field); box-shadow: var(--box); position: relative; }
.veylo-note::before { content: ""; position: absolute; left: 7px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: var(--acc); }
.veylo-note::after { content: ""; position: absolute; left: 10px; top: 50%; width: 10px; height: 10px; margin-top: -5px; background: #fff; clip-path: path("M4 0.5h2v2H4z M4 4h2v5.5H4z"); }
.veylo-note.no::before { background: var(--no); }
.veylo-note.no::after { background: #000; clip-path: path("M4 0.5h2v6H4z M4 7.5h2v2H4z"); }
.veylo-note.ok::before { background: var(--ok); }
.veylo-note.ok::after { background: #000; clip-path: polygon(10% 52%, 24% 38%, 42% 58%, 80% 12%, 94% 26%, 42% 88%); }
.veylo-note.err::before { background: var(--err); }
.veylo-note.err::after { background: #000; clip-path: polygon(8% 22%, 22% 8%, 50% 36%, 78% 8%, 92% 22%, 64% 50%, 92% 78%, 78% 92%, 50% 64%, 22% 92%, 8% 78%, 36% 50%); }

/* ================= tabs ================= */
/* tabbar + sheet read as one raised page. Inactive tabs are short and sit above the sheet edge; the active tab is taller, wider and runs
   down over the sheet border so it joins the page. The bar scrolls sideways when the tabs do not fit (no squashing, no ellipsis). */
.veylo-tabbar { display: flex; align-items: flex-end; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: 0 4px; position: relative; z-index: 1; margin-bottom: -2px; }
.veylo-tabbar::-webkit-scrollbar { display: none; }
.veylo .veylo-tabbar a, .veylo .veylo-tabbar button {
  flex: 0 0 auto; margin: 0 0 2px; min-width: 0; padding: 3px 12px; border: 0; border-radius: 0; white-space: nowrap;
  font: var(--fs)/var(--lh) var(--ui); color: var(--text-dim); text-decoration: none; cursor: var(--cur);
  background: var(--face); box-shadow: inset 1px 1px var(--b1), inset 2px 2px var(--b2), inset -1px 0 var(--b4), inset -2px 0 var(--b3);
}
.veylo .veylo-tabbar a:visited { color: var(--text-dim); }
.veylo .veylo-tabbar a:hover, .veylo .veylo-tabbar button:hover { color: var(--text); background: var(--face); }
.veylo .veylo-tabbar .on { margin: 0 -2px; padding: 7px 18px 9px; color: var(--text); font-weight: 700; position: relative; z-index: 2; }
.veylo .veylo-tabbar .on:hover { background: var(--face); }
.veylo .veylo-tabbar button:active { padding: 4px 12px 2px; background: var(--face); }
.veylo .veylo-tabbar .on:active { padding: 7px 18px 9px; }
.veylo .veylo-tabbar :focus-visible { outline: 1px dotted var(--text); outline-offset: -5px; }
.veylo .veylo-tabbar button:not(.on):focus-visible { outline-offset: -3px; }
.veylo-tabbar + .veylo-sheet { background: var(--face); border: 2px solid; border-color: var(--b1) var(--b4) var(--b4) var(--b1); box-shadow: inset 1px 1px var(--b2), inset -1px -1px var(--b3); padding: 4px; }
.veylo-tabbar + .veylo-sheet > .veylo-panel, .veylo-tabbar + .veylo-sheet > section { box-shadow: var(--sink); }
@media (pointer: coarse) { .veylo .veylo-tabbar a, .veylo .veylo-tabbar button { min-height: 38px; } .veylo .veylo-tabbar .on { min-height: 46px; } }

/* ================= buttons ================= */
.veylo-btn, .veylo button, .veylo input[type=button], .veylo input[type=submit], .veylo input[type=reset] {
  display: inline-block; min-width: 75px; padding: 3px 12px; border: 0; border-radius: 0; text-align: center; text-decoration: none;
  font: var(--fs)/var(--lh) var(--ui); color: var(--text); background: var(--face); box-shadow: var(--raise); cursor: var(--cur);
  user-select: none;
}
.veylo a.veylo-btn { color: var(--text); text-decoration: none; cursor: var(--cur); }
.veylo-btn:hover, .veylo button:hover { background: color-mix(in srgb, var(--face) 92%, #fff); }
.veylo-btn:active, .veylo button:active, .veylo-btn.on, .veylo button.on {
  background: repeating-conic-gradient(var(--face) 0 25%, color-mix(in srgb, var(--face) 80%, var(--b1)) 0 50%) 0 0/2px 2px;
  box-shadow: var(--sink); padding: 4px 11px 2px 13px;
}
.veylo-btn:focus-visible, .veylo button:focus-visible { outline: 1px dotted var(--text); outline-offset: -5px; }
.veylo-btn.def, .veylo button.def { box-shadow: 0 0 0 1px var(--b4), var(--raise); margin: 1px; }
.veylo-btn[disabled], .veylo button[disabled], .veylo-btn.dis { color: var(--b3); text-shadow: 1px 1px var(--b1); cursor: var(--cur-no); }
.veylo-btn[disabled]:hover, .veylo button[disabled]:hover, .veylo-btn[disabled]:active, .veylo button[disabled]:active, .veylo-btn.dis:active {
  background: var(--face); box-shadow: var(--raise); padding: 3px 12px; }
.veylo-btn.sm, .veylo button.sm { min-width: 0; padding: 1px 6px; font-size: var(--fs-sm); }
.veylo-btn.icon, .veylo button.icon { min-width: 0; width: 23px; height: 22px; padding: 0; line-height: 20px; }
.veylo-btn.icon:active, .veylo button.icon:active { padding: 1px 0 0 1px; }
.veylo :is(.veylo-btn, button).flat, .veylo :is(.veylo-btn, button).flat:hover, .veylo :is(.veylo-btn, button).flat:active { background: none; }
.veylo-btn.flat, .veylo button.flat { box-shadow: none; }
.veylo-btn.flat:hover, .veylo button.flat:hover { box-shadow: var(--flat-raise); }
.veylo-btn.flat:active, .veylo button.flat:active { box-shadow: var(--flat-sink); padding: 3px 12px; }

/* ================= inputs ================= */
.veylo input[type=text], .veylo input[type=search], .veylo input[type=number], .veylo input[type=password], .veylo input[type=email],
.veylo input[type=url], .veylo input[type=date], .veylo input[type=time], .veylo textarea, .veylo select {
  padding: 3px 4px; border: 0; border-radius: 0; font: var(--fs)/var(--lh) var(--ui);
  color: var(--text); background: var(--field); box-shadow: var(--sink); max-width: 100%; cursor: var(--cur-text);
}
.veylo input:focus, .veylo textarea:focus, .veylo select:focus { outline: 0; box-shadow: var(--sink), inset 0 0 0 1px var(--acc-b); }
.veylo input::placeholder, .veylo textarea::placeholder { color: var(--text-dim); }
.veylo input::selection, .veylo textarea::selection { background: var(--acc); color: #fff; }
.veylo input:disabled, .veylo textarea:disabled, .veylo select:disabled { color: var(--text-dim); background: var(--face); cursor: var(--cur-no); }
.veylo select {
  appearance: none; padding: 3px 24px 3px 4px; cursor: var(--cur);
  background-color: var(--field);
  background-image: var(--ar-d), linear-gradient(var(--face), var(--face));
  background-repeat: no-repeat; background-position: right 7px center, right 2px center; background-size: 7px 4px, 16px calc(100% - 4px);
}
.veylo select[multiple], .veylo select[size] { padding: 2px; background-image: none; cursor: var(--cur); }
.veylo option:checked { background: var(--acc); color: #fff; }
.veylo textarea { font-family: var(--mono); resize: vertical; }
.veylo label { cursor: var(--cur); }
.veylo .row { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; flex-wrap: wrap; }
.veylo .row > label:first-child:not(:has(> input)) { min-width: 7rem; }
/* number spinner */
.veylo input[type=number] { width: 6rem; }
.veylo input[type=number]::-webkit-inner-spin-button { appearance: none; width: 16px; height: 100%; margin: 0 -4px 0 0; opacity: 1;
  background: var(--face) var(--ar-u) no-repeat center 3px; box-shadow: var(--raise); cursor: var(--cur); }
.veylo input[type=number]::-webkit-inner-spin-button:active { box-shadow: var(--sink); }
.veylo input[type=date], .veylo input[type=time] { color-scheme: inherit; }
/* masked field: JS-driven, shows * instead of dots (see veylo.js, input[data-veylo-mask]) */
.veylo input[data-veylo-mask] { font-family: var(--mono); letter-spacing: 1px; }

/* checkbox + radio, drawn. Marks are absolutely positioned so toggling never moves the box. */
.veylo input[type=checkbox], .veylo input[type=radio] {
  appearance: none; position: relative; display: inline-block; flex: none; width: 13px; height: 13px; margin: 0 6px 0 0;
  vertical-align: middle; top: -1px; background: var(--field); box-shadow: var(--sink); cursor: var(--cur);
}
.veylo input[type=radio] { border-radius: 50%; box-shadow: inset 1px 1px var(--b3), inset -1px -1px var(--b1), inset 2px 2px var(--b4); }
.veylo input[type=checkbox]::before, .veylo input[type=radio]::before { content: ""; position: absolute; display: none; }
.veylo input[type=checkbox]:checked::before { display: block; left: 3px; top: 3px; width: 7px; height: 7px; background: var(--text);
  clip-path: polygon(0 50%, 15% 35%, 40% 60%, 85% 0, 100% 15%, 40% 100%); }
.veylo input[type=checkbox]:indeterminate::before { display: block; left: 3px; top: 3px; width: 7px; height: 7px; background: var(--text-dim); }
.veylo input[type=radio]:checked::before { display: block; left: 4px; top: 4px; width: 5px; height: 5px; background: var(--text); border-radius: 50%; }
.veylo input[type=checkbox]:focus-visible { outline: 0; box-shadow: var(--sink), inset 0 0 0 1px var(--acc-b); }
.veylo input[type=radio]:focus-visible { outline: 0; box-shadow: inset 1px 1px var(--b3), inset -1px -1px var(--b1), 0 0 0 1px var(--acc-b); }
.veylo input[type=checkbox]:disabled, .veylo input[type=radio]:disabled { background: var(--face); cursor: var(--cur-no); }
.veylo label:has(> input[type=checkbox]), .veylo label:has(> input[type=radio]) { display: inline-flex; align-items: center; white-space: nowrap; }

/* range: one flat groove, one raised thumb */
.veylo input[type=range] { appearance: none; width: 12rem; height: 22px; padding: 0; background: none; box-shadow: none; cursor: var(--cur); }
.veylo input[type=range]:focus { box-shadow: none; }
.veylo input[type=range]:focus-visible { outline: 0; }
.veylo input[type=range]::-webkit-slider-runnable-track { height: 4px; background: var(--field); box-shadow: var(--flat-sink); }
.veylo input[type=range]::-webkit-slider-thumb { appearance: none; width: 11px; height: 21px; margin-top: -9px; background: var(--face); box-shadow: var(--raise); border: 0; border-radius: 0; }
.veylo input[type=range]:active::-webkit-slider-thumb { box-shadow: var(--sink); }
.veylo input[type=range]:focus-visible::-webkit-slider-thumb { outline: 1px dotted var(--text); outline-offset: -4px; }
.veylo input[type=range]::-moz-range-track { height: 4px; background: var(--field); box-shadow: var(--flat-sink); }
.veylo input[type=range]::-moz-range-thumb { width: 11px; height: 21px; background: var(--face); box-shadow: var(--raise); border: 0; border-radius: 0; }

/* progress + meter: block style */
.veylo progress { appearance: none; width: 100%; height: 18px; border: 0; background: var(--field); box-shadow: var(--sink); padding: 2px; }
.veylo progress::-webkit-progress-bar { background: transparent; }
.veylo progress::-webkit-progress-value { background: repeating-linear-gradient(90deg, var(--acc) 0 8px, transparent 8px 10px); }
.veylo progress::-moz-progress-bar { background: repeating-linear-gradient(90deg, var(--acc) 0 8px, transparent 8px 10px); }
.veylo progress:not([value]) { background: repeating-linear-gradient(90deg, var(--acc) 0 8px, transparent 8px 10px) 0 0/200% 100% no-repeat; background-clip: content-box; animation: veylo-marq 1.6s steps(12) infinite; }
@keyframes veylo-marq { to { background-position: 40px 0; } }
.veylo meter { appearance: none; width: 100%; height: 18px; padding: 2px; background: var(--field); box-shadow: var(--sink); border: 0; }
.veylo meter::-webkit-meter-bar { background: transparent; border: 0; height: 14px; }
.veylo meter::-webkit-meter-optimum-value { background: repeating-linear-gradient(90deg, var(--acc) 0 8px, transparent 8px 10px); }
.veylo meter::-webkit-meter-suboptimum-value { background: repeating-linear-gradient(90deg, var(--no) 0 8px, transparent 8px 10px); }
.veylo meter::-webkit-meter-even-less-good-value { background: repeating-linear-gradient(90deg, var(--err) 0 8px, transparent 8px 10px); }
@media (prefers-reduced-motion: reduce) { .veylo progress:not([value]) { animation: none; } }

/* ================= bars: <div class="veylo-bar" style="--v:60"><i></i></div>  (--v is 0-100) ================= */
.veylo-bar { position: relative; height: 18px; padding: 2px; background: var(--field); box-shadow: var(--sink); overflow: hidden; margin: 0 0 6px; }
.veylo-bar > i { display: block; height: 100%; width: calc(var(--v, 0) * 1%); background: repeating-linear-gradient(90deg, var(--acc) 0 8px, transparent 8px 10px); }
.veylo-bar[data-t]::after { content: attr(data-t); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: var(--fs-sm); color: #fff; text-shadow: 1px 1px #000; }
.veylo-bar.smooth > i { background: linear-gradient(90deg, var(--acc-a), var(--acc-b)); }
.veylo-bar.solid > i { background: var(--acc); }
.veylo-bar.ok > i { background: repeating-linear-gradient(90deg, var(--ok) 0 8px, transparent 8px 10px); }
.veylo-bar.no > i { background: repeating-linear-gradient(90deg, var(--no) 0 8px, transparent 8px 10px); }
.veylo-bar.err > i { background: repeating-linear-gradient(90deg, var(--err) 0 8px, transparent 8px 10px); }
.veylo-bar.smooth.ok > i { background: var(--ok); } .veylo-bar.smooth.no > i { background: var(--no); } .veylo-bar.smooth.err > i { background: var(--err); }
.veylo-bar.stripe > i { background: repeating-linear-gradient(135deg, var(--acc) 0 6px, var(--acc-b) 6px 12px); background-size: 17px 17px; animation: veylo-stripe .8s linear infinite; }
@keyframes veylo-stripe { to { background-position: 17px 0; } }
.veylo-bar.thin { height: 10px; padding: 1px; } .veylo-bar.thin > i { background: var(--acc); }
.veylo-bar.fat { height: 26px; padding: 3px; }
.veylo-bar.busy > i { width: 30px; animation: veylo-run 1.4s linear infinite; }
@keyframes veylo-run { from { transform: translateX(-30px); } to { transform: translateX(400px); } }
.veylo-bar.bounce > i { width: 28%; background: linear-gradient(90deg, var(--acc-a), var(--acc-b)); animation: veylo-bounce 1.6s steps(16) infinite alternate; }
@keyframes veylo-bounce { from { transform: translateX(0); } to { transform: translateX(257%); } }
.veylo-bar.vert { display: inline-block; width: 18px; height: 90px; margin: 0 6px 0 0; vertical-align: bottom; }
.veylo-bar.vert > i { position: absolute; left: 2px; right: 2px; bottom: 2px; width: auto; height: calc((100% - 4px) * var(--v, 0) / 100); background: repeating-linear-gradient(0deg, var(--acc) 0 8px, transparent 8px 10px); }
.veylo-bar.cells { width: 110px; display: inline-block; height: 22px; padding: 3px; vertical-align: middle; margin: 0 6px 0 0; }
.veylo-bar.cells > i { background: repeating-linear-gradient(90deg, var(--ok) 0 9px, transparent 9px 11px); }
.veylo-bar.cells.low > i { background: repeating-linear-gradient(90deg, var(--err) 0 9px, transparent 9px 11px); }
.veylo-spin { display: inline-block; width: 16px; height: 16px; vertical-align: middle; border: 3px solid var(--rule); border-top-color: var(--acc-b); border-radius: 50%; animation: veylo-rot .8s steps(8) infinite; }
@keyframes veylo-rot { to { transform: rotate(360deg); } }
.veylo-dots::after { content: ""; animation: veylo-dots 1.2s steps(1) infinite; }
@keyframes veylo-dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
@media (prefers-reduced-motion: reduce) { .veylo-bar.stripe > i, .veylo-bar.busy > i, .veylo-bar.bounce > i, .veylo-spin, .veylo-dots::after { animation: none; } }

/* file input */
.veylo input[type=file] { max-width: 100%; font: var(--fs)/var(--lh) var(--ui); color: var(--text); cursor: var(--cur); }
.veylo input[type=file]::file-selector-button { margin-right: 8px; padding: 3px 12px; border: 0; border-radius: 0; background: var(--face); color: var(--text); box-shadow: var(--raise); font: inherit; cursor: var(--cur); }
.veylo input[type=file]::file-selector-button:active { box-shadow: var(--sink); }

/* form feedback */
.veylo .help { display: block; margin-top: 2px; font-size: var(--fs-sm); color: var(--text-dim); }
.veylo .invalid, .veylo input:user-invalid { box-shadow: var(--sink), inset 0 0 0 1px var(--err); }
.veylo .req::after { content: " *"; color: var(--err); }

/* ================= custom colour picker (JS: <div class="veylo-color" data-value="#6b45d6">) ================= */
.veylo-color { position: relative; display: inline-block; vertical-align: middle; }
.veylo-color > .veylo-color-btn { display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding: 3px 6px 3px 4px; }
.veylo-color > .veylo-color-btn:active, .veylo-color.open > .veylo-color-btn { padding: 4px 5px 2px 5px; }
.veylo-color .sw { display: block; width: 28px; height: 14px; box-shadow: var(--flat-sink); }
.veylo-color .caret { display: block; width: 7px; height: 4px; background: var(--ar-d) no-repeat center; }
.veylo-color-pop { position: absolute; left: 0; top: 100%; margin-top: 2px; z-index: 30; padding: 8px; background: var(--face); box-shadow: var(--raise), 4px 4px 0 rgba(0,0,0,.35); width: 268px; }
.veylo-color-pop[hidden] { display: none; }
.veylo-color-pop .pick { display: flex; gap: 8px; }
.veylo-color-pop .sv { position: relative; flex: 1; height: 152px; box-shadow: var(--sink); cursor: var(--cur-cross); touch-action: none;
  background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(var(--h, 0), 100%, 50%)); }
.veylo-color-pop .sv i { position: absolute; width: 11px; height: 11px; margin: -6px 0 0 -6px; pointer-events: none; box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #000, inset 0 0 0 2px #fff; }
.veylo-color-pop .hue { position: relative; flex: none; width: 20px; height: 152px; box-shadow: var(--sink); cursor: var(--cur-ns); touch-action: none;
  background: linear-gradient(to bottom, #f00, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00); }
.veylo-color-pop .hue i { position: absolute; left: -3px; right: -3px; height: 7px; margin-top: -3px; pointer-events: none; background: var(--face); box-shadow: var(--raise); }
.veylo-color-pop .fields { display: grid; grid-template-columns: 44px 1fr 1fr 1fr; gap: 5px 6px; align-items: center; margin: 10px 0 0; padding-top: 10px; box-shadow: 0 -1px var(--b3), 0 -2px var(--b1); }
.veylo-color-pop .prev { display: flex; flex-direction: column; grid-row: span 2; height: 100%; min-height: 44px; box-shadow: var(--sink); }
.veylo-color-pop .prev i { flex: 1; display: block; }
.veylo-color-pop .prev i + i { box-shadow: inset 0 1px var(--b4); }
.veylo-color-pop .fields label { display: flex; align-items: center; gap: 3px; font-size: var(--fs-sm); }
.veylo-color-pop .fields input { width: 100%; min-width: 0; padding: 2px 3px; font-family: var(--mono); }
.veylo-color-pop .fields input[type=number]::-webkit-inner-spin-button { display: none; }
.veylo-color-pop .fields .hex { grid-column: 2 / span 3; }
.veylo-color-pop .act { display: flex; gap: 6px; justify-content: flex-end; margin-top: 10px; }
.veylo-color-pop .act button { min-width: 64px; }

/* ================= tables & spreadsheet ================= */
.veylo table { width: 100%; border-collapse: collapse; margin: 0 0 .75em; }
.veylo th, .veylo td { padding: 3px 6px; border: 1px solid var(--rule); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.veylo th { background: var(--face); font-weight: 700; }
.veylo table.fixed { table-layout: fixed; }
.veylo table.zebra tbody tr:nth-child(even) td { background: var(--stripe); }
.veylo table.hover tbody tr:hover td { background: color-mix(in srgb, var(--acc) 22%, var(--field)); }
.veylo table.hover tbody tr:hover a { color: inherit; }
.veylo caption { text-align: left; font-weight: 700; padding: 2px 0 4px; }
.veylo .num { text-align: right; font-variant-numeric: tabular-nums; }
.veylo .ctr { text-align: center; }
.veylo tr.sel td { background: color-mix(in srgb, var(--acc) 38%, var(--field)); color: var(--text); }
.veylo tr.sel td:first-child { box-shadow: inset 3px 0 var(--acc-b); }
.veylo td.err { color: var(--err); }
.veylo th.chk, .veylo td.chk { width: 28px; text-align: center; padding-inline: 0; }
.veylo td.chk input, .veylo th.chk input { margin: 0; top: 0; }
/* sortable header: button feel. JS (veylo.js) sets aria-sort and reorders rows: <table data-veylo-sort><th data-sort> */
.veylo th[data-sort] { cursor: var(--cur); user-select: none; padding-right: 20px; position: relative; }
.veylo th[data-sort]:hover { background: color-mix(in srgb, var(--face) 88%, #fff); }
.veylo th[data-sort]:active { background: color-mix(in srgb, var(--face) 85%, #000); padding-top: 4px; padding-bottom: 2px; }
.veylo th[data-sort]:focus-visible { outline: 1px dotted var(--text); outline-offset: -4px; }
.veylo th[data-sort]::after { content: ""; position: absolute; right: 7px; top: 50%; margin-top: -2px; opacity: 0; }
.veylo th[data-sort]:hover::after { border: 4px solid transparent; border-bottom: 5px solid var(--text-dim); border-top: 0; opacity: .6; }
.veylo th[aria-sort=ascending]::after, .veylo th[aria-sort=ascending]:hover::after { border: 4px solid transparent; border-bottom: 5px solid currentColor; border-top: 0; opacity: 1; }
.veylo th[aria-sort=descending]::after, .veylo th[aria-sort=descending]:hover::after { border: 4px solid transparent; border-top: 5px solid currentColor; border-bottom: 0; opacity: 1; }

/* spreadsheet grid: separate borders so header bevels are not doubled */
.veylo table.veylo-grid { font: var(--fs)/1.2 var(--ui); table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.veylo-grid th, .veylo-grid td { padding: 1px 4px; height: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 0; }
.veylo-grid td { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); cursor: var(--cur-cross); }
.veylo-grid thead th, .veylo-grid tbody th { background: var(--face); box-shadow: var(--flat-raise); text-align: center; font-weight: 400; cursor: var(--cur); }
.veylo-grid tbody th { width: 2.6rem; }
.veylo-grid th.hl { font-weight: 700; background: color-mix(in srgb, var(--acc) 30%, var(--face)); box-shadow: var(--flat-sink); }
.veylo-grid td.cur { outline: 2px solid var(--acc-b); outline-offset: -2px; }
.veylo-grid td.sel { background: color-mix(in srgb, var(--acc) 30%, var(--field)); }
.veylo-grid tfoot td { font-weight: 700; background: var(--face); }
.veylo-fbar { display: flex; gap: 4px; align-items: center; margin: 0 0 6px; }
.veylo-fbar .ref { width: 5rem; padding: 3px 4px; text-align: center; background: var(--field); box-shadow: var(--sink); }
.veylo-fbar .fx { padding: 0 4px; font: italic 700 13px var(--ui); color: var(--text-dim); }
.veylo-fbar input { flex: 1; }

/* ================= article / wikipedia bits ================= */
.veylo-article { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 0 20px; align-items: start; }
.veylo-article > aside { grid-column: 2; grid-row: 1 / span 20; position: sticky; top: 0; }
.veylo-article > :not(aside) { grid-column: 1; min-width: 0; }
.veylo-article h2:first-of-type { margin-top: 0; }
.veylo-infobox { width: 100%; font-size: var(--fs-sm); }
.veylo .veylo-infobox th[colspan] { text-align: center; background: linear-gradient(90deg, var(--acc-a), var(--acc-b)); color: #fff; }
.veylo .veylo-infobox td:first-child { width: 40%; background: var(--face); font-weight: 700; }
.veylo-hat { font-style: italic; color: var(--text-dim); margin: 0 0 .5em; font-size: var(--fs-sm); }
/* contents box: small panel with a header strip */
.veylo-toc { display: block; width: fit-content; min-width: 15rem; max-width: 100%; margin: 0 0 1em; background: var(--field); box-shadow: var(--box); }
.veylo-toc > b { display: block; padding: 2px 10px; background: var(--face); box-shadow: inset 0 -1px var(--rule); font-size: var(--fs-sm); }
.veylo-toc ol { margin: 0; padding: 6px 14px 6px 32px; }
.veylo-toc ol ol { padding: 0 0 0 20px; margin: 0; }
.veylo-toc a, .veylo-toc a:visited { color: var(--link); }
.veylo-crumbs { font-size: var(--fs-sm); margin: 0 0 6px; color: var(--text-dim); }
.veylo-crumbs > * + *::before { content: ">"; display: inline-block; text-decoration: none; margin: 0 6px; color: var(--text-dim); }
.veylo-crumbs a, .veylo-crumbs a:visited { color: var(--link); }
.veylo-refs { font-size: var(--fs-sm); color: var(--text-dim); }
.veylo-refs li::marker { color: var(--link); }
.veylo .veylo-cat { margin: 1em 0 0; padding: 4px 8px; background: var(--face); box-shadow: var(--flat-raise); font-size: var(--fs-sm); }
.veylo-fig { margin: 0 0 .75em; padding: 3px; background: var(--face); box-shadow: var(--raise); }
.veylo-fig > div { height: 90px; background: repeating-conic-gradient(var(--field) 0 25%, var(--stripe) 0 50%) 0 0/12px 12px; box-shadow: var(--sink); }
.veylo-fig figcaption { padding: 3px 2px 1px; font-size: var(--fs-sm); color: var(--text-dim); }

/* tree: each li draws its own connector; the last child's vertical line stops at the elbow */
.veylo-tree, .veylo-tree ul { list-style: none; margin: 0; padding: 0; }
.veylo-tree ul { margin-left: 4px; padding-left: 18px; }
.veylo-tree li { position: relative; margin: 0; padding: 2px 0; line-height: 16px; }
.veylo-tree ul > li::before { content: ""; position: absolute; left: -14px; top: 10px; width: 12px; border-top: 1px dotted var(--text-dim); }
.veylo-tree ul > li::after { content: ""; position: absolute; left: -14px; top: 0; bottom: 0; border-left: 1px dotted var(--text-dim); }
.veylo-tree ul > li:last-child::after { bottom: auto; height: 10px; }
.veylo-tree summary { list-style: none; cursor: var(--cur); }
.veylo-tree summary::-webkit-details-marker { display: none; }
.veylo-tree summary::before { content: "+"; display: inline-block; width: 9px; height: 9px; margin-right: 6px; background: var(--field);
  box-shadow: inset 0 0 0 1px var(--text-dim); font: 9px/9px var(--mono); text-align: center; vertical-align: 1px; }
.veylo-tree details[open] > summary::before { content: "−"; }
.veylo-tree li.leaf { padding-left: 15px; }
.veylo-tree .sel, .veylo-tree summary:focus-visible { background: var(--acc); color: #fff; outline: 1px dotted #fff; outline-offset: -1px; }

.veylo-list { list-style: none; margin: 0 0 .75em; padding: 2px; background: var(--field); box-shadow: var(--sink); }
.veylo-list li { padding: 1px 6px; margin: 0; }
.veylo-list li:hover { background: color-mix(in srgb, var(--acc) 30%, var(--field)); }
.veylo-list li.sel { background: var(--acc); color: #fff; outline: 1px dotted #fff; outline-offset: -1px; }

/* ================= dialog, menu, tooltip ================= */
.veylo-dialog { position: relative; display: inline-block; max-width: 100%; min-width: 16rem; padding: 3px; background: var(--face); box-shadow: var(--raise), 4px 4px 0 rgba(0,0,0,.35); }
.veylo-dialog .veylo-body { padding: 12px; }
.veylo-dialog .btns { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.veylo-dialog .msg { display: flex; gap: 12px; align-items: center; }
.veylo-dialog .ico { display: flex; align-items: center; justify-content: center; padding-bottom: 1px; flex: none; width: 32px; height: 32px; border-radius: 50%; font: 700 20px/1 var(--ui); text-align: center; color: #fff; background: var(--acc-b); }
.veylo-dialog .ico.no { background: var(--no); color: #000; }
.veylo-dialog .ico.err { background: var(--err); color: #000; }
/* menus: li.chk | .dis | .sub | .sep, data-k="Ctrl+X", <u> marks the mnemonic */
.veylo ul.veylo-popup { display: inline-block; min-width: 12rem; margin: 0; padding: 2px; list-style: none; background: var(--face); box-shadow: var(--raise), 4px 4px 0 rgba(0,0,0,.35); }
.veylo-popup li { margin: 0; padding: 3px 28px 3px 26px; position: relative; white-space: nowrap; cursor: var(--cur); }
.veylo-popup li:hover:not(.sep):not(.dis) { background: var(--acc); color: #fff; }
.veylo-popup li.sep { padding: 0; margin: 3px 1px; height: 2px; box-shadow: var(--etch); }
.veylo-popup li.chk::before { content: ""; position: absolute; left: 8px; top: 50%; width: 8px; height: 8px; margin-top: -4px; background: currentColor;
  clip-path: polygon(0 50%, 15% 35%, 40% 60%, 85% 0, 100% 15%, 40% 100%); }
.veylo-popup li.dis { color: var(--b3); text-shadow: 1px 1px var(--b1); cursor: var(--cur-no); }
.veylo-popup li.sub::after { content: ""; position: absolute; right: 8px; top: 50%; margin-top: -4px; border: 4px solid transparent; border-left: 5px solid currentColor; border-right: 0; }
.veylo-popup li[data-k] { padding-right: 56px; }
.veylo-popup li[data-k]::after { content: attr(data-k); position: absolute; right: 10px; color: var(--text-dim); }
.veylo-popup li:hover[data-k]::after { color: #fff; }
.veylo-popup li.dis[data-k]::after { color: inherit; }
.veylo [data-tip] { position: relative; cursor: var(--cur-help); }
.veylo [data-tip]:hover::after, .veylo [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; left: 0; top: 100%; margin-top: 4px; z-index: 5; white-space: nowrap;
  padding: 1px 4px; font: var(--fs-sm)/var(--lh) var(--ui); color: #000; background: #ffffe1; border: 1px solid #000; text-decoration: none; cursor: var(--cur);
}

/* ================= code / badges ================= */
.veylo pre.veylo-cmd, .veylo pre.veylo-code { margin: 0 0 .75em; padding: 3px 6px; overflow: auto; background: var(--code-bg); box-shadow: var(--sink); cursor: var(--cur-text); }
.veylo pre code { white-space: pre-wrap; background: none; box-shadow: none; padding: 0; }
.veylo-codebox { position: relative; margin: 0 0 .75em; }
.veylo-codebox pre { margin: 0; padding-right: 64px; }
.veylo-codebox .veylo-copy { position: absolute; top: 3px; right: 3px; min-width: 0; padding: 1px 8px; font-size: var(--fs-sm); }
.veylo-badge { display: inline-block; padding: 0 5px; margin-left: 6px; font-size: var(--fs-sm); background: var(--face); box-shadow: var(--flat-raise); }
.veylo-ok, .veylo .ok { color: var(--ok); }
.veylo-no, .veylo .no, .veylo-sec { color: var(--no); }
.veylo .err { color: var(--err); }
.veylo .dim { color: var(--text-dim); }

/* ================= more components ================= */
.veylo-seg { display: inline-flex; }
.veylo-seg > button { min-width: 0; margin: 0; }
.veylo-seg > button + button { margin-left: -1px; }
.veylo-tag { display: inline-block; padding: 0 6px; margin: 0 2px 2px 0; font-size: var(--fs-sm); background: var(--face); box-shadow: var(--flat-raise); }
.veylo-tag.acc { background: var(--acc); color: #fff; box-shadow: none; }
.veylo-tag.ok { color: var(--ok); } .veylo-tag.no { color: var(--no); } .veylo-tag.err { color: var(--err); }
.veylo ul.veylo-pager { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 .75em; padding: 0; list-style: none; }
.veylo-pager li { margin: 0; }
.veylo-pager a, .veylo-pager span { display: block; min-width: 26px; padding: 2px 8px; text-align: center; text-decoration: none; background: var(--face); box-shadow: var(--raise); color: var(--text); cursor: var(--cur); }
.veylo-pager a:visited { color: var(--text); }
.veylo-pager a:active { box-shadow: var(--sink); }
.veylo-pager .on { background: var(--acc); color: #fff; box-shadow: var(--sink); }
.veylo-pager .dis { color: var(--b3); text-shadow: 1px 1px var(--b1); cursor: var(--cur-no); }
.veylo-dl { display: grid; grid-template-columns: max-content 1fr; margin: 0 0 .75em; border: 1px solid var(--rule); }
.veylo-dl dt, .veylo-dl dd { margin: 0; padding: 3px 8px; border-bottom: 1px solid var(--rule); }
.veylo-dl dt { background: var(--face); font-weight: 700; border-right: 1px solid var(--rule); }
.veylo-dl dt:nth-last-of-type(1), .veylo-dl dd:nth-last-of-type(1) { border-bottom: 0; }
/* accordion: wrap several in .veylo-accs for one joined box; summary is a flat button, body sits flush under it */
.veylo-accs { margin: 0 0 .75em; border: 1px solid var(--rule); background: var(--face); }
.veylo-acc { margin: 0; background: var(--field); }
.veylo-accs > .veylo-acc + .veylo-acc { border-top: 1px solid var(--rule); }
.veylo-acc:not(.veylo-accs > .veylo-acc) { margin: 0 0 .75em; border: 1px solid var(--rule); }
.veylo-acc > summary { display: flex; align-items: center; gap: 8px; padding: 4px 8px; list-style: none; cursor: var(--cur); background: var(--face); font-weight: 700; user-select: none; }
.veylo-acc > summary::-webkit-details-marker { display: none; }
.veylo-acc > summary::before { content: ""; flex: none; border: 4px solid transparent; border-left: 5px solid currentColor; border-right: 0; }
.veylo-acc[open] > summary::before { border: 4px solid transparent; border-top: 5px solid currentColor; border-bottom: 0; }
.veylo-acc > summary:hover { background: color-mix(in srgb, var(--face) 88%, #fff); }
.veylo-acc > summary:active { background: color-mix(in srgb, var(--face) 85%, #000); }
.veylo-acc[open] > summary { box-shadow: inset 0 -1px var(--rule); }
.veylo-acc > summary:focus-visible { outline-offset: -4px; }
.veylo-acc > div { padding: 8px 10px; }
.veylo ol.veylo-steps { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 .75em; padding: 0; list-style: none; counter-reset: s; }
.veylo-steps li { counter-increment: s; flex: 1 1 6rem; margin: 0; padding: 3px 8px; background: var(--face); box-shadow: var(--flat-raise); color: var(--text-dim); }
.veylo-steps li::before { content: counter(s) ". "; }
.veylo-steps li.on { background: var(--acc); color: #fff; }
.veylo-steps li.done { color: var(--text); }
.veylo-steps li.done::after { content: " ✓"; }
.veylo-search { display: flex; gap: 4px; }
.veylo-search input { flex: 1; }
.veylo ul.veylo-nav { display: flex; flex-direction: column; margin: 0 0 .75em; padding: 2px; list-style: none; background: var(--face); box-shadow: var(--raise); }
.veylo-nav li { margin: 0; }
.veylo-nav a { display: block; padding: 3px 10px; color: var(--text); text-decoration: none; cursor: var(--cur); }
.veylo-nav a:visited { color: var(--text); }
.veylo-nav a:hover { background: color-mix(in srgb, var(--acc) 30%, var(--face)); }
.veylo-nav a[aria-current], .veylo-nav a.on { background: var(--acc); color: #fff; }
.veylo-layout { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 12px; align-items: start; }
.veylo-foot { margin-top: 12px; padding: 6px 8px; font-size: var(--fs-sm); color: var(--text-dim); box-shadow: inset 0 1px var(--b3), inset 0 2px var(--b1); text-align: center; }
.veylo-toast { display: inline-block; max-width: 22rem; padding: 6px 10px; color: #000; background: #ffffe1; border: 1px solid #000; box-shadow: 3px 3px 0 rgba(0,0,0,.35); }
.veylo-toast b { display: block; margin-bottom: 2px; }
.veylo-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: 6px; margin: 0 0 .75em; }
.veylo-stat { padding: 6px 8px; background: var(--face); box-shadow: var(--raise); }
.veylo-stat b { display: block; font-size: 20px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.veylo-stat span { font-size: var(--fs-sm); color: var(--text-dim); }
.veylo ul.veylo-log { margin: 0 0 .75em; padding: 0; list-style: none; }
.veylo-log > li { position: relative; margin: 0; padding: 0 0 10px 18px; }
.veylo-log > li::before { content: ""; position: absolute; left: 3px; top: 5px; width: 7px; height: 7px; background: var(--acc); }
.veylo-log > li::after { content: ""; position: absolute; left: 6px; top: 14px; bottom: 0; border-left: 1px dotted var(--text-dim); }
.veylo-log > li:last-child::after { display: none; }
.veylo-log time { display: block; font-size: var(--fs-sm); color: var(--text-dim); }
.veylo-empty { padding: 18px 12px; text-align: center; color: var(--text-dim); background: var(--field); box-shadow: var(--sink); margin: 0 0 .75em; }
.veylo-avatar { display: inline-block; width: 32px; height: 32px; font: 700 14px/32px var(--ui); text-align: center; color: #fff; background: var(--acc); box-shadow: var(--raise); vertical-align: middle; }
.veylo-count { display: inline-block; min-width: 18px; padding: 0 5px; font-size: var(--fs-sm); text-align: center; color: #fff; background: var(--err); }

/* ================= card = mini window (same frame as .veylo-win) ================= */
.veylo-card { margin: 0 0 .75em; padding: 3px; background: var(--face); box-shadow: var(--raise); }
.veylo .veylo-card > h4 { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; margin: 0 0 3px; padding: 3px 6px;
  background: linear-gradient(90deg, var(--acc-a), var(--acc-b)); color: #fff; font: 700 var(--fs)/16px var(--ui); }
.veylo-card > div, .veylo-card > p { margin: 0; padding: 8px; }
.veylo-card.sunk > div { background: var(--field); box-shadow: var(--sink); }
.veylo-card > footer { display: flex; gap: 6px; justify-content: flex-end; padding: 6px 4px 3px; }
.veylo-card.plain > h4 { background: var(--face); color: var(--text); box-shadow: var(--flat-raise); }

/* ================= buttons: variants, sizes ================= */
.veylo :is(.veylo-btn, button):is(.primary, .success, .danger, .warning, .info, .dark) {
  background: var(--bc); color: var(--bt, #fff); margin: 1px;
  box-shadow: 0 0 0 1px var(--b4), inset 1px 1px rgba(255,255,255,.4), inset -1px -1px rgba(0,0,0,.5), inset 2px 2px rgba(255,255,255,.15), inset -2px -2px rgba(0,0,0,.25);
}
.veylo :is(.veylo-btn, button).primary { --bc: var(--acc); }
.veylo :is(.veylo-btn, button).success { --bc: #2f7d3a; }
.veylo :is(.veylo-btn, button).danger { --bc: #b3302b; }
.veylo :is(.veylo-btn, button).warning { --bc: #d29a00; --bt: #000; }
.veylo :is(.veylo-btn, button).info { --bc: #2a6fb5; }
.veylo :is(.veylo-btn, button).dark { --bc: #202020; }
.veylo :is(.veylo-btn, button):is(.primary, .success, .danger, .warning, .info, .dark):hover { background: color-mix(in srgb, var(--bc) 88%, #fff); }
.veylo :is(.veylo-btn, button):is(.primary, .success, .danger, .warning, .info, .dark):is(:active, .on) {
  background: color-mix(in srgb, var(--bc) 82%, #000);
  box-shadow: 0 0 0 1px var(--b4), inset 1px 1px rgba(0,0,0,.6), inset -1px -1px rgba(255,255,255,.25); padding: 4px 11px 2px 13px;
}
.veylo :is(.veylo-btn, button):is(.primary, .success, .danger, .warning, .info, .dark)[disabled] { background: var(--face); color: var(--b3); box-shadow: var(--raise); margin: 0; }
.veylo :is(.veylo-btn, button).secondary { font-weight: 700; box-shadow: 0 0 0 1px var(--b4), var(--raise); margin: 1px; }
.veylo :is(.veylo-btn, button).outline { background: none; box-shadow: inset 0 0 0 1px var(--text-dim); }
.veylo :is(.veylo-btn, button).outline:hover { background: var(--acc); color: #fff; box-shadow: inset 0 0 0 1px var(--acc); }
.veylo :is(.veylo-btn, button).link { min-width: 0; padding: 0 2px; background: none; box-shadow: none; color: var(--link); text-decoration: underline; cursor: var(--cur-hand); }
.veylo :is(.veylo-btn, button).link:hover { background: none; }
.veylo :is(.veylo-btn, button).link:active { padding: 0 2px; box-shadow: none; background: none; color: var(--err); }
.veylo :is(.veylo-btn, button).lg { min-width: 100px; padding: 6px 20px; font-size: 14px; }
.veylo :is(.veylo-btn, button).block { display: block; width: 100%; }

/* switch: <label class="veylo-switch"><input type="checkbox">Label</label>  (.sm smaller, .noText hides ON/OFF) */
.veylo .veylo-switch { display: inline-flex; align-items: center; gap: 8px; cursor: var(--cur); }
.veylo .veylo-switch input[type=checkbox] { width: 52px; height: 22px; margin: 0; top: 0; clip-path: none; background: var(--field); box-shadow: var(--sink); overflow: hidden; }
.veylo .veylo-switch input[type=checkbox]::after { content: "OFF"; position: absolute; right: 8px; top: 0; font: 700 11px/22px var(--ui); color: var(--text); letter-spacing: .5px; }
.veylo .veylo-switch input[type=checkbox]::before, .veylo .veylo-switch input[type=checkbox]:checked::before {
  display: block; left: 2px; top: 2px; width: 18px; height: 18px; background: var(--face); box-shadow: var(--raise); clip-path: none; z-index: 1;
}
.veylo .veylo-switch input[type=checkbox]:checked { background: var(--acc); box-shadow: var(--sink); }
.veylo .veylo-switch input[type=checkbox]:checked::before { left: 32px; }
.veylo .veylo-switch input[type=checkbox]:checked::after { content: "ON"; left: 9px; right: auto; color: #fff; }
.veylo .veylo-switch:hover input[type=checkbox]::before { background: color-mix(in srgb, var(--face) 88%, #fff); }
.veylo .veylo-switch input[type=checkbox]:active::before { box-shadow: var(--sink); }
.veylo .veylo-switch input[type=checkbox]:focus-visible { box-shadow: var(--sink), 0 0 0 1px var(--acc-b); }
.veylo .veylo-switch input[type=checkbox]:disabled { opacity: .6; }
.veylo .veylo-switch.sm input[type=checkbox] { width: 32px; height: 16px; }
.veylo .veylo-switch.sm input[type=checkbox]::after { content: none; }
.veylo .veylo-switch.sm input[type=checkbox]::before, .veylo .veylo-switch.sm input[type=checkbox]:checked::before { width: 12px; height: 12px; }
.veylo .veylo-switch.sm input[type=checkbox]:checked::before { left: 18px; }

/* input group: <div class="veylo-ig"><span>https://</span><input><button>Go</button></div> */
.veylo-ig { display: flex; align-items: stretch; max-width: 100%; }
.veylo-ig > * { margin: 0; flex: none; }
.veylo-ig > input, .veylo-ig > select { flex: 1 1 auto; min-width: 0; }
.veylo-ig > span { display: flex; align-items: center; padding: 0 8px; background: var(--face); box-shadow: var(--raise); color: var(--text-dim); }

/* ================= layout: split panes (nest as deep as you like), grid helpers ================= */
.veylo-split { display: flex; height: 12rem; margin: 0 0 .75em; background: var(--face); box-shadow: var(--sink); overflow: hidden; }
.veylo-split.v { flex-direction: column; }
.veylo-split > :not(.veylo-gutter) { flex: 1 1 0; min-width: 0; min-height: 0; overflow: auto; }
.veylo-split > :not(.veylo-gutter):not(.veylo-split) { padding: 6px 8px; background: var(--field); }
.veylo-split > .veylo-split { height: auto; margin: 0; box-shadow: none; }
.veylo-gutter { position: relative; flex: none; width: 8px; background: var(--face); box-shadow: inset 1px 0 var(--b1), inset -1px 0 var(--b3); cursor: var(--cur-ew); touch-action: none; }
.veylo-gutter::after { content: ""; position: absolute; left: 3px; top: 50%; width: 2px; height: 20px; margin-top: -10px; background: repeating-linear-gradient(0deg, var(--b3) 0 2px, transparent 2px 4px); }
.veylo-split.v > .veylo-gutter { width: auto; height: 8px; cursor: var(--cur-ns); box-shadow: inset 0 1px var(--b1), inset 0 -1px var(--b3); }
.veylo-split.v > .veylo-gutter::after { left: 50%; top: 3px; width: 20px; height: 2px; margin: 0 0 0 -10px; background: repeating-linear-gradient(90deg, var(--b3) 0 2px, transparent 2px 4px); }
.veylo-gutter:hover, .veylo-gutter.drag, .veylo-gutter:focus-visible { background: color-mix(in srgb, var(--acc) 45%, var(--face)); outline: 0; }
.veylo-split.drag { user-select: none; }
.veylo .cols-4 { grid-template-columns: repeat(4, 1fr); } .veylo .cols-6 { grid-template-columns: repeat(6, 1fr); }
.veylo .auto-fit { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.veylo .span-2 { grid-column: span 2; } .veylo .span-3 { grid-column: span 3; } .veylo .span-full { grid-column: 1 / -1; }
.veylo .stack { display: flex; flex-direction: column; gap: 8px; } .veylo .cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.veylo .container { max-width: var(--measure); margin-inline: auto; }

/* ================= building blocks ================= */
/* navbar: brand + links + right-aligned actions */
.veylo-navbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; padding: 3px; margin: 0 0 8px; background: var(--face); box-shadow: var(--raise); }
.veylo-navbar .brand { padding: 2px 8px; font-weight: 700; }
.veylo-navbar a { padding: 3px 10px; color: var(--text); text-decoration: none; cursor: var(--cur); }
.veylo-navbar a:visited { color: var(--text); }
.veylo-navbar a:hover { box-shadow: var(--flat-raise); }
.veylo-navbar a:active { box-shadow: var(--flat-sink); }
.veylo-navbar a[aria-current], .veylo-navbar a.on { box-shadow: var(--flat-sink); font-weight: 700; }
.veylo-navbar .sp { flex: 1; }
/* dropdown: <details class="veylo-dd"><summary>Menu</summary><ul class="veylo-popup">…</ul></details> */
.veylo-dd { position: relative; display: inline-block; }
.veylo-dd > summary { display: inline-block; list-style: none; padding: 3px 10px; cursor: var(--cur); user-select: none; }
.veylo-dd > summary::-webkit-details-marker { display: none; }
.veylo-dd > summary:hover { box-shadow: var(--flat-raise); }
.veylo-dd[open] > summary { box-shadow: var(--flat-sink); }
.veylo-dd > ul { position: absolute; left: 0; top: 100%; z-index: 20; }
.veylo-dd.btn > summary { min-width: 75px; padding: 3px 12px; background: var(--face); box-shadow: var(--raise); text-align: center; }
.veylo-dd.btn[open] > summary { box-shadow: var(--sink); }
/* hero */
.veylo-hero { margin: 0 0 12px; padding: 24px 16px; text-align: center; background: var(--field); box-shadow: var(--sink); }
.veylo .veylo-hero h1 { margin: 0 0 6px; font-size: 24px; }
.veylo-hero p { margin: 0 auto 12px; max-width: 36rem; color: var(--text-dim); }
/* modal: native <dialog class="veylo-dialog">; open with data-veylo-modal="#id", close with data-veylo-close */
dialog.veylo-dialog:not([open]) { display: none; }
dialog.veylo-dialog { position: fixed; inset: 0; margin: auto; border: 0; color: var(--text); font: var(--fs)/var(--lh) var(--ui); max-width: min(92vw, 30rem); }
dialog.veylo-dialog::backdrop { background: repeating-conic-gradient(rgba(0,0,0,.5) 0 25%, rgba(0,0,0,.25) 0 50%) 0 0/2px 2px; }
/* list group / media / chip / skeleton */
.veylo-media { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 .75em; }
.veylo-media > :last-child { flex: 1; min-width: 0; }
.veylo-media b { display: block; }
.veylo-chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 2px 0 6px; margin: 0 2px 2px 0; background: var(--face); box-shadow: var(--flat-raise); font-size: var(--fs-sm); }
.veylo-chip button { min-width: 0; padding: 0 4px; margin: 0; line-height: 14px; box-shadow: none; background: none; }
.veylo-chip button:hover { background: var(--err); color: #000; }
.veylo-skel { height: 12px; margin: 0 0 6px; background: repeating-conic-gradient(var(--stripe) 0 25%, var(--face) 0 50%) 0 0/4px 4px; animation: veylo-skel 1s steps(2) infinite; }
.veylo-skel.l { width: 60%; } .veylo-skel.xl { height: 60px; }
@keyframes veylo-skel { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .veylo-skel { animation: none; } }
.veylo-rate { letter-spacing: 2px; color: var(--no); }
.veylo-rate .off { color: var(--rule); }
.veylo-divider { display: flex; align-items: center; gap: 8px; margin: 12px 0; color: var(--text-dim); }
.veylo-divider::before, .veylo-divider::after { content: ""; flex: 1; height: 2px; box-shadow: var(--etch); }
.veylo-kv { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; border-bottom: 1px dotted var(--rule); }
.veylo-price { font-size: 26px; font-weight: 700; }
.veylo-price small { font-size: var(--fs-sm); font-weight: 400; color: var(--text-dim); }

/* ================= cursors / carets (utilities) ================= */
.veylo .cur-arrow { cursor: var(--cur); } .veylo .cur-hand { cursor: var(--cur-hand); } .veylo .cur-text { cursor: var(--cur-text); }
.veylo .cur-wait { cursor: var(--cur-wait); } .veylo .cur-busy { cursor: var(--cur-wait); } .veylo .cur-help { cursor: var(--cur-help); }
.veylo .cur-no { cursor: var(--cur-no); } .veylo .cur-move { cursor: var(--cur-move); } .veylo .cur-cross { cursor: var(--cur-cross); }
.veylo .cur-ns { cursor: var(--cur-ns); } .veylo .cur-ew { cursor: var(--cur-ew); } .veylo .cur-cell { cursor: var(--cur-cross); }
.veylo[data-caret=bar] { --caret: bar; } .veylo[data-caret=underscore] { --caret: underscore; } .veylo[data-caret=block] { --caret: block; } .veylo[data-caret=auto] { --caret: auto; }
.veylo .caret-auto { caret-shape: auto; } .veylo .caret-block { caret-shape: block; } .veylo .caret-bar { caret-shape: bar; } .veylo .caret-under { caret-shape: underscore; }
.veylo .caret-acc { caret-color: var(--acc-b); } .veylo .caret-text { caret-color: var(--text); }
.veylo .blink::after { content: "█"; animation: veylo-blink 1s steps(1) infinite; margin-left: 1px; }
@keyframes veylo-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .veylo .blink::after { animation: none; } }

/* ================= scrollbars ================= */
.veylo-sheet::-webkit-scrollbar, .veylo pre::-webkit-scrollbar, .veylo-scroll::-webkit-scrollbar, .veylo textarea::-webkit-scrollbar {
  width: 16px; height: 16px; background-color: var(--face);
  background-image: conic-gradient(var(--face) 25%, var(--b2) 0 50%, var(--face) 0 75%, var(--b2) 0); background-size: 2px 2px;
}
.veylo-sheet::-webkit-scrollbar-track, .veylo pre::-webkit-scrollbar-track, .veylo-scroll::-webkit-scrollbar-track, .veylo textarea::-webkit-scrollbar-track { background: transparent; }
.veylo-sheet::-webkit-scrollbar-thumb, .veylo pre::-webkit-scrollbar-thumb, .veylo-scroll::-webkit-scrollbar-thumb, .veylo textarea::-webkit-scrollbar-thumb { min-height: 32px; min-width: 32px; background: var(--face); box-shadow: var(--raise); }
.veylo-sheet::-webkit-scrollbar-button:single-button, .veylo pre::-webkit-scrollbar-button:single-button, .veylo-scroll::-webkit-scrollbar-button:single-button, .veylo textarea::-webkit-scrollbar-button:single-button {
  display: block; width: 16px; height: 16px; background: var(--face) no-repeat center; box-shadow: var(--raise);
}
.veylo-sheet::-webkit-scrollbar-button:single-button:active, .veylo-scroll::-webkit-scrollbar-button:single-button:active { box-shadow: var(--sink); }
.veylo-sheet::-webkit-scrollbar-button:vertical:decrement, .veylo-scroll::-webkit-scrollbar-button:vertical:decrement { background-image: var(--ar-u); }
.veylo-sheet::-webkit-scrollbar-button:vertical:increment, .veylo-scroll::-webkit-scrollbar-button:vertical:increment { background-image: var(--ar-d); }
.veylo-sheet::-webkit-scrollbar-button:horizontal:decrement, .veylo-scroll::-webkit-scrollbar-button:horizontal:decrement { background-image: var(--ar-l); }
.veylo-sheet::-webkit-scrollbar-button:horizontal:increment, .veylo-scroll::-webkit-scrollbar-button:horizontal:increment { background-image: var(--ar-r); }
.veylo-sheet::-webkit-scrollbar-corner, .veylo-scroll::-webkit-scrollbar-corner { background: var(--face); }
@supports not selector(::-webkit-scrollbar) { .veylo-sheet, .veylo-scroll { scrollbar-color: var(--b1) var(--face); scrollbar-width: auto; } }

/* ================= utilities ================= */
.veylo .m0 { margin: 0; } .veylo .mt0 { margin-top: 0; } .veylo .mt1 { margin-top: 4px; } .veylo .mt2 { margin-top: 8px; } .veylo .mb1 { margin-bottom: 4px; } .veylo .mb2 { margin-bottom: 8px; }
.veylo .p1 { padding: 4px; } .veylo .p2 { padding: 8px; } .veylo .px2 { padding-inline: 8px; } .veylo .py1 { padding-block: 4px; }
.veylo .gap1 { gap: 4px; } .veylo .gap2 { gap: 8px; }
.veylo .flex { display: flex; } .veylo .grid { display: grid; } .veylo .block { display: block; } .veylo .inline { display: inline; } .veylo .none { display: none; }
.veylo .wrap { flex-wrap: wrap; } .veylo .col { flex-direction: column; } .veylo .grow { flex: 1 1 auto; }
.veylo .between { justify-content: space-between; } .veylo .center { align-items: center; justify-content: center; } .veylo .items-c { align-items: center; }
.veylo .cols-2 { grid-template-columns: repeat(2, 1fr); } .veylo .cols-3 { grid-template-columns: repeat(3, 1fr); }
.veylo .tl { text-align: left; } .veylo .tc { text-align: center; } .veylo .tr { text-align: right; }
.veylo .b { font-weight: 700; } .veylo .i { font-style: italic; } .veylo .u { text-decoration: underline; } .veylo .mono { font-family: var(--mono); }
.veylo .raise { box-shadow: var(--raise); } .veylo .sink { box-shadow: var(--sink); } .veylo .etch { box-shadow: var(--etch); }
.veylo .face { background: var(--face); } .veylo .field { background: var(--field); } .veylo .acc { background: var(--acc); color: #fff; }
.veylo .bd { border: 1px solid var(--rule); }
.veylo .w100 { width: 100%; } .veylo .hide, .veylo [hidden] { display: none !important; }
.veylo .clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.veylo .fl { float: left; } .veylo .fr { float: right; } .veylo .clear { clear: both; }
.veylo .nosel { user-select: none; }
.veylo .sr, .veylo .skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.veylo .skip:focus { width: auto; height: auto; clip-path: none; left: 4px; top: 4px; z-index: 9; background: var(--face); padding: 2px 6px; }
@media print { .veylo { max-width: none; } .veylo-win { box-shadow: none; } }

/* ================= responsive ================= */
@media (max-width: 44rem) {
  .veylo { padding: 4px; }
  .veylo-body { padding: 8px 4px 4px; }
  .veylo-panel { padding: 8px; }
  .veylo-article, .veylo-layout { display: block; }
  .veylo-article > aside { position: static; margin-bottom: 8px; }
  .veylo .cols-2, .veylo .cols-3 { grid-template-columns: 1fr; }
}

/* ================= interactive widgets ================= */
.veylo-list li { cursor: var(--cur); user-select: none; }
.veylo-list:focus-visible { outline: 1px dotted var(--text); outline-offset: 2px; }
.veylo-tree li.leaf { cursor: var(--cur); user-select: none; }
.veylo-tree li.leaf:hover { background: color-mix(in srgb, var(--acc) 30%, var(--field)); }
.veylo-cal { display: inline-block; padding: 3px; background: var(--face); box-shadow: var(--raise); user-select: none; }
.veylo-cal .hd { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 2px 2px 4px; }
.veylo-cal .hd b { flex: 1; text-align: center; }
.veylo-cal .hd button { min-width: 0; width: 22px; padding: 1px 0; }
.veylo-cal .days { display: grid; grid-template-columns: repeat(7, 28px); padding: 2px; background: var(--field); box-shadow: var(--sink); }
.veylo-cal .days span { display: block; height: 22px; line-height: 22px; text-align: center; cursor: var(--cur); }
.veylo-cal .days .dow { color: var(--text-dim); font-size: var(--fs-sm); cursor: var(--cur); box-shadow: inset 0 -1px var(--rule); }
.veylo-cal .days .o { color: var(--text-dim); opacity: .55; }
.veylo-cal .days .today { box-shadow: inset 0 0 0 1px var(--acc-b); }
.veylo-cal .days span:not(.dow):hover { background: color-mix(in srgb, var(--acc) 35%, var(--field)); }
.veylo-cal .days .sel, .veylo-cal .days .sel:hover { background: var(--acc); color: #fff; }
.veylo-rate[data-veylo-rate] { cursor: var(--cur-hand); user-select: none; }
.veylo-rate[data-veylo-rate] span:hover { color: var(--text); }
.veylo-x { float: right; min-width: 0; padding: 0 6px; margin: 0 0 0 8px; line-height: 14px; }

/* ================= power-user layer ================= */
/* close / remove buttons: the cross is drawn, never a font glyph, so it stays centred, crisp and ghost-free in every state. Markup: <button class="veylo-x" aria-label="Close"></button> (an x in the text still works) */
.veylo :is(.veylo-x, .veylo-chip button, button.x) { position: relative; flex: none; font-size: 0; line-height: 0; color: var(--text); text-shadow: none; width: 18px; height: 16px; min-width: 0; padding: 0; margin: 0; overflow: hidden; }
.veylo :is(.veylo-x, .veylo-chip button, button.x)::before { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; background: currentColor;
  clip-path: polygon(0 12%, 12% 0, 50% 38%, 88% 0, 100% 12%, 62% 50%, 100% 88%, 88% 100%, 50% 62%, 12% 100%, 0 88%, 38% 50%); }
.veylo .veylo-x { float: right; margin: 0 0 0 8px; }
.veylo .veylo-x.sm { width: 16px; height: 14px; }
.veylo .veylo-chip button { width: 15px; height: 14px; box-shadow: none; background: none; }
.veylo :is(.veylo-x, .veylo-chip button, button.x):active { padding: 0; background: var(--face); box-shadow: var(--sink); }
.veylo .veylo-chip button:hover, .veylo .veylo-chip button:active { background: var(--err); color: #000; box-shadow: none; }
.veylo :is(.veylo-x, .veylo-chip button, button.x):is(:disabled, .dis) { color: color-mix(in srgb, var(--text) 38%, var(--face)); background: none; cursor: var(--cur-no); }
.veylo :is(.veylo-x, .veylo-chip button, button.x):is(:disabled, .dis):hover { background: none; }

/* keyboard / selection cursor */
.veylo-list li.sel { outline: 0; }
.veylo-list li.cur { outline: 1px dotted var(--text); outline-offset: -1px; }
.veylo-list li.sel.cur { outline-color: #fff; }
.veylo-list:not(:focus) li.cur { outline: 0; }
.veylo table[data-veylo-select] tbody tr { cursor: var(--cur); user-select: none; }
.veylo table[data-veylo-select] tbody tr:hover:not(.sel) td { background: color-mix(in srgb, var(--acc) 22%, var(--field)); }
.veylo table[data-veylo-select]:focus { outline: 0; }
.veylo table[data-veylo-select]:focus-visible { outline: 1px dotted var(--text); outline-offset: 2px; }
.veylo table[data-veylo-select]:focus tr.cur td:first-child { box-shadow: inset 3px 0 var(--acc-b), inset 0 0 0 1px var(--text-dim); }
.veylo table[data-veylo-select] tr.sel:hover td { background: color-mix(in srgb, var(--acc) 48%, var(--field)); }
.veylo-cal:focus { outline: 0; }
.veylo-cal:focus-visible { outline: 1px dotted var(--text); outline-offset: 2px; }
.veylo-cal .days .cur { outline: 1px dotted transparent; outline-offset: -2px; }
.veylo-cal:focus-within .days .cur { outline-color: var(--text); }
.veylo-cal:focus-within .days .sel.cur { outline-color: #fff; }
.veylo-rate[data-veylo-rate]:focus { outline: 0; }
.veylo-rate[data-veylo-rate]:focus-visible { outline: 1px dotted var(--text); outline-offset: 2px; }
.veylo-color .sv:focus-visible, .veylo-color .hue:focus-visible { outline: 1px dotted var(--text); outline-offset: 1px; }
.veylo-accs summary:focus-visible { outline: 1px dotted var(--text); outline-offset: -3px; }
.veylo th[data-sort]:focus-visible { outline: 1px dotted var(--text); outline-offset: -3px; }

/* menus: keyboard highlight (.hot) matches hover; context menus float at the pointer */
.veylo-popup li.hot:not(.sep):not(.dis) { background: var(--acc); color: #fff; }
.veylo-popup li.hot[data-k]::after { color: #fff; }
.veylo ul.veylo-popup[hidden] { display: none; }
.veylo ul.veylo-popup.ctx { position: fixed; z-index: 60; outline: 0; }
.veylo ul.veylo-popup:focus { outline: 0; }
.veylo-dd > summary:focus-visible { outline: 1px dotted var(--text); outline-offset: -3px; }

/* ================= classic theme: closer to real Win98 ================= */
.veylo[data-theme=classic] {
  /* real Win98 system colours: face #c0c0c0, shadow #808080, dark shadow #000, light #dfdfdf, hilight #fff, window #fff, title #000080 > #1084d0, tooltip #ffffe1 */
  --ui: "MS Sans Serif", "Microsoft Sans Serif", Tahoma, Verdana, sans-serif;
  --fs: 11px; --fs-sm: 11px; --fs-h2: 14px; --fs-h3: 12px; --lh: 1.3;
  --link: #0000ff; --visited: #800080; --text-dim: #808080; --rule: #808080; --stripe: #fff;
  --sink: inset -1px -1px var(--b1), inset 1px 1px var(--b3), inset -2px -2px var(--b2), inset 2px 2px var(--b4);
  --flat-sink: inset -1px -1px var(--b1), inset 1px 1px var(--b3);
}
.veylo[data-theme=classic] .veylo-win { box-shadow: inset -1px -1px var(--b4), inset 1px 1px var(--b2), inset -2px -2px var(--b3), inset 2px 2px var(--b1); }
.veylo[data-theme=classic] .veylo-title { min-height: 18px; padding: 1px 3px; font-size: 11px; line-height: 14px; margin-bottom: 2px; }
.veylo[data-theme=classic] .veylo-win.off .veylo-title { background: linear-gradient(90deg, #808080, #c0c0c0); color: #c0c0c0; }
.veylo[data-theme=classic] .veylo-body { padding: 8px 6px 4px; }
.veylo[data-theme=classic] :is(.veylo-btn, button) { min-width: 75px; padding: 3px 8px 4px; }
.veylo[data-theme=classic] :is(.veylo-btn, button):focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
.veylo[data-theme=classic] :is(.veylo-btn, button, input, select, textarea)[disabled], .veylo[data-theme=classic] :is(input, select, textarea):disabled { color: #808080; text-shadow: 1px 1px 0 #fff; background-color: var(--face); }
.veylo[data-theme=classic] :is(input[type=text], input[type=search], input[type=number], input[type=password], input[type=email], input[type=url], textarea, select):focus { box-shadow: var(--sink); }
.veylo[data-theme=classic] :is(input[type=text], input[type=search], input[type=number], input[type=password], input[type=email], input[type=url], input[type=date], input[type=time], textarea, select) { padding: 2px 3px; }
.veylo[data-theme=classic] th { background: var(--face); box-shadow: var(--raise); border-color: transparent; }
.veylo[data-theme=classic] .veylo-bar > i { background: repeating-linear-gradient(90deg, #000080 0 8px, transparent 8px 10px); }
.veylo[data-theme=classic] .veylo-bar.smooth > i { background: linear-gradient(90deg, #000080, #1084d0); }
.veylo[data-theme=classic] [data-tip]::after, .veylo[data-theme=classic] [data-tip]:hover::after { background: #ffffe1; color: #000; box-shadow: 0 0 0 1px #000; text-shadow: none; }
.veylo[data-theme=classic] .veylo-popup li.hot:not(.sep):not(.dis), .veylo[data-theme=classic] .veylo-list li.sel { background: #000080; color: #fff; }
.veylo[data-theme=classic] .veylo-status span { box-shadow: var(--flat-sink); }
.veylo[data-theme=classic] .veylo-navbar { box-shadow: var(--raise); }
.veylo[data-theme=classic] .veylo-navbar a:hover { box-shadow: var(--flat-raise); }
.veylo[data-theme=classic] .veylo-tabbar :is(a, button, a:visited) { color: #000; }
/* buttons are grey, never filled: Win98 marks the default button with a black frame, not a colour */
.veylo[data-theme=classic] :is(.veylo-btn, button):is(.primary, .success, .danger, .warning, .info, .dark) { --bc: var(--face); --bt: var(--text); box-shadow: var(--raise); }
.veylo[data-theme=classic] :is(.veylo-btn, button).primary { box-shadow: 0 0 0 1px var(--b4), var(--raise); }
.veylo[data-theme=classic] :is(.veylo-btn, button).success { --bt: var(--ok); }
.veylo[data-theme=classic] :is(.veylo-btn, button).danger { --bt: var(--err); }
.veylo[data-theme=classic] :is(.veylo-btn, button).warning { --bt: var(--no); }
.veylo[data-theme=classic] :is(.veylo-btn, button).info { --bt: #000080; }
.veylo[data-theme=classic] :is(.veylo-btn, button):is(.primary, .success, .danger, .warning, .info, .dark):hover,
.veylo[data-theme=classic] :is(.veylo-btn, button):hover { background: var(--face); }
.veylo[data-theme=classic] :is(.veylo-btn, button):not(.on):active { background: var(--face); }
.veylo[data-theme=classic] :is(.veylo-btn, button):is(.primary, .success, .danger, .warning, .info, .dark):is(:active, .on) {
  background: var(--face); box-shadow: 0 0 0 1px var(--b4), inset 1px 1px var(--b3), inset -1px -1px var(--b2);
}
.veylo[data-theme=classic] :is(.veylo-btn, button):is(.primary, .success, .danger, .warning, .info, .dark)[disabled] { --bt: var(--b3); }
/* selected rows are solid navy with white text */
.veylo[data-theme=classic] tr.sel td, .veylo[data-theme=classic] table[data-veylo-select] tr.sel:hover td { background: var(--acc); color: #fff; }
.veylo[data-theme=classic] tr.sel td:first-child { box-shadow: none; }
/* scrollbar track: white and grey dither */
.veylo[data-theme=classic] :is(.veylo-sheet, pre, .veylo-scroll, textarea)::-webkit-scrollbar { background-image: conic-gradient(var(--face) 25%, #fff 0 50%, var(--face) 0 75%, #fff 0); }
