vjuu 0.4.0

Fast review window for AI-agent handoffs: markdown, diffs and code with inline comments.
/* Embedded in the exe rather than fetched, so opening stays instant and works offline. */
@font-face { font-family: "Inter"; src: url("vendor/inter.woff2") format("woff2"); font-weight: 100 900; }
@font-face { font-family: "JetBrains Mono"; src: url("vendor/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; }

/* The colours come from a theme (themes/*.css, compiled into theme.css by vjuu); these are what every theme shares.
   diff2html is always drawn in its light scheme and recoloured through its --d2h-* variables. */
:root {
  /* vjuu's brand colour (Monokai green): window border and logo. src/main.rs sets the border to the same value. */
  --brand: #a6e22e;
  --brand-fg: #272822;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
}
/* Ligatures turn -> and == into glyphs; a review must show the source as written. */
code, pre, .d2h-wrapper { font-variant-ligatures: none; }

.hljs-keyword, .hljs-selector-tag, .hljs-doctag { color: var(--hl-keyword); }
.hljs-string, .hljs-regexp, .hljs-char { color: var(--hl-string); }
.hljs-comment, .hljs-quote { color: var(--hl-comment); font-style: italic; }
.hljs-number, .hljs-literal, .hljs-symbol, .hljs-bullet { color: var(--hl-number); }
.hljs-title, .hljs-section, .hljs-selector-id, .hljs-selector-class, .hljs-addition { color: var(--hl-title); }
.hljs-built_in, .hljs-type, .hljs-title.class_ { color: var(--hl-type); }
.hljs-attr, .hljs-attribute, .hljs-property, .hljs-name, .hljs-tag { color: var(--hl-attr); }
.hljs-params, .hljs-variable, .hljs-template-variable { color: var(--hl-param); }
.hljs-meta { color: var(--hl-meta); }
.hljs-deletion { color: var(--hl-keyword); }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }
.d2h-wrapper, .d2h-code-line, .d2h-code-side-line { color: var(--fg); }
.d2h-info { color: var(--muted); }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  /* Title bar on top, a scrolling content area below it, like Windows Terminal. */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.55 var(--sans);
}
button, select {
  font: inherit;
  color: inherit;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 10px;
  cursor: pointer;
}

#titlebar {
  flex: none;
  height: 40px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding-left: 14px;
  background: var(--chrome);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  user-select: none;
}
#brand { height: 22px; width: 22px; flex: none; }
#titlebar select, #titlebar > button { padding: 1px 10px; }
#settings-open { font-size: 15px; line-height: 1; padding: 3px 7px; }
/* Without our own window controls on macOS and Linux, the gear is the last thing in the bar. */
.native-frame #settings-open { margin-right: 10px; }
#settings { max-width: 460px; padding: 20px 24px; color: var(--fg); background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px; }
#settings::backdrop { background: rgb(0 0 0 / 35%); }
#settings h2 { margin: 0 0 4px; font-size: 18px; }
#settings p { margin: 0 0 14px; color: var(--muted); }
#settings label { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; margin-bottom: 12px; cursor: pointer; }
#settings label span { grid-column: 2; color: var(--muted); }
#settings input { grid-row: span 2; margin-top: 4px; accent-color: var(--accent); }
#settings .cli { margin: 16px 0 0; font-size: 13px; }
#settings label.theme { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 16px; }
#settings-apply { float: right; margin-top: -26px; padding: 4px 18px; background: var(--accent); border-color: var(--accent);
  color: var(--accent-fg); font-weight: 700; }
#window-controls { display: flex; align-self: stretch; margin-left: 4px; }
#window-controls button {
  width: 46px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  font: 10px "Segoe Fluent Icons", "Segoe MDL2 Assets";
  cursor: default;
}
#window-controls button:hover { background: rgba(128, 128, 128, 0.2); }
#window-controls #close:hover { background: #c42b1c; color: #fff; }
#scroll { flex: 1; overflow: auto; position: relative; }

/* Resize handles along the window edges; hidden when maximised. */
.edge { position: fixed; z-index: 50; }
.edge[data-dir="n"] { top: 0; left: 8px; right: 8px; height: 4px; cursor: ns-resize; }
.edge[data-dir="s"] { bottom: 0; left: 8px; right: 8px; height: 4px; cursor: ns-resize; }
.edge[data-dir="e"] { right: 0; top: 8px; bottom: 8px; width: 4px; cursor: ew-resize; }
.edge[data-dir="w"] { left: 0; top: 8px; bottom: 8px; width: 4px; cursor: ew-resize; }
.edge[data-dir="ne"] { top: 0; right: 0; width: 8px; height: 8px; cursor: nesw-resize; }
.edge[data-dir="sw"] { bottom: 0; left: 0; width: 8px; height: 8px; cursor: nesw-resize; }
.edge[data-dir="nw"] { top: 0; left: 0; width: 8px; height: 8px; cursor: nwse-resize; }
.edge[data-dir="se"] { bottom: 0; right: 0; width: 8px; height: 8px; cursor: nwse-resize; }
body.maximized .edge { display: none; }
#session { flex: none; max-width: 30%; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#session:empty { display: none; }
#context { flex: none; max-width: 30%; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#context:empty { display: none; }
#name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#count { color: var(--fg); font-weight: 600; }
#statusbar {
  flex: none;
  height: 48px;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 14px;
  background: var(--chrome);
  border-top: 1px solid var(--border);
  font-size: 13px;
}
#hint { color: var(--muted); }
/* The theme's accent, not the brand green, so the main action matches the rest of the theme. */
#done { margin-left: auto; padding: 5px 22px; background: var(--accent); border-color: var(--accent); color: var(--accent-fg); font-weight: 700; }
#done:hover { filter: brightness(1.08); }
/* Keycaps, in buttons and the help. */
kbd { display: inline-block; min-width: 1.6em; padding: 0 5px; border: 1px solid currentColor; border-bottom-width: 2px;
  border-radius: 4px; font-family: inherit; font-size: 11px; line-height: 1.5; font-weight: 600; text-align: center; opacity: 0.75; }
button kbd { margin-left: 3px; }
button kbd:first-of-type { margin-left: 8px; }
#help { max-width: 560px; padding: 20px 24px; color: var(--fg); background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px; }
#help::backdrop { background: rgb(0 0 0 / 35%); }
#help h2 { display: flex; gap: 10px; align-items: center; margin: 0 0 14px; font-size: 18px; }
#version { color: var(--muted); font-weight: 400; font-size: 14px; }
#help td { padding: 4px 16px 4px 0; vertical-align: top; }
#help td:first-child { white-space: nowrap; }

main { padding: 24px 24px 24px 48px; }
/* Rendered markdown documents. Always `article.markdown`: diff2html puts a `markdown` class on highlighted lines of .md files. */
article.markdown { max-width: 860px; font-size: 16px; line-height: 1.7; }
article.markdown > :first-child { margin-top: 0; }
article.markdown p, article.markdown ul, article.markdown ol, article.markdown blockquote, article.markdown pre, article.markdown table { margin: 0 0 1em; }
article.markdown h1, article.markdown h2, article.markdown h3, article.markdown h4 { margin: 1.6em 0 0.6em; line-height: 1.25; font-weight: 700; letter-spacing: -0.015em; }
article.markdown h1 { font-size: 2em; color: var(--heading); padding-bottom: 0.3em; border-bottom: 1px solid var(--border); }
article.markdown h2 { font-size: 1.45em; color: var(--heading); padding-bottom: 0.25em; border-bottom: 1px solid var(--border); }
article.markdown h3 { font-size: 1.2em; color: var(--heading-3); }
article.markdown h4 { font-size: 1em; color: var(--heading-3); }
article.markdown ul, article.markdown ol { padding-left: 1.6em; }
article.markdown li + li, article.markdown li > ul, article.markdown li > ol { margin-top: 0.25em; }
article.markdown li::marker { color: var(--muted); }
article.markdown strong { font-weight: 650; }
article.markdown a { text-underline-offset: 2px; }
article.markdown pre, article.markdown code { background: var(--code-bg); border-radius: 6px; font-family: var(--mono); font-size: 13.5px; }
article.markdown pre { padding: 14px 16px; overflow-x: auto; line-height: 1.55; border: 1px solid var(--border); }
article.markdown code { padding: 2px 5px; color: var(--inline-code); }
article.markdown pre code { padding: 0; color: var(--fg); background: none; border: 0; }
article.markdown table { border-collapse: collapse; display: block; overflow-x: auto; }
article.markdown th, article.markdown td { border: 1px solid var(--border); padding: 6px 12px; }
article.markdown th { background: var(--code-bg); font-weight: 600; text-align: left; }
article.markdown tr:nth-child(2n) td { background: color-mix(in srgb, var(--code-bg) 60%, transparent); }
article.markdown img { max-width: 100%; border-radius: 6px; }
article.markdown hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
article.markdown blockquote { padding: 0.6em 1em; border-left: 4px solid var(--accent); background: var(--code-bg); border-radius: 0 6px 6px 0; color: var(--muted); }
article.markdown blockquote > :last-child { margin-bottom: 0; }
article.markdown h1, article.markdown h2, article.markdown h3 { scroll-margin-top: 8px; }
/* ```choice blocks: each option a button; the picked one in the pick colour. */
article.markdown .choice { margin: 0 0 1em; display: flex; flex-direction: column; gap: 8px; max-width: 640px; counter-reset: option; }
article.markdown .choice .question { margin: 0; font-weight: 600; }
article.markdown .choice button { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px 10px 42px; border-radius: 8px; background: var(--bg); text-align: left; counter-increment: option; }
/* The digit that picks it; generated content, so it stays out of the button's text. */
article.markdown .choice button::before { content: counter(option); position: absolute; left: 12px; top: 11px; min-width: 18px; border: 1px solid var(--border); border-radius: 4px; color: var(--muted); font: 12px/18px var(--mono); text-align: center; }
article.markdown .choice button:nth-of-type(n + 10)::before { content: none; }
article.markdown .choice button:hover { border-color: var(--accent); }
article.markdown .choice button span { color: var(--muted); font-size: 14px; }
article.markdown .choice button.picked { border-color: var(--pick); background: var(--pick-bg); box-shadow: inset 3px 0 var(--pick); }
article.markdown .choice button.picked::before { border-color: var(--pick); color: var(--pick); }
tr.hovered td { background-image: linear-gradient(var(--focus), var(--focus)); }
a { color: var(--accent); }
.d2h-code-line, .d2h-code-side-line, .d2h-code-linenumber, .d2h-code-side-linenumber, .d2h-file-name { font-family: var(--mono); }

.focused { background: var(--focus) !important; outline: 1px solid var(--accent); }
/* Whatever is hovered gets the comment on click. */
.hovered { cursor: pointer; }
.hovered:not(tr) { background: var(--focus); border-radius: 4px; }

.comment {
  margin: 6px 0;
  padding: 8px 10px;
  background: var(--comment-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
  font: 14px/1.5 var(--sans);
  white-space: normal;
}
.comment .text { flex: 1; white-space: pre-wrap; cursor: text; }
.comment textarea { width: 100%; font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 6px; }
tr.vjuu-c td { padding: 0 8px; }
/* A comment row spans the whole table, which long lines make wider than the view: keep the box the visible
   width and pinned to the left, so it wraps instead of scrolling the diff sideways while you type. */
.d2h-file-diff, .d2h-file-side-diff, .code-scroll { container-type: inline-size; }
tr.vjuu-c .comment { position: sticky; left: 8px; box-sizing: border-box; width: calc(100cqw - 16px); }

#overall-box { padding: 0 16px 24px 40px; max-width: 940px; }
#overall-box label { display: block; font-weight: 600; margin-bottom: 4px; }
#overall { width: 100%; font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 8px; }
#orphans { margin-top: 24px; }
/* The last review's comments: read-only, set apart from this review's. */
.comment.earlier { border-style: dashed; background: transparent; color: var(--muted); }
.comment.earlier .text { cursor: default; }
.comment.earlier blockquote { flex-basis: 100%; margin: 0; padding-left: 8px; border-left: 3px solid var(--border); white-space: pre-wrap; }
#earlier { margin-bottom: 24px; }

.doc + .doc { margin-top: 32px; }
.doc-header { font: 600 14px/1.4 var(--mono); padding: 8px 12px; margin-bottom: 8px; background: var(--code-bg); border: 1px solid var(--border); border-radius: 6px; max-width: 900px; }

/* File list for multi-file reviews, like GitLab's and GitHub's. */
#files {
  position: fixed;
  z-index: 20; /* above the scrolling area, which is positioned too */
  top: var(--header-h, 45px);
  bottom: 49px; /* above the status bar */
  left: 0;
  width: 280px;
  overflow-y: auto;
  padding: 8px 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  font-size: 13px;
}
body.with-files main, body.with-files #overall-box { margin-left: 280px; }
#files a { display: flex; gap: 6px; align-items: baseline; padding: 3px 12px; color: var(--fg); text-decoration: none; cursor: pointer; white-space: nowrap; }
#files a:hover { background: var(--focus); }
#files a.active { background: var(--focus); box-shadow: inset 3px 0 var(--accent); }
#files .base { font-weight: 600; }
#files .base { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#files .folder { display: flex; gap: 6px; align-items: center; padding: 3px 12px; color: var(--muted); white-space: nowrap; }
#files .folder .name { overflow: hidden; text-overflow: ellipsis; }
/* Octicons' file-directory-fill (MIT), as a mask so it takes the text colour. */
#files .folder::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
#files .add { color: var(--d2h-ins-label-color); font: 12px var(--mono); }
#files .del { color: var(--d2h-del-label-color); font: 12px var(--mono); }
#files .badge { background: var(--accent); color: var(--accent-fg); border-radius: 8px; padding: 0 6px; font-size: 11px; font-weight: 600; }
.d2h-file-wrapper, .doc { scroll-margin-top: 8px; }
#files a.toc { color: var(--muted); }
#files a.toc.active, #files a.toc:hover { color: var(--fg); }
#files .heading { overflow: hidden; text-overflow: ellipsis; }
#sel-comment {
  position: absolute;
  z-index: 6;
  padding: 3px 12px;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* HTML pages scroll inside their frame, about one screen tall; white like a browser where the page sets no background. */
iframe.html-page { display: block; width: 100%; height: calc(100vh - 200px); min-height: 300px; background: #fff; border: 1px solid var(--border); border-radius: 6px; }

/* Source files: line numbers plus highlighted code. */
.code-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 6px; background: var(--code-bg); }
table.code { border-collapse: collapse; min-width: 100%; font: 13px/1.6 var(--mono); }
table.code td { padding: 0 14px; white-space: pre; vertical-align: top; }
table.code td.code-ln { width: 1%; text-align: right; color: var(--muted); user-select: none; cursor: pointer; border-right: 1px solid var(--border); }
table.code tr.vjuu-c td { white-space: normal; font-family: var(--sans); }

/* Thin, theme-coloured scrollbars instead of the classic Windows ones. */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 45%, transparent); border: 3px solid transparent; border-radius: 6px; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--muted); }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }

/* macOS and Linux: the OS draws the frame and window buttons. */
body.native-frame #window-controls, body.native-frame .edge { display: none; }