@use 'mixins' as *; // ---------- Lean editor (/lean) ---------- // The wiki's own Lean workbench. On the /lean address it owns the space // beside the sidebar the way the map and the plane do — fixed, edge to // edge. In a book pane it becomes the pane's own box instead. // (The page transition only fades, so no transform steals the // fixed positioning.) .lean-stage { position: fixed; inset: 0 0 0 var(--sidebar-w); transition: left 0.22s ease; z-index: 1; background: var(--bg); } .pane-stage .lean-stage { position: absolute; inset: 0; } // editor left, infoview right — the workbench of every Lean editor, in // the wiki's own materials. The fold closes the panel's track and the // editor takes the whole width. .lean-work { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; transition: grid-template-columns 0.22s ease; } .lean-work[data-panel='collapsed'] { grid-template-columns: minmax(0, 1fr) 0; } .lean-work-editor { position: relative; min-width: 0; background: var(--surface); } .lean-work-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-left: 1px solid var(--border); background: var(--bg-elev); overflow: hidden; visibility: visible; transition: opacity 0.18s ease, visibility 0s; } .lean-work[data-panel='collapsed'] .lean-work-panel { opacity: 0; visibility: hidden; // out of sight and out of the reader's way — only after the track closes transition: opacity 0.18s ease, visibility 0s 0.22s; } // status row: whose Lean, doing what, and the door to the classic client .lean-work-status { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--border); font-size: 0.74rem; color: var(--muted); .lean-work-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex-shrink: 0; } &[data-phase='ready'] .lean-work-dot { background: var(--success); } &[data-phase='lost'] .lean-work-dot { background: var(--danger); } &[data-phase='connecting'] .lean-work-dot, &[data-phase='initializing'] .lean-work-dot { background: var(--accent); } // elaborating: the amber pulse every Lean editor wears while working &[data-busy='true'] .lean-work-dot { background: #d97706; animation: lean-pulse 1s ease-in-out infinite; } [data-theme='dark'] &[data-busy='true'] .lean-work-dot { background: #f5a83c; } } @keyframes lean-pulse { 50% { opacity: 0.35; } } .lean-work-phase { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } // the status row's two quiet doors: the classic client outside, and the fold .lean-work-classic, .lean-work-collapse { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: var(--faint); transition: color 0.15s ease, background 0.15s ease; &:hover { color: var(--text); background: var(--surface-2); } } .lean-work-classic { margin-left: auto; } // the panes below: Goals and Messages, the wiki's own infoview .lean-work-goals, .lean-work-messages { padding: 10px 12px 14px; overflow-y: auto; min-height: 0; h3 { margin: 0 0 8px; font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); } pre { margin: 0 0 8px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font-family: ui-monospace, 'JetBrains Mono', 'Cascadia Code', 'Fira Code', Menlo, Consolas, monospace; font-size: 0.78rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word; } } .lean-work-goals { flex: 1 1 55%; } .lean-work-messages { flex: 1 1 45%; border-top: 1px solid var(--border); } .lean-work-messages ul { list-style: none; margin: 0; padding: 0; li { position: relative; } } .lean-work-msg-line { font-family: ui-monospace, 'JetBrains Mono', Menlo, Consolas, monospace; font-size: 0.66rem; color: var(--faint); } .lean-work-none { margin: 0; font-size: 0.8rem; color: var(--faint); } // the fold's other half: while the panel lies collapsed, this quiet card // waits at the editor's top-right corner to pull the infoview back .lean-panel-open { position: absolute; top: 10px; right: 12px; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 11px; background: color-mix(in srgb, var(--bg-elev) 84%, transparent); backdrop-filter: blur(10px); box-shadow: var(--shadow-sm); color: var(--muted); font-size: 0.84rem; font-weight: 650; white-space: nowrap; transition: color 0.15s, background-color 0.15s; &:hover { color: var(--text); background: var(--surface-2); } } // until Lean answers — and when the server is not there at all — the // wiki speaks for the editor .lean-state { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; align-content: center; gap: 14px; padding: 24px; background: var(--bg); .banner { width: min(520px, 100%); } } .lean-spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent); animation: lean-spin 0.7s linear infinite; } @keyframes lean-spin { to { transform: rotate(1turn); } } .lean-loading-text { margin: 0; font-size: 0.86rem; color: var(--muted); } // small screens: the panel lies under the editor instead of beside it — // and collapses into the bottom edge the same way @media (max-width: 900px) { .lean-work { grid-template-columns: none; grid-template-rows: minmax(0, 1fr) minmax(0, 40%); transition: grid-template-rows 0.22s ease; } .lean-work[data-panel='collapsed'] { grid-template-columns: none; grid-template-rows: minmax(0, 1fr) minmax(0, 0%); } .lean-work-panel { border-left: 0; border-top: 1px solid var(--border); } } @media (prefers-reduced-motion: reduce) { .lean-stage { transition: none; } .lean-work { transition: none; } .lean-work-panel { transition: opacity 0.01s ease, visibility 0s; } .lean-work[data-panel='collapsed'] .lean-work-panel { transition: opacity 0.01s ease, visibility 0s; } .lean-spinner { animation-duration: 1.4s; } .lean-work-status[data-busy='true'] .lean-work-dot { animation: none; } }