arborist-viz/arborist_viz/static/css/viz.css
russell@unturf.com 0cd96ab1d7
Initial commit: arborist VIZ — Merkle command center
Pyramid web app for inspecting arborist Merkle trees over sharded SQLite:
document roots, inclusion proofs, an interactive 3D Merkle lattice
(six.js / WebGL with graceful fallback), audit-chain linkage, and a live
SSE event stream.

Generated artifacts (env/, vendored static/six/ bundles, demo databases)
are gitignored and rebuilt via the Makefile (venv, six, init-db, serve).
2026-05-28 09:22:59 -04:00

612 lines
16 KiB
CSS

/* arborist VIZ — command-center dark theme. */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
:root {
--bg: #0b0e12;
--bg-elev: #11161c;
--bg-elev-2: #161d25;
--border: #1f2934;
--fg: #d6e0ec;
--fg-dim: #8aa1b8;
--fg-mute: #5e7081;
--accent: #4dd1c1; /* mint — root/live */
--warn: #f5b455; /* amber — stale */
--bad: #e96b6b; /* red — failed/quarantined */
--pulse: #7aa2ff; /* blue — proof pulse */
--mono: ui-monospace, "JetBrains Mono", "Fira Code", Consolas, monospace;
--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
body.cmd-center {
background: var(--bg);
color: var(--fg);
font-family: var(--sans);
font-size: 13px;
line-height: 1.45;
display: grid;
grid-template-rows: auto 1fr auto;
min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--mono); font-size: 12px; }
.cmd-bar {
display: flex; justify-content: space-between; align-items: center;
padding: 0.5rem 1rem;
background: var(--bg-elev);
border-bottom: 1px solid var(--border);
}
.cmd-bar-left, .cmd-bar-right { display: flex; align-items: center; gap: 0.6rem; }
.cmd-brand { font-family: var(--mono); font-weight: 700; letter-spacing: 0.05em; color: var(--accent); }
.cmd-tag { color: var(--fg-dim); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.cmd-sep { color: var(--fg-mute); }
.cmd-pill {
font-family: var(--mono);
font-size: 10.5px;
padding: 0.15rem 0.5rem;
border: 1px solid var(--border);
border-radius: 999px;
color: var(--fg-dim);
background: var(--bg);
}
.cmd-pill-on { color: var(--bad); border-color: var(--bad); }
.cmd-pill-off { color: var(--fg-dim); }
.cmd-pill-shards { color: var(--accent); border-color: var(--accent); }
/* ---------- hash-drop bar ---------- */
.cmd-hash-drop {
display: flex;
align-items: center;
gap: 0.4rem;
flex: 1;
max-width: 720px;
margin: 0 1rem;
}
.cmd-hash-drop input[type="text"] {
flex: 1;
background: var(--bg);
border: 1px solid var(--border);
color: var(--fg);
font-family: var(--mono);
font-size: 12px;
padding: 0.35rem 0.6rem;
border-radius: 4px;
min-width: 0;
}
.cmd-hash-drop input[type="text"]:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 1px var(--accent);
}
.cmd-hash-drop button {
background: var(--bg-elev-2);
border: 1px solid var(--border);
color: var(--accent);
font-family: var(--mono);
font-size: 11px;
padding: 0.35rem 0.75rem;
cursor: pointer;
border-radius: 4px;
}
.cmd-hash-drop button:hover { border-color: var(--accent); }
.cmd-hash-status {
font-family: var(--mono);
font-size: 11px;
color: var(--fg-mute);
min-width: 7rem;
}
.cmd-hash-status[data-level="ok"] { color: var(--accent); }
.cmd-hash-status[data-level="err"] { color: var(--bad); }
.cmd-hash-status[data-level="wait"] { color: var(--warn); }
.cmd-main { padding: 0; overflow: hidden; }
.cmd-foot {
padding: 0.4rem 1rem;
border-top: 1px solid var(--border);
color: var(--fg-mute);
font-family: var(--mono);
font-size: 11px;
display: flex; gap: 0.6rem; flex-wrap: wrap;
}
.dash {
display: grid;
grid-template-columns: 260px 1fr;
height: 100%;
}
.dash-side {
background: var(--bg-elev);
border-right: 1px solid var(--border);
padding: 1rem;
overflow: auto;
}
.dash-h2 {
font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
color: var(--fg-mute);
margin: 1rem 0 0.4rem;
}
.dash-h2:first-child { margin-top: 0; }
.dash-list { list-style: none; padding: 0; margin: 0; }
.dash-list li { padding: 0.25rem 0; }
.dash-side-note { color: var(--fg-mute); font-size: 11px; }
.dash-roots .root-link {
display: block;
border: 1px solid var(--border);
background: var(--bg);
padding: 0.4rem 0.5rem;
border-radius: 4px;
color: var(--fg);
text-decoration: none;
margin-bottom: 0.3rem;
}
.dash-roots .root-link:hover { border-color: var(--accent); text-decoration: none; }
.dash-roots .root-title { display: block; font-size: 12px; line-height: 1.3; }
.dash-roots .root-meta {
display: inline-block;
font-family: var(--mono);
font-size: 10px;
color: var(--accent);
margin-right: 0.4rem;
}
.dash-roots .root-hash-short {
font-family: var(--mono);
font-size: 10px;
color: var(--fg-mute);
}
.dash-stream {
display: flex; align-items: center; gap: 0.4rem;
font-family: var(--mono); font-size: 11px;
color: var(--fg-dim);
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-off { background: var(--fg-mute); }
.dot-on { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.dot-err { background: var(--bad); }
.dash-events {
background: var(--bg);
border: 1px solid var(--border);
padding: 0.4rem;
max-height: 14rem;
overflow: auto;
font-size: 10.5px;
color: var(--fg-dim);
margin-top: 0.4rem;
}
.dash-grid {
padding: 1rem;
display: grid;
grid-template-columns: repeat(12, 1fr);
grid-auto-rows: 8rem;
gap: 0.75rem;
overflow: auto;
}
.widget {
background: var(--bg-elev);
border: 1px solid var(--border);
border-radius: 6px;
display: flex;
flex-direction: column;
overflow: hidden;
}
.widget-empty { grid-column: span 12; grid-row: span 2; }
.widget-head {
display: flex; align-items: center; gap: 0.5rem;
padding: 0.4rem 0.6rem;
background: var(--bg-elev-2);
border-bottom: 1px solid var(--border);
}
.widget-type {
font-family: var(--mono);
color: var(--accent);
font-size: 10.5px;
}
.widget-title { color: var(--fg); }
.widget-body { padding: 0.75rem; overflow: auto; flex: 1; }
.widget-foot {
border-top: 1px solid var(--border);
padding: 0.3rem 0.6rem;
background: var(--bg);
font-family: var(--mono);
font-size: 10.5px;
color: var(--fg-mute);
}
.widget-foot summary { cursor: pointer; }
.widget-foot pre { color: var(--fg-dim); margin: 0.3rem 0 0; }
/* widget-specific layouts. */
.widget-root-explorer { grid-column: span 4; grid-row: span 3; }
.widget-audit-timeline { grid-column: span 8; grid-row: span 3; }
.widget-claim-warrant { grid-column: span 6; grid-row: span 3; }
.widget-run-dag { grid-column: span 6; grid-row: span 3; }
.widget-claim-graveyard { grid-column: span 12; grid-row: span 4; }
.widget-merkle-proof { grid-column: span 6; grid-row: span 3; }
.widget-table { width: 100%; border-collapse: collapse; }
.widget-table th, .widget-table td {
text-align: left;
padding: 0.3rem 0.4rem;
border-bottom: 1px solid var(--border);
font-family: var(--mono);
font-size: 11.5px;
}
.widget-table th { color: var(--fg-dim); font-weight: 500; }
.muted { color: var(--fg-mute); font-style: italic; }
.warrant-ladder { list-style: none; padding: 0; margin: 0; font-family: var(--mono); font-size: 12px; }
.warrant-ladder li { padding: 0.18rem 0.4rem; color: var(--fg-dim); border-left: 2px solid var(--border); margin-bottom: 2px; }
.warrant-ladder li:last-child { color: var(--accent); border-left-color: var(--accent); }
.dag-stages { padding-left: 1.2rem; color: var(--fg-dim); }
.dag-stages li { padding: 0.1rem 0; }
.audit-chain { list-style: none; padding: 0; margin: 0; font-family: var(--mono); font-size: 11.5px; }
.audit-chain li { padding: 0.2rem 0.4rem; border-bottom: 1px solid var(--border); }
.audit-chain li.evt-heartbeat { color: var(--fg-mute); }
.audit-chain li.evt-ready { color: var(--accent); }
/* ---------- proof page ---------- */
.proof, .audit-page {
display: grid;
grid-template-columns: 1fr 1fr;
height: 100%;
}
.proof-stage, .audit-stage {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
min-width: 0; /* prevent the lattice canvas from blowing out the grid track */
}
/* Mobile / narrow viewports: stack sidebar above stage. */
@media (max-width: 900px) {
.cmd-main { overflow: auto; }
.proof, .audit-page {
grid-template-columns: 1fr;
height: auto;
}
.proof .dash-side, .audit-page .dash-side {
border-right: none;
border-bottom: 1px solid var(--border);
overflow: visible;
}
.proof-stage, .audit-stage {
height: auto;
overflow: visible;
}
.lattice-canvas { min-height: 280px; }
}
.lattice-bar {
display: flex;
align-items: center;
gap: 0.6rem;
padding: 0.4rem 0.8rem;
background: var(--bg-elev);
border-bottom: 1px solid var(--border);
font-family: var(--mono);
font-size: 12px;
color: var(--fg-dim);
}
.lattice-bar button {
background: var(--bg-elev-2);
border: 1px solid var(--border);
color: var(--accent);
font-family: var(--mono);
font-size: 11px;
padding: 0.25rem 0.7rem;
cursor: pointer;
border-radius: 3px;
}
.lattice-bar button:disabled { color: var(--fg-mute); cursor: not-allowed; }
.lattice-bar button:hover:not(:disabled) { border-color: var(--accent); }
.lattice-canvas {
flex: 1;
background: #0b0e12;
min-height: 320px;
position: relative;
}
.lattice-canvas canvas {
display: block;
width: 100% !important;
height: 100% !important;
}
/* Legend colors mirror merkle-lattice.js COLORS — keep in sync if those
constants change. */
.lattice-legend {
display: inline-flex;
align-items: center;
gap: 0.4rem;
margin-left: auto;
margin-right: 0.6rem;
font-size: 11px;
}
.legend-swatch {
display: inline-block;
width: 10px;
height: 10px;
border-radius: 50%;
margin-left: 0.4rem;
margin-right: 0.15rem;
vertical-align: middle;
border: 1px solid rgba(0,0,0,0.4);
}
.swatch-leaf { background: #4dd1c1; }
.swatch-interior { background: #7aa2ff; }
.swatch-root { background: #f5b455; }
.swatch-selected { background: #ffffff; }
.node-inspect {
font-family: var(--mono);
font-size: 12px;
padding: 0.4rem 0.8rem;
background: var(--bg-elev);
border-top: 1px solid var(--border);
white-space: pre-wrap;
word-break: keep-all;
}
.node-inspect .k { color: var(--accent); margin-right: 0.6rem; }
.leaves-strip {
display: flex;
flex-wrap: wrap;
gap: 0.3rem;
padding: 0.6rem 0.8rem;
border-top: 1px solid var(--border);
background: var(--bg-elev);
max-height: 8rem;
overflow: auto;
}
.leaf-chip {
background: var(--bg-elev-2);
border: 1px solid var(--border);
color: var(--fg-dim);
font-family: var(--mono);
font-size: 11px;
padding: 0.2rem 0.5rem;
border-radius: 3px;
cursor: pointer;
display: flex;
gap: 0.4rem;
align-items: center;
}
.leaf-chip:hover { border-color: var(--accent); color: var(--fg); }
.leaf-chip.active {
background: var(--accent);
color: var(--bg);
border-color: var(--accent);
}
.leaf-idx { font-weight: 700; }
.leaf-hash { opacity: 0.7; }
/* Provenance glow — which leaves the answer actually drew on. Mirrors the
3D lattice two-tier glow: `used` = chunk cited in the answer (gold),
`primary` = retrieved primary candidate not cited (mint). */
.leaf-chip.used {
border-color: #ffd166;
color: #ffd166;
box-shadow: 0 0 7px rgba(255, 209, 102, 0.6);
}
.leaf-chip.primary { border-color: var(--accent); color: var(--accent); }
.leaf-used { color: #ffd166; font-weight: 700; }
.source-row.used { border-left: 2px solid #ffd166; padding-left: 0.5rem; }
.used-tag { color: #ffd166; font-weight: 700; font-style: normal; }
/* Shown in place of the 3D canvas when WebGL is unavailable. */
.lattice-fallback { padding: 1rem; font-style: italic; }
/* Atomic identifier — Mode B (chunked). See docs/style-guide.md §4.4.
Server/JS renders the hash as 8-char groups joined by two spaces;
we wrap only at whitespace, never mid-token. */
.root-hash-block {
background: var(--bg);
border: 1px solid var(--border);
padding: 0.5rem;
font-family: var(--mono);
font-size: 13px;
line-height: 1.5;
color: var(--fg-dim);
white-space: pre-wrap;
word-break: keep-all;
overflow-wrap: normal;
}
.proof-card {
background: var(--bg);
border: 1px solid var(--border);
padding: 0.6rem;
font-family: var(--mono);
font-size: 12.5px;
}
.proof-pass { font-weight: 700; padding-bottom: 0.4rem; }
.proof-pass.passed { color: var(--accent); }
.proof-pass.failed { color: var(--bad); }
.proof-row {
display: grid;
grid-template-columns: 7rem 1fr;
gap: 0.4rem;
padding: 0.15rem 0;
border-bottom: 1px solid var(--border);
}
.proof-row .k { color: var(--fg-mute); }
/* Atomic identifier — Mode B (chunked wrap). See docs/style-guide.md §4.4.
Full SHA-256 stays visible; breaks only at the chunkHex whitespace
separators so no token splits mid-hex. */
.proof-row .v.mono {
font-size: 13px;
white-space: pre-wrap;
word-break: keep-all;
overflow-wrap: normal;
min-width: 0;
}
.proof-details { margin-top: 0.4rem; }
.proof-details summary { color: var(--fg-dim); cursor: pointer; }
.sibling-list { margin: 0.3rem 0 0 1rem; padding: 0; color: var(--fg-dim); }
.sibling-list li { padding: 0.1rem 0; font-size: 10.5px; }
.audit-detail {
background: var(--bg);
border: 1px solid var(--border);
padding: 0.5rem;
font-size: 11.5px;
color: var(--fg-dim);
white-space: pre-wrap;
max-height: 24rem;
overflow: auto;
}
.audit-link-row {
display: block;
font-family: var(--mono);
font-size: 11px;
padding: 0.15rem 0;
border-bottom: 1px solid var(--border);
}
/* Atomic identifier — chunked inline. Renders the full hash with
whitespace wrapping only at chunk boundaries, never mid-token.
Use inside links and anywhere a hash must appear in full.
See docs/style-guide.md §4.4 (Mode B). */
.hash-id {
font-family: var(--mono);
white-space: pre-wrap;
word-break: keep-all;
overflow-wrap: normal;
}
.leaf-content {
background: var(--bg);
border: 1px solid var(--border);
padding: 0.6rem 0.7rem;
font-family: var(--mono);
font-size: 11.5px;
line-height: 1.45;
color: var(--fg);
max-height: 16rem;
overflow: auto;
white-space: pre-wrap;
word-break: break-word;
}
.leaf-content.muted { color: var(--fg-mute); font-style: italic; }
#content-mode-label { font-weight: 400; margin-left: 0.4rem; }
.content-toggle {
display: flex;
align-items: center;
gap: 0.3rem;
margin: 0.2rem 0 0.3rem;
font-family: var(--mono);
font-size: 10.5px;
}
.content-toggle button {
background: var(--bg);
border: 1px solid var(--border);
color: var(--fg-dim);
font-family: var(--mono);
font-size: 10.5px;
padding: 0.15rem 0.55rem;
border-radius: 3px;
cursor: pointer;
}
.content-toggle button:hover { border-color: var(--accent); color: var(--fg); }
.content-toggle button.active {
background: var(--bg-elev-2);
color: var(--accent);
border-color: var(--accent);
}
#content-base-version { color: var(--fg-mute); }
.mono { font-family: var(--mono); }
/* ---- context-root panel (QA card + sources manifest) ---- */
.qa-card {
background: var(--bg);
border: 1px solid var(--border);
padding: 0.6rem 0.7rem;
margin-bottom: 0.7rem;
font-family: var(--mono);
font-size: 12px;
}
.qa-row {
display: grid;
grid-template-columns: 6rem 1fr;
gap: 0.5rem;
padding: 0.2rem 0;
border-bottom: 1px solid var(--border);
}
.qa-row:last-child { border-bottom: none; }
.qa-row .k { color: var(--fg-mute); }
.qa-row .v { color: var(--fg); min-width: 0; }
.qa-row .v.mono { white-space: pre-wrap; word-break: keep-all; }
.qa-answer {
margin: 0;
white-space: pre-wrap;
word-break: break-word;
max-height: 16rem;
overflow: auto;
color: var(--fg);
}
.sources-list {
list-style: none;
margin: 0;
padding: 0;
}
.source-row {
display: flex;
align-items: baseline;
gap: 0.5rem;
padding: 0.4rem 0;
border-bottom: 1px solid var(--border);
}
.source-row:last-child { border-bottom: none; }
.leaf-jump {
flex: 0 0 auto;
background: var(--bg-elev-2);
border: 1px solid var(--border);
color: var(--accent);
font-family: var(--mono);
font-size: 10.5px;
font-weight: 700;
padding: 0.15rem 0.5rem;
border-radius: 3px;
cursor: pointer;
white-space: nowrap;
}
.leaf-jump:hover { border-color: var(--accent); background: var(--accent); color: var(--bg); }
.source-link {
display: grid;
gap: 0.1rem;
text-decoration: none;
color: var(--fg);
min-width: 0;
}
.source-link:hover .source-title { color: var(--accent); }
.source-title { font-weight: 600; }
.source-uri { font-size: 11px; word-break: break-all; }
.source-meta { font-family: var(--mono); font-size: 10.5px; }
.source-hash {
font-size: 11px;
color: var(--fg-dim);
white-space: pre-wrap;
word-break: keep-all;
}