/* kody-os shell theme — classic Mac-style desktop, e-ink safe. Monochrome only: no colour, no gradients, no animation, no transitions. Stripes are a tiny inline SVG tile (a 1px rule every 4px), not a gradient. */ :root { color-scheme: light; font-family: Geneva, Verdana, 'DejaVu Sans', sans-serif; font-size: 16px; line-height: 1.4; --paper: #fff; --desk: #e8e8e8; --shade: #f2f2f2; --rule: 2px solid #000; --lift: 3px 3px 0 #000; --lift-lg: 5px 5px 0 #000; --os-ink: #000; --os-paper: var(--paper); --os-grey: #888; --os-border: 1px solid #000; --os-shadow: 2px 2px 0 #000; --os-radius: 4px; --os-font: "Chicago", "Geneva", Helvetica, Arial, sans-serif; --os-font-mono: "Courier New", Courier, monospace; --os-text-sm: 14px; --os-text: 16px; --os-text-lg: 20px; --os-display: 28px; --os-tap: 48px; --os-gap: 6px; --os-pad: 16px; --os-dots: radial-gradient(#000 1px, transparent 1.4px); --stripes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect y='2' width='4' height='1' fill='%23000'/%3E%3C/svg%3E"); --checker: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='2' height='2' fill='%23888'/%3E%3Crect x='2' y='2' width='2' height='2' fill='%23888'/%3E%3C/svg%3E"); background: var(--desk); color: #000; } * { box-sizing: border-box; } /* E-ink discipline: never animate, never transition. */ *, *::before, *::after { animation: none !important; transition: none !important; } :focus-visible { outline: 3px solid #000; outline-offset: 2px; } body { min-height: 100vh; margin: 0; padding: 0 0 2rem; background: var(--desk); color: #000; } /* ---- System menu bar ---- */ .os-menubar { display: flex; flex-wrap: wrap; align-items: stretch; padding: 0 0.5rem; background: var(--paper); border-bottom: var(--rule); } .os-brand { display: inline-flex; align-items: center; padding: 0 0.9rem 0 0.35rem; border-right: 1px solid #000; font-size: 1rem; font-weight: bold; letter-spacing: 0.02em; white-space: nowrap; } /* Checkerboard mark drawn in CSS: no font glyph, nothing to go missing. */ .os-mark { position: relative; display: inline-block; width: 0.85rem; height: 0.85rem; margin-right: 0.45rem; border: 2px solid #000; background: #fff; } .os-mark::before, .os-mark::after { content: ""; position: absolute; width: 50%; height: 50%; background: #000; } .os-mark::before { top: 0; left: 0; } .os-mark::after { right: 0; bottom: 0; } /* Fork glyph mark from settings.json: replaces the default Kody mark when set. */ .os-mark-glyph { display: inline-flex; align-items: center; justify-content: center; margin-right: 0.45rem; padding: 0 0.15rem; border: 2px solid #000; background: #fff; font-size: 0.85rem; font-weight: bold; line-height: 1; } /* Inline-SVG mark from settings.json: sanitized at resolve time, monochrome. Fixed box like tile icons; strokes follow the text color, fills come from the markup so line art stays line art. */ .os-mark-glyph svg { display: block; width: 1.1rem; height: 1.1rem; stroke: currentColor; } /* Default header mark: the official Kody mark in public/favicon.png. A theme icon from settings.json still replaces it (see .os-mark-glyph). */ .os-mark-img { display: block; width: auto; height: 1.5rem; margin-right: 0.45rem; } .os-menubar nav { display: flex; flex-wrap: wrap; margin-left: 0; } .os-menubar nav a { min-height: 3rem; padding: 0 0.75rem; font-size: 0.9375rem; font-weight: bold; text-decoration: none; } .os-menubar nav a:hover { background: var(--shade); } .os-menubar nav a:active { background: #000; color: #fff; } /* Server-rendered clock slot, far right of the bar. */ .os-clock { display: inline-flex; align-items: center; margin-left: auto; min-height: 3rem; padding: 0 0.75rem 0 0.25rem; font-size: 0.8125rem; font-weight: bold; letter-spacing: 0.04em; white-space: nowrap; } /* ---- Desktop window ---- */ .os-window { width: calc(100% - 2rem); max-width: 48rem; margin: 1.5rem auto 0; background: var(--paper); border: var(--rule); box-shadow: var(--lift-lg); } /* Title bar: a white 2.75rem bar carrying a full-width 33px racing-striped band (8 x 4px tile rows + 1, so the band shows eight rules with paper at its top and bottom edges). The band is the ::before layer, centered; white bar padding shows above and below it. The title is borderless white ground running the full bar height at its own width (align-self: stretch), so no stripe ever passes above or below the text. Slots are UNMOVED: absolute 3rem full-height hit targets exactly as before — only the drawn squares grow, never the slots. */ .os-titlebar { position: relative; display: flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0 3.5rem; border-bottom: var(--rule); background-color: var(--paper); } /* 33px stripe band, full-width, centered. Same 4px --stripes tile, unchanged density; band heights stay 4n+1px so the tile phase stays aligned top to bottom. 33px = 8 tile rows + 1, giving 8 rules with paper at the band's top and bottom edges. */ .os-titlebar::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); height: 33px; background-color: var(--paper); background-image: var(--stripes); background-repeat: repeat; pointer-events: none; } .os-title { align-self: stretch; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; max-width: 100%; margin: 0; padding: 0 0.85rem; border: 0; background: var(--paper); font-family: var(--os-font); font-size: 1.1rem; font-weight: bold; letter-spacing: 0.04em; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* Close box doubles as back-to-home, so the chrome is honest. Slots stay at top: 0 for full-height 48px hit targets; the drawn squares shift up 2.5px via the shared header-box square rule to align with the 33px band. */ .os-box { position: absolute; top: 0; left: 0; display: flex; align-items: center; justify-content: center; width: 3rem; height: 100%; min-height: 3rem; padding: 0; text-decoration: none; } /* Shared header-box square: the close, expand/collapse, help, widget-expand, and modal-expand boxes draw one identical 1.7rem outlined square with a 3px white halo punched over the stripes (stripes run up to the halo, no white end columns). One rule for every box, so a new box cannot drift from the rest. Hover/active inverts the square; the X, `?`, and bracket glyphs invert with their own rules below. Slots stay absolute 3rem full-height. Squares shift up 2.5px here so slots stay at top: 0; glyphs shift with matching offsets in their own rules below. */ .os-box::before, .os-expand::before, .os-collapse::before, .os-help::before, .widget-expand::before, .modal-expand::before { content: ""; display: block; width: 1.7rem; height: 1.7rem; border: 2px solid #000; background: #fff; box-shadow: 0 0 0 3px #fff; transform: translateY(-2.5px); } .os-box:hover::before, .os-box:active::before, .os-expand:hover::before, .os-expand:active::before, .os-collapse:hover::before, .os-collapse:active::before, .os-help:hover::before, .os-help:active::before, .widget-expand:hover::before, .widget-expand:active::before, .modal-expand:hover::before, .modal-expand:active::before { background: #000; } /* ---- App page full-window view ---- */ /* Page-mode expand/collapse controls share the widget/modal box look and sit in the titlebar slot opposite the close box. */ .os-expand, .os-collapse { position: absolute; top: 0; right: 0; display: flex; align-items: center; justify-content: center; width: 3rem; height: 100%; min-height: 3rem; padding: 0; text-decoration: none; } .os-collapse { display: none; } /* Close: visible X at rest, black on white, inverting with the box. Text glyph (not a drawing) so it inverts with color exactly like the help `?`; sized to 17px arms to match the 1.7rem square. Kept blank-square fallback: if the X ever reads as a smudge at 1-bit e-ink, remove this rule and the box returns to the inverting blank square. */ .os-box::after { content: "×"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, calc(-50% - 2.5px)); font-family: var(--os-font); font-size: 1.1rem; font-weight: bold; line-height: 1; color: #000; } .os-box:hover::after, .os-box:active::after { color: #fff; } /* Expand: upward-outward corner bracket, matching widget/modal expand. 10px bracket centered in the upper-right quadrant of the 1.7rem square. */ .os-expand::after { content: ""; position: absolute; top: calc(50% - 0.55rem - 2.5px); left: calc(50% - 0.05rem); width: 0.625rem; height: 0.625rem; border-top: 2px solid #000; border-right: 2px solid #000; } /* Collapse: the same bracket mirrored to the lower-left corner. */ .os-collapse::after { content: ""; position: absolute; top: calc(50% - 0.075rem - 2.5px); left: calc(50% - 0.575rem); width: 0.625rem; height: 0.625rem; border-bottom: 2px solid #000; border-left: 2px solid #000; } .os-expand:hover::after, .os-expand:active::after, .os-collapse:hover::after, .os-collapse:active::after { border-color: #fff; } /* ---- Per-app help: `[?]` box + JS-opened dialog ---- */ /* 3rem hit slot in the titlebar slot immediately left of expand (expand stays at right: 0). The drawn square is the shared header-box square above; this rule only positions the slot and resets the