The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
/* Doc Viewer. Tokens follow the Harness app's palette (desktop/lib/shared/theme/app_theme.dart):
paper white with near-black ink in light, charcoal with off-white ink in dark. Pages always keep
their own colours; only the chrome around them changes. */
:root {
color-scheme: light;
--bg: #ffffff;
--panel: #f9f9f8;
--card: #f3f3f2;
--hover: #ecece9;
--pressed: #e4e4e1;
--canvas: #ecebe8;
--divider: rgba(0, 0, 0, .07);
--guide: rgba(0, 0, 0, .16);
--text: #1a1a18;
--text-2: #62615b;
--text-3: #8e8d86;
--accent: #2f5bea;
--accent-ink: #2f5bea;
--accent-soft: rgba(47, 91, 234, .12);
--accent-ring: rgba(47, 91, 234, .55);
--danger: #b3261e;
--danger-soft: rgba(179, 38, 30, .09);
--warn: #b45309;
--warn-soft: rgba(180, 83, 9, .1);
--ok: #15803d;
--page-shadow: 0 0 0 .5px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .08), 0 6px 22px rgba(0, 0, 0, .07);
--float-shadow: 0 0 0 .5px rgba(0, 0, 0, .08), 0 8px 28px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .06);
--glass: rgba(255, 255, 255, .86);
--mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
--tb-h: 42px;
--side-w: 188px;
--radius: 8px;
font: 13px/1.35 -apple-system, BlinkMacSystemFont, system-ui, "Helvetica Neue", sans-serif;
}
:root[data-theme="dark"] {
color-scheme: dark;
--bg: #1b1b1b;
--panel: #161616;
--card: #232323;
--hover: #2a2a2a;
--pressed: #333333;
--canvas: #0f0f0f;
--divider: rgba(255, 255, 255, .08);
--guide: rgba(255, 255, 255, .14);
--text: #f5f5f5;
--text-2: #a8a8a2;
--text-3: #75756f;
--accent: #4e6bf0;
--accent-ink: #9db2ff;
--accent-soft: rgba(110, 140, 255, .18);
--accent-ring: rgba(140, 165, 255, .75);
--danger: #f2544b;
--danger-soft: rgba(242, 84, 75, .13);
--warn: #ffb020;
--warn-soft: rgba(255, 176, 32, .12);
--ok: #3fb950;
--page-shadow: 0 0 0 .5px rgba(255, 255, 255, .06), 0 2px 10px rgba(0, 0, 0, .55);
--float-shadow: 0 0 0 .5px rgba(255, 255, 255, .1), 0 10px 30px rgba(0, 0, 0, .5);
--glass: rgba(34, 34, 34, .88);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
color-scheme: dark;
--bg: #1b1b1b; --panel: #161616; --card: #232323; --hover: #2a2a2a; --pressed: #333333; --canvas: #0f0f0f;
--divider: rgba(255, 255, 255, .08); --guide: rgba(255, 255, 255, .14);
--text: #f5f5f5; --text-2: #a8a8a2; --text-3: #75756f;
--accent: #4e6bf0; --accent-ink: #9db2ff; --accent-soft: rgba(110, 140, 255, .18); --accent-ring: rgba(140, 165, 255, .75);
--danger: #f2544b; --danger-soft: rgba(242, 84, 75, .13); --warn: #ffb020; --warn-soft: rgba(255, 176, 32, .12); --ok: #3fb950;
--page-shadow: 0 0 0 .5px rgba(255, 255, 255, .06), 0 2px 10px rgba(0, 0, 0, .55);
--float-shadow: 0 0 0 .5px rgba(255, 255, 255, .1), 0 10px 30px rgba(0, 0, 0, .5);
--glass: rgba(34, 34, 34, .88);
}
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--canvas); color: var(--text); }
body { -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
svg.i { width: 16px; height: 16px; display: block; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#app { position: fixed; inset: 0; display: flex; flex-direction: column; }
/* ---------- toolbar ---------- */
#toolbar {
position: relative; z-index: 20; flex: none; height: var(--tb-h);
display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(auto, 1fr); align-items: center; gap: 8px;
padding: 0 8px; background: var(--bg); border-bottom: 1px solid var(--divider);
container-type: inline-size; container-name: tb; user-select: none; -webkit-user-select: none;
}
.tb-left, .tb-right { display: flex; align-items: center; gap: 2px; min-width: 0; }
.tb-right { justify-content: flex-end; }
.tb-center { display: flex; align-items: center; gap: 2px; }
.icon-btn {
display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px;
background: transparent; color: var(--text-2); cursor: default; flex: none;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn:active { background: var(--pressed); }
.icon-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.icon-btn:disabled { opacity: .35; background: transparent; }
.icon-btn.text-toggle { width: auto; min-width: 28px; padding: 0 6px; font-size: 12px; font-weight: 600; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 1px; }
.title-btn {
display: flex; align-items: center; gap: 6px; min-width: 0; height: 28px; margin-left: 2px; padding: 0 8px;
border: 0; border-radius: 6px; background: transparent; cursor: default; text-align: left;
}
.title-btn.switchable:hover { background: var(--hover); }
.title-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 13px; }
.title-caret { color: var(--text-3); display: grid; }
.page-box {
display: flex; align-items: center; height: 26px; padding: 0 8px 0 2px; border-radius: 6px; background: var(--card);
color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap;
}
#page-input {
width: 3.2ch; min-width: 28px; height: 22px; padding: 0 2px; border: 0; border-radius: 4px; background: transparent;
color: var(--text); font: inherit; font-variant-numeric: tabular-nums; text-align: right;
}
#page-input:focus { background: var(--bg); outline: 2px solid var(--accent-ring); outline-offset: 0; }
#page-count { margin-left: 3px; }
.zoom-group { display: flex; align-items: center; gap: 0; margin: 0 2px; }
.zoom-btn {
height: 26px; min-width: 50px; padding: 0 7px; border: 0; border-radius: 6px; background: var(--card); cursor: default;
font-variant-numeric: tabular-nums; color: var(--text); font-size: 12px;
}
.zoom-btn:hover { background: var(--hover); }
.pill {
display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; margin-right: 6px; border: 0; border-radius: 12px;
background: var(--card); color: var(--text-2); font-size: 12px; white-space: nowrap; cursor: default; flex: none;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pill.building { color: var(--accent-ink); background: var(--accent-soft); }
.pill.stale { color: var(--text-2); }
.pill.failed { color: var(--danger); background: var(--danger-soft); }
.pill.warnings { color: var(--warn); background: var(--warn-soft); }
.pill .label { overflow: hidden; text-overflow: ellipsis; }
.spinner { width: 11px; height: 11px; border-radius: 50%; border: 1.6px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
#busy-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; }
#busy-bar::before {
content: ""; position: absolute; top: 0; bottom: 0; width: 34%; border-radius: 2px; background: var(--accent);
animation: busy 1.25s cubic-bezier(.45, .05, .55, .95) infinite;
}
@keyframes busy { from { left: -34%; } to { left: 100%; } }
@container tb (max-width: 700px) {
#btn-present { display: none; }
}
@container tb (max-width: 600px) {
#btn-zoom-out, #btn-zoom-in { display: none; }
.pill .label { display: none; }
.pill { padding: 0 7px; }
}
@container tb (max-width: 470px) {
.title-btn { display: none; }
#page-count { display: none; }
}
/* ---------- layout ---------- */
#main { position: relative; flex: 1; display: flex; min-height: 0; }
#stage { position: relative; flex: 1; min-width: 0; overflow: hidden; background: var(--canvas); }
/* ---------- sidebar ---------- */
#sidebar {
position: relative; z-index: 12; flex: none; width: var(--side-w); display: flex; flex-direction: column;
background: var(--panel); border-right: 1px solid var(--divider); user-select: none; -webkit-user-select: none;
}
#app.side-overlay #sidebar { position: absolute; top: 0; bottom: 0; left: 0; box-shadow: var(--float-shadow); animation: slide-in .16s ease-out; }
@keyframes slide-in { from { transform: translateX(-12px); opacity: .4; } }
#sidebar-scrim { position: absolute; inset: 0; z-index: 11; background: rgba(0, 0, 0, .08); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 8px 10px 6px; padding: 2px; border-radius: 7px; background: var(--card); }
.seg button { height: 24px; border: 0; border-radius: 5px; background: transparent; color: var(--text-2); font-size: 12px; font-weight: 500; cursor: default; }
.seg button[aria-selected="true"] { background: var(--bg); color: var(--text); box-shadow: 0 0 0 .5px var(--divider), 0 1px 2px rgba(0, 0, 0, .08); }
.side-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
#thumbs { padding: 6px 0 18px; }
.thumb { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 7px 0 5px; cursor: default; position: relative; }
.thumb-frame {
position: relative; width: 116px; background: #fff; border-radius: 2px; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12), 0 1px 3px rgba(0, 0, 0, .1);
overflow: hidden; transition: box-shadow .12s;
}
.thumb-frame img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.thumb:hover .thumb-frame { box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12), 0 0 0 3px var(--hover), 0 1px 3px rgba(0, 0, 0, .1); }
.thumb.current .thumb-frame { box-shadow: 0 0 0 2.5px var(--accent), 0 1px 3px rgba(0, 0, 0, .1); }
.thumb-num { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; padding: 0 6px; border-radius: 8px; line-height: 16px; }
.thumb.current .thumb-num { color: #fff; background: var(--accent); }
.thumb.changed .thumb-frame::after {
content: ""; position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%;
background: var(--accent); box-shadow: 0 0 0 2px #fff;
}
.thumb.changed .thumb-num::after { content: " · updated"; }
.thumb.changed:not(.current) .thumb-num { color: var(--accent-ink); }
#outline { padding: 2px 6px 18px; }
.ol-empty { padding: 18px 12px; color: var(--text-3); font-size: 12px; line-height: 1.45; }
.ol-row {
display: flex; align-items: flex-start; gap: 2px; width: 100%; min-height: 26px; padding: 4px 6px 4px 0; border: 0; border-radius: 6px;
background: transparent; text-align: left; cursor: default; color: var(--text); font-size: 12.5px; line-height: 18px;
}
.ol-row:hover { background: var(--hover); }
.ol-row.current { background: var(--accent-soft); color: var(--accent-ink); }
.ol-row .twisty { width: 16px; height: 18px; display: grid; place-items: center; color: var(--text-3); flex: none; border-radius: 4px; }
.ol-row .twisty svg { width: 12px; height: 12px; transition: transform .12s; }
.ol-row.open .twisty svg { transform: rotate(90deg); }
.ol-row .ol-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ol-row .ol-page { flex: none; color: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; padding-left: 6px; }
.ol-row.current .ol-page { color: inherit; }
.ol-row.level-0 .ol-title { font-weight: 550; }
.ol-children[hidden] { display: none; }
/* ---------- document ---------- */
.viewerContainer {
position: absolute; inset: 0; overflow: auto; background: var(--canvas); outline: none;
overscroll-behavior: contain; scrollbar-gutter: auto;
}
.viewerContainer.pending { visibility: visible; z-index: 0; }
.viewerContainer.live { z-index: 1; }
.pdfViewer { padding: 18px 0 28px; }
.pdfViewer.removePageBorders .page { margin: 0 auto 14px; box-shadow: var(--page-shadow); border-radius: 1px; }
.pdfViewer.removePageBorders .spread { margin-bottom: 14px; }
.pdfViewer.removePageBorders .spread .page { margin: 0 6px; }
.pdfViewer .page.loading::after, .pdfViewer .page.loadingIcon::after { background: none; }
.pdfViewer .page { transition: box-shadow .5s ease; }
.pdfViewer .page.dv-changed { animation: changed 2.8s ease-out 1; }
@keyframes changed {
0% { box-shadow: 0 0 0 3px var(--accent), var(--page-shadow); }
60% { box-shadow: 0 0 0 3px var(--accent), var(--page-shadow); }
100% { box-shadow: 0 0 0 3px transparent, var(--page-shadow); }
}
.pdfViewer .page .dv-badge { display: none; }
.textLayer .highlight { scroll-margin: 96px 40px; --highlight-bg-color: rgba(255, 196, 0, .38); --highlight-selected-bg-color: rgba(255, 132, 0, .55); }
.textLayer .highlight.selected { box-shadow: 0 0 0 1.5px rgba(255, 132, 0, .9); border-radius: 2px; }
.textLayer ::selection { background: rgba(47, 91, 234, .28); }
#stage .annotationLayer .linkAnnotation:not(.hasBorder) > a:hover { opacity: 1; background-color: rgba(47, 91, 234, .12); border-radius: 2px; box-shadow: none; }
.viewerContainer.panning { cursor: grabbing; }
.viewerContainer.panning .textLayer { pointer-events: none; }
/* ---------- floating things ---------- */
.floating { position: absolute; z-index: 15; background: var(--glass); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6); box-shadow: var(--float-shadow); border-radius: 10px; }
#findbar { top: 10px; right: 14px; display: flex; align-items: center; gap: 2px; height: 38px; padding: 0 5px 0 10px; max-width: calc(100% - 28px); animation: pop .14s ease-out; }
@keyframes pop { from { transform: translateY(-4px) scale(.98); opacity: 0; } }
.find-icon { color: var(--text-3); display: grid; margin-right: 4px; }
#find-input {
width: 200px; min-width: 60px; flex: 1 1 200px; height: 28px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; outline: none;
}
#find-input::-webkit-search-cancel-button { display: none; }
#find-count { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; padding: 0 6px; }
#find-count.none { color: var(--danger); }
.find-sep { width: 1px; height: 18px; background: var(--divider); margin: 0 3px; }
@media (max-width: 460px) { #find-word { display: none; } #find-input { width: 110px; } }
#error-card {
top: 12px; left: 50%; transform: translateX(-50%); width: min(600px, calc(100% - 28px)); padding: 12px 14px 12px; border-radius: 12px;
background: var(--bg); animation: drop .18s ease-out;
}
@keyframes drop { from { transform: translate(-50%, -6px); opacity: 0; } }
.ec-head { display: flex; align-items: center; gap: 8px; }
.ec-head .badge { display: inline-flex; align-items: center; gap: 6px; color: var(--danger); font-weight: 600; font-size: 12.5px; }
.ec-head .badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.ec-head .sub { color: var(--text-3); font-size: 12px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-body { margin-top: 8px; max-height: min(46vh, 380px); overflow: auto; }
.ec-item + .ec-item { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--divider); }
.ec-msg { font-size: 13.5px; font-weight: 550; line-height: 1.4; overflow-wrap: anywhere; }
.ec-msg.warning::before { content: "warning "; color: var(--warn); font-weight: 600; font-size: 12px; }
.ec-ref { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.ec-code { margin: 8px 0 0; padding: 8px 0; border-radius: 8px; background: var(--card); font: 12px/1.55 var(--mono); overflow-x: auto; }
.ec-code .ln { display: flex; white-space: pre; padding: 0 12px 0 0; }
.ec-code .ln .n { width: 3.6em; flex: none; text-align: right; padding-right: 12px; color: var(--text-3); user-select: none; -webkit-user-select: none; }
.ec-code .ln.hit { background: var(--danger-soft); }
.ec-code .ln.hit .n { color: var(--danger); }
.ec-code .caret { color: var(--danger); }
.ec-hint { margin-top: 6px; font-size: 12px; color: var(--text-2); }
.ec-hint::before { content: "hint "; color: var(--accent-ink); font-weight: 600; }
.ec-more { margin-top: 10px; color: var(--text-3); font-size: 12px; }
.card-btn { height: 24px; padding: 0 8px; border: 0; border-radius: 6px; background: var(--card); color: var(--text-2); font-size: 12px; cursor: default; }
.card-btn:hover { background: var(--hover); color: var(--text); }
#back-chip {
left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 9px; border: 0;
border-radius: 15px; color: var(--text); font-size: 12.5px; cursor: default; animation: pop .14s ease-out;
}
#back-chip:hover { color: var(--accent-ink); }
#link-status {
position: absolute; z-index: 16; left: 0; bottom: 0; max-width: min(70%, 520px); padding: 4px 10px; border-top-right-radius: 8px;
background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 0 0 .5px var(--divider);
color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
#back-chip:not([hidden]) ~ #link-status { left: 0; }
#toasts { position: absolute; z-index: 18; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100% - 28px); }
.toast {
display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 6px 6px 14px; border-radius: 18px; pointer-events: auto;
background: var(--glass); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6); box-shadow: var(--float-shadow);
font-size: 12.5px; color: var(--text); animation: rise .2s ease-out; max-width: 100%;
}
.toast.no-action { padding-right: 14px; }
.toast .t-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.toast .t-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast .t-sub { color: var(--text-3); }
.toast button { height: 26px; padding: 0 11px; border: 0; border-radius: 13px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; cursor: default; flex: none; }
.toast button:hover { filter: brightness(1.08); }
.toast.leaving { animation: sink .2s ease-in forwards; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
@keyframes sink { to { transform: translateY(8px); opacity: 0; } }
/* ---------- empty state ---------- */
#empty { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 24px; background: var(--canvas); overflow: auto; }
.empty-inner { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 420px; }
.empty-art { position: relative; width: 132px; height: 128px; margin-bottom: 22px; }
.empty-art .sheet {
position: absolute; width: 84px; height: 110px; border-radius: 4px; background: var(--bg); box-shadow: var(--page-shadow);
padding: 14px 12px; display: flex; flex-direction: column; gap: 6px;
}
.empty-art .sheet.back { left: 8px; top: 12px; transform: rotate(-7deg); opacity: .75; }
.empty-art .sheet.front { left: 38px; top: 4px; transform: rotate(4deg); }
.empty-art .bar { height: 5px; border-radius: 3px; background: var(--card); }
.empty-art .bar.h { height: 8px; width: 70%; background: var(--hover); }
.empty-art .bar.s { width: 55%; }
.building .empty-art .bar { background: linear-gradient(90deg, var(--card) 0%, var(--accent-soft) 50%, var(--card) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.empty-title { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.empty-text { margin-top: 6px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.empty-meta { margin-top: 14px; display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border-radius: 13px; background: var(--card); color: var(--text-2); font-size: 12px; }
.empty-meta code { font-family: var(--mono); font-size: 11.5px; }
.empty-tips { margin-top: 22px; display: grid; gap: 6px; text-align: left; width: 100%; }
.empty-tips div { display: flex; gap: 10px; align-items: baseline; color: var(--text-2); font-size: 12.5px; }
.empty-tips kbd { min-width: 64px; }
.empty-error { width: min(600px, 100%); text-align: left; }
.empty-error .ec-card { padding: 14px 16px; border-radius: 12px; background: var(--bg); box-shadow: var(--float-shadow); }
kbd {
display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 5px; background: var(--card); box-shadow: inset 0 -1px 0 var(--divider), 0 0 0 .5px var(--divider);
font: 11.5px/18px -apple-system, system-ui, sans-serif; color: var(--text-2); text-align: center; white-space: nowrap;
}
/* ---------- menu, tooltip, help ---------- */
#menu {
position: fixed; z-index: 40; min-width: 210px; max-width: min(340px, calc(100vw - 16px)); max-height: calc(100vh - 60px); overflow: auto; padding: 5px;
border-radius: 10px; background: var(--glass); backdrop-filter: blur(22px) saturate(1.7); -webkit-backdrop-filter: blur(22px) saturate(1.7); box-shadow: var(--float-shadow);
animation: pop .12s ease-out; user-select: none; -webkit-user-select: none;
}
.mi {
display: flex; align-items: center; gap: 8px; width: 100%; height: 28px; padding: 0 8px 0 6px; border: 0; border-radius: 6px; background: transparent;
color: var(--text); font-size: 13px; text-align: left; cursor: default; white-space: nowrap;
}
.mi .check { width: 16px; display: grid; place-items: center; color: var(--accent-ink); flex: none; }
.mi .mi-icon { width: 16px; display: grid; place-items: center; color: var(--text-2); flex: none; }
.mi .mi-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mi .mi-sub { color: var(--text-3); font-size: 11.5px; }
.mi .mi-key { color: var(--text-3); font-size: 12px; margin-left: 16px; }
.mi:hover, .mi.active { background: var(--accent); color: #fff; }
.mi:hover .mi-key, .mi.active .mi-key, .mi:hover .mi-sub, .mi.active .mi-sub, .mi:hover .check, .mi.active .check, .mi:hover .mi-icon, .mi.active .mi-icon { color: rgba(255, 255, 255, .85); }
.mi:disabled { opacity: .4; background: transparent; color: var(--text); }
.mi.tall { height: auto; min-height: 36px; padding-block: 4px; }
.mi.tall .mi-label { display: flex; flex-direction: column; }
.m-sep { height: 1px; margin: 5px 8px; background: var(--divider); }
.m-head { padding: 6px 8px 3px 30px; color: var(--text-3); font-size: 11px; font-weight: 600; letter-spacing: .02em; }
#tooltip {
position: fixed; z-index: 50; padding: 4px 8px; border-radius: 6px; background: #1f1f1f; color: #f5f5f5; font-size: 11.5px; pointer-events: none;
white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); display: flex; gap: 8px; align-items: center;
}
#tooltip .k { color: #a8a8a2; }
#help { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .28); animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
.help-card { width: min(640px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 14px; background: var(--bg); box-shadow: var(--float-shadow); padding: 6px 20px 18px; animation: pop .16s ease-out; }
.help-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--bg); padding: 12px 0 8px; }
.help-head h2 { margin: 0; font-size: 15px; font-weight: 650; }
#help-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 4px 28px; }
.hk-group h3 { margin: 12px 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.hk { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0; font-size: 12.5px; border-bottom: 1px solid var(--divider); }
.hk:last-child { border-bottom: 0; }
.hk .keys { display: flex; gap: 3px; flex: none; }
/* ---------- review: an exact draft, with notes beside the native PDF pages ---------- */
.review-button {
border: 1px solid var(--guide); border-radius: 6px; padding: 6px 9px;
background: var(--bg); color: var(--text); font-size: 12px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.review-button:hover { background: var(--hover); }
.review-button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.review-button:disabled { opacity: .4; cursor: default; }
.review-button[aria-pressed="true"] { border-color: var(--accent-ring); background: var(--accent-soft); color: var(--accent-ink); }
#btn-review { padding: 4px 8px; margin-right: 5px; }
#btn-review.held::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: var(--accent); vertical-align: 2px; }
#review-panel {
flex: none; width: 340px; padding: 18px; overflow: auto; overscroll-behavior: contain;
border-left: 1px solid var(--divider); background: var(--panel); line-height: 1.5;
}
.review-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.review-heading strong { font-size: 14px; letter-spacing: -.2px; }
.review-heading.shelf { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--guide); }
.review-intro { color: var(--text-2); font-size: 12px; }
#review-status { font-size: 12px; line-height: 1.5; margin: 14px 0; }
#review-status.error { color: var(--danger); }
#review-title, #review-text, #review-kind {
width: 100%; border: 1px solid var(--guide); border-radius: 6px; padding: 8px 9px;
background: var(--bg); color: var(--text); font: inherit;
}
#review-title { font-weight: 600; margin: 0 0 10px; }
#review-text { resize: vertical; min-height: 88px; margin: 8px 0; line-height: 1.5; }
#review-kind { width: auto; }
#review-panel :is(textarea, select, a):focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
.review-row, .review-save { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 9px 0; }
.review-save { margin-top: 16px; }
#review-pending { font-size: 12px; padding: 9px 10px; color: var(--accent-ink); background: var(--accent-soft); border-radius: 6px; }
#review-composer { padding: 12px; margin: 12px 0; border: 1px solid var(--accent-ring); background: var(--bg); border-radius: 8px; }
#review-anchor { font-size: 12px; color: var(--text-2); margin: 0 0 10px; overflow-wrap: anywhere; }
.review-note { border: 1px solid var(--guide); border-left: 3px solid #d19b32; border-radius: 7px; padding: 12px; margin-top: 12px; background: var(--bg); }
.review-note.keep { border-left-color: #39a37b; }
.review-note.question { border-left-color: #688cdd; }
.review-note.selected { box-shadow: 0 0 0 1px var(--accent-ring); }
.review-note p { margin: 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-note blockquote { margin: 8px 0; padding: 0 0 0 9px; border-left: 2px solid var(--guide); color: var(--text-2); font-size: 12px; overflow-wrap: anywhere; }
.review-jump { border: 0; padding: 0; background: transparent; font-weight: 600; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.review-jump:hover { color: var(--accent-ink); }
.review-note .review-row { margin: 10px 0 0; }
.review-note .review-button { border-color: transparent; padding: 2px 5px; font-size: 11px; color: var(--text-2); }
.review-saved { padding: 13px 0; border-bottom: 1px solid var(--divider); }
.review-saved p { margin: 4px 0; font-size: 11px; color: var(--text-2); overflow-wrap: anywhere; }
#review-panel a { color: var(--accent-ink); font-size: 12px; }
#review-saved-path { font: 10px/1.6 var(--mono); color: var(--text-3); overflow-wrap: anywhere; }
.review-marks, .review-pick-layer { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.review-highlight { position: absolute; background: #f8c45d40; border: 1px solid #c2862680; pointer-events: none; }
.review-highlight.keep { background: #5ed3a130; border-color: #25885c80; }
.review-highlight.question { background: #85a5f030; border-color: #3469ce80; }
.review-highlight.selected { outline: 1px solid #315eaa; outline-offset: 1px; }
.review-pin { position: absolute; width: 21px; height: 21px; border: 1px solid #fff; border-radius: 50%; background: #986312; color: #fff; font-size: 11px; line-height: 19px; padding: 0; text-align: center; pointer-events: auto; cursor: pointer; box-shadow: 0 1px 4px #0003; transform: translate(-50%, -50%); }
.review-pin.keep { background: #237553; }
.review-pin.question { background: #315eaa; }
.review-pick-layer { pointer-events: auto; cursor: crosshair; touch-action: none; z-index: 7; }
@media (max-width: 760px) {
#app.review-open #main { flex-direction: column; }
#app.review-open #stage { min-height: 150px; }
#review-panel { width: 100%; flex-basis: 48%; max-height: 55%; padding: 13px 16px; border-left: 0; border-top: 1px solid var(--guide); }
#review-panel .review-heading.shelf { margin-top: 18px; }
#review-panel .review-intro { margin: 7px 0; }
}
@container tb (max-width: 360px) { #btn-find { display: none; } }
@media (max-width: 700px) {
#toolbar { display: flex; gap: 4px; }
.tb-left { flex: 1; }
.tb-center, .tb-right { flex: none; }
}
/* ---------- presenting ---------- */
#app.presenting #toolbar, #app.presenting #sidebar, #app.presenting #sidebar-scrim, #app.presenting #findbar, #app.presenting #error-card, #app.presenting #back-chip, #app.presenting #review-panel { display: none !important; }
#app.presenting #stage, #app.presenting .viewerContainer { background: #000; }
#app.presenting .viewerContainer { overflow: hidden; }
#app.presenting .pdfViewer { padding: 0; min-height: 100%; display: flex; align-items: center; justify-content: center; }
#app.presenting .pdfViewer.removePageBorders .page { margin: 0 auto; box-shadow: none; }
#app.presenting .textLayer { user-select: none; -webkit-user-select: none; }
#app.presenting.hud-hidden .viewerContainer { cursor: none; }
#present-hud {
position: absolute; z-index: 30; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; height: 40px; padding: 0 6px;
border-radius: 20px; background: rgba(30, 30, 30, .82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: #f5f5f5;
transition: opacity .3s ease; font-variant-numeric: tabular-nums; font-size: 13px;
}
#present-hud .icon-btn { color: #d0d0cc; border-radius: 16px; width: 30px; height: 30px; }
#present-hud .icon-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
#hud-page { min-width: 64px; text-align: center; }
.hud-sep { width: 1px; height: 18px; background: rgba(255, 255, 255, .18); margin: 0 2px; }
#app.hud-hidden #present-hud { opacity: 0; pointer-events: none; }
#app:not(.presenting) #present-hud { display: none; }
#app.booting #toolbar > * { visibility: hidden; }
#app.no-doc #page-nav, #app.no-doc .zoom-group, #app.no-doc #btn-find, #app.no-doc #btn-present, #app.no-doc #btn-sidebar, #app.no-doc #build-pill { display: none; }
.empty-foot { margin-top: 12px; color: var(--text-3); font-size: 12px; text-align: center; }
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}