:root {
	color-scheme: light dark;
	--primary: light-dark(#0067b8, #75b6ff);
	--surface: light-dark(#fff, #202020);
	--text: light-dark(#202020, #f2f2f2);
	--muted: light-dark(#616161, #b5b5b5);
	--border: light-dark(#d1d1d1, #505050);
	--wash: light-dark(#f5f6f7, #292929);
	font: 14px/1.5 "Segoe UI", sans-serif;
	color: var(--text);
	background: var(--surface);
	letter-spacing: 0;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
header {
	min-height: 56px;
	padding: 10px 24px;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px 20px;
	border-bottom: 1px solid var(--border);
	background: var(--wash);
}
header strong { font-size: 18px; }
#enterprise { color: var(--muted); overflow-wrap: anywhere; }
#identity { margin-left: auto; }
main { margin: auto; padding: 24px; }
.heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 16px; }
h1 { margin: 0 0 20px; font-size: 24px; font-weight: 600; }
#organization { color: var(--muted); }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
fieldset { display: flex; flex-wrap: wrap; gap: 16px; border: 0; margin: 0; padding: 0; }
fieldset label { padding: 8px 0; cursor: pointer; }
input { accent-color: var(--primary); caret-color: var(--primary); }
button {
	font: inherit;
	min-height: 36px;
	border: 1px solid var(--border);
	border-radius: 3px;
	padding: 6px 12px;
	color: var(--text);
	background: var(--surface);
	cursor: pointer;
}
button:hover:enabled { background: var(--wash); border-color: var(--primary); }
button:disabled { opacity: .55; cursor: default; }
#sign-in { background: var(--primary); color: light-dark(#fff, #151515); border-color: var(--primary); }
#sign-in:hover:enabled { background: var(--primary); filter: brightness(.9); }
#refresh { min-height: 36px; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
::selection { color: var(--surface); background: var(--primary); }
a { color: var(--primary); text-underline-offset: 3px; overflow-wrap: anywhere; }
#status { min-height: 24px; color: var(--muted); overflow-wrap: anywhere; }
#status[data-error="true"] { color: light-dark(#b10e1e, #ff9aa4); }
.table-scroll { overflow-x: auto; scrollbar-color: var(--border) var(--surface); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { font-weight: 600; color: var(--muted); background: var(--wash); }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
td:first-child { width: 52%; min-width: 200px; }
td { overflow-wrap: anywhere; }
time { white-space: nowrap; font-variant-numeric: tabular-nums; }
#load-more { margin-top: 20px; }
.muted { color: var(--muted); }
.review-navigation { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.pr-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
#pr-title { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.copy-pr { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; min-height: 32px; padding: 6px; }
.copy-pr .copy-done, .copy-pr[data-copied="true"] .copy-outline { display: none; }
.copy-pr[data-copied="true"] .copy-done { display: block; }
#pr-meta { margin: 0 0 16px; overflow-wrap: anywhere; }
#pr-description { margin-bottom: 16px; }
#pr-description summary { cursor: pointer; }
#pr-body { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; max-height: 240px; overflow: auto; }
.review-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.review-actions { display: flex; align-items: center; gap: 12px; flex: 0 1 400px; min-width: 0; height: 36px; margin-left: auto; }
#refresh-review, #retry-progress { flex-shrink: 0; }
#review-status { color: var(--muted); min-height: 24px; overflow-wrap: anywhere; }
#review-status:empty { display: none; }
#review-status[data-error="true"] { color: light-dark(#b10e1e, #ff9aa4); }
.review-progress { display: flex; align-items: center; flex: 0 1 320px; min-width: 0; min-height: 36px; gap: 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
#viewed-count { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#viewed-progress { width: 80px; height: 8px; accent-color: var(--primary); }
.progress-feedback { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex: 1; min-width: 0; height: 36px; }
#progress-status { margin: 0; min-width: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#progress-status[data-error="true"] { color: light-dark(#b10e1e, #ff9aa4); }
.viewed-label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12px; }
.file-row { display: flex; align-items: center; min-width: 0; }
.file-row .file-entry { flex: 1; min-width: 0; width: auto; }
.viewed-checkbox, #file-viewed { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--primary); cursor: pointer; }
#file-viewed { margin: 0; }
.viewed-checkbox { margin: 6px; vertical-align: middle; }
.viewed-checkbox:disabled, #file-viewed:disabled { cursor: default; }
.folder-count { margin-left: 6px; font-size: 11px; font-variant-numeric: tabular-nums; color: var(--muted); }
.file-row[data-viewed="true"] .file-entry > span:first-child { color: var(--muted); }
.notice { padding: 10px 12px; background: var(--wash); border: 1px solid var(--border); overflow-wrap: anywhere; }
.review-workspace { display: grid; grid-template-columns: minmax(200px, 340px) minmax(0, 1fr); border-top: 1px solid var(--border); }
.file-sidebar { padding: 16px 16px 16px 0; border-right: 1px solid var(--border); min-width: 0; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }
#file-filter { width: 100%; margin: 12px 0; min-height: 36px; border: 1px solid var(--border); border-radius: 3px; padding: 6px 8px; font: inherit; color: var(--text); background: var(--surface); }
#file-tree { max-height: calc(100dvh - 360px); min-height: 200px; overflow: auto; scrollbar-gutter: stable; scrollbar-color: var(--border) var(--surface); }
#file-tree ul { list-style: none; margin: 0; padding-left: 20px; }
#file-tree details > ul { border-left: 1px solid var(--border); }
#file-tree > ul { padding-left: 0; min-width: 100%; width: max-content; }
#file-tree summary { cursor: pointer; padding: 5px 0; white-space: nowrap; overflow-wrap: normal; }
.file-entry { width: 100%; min-height: 32px; border: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 5px 8px; text-align: left; white-space: nowrap; }
.file-entry > span:first-child { overflow-wrap: normal; min-width: 0; }
.file-entry[aria-current="true"] { background: var(--wash); color: var(--primary); outline: 1px solid var(--border); outline-offset: -1px; }
.file-change { font: 12px Consolas, monospace; color: var(--muted); flex-shrink: 0; }
.file-change[data-kind="added"] { color: light-dark(#107c41, #70cf97); }
.file-change[data-kind="removed"] { color: light-dark(#b10e1e, #ff9aa4); }
.file-change[data-kind="renamed"] { color: var(--primary); }
.diff-pane { min-width: 0; padding: 16px 0 16px 20px; }
.file-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; }
#file-path { overflow-wrap: anywhere; min-width: 0; flex: 1 1 240px; }
#github-file { font-size: 12px; flex-shrink: 0; }
#file-meta { font-size: 12px; overflow-wrap: anywhere; }
#diff-content { position: relative; overflow-x: scroll; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; max-width: 100%; scrollbar-color: var(--border) var(--surface); }
#diff-content:has(.d2h-file-side-diff) { overflow-x: hidden; }
#split-scroll { flex: 0 0 18px; height: 18px; overflow-x: scroll; overflow-y: hidden; scrollbar-color: var(--border) var(--surface); }
#split-scroll > div { height: 1px; }
#diff-content > pre { font: 13px/1.6 "Cascadia Code", Consolas, monospace; margin: 0; }
.review-workspace.files-collapsed { grid-template-columns: minmax(0, 1fr); }
.files-collapsed .file-sidebar { display: none; }
.files-collapsed .diff-pane { padding-left: 0; }
#diff-content .d2h-wrapper { color: var(--text); margin: 0; }
#diff-content .d2h-file-wrapper { border-color: var(--border); border-radius: 0; margin-bottom: 0; min-width: 100%; width: max-content; }
#diff-content .d2h-file-diff { overflow: visible; }
#diff-content .d2h-file-wrapper:has(.d2h-file-side-diff) { width: 100%; }
#diff-content .d2h-files-diff:has(.d2h-file-side-diff) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
#diff-content .d2h-file-side-diff { position: relative; float: none; min-width: 0; width: auto; overflow: hidden; }
#diff-content .d2h-file-header { display: none; }
#diff-content .d2h-diff-table { font: 13px/1.6 "Cascadia Code", Consolas, monospace; margin: 0; width: 100%; }
#diff-content td { padding: 0; overflow-wrap: normal; border-color: var(--border); }
#diff-content td:first-child { min-width: 0; width: auto; }
#diff-content .d2h-code-line, #diff-content .d2h-code-side-line { padding-right: 16px; }
#diff-content .d2h-code-linenumber, #diff-content .d2h-code-side-linenumber { background: var(--wash); color: var(--muted); }
#diff-content .d2h-cntx, #diff-content .d2h-emptyplaceholder, #diff-content .d2h-code-side-emptyplaceholder { background: var(--surface); color: var(--text); }
#diff-content .d2h-info { background: var(--wash); color: var(--muted); }
#diff-content .d2h-del { background: light-dark(#ffebe9, #4a2225); color: var(--text); }
#diff-content .d2h-ins { background: light-dark(#dafbe1, #183d2a); color: var(--text); }
#diff-content .d2h-code-line del, #diff-content .d2h-code-side-line del { background: light-dark(#ffc1bc, #793c42); }
#diff-content .d2h-code-line ins, #diff-content .d2h-code-side-line ins { background: light-dark(#aceebb, #286542); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.review-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.review-tabs button { border: 0; border-radius: 0; padding: 8px 4px; background: none; border-bottom: 2px solid transparent; }
.review-tabs button[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
#overview-panel { flex: 1; min-height: 0; overflow: auto; scrollbar-gutter: stable; scrollbar-color: var(--border) var(--surface); }
.discussion-toolbar { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
#discussion-status { margin: 0; flex: 1; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
#discussion-status[data-error="true"] { color: light-dark(#b10e1e, #ff9aa4); }
#activity-list { max-width: 1200px; }
.activity-event, .discussion-comment { padding: 16px 0; border-bottom: 1px solid var(--border); }
.comment-author { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; font-size: 12px; }
.comment-author a { margin-left: auto; }
.avatar { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.comment-body { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.6 "Segoe UI", sans-serif; }
.comment-body.rendered-markdown { white-space: normal; }
.comment-body > :first-child { margin-top: 0; }
.comment-body > :last-child { margin-bottom: 0; }
.comment-body pre { max-width: 100%; overflow: auto; padding: 8px; background: var(--surface); font: 12px/1.5 "Cascadia Code", Consolas, monospace; }
.comment-body code { font: 12px/1.5 "Cascadia Code", Consolas, monospace; background: var(--surface); }
.comment-body table { display: block; overflow: auto; }
.comment-body blockquote { margin-left: 0; padding-left: 12px; border-left: 1px solid var(--border); color: var(--muted); }
.comment-composer { padding: 12px 0; min-width: 0; }
.comment-composer textarea { display: block; width: 100%; min-height: 64px; max-height: 40dvh; resize: vertical; font: 14px/1.5 "Segoe UI", sans-serif; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 3px; padding: 8px 12px; caret-color: var(--primary); }
.comment-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.comment-status { flex: 1 1 160px; min-width: 0; margin: 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.publish-comment { background: var(--primary); color: light-dark(#fff, #151515); border-color: var(--primary); }
.publish-comment:hover:enabled { background: var(--primary); filter: brightness(.9); }
.review-thread { margin: 12px 0; border: 1px solid var(--border); border-radius: 3px; padding: 12px 16px; background: var(--wash); min-width: 0; font: 14px/1.5 "Segoe UI", sans-serif; color: var(--text); }
.review-thread > summary { cursor: pointer; overflow-wrap: anywhere; color: var(--muted); }
.review-thread .discussion-comment { padding: 12px 0; }
.review-thread > .comment-composer:last-child { padding-bottom: 0; }
.review-thread > .discussion-comment:first-child { padding-top: 0; }
.comment-author > .thread-heading { margin-left: auto; min-width: 0; }
.comment-author:has(> .thread-heading) > a { margin-left: 0; }
.thread-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.thread-heading > button:first-child { text-align: left; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.thread-state { font-size: 12px; color: var(--muted); margin-left: auto; }
.thread-context { margin: 12px 0 0; max-height: 180px; overflow: auto; white-space: pre; font: 12px/1.5 "Cascadia Code", Consolas, monospace; background: var(--surface); padding: 8px; }
.commit-message { margin: 4px 0; overflow-wrap: anywhere; white-space: pre-wrap; }
#file-discussions { max-height: 35dvh; overflow: auto; flex-shrink: 1; }
.detached-thread > summary { cursor: pointer; font-size: 12px; padding: 4px 0; }
#diff-content .line-anchor { font: inherit; color: inherit; min-height: 0; padding: 0 2px; border: 0; border-radius: 0; background: none; cursor: crosshair; }
#diff-content .line-anchor:hover, #diff-content .line-anchor.selected-line { background: var(--primary); color: var(--surface); }
#diff-content .discussion-cell { padding: 0; overflow: visible; white-space: normal; }
.discussion-slot { position: sticky; left: 0; width: 100%; min-width: 0; }
.discussion-stack { display: flow-root; padding: 0 8px; min-width: 0; }
.discussion-stack:empty { padding: 0; }
.discussion-stack .review-thread { margin: 8px 0; }
.discussion-stack .comment-author time { white-space: normal; }
@media (min-width: 761px) {
	body:has(#review-view:not([hidden])) { height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr); }
	body:has(#review-view:not([hidden])) main { min-height: 0; margin: 0; overflow: auto; }
	#review-view:not([hidden]) { display: flex; flex-direction: column; height: 100%; }
	#review-view > * { flex-shrink: 0; }
	#pr-description { flex-shrink: 1; min-height: 24px; max-height: 25dvh; overflow: auto; }
	#pr-body { max-height: none; }
	.review-workspace { flex: 1; min-height: 0; overflow: hidden; }
	.file-sidebar { display: flex; flex-direction: column; min-height: 0; }
	#file-filter { flex-shrink: 0; }
	#file-tree { flex: 1; min-height: 0; max-height: none; }
	.diff-pane { display: flex; flex-direction: column; min-height: 0; }
	.diff-pane > :not(#diff-content) { flex-shrink: 0; }
	#diff-content { flex: 1; min-height: 0; position: relative; }
}
@media (min-width: 1200px) {
	body:has(#review-view:not([hidden])) main { padding-top: 16px; padding-bottom: 12px; }
	.review-navigation { margin-bottom: 12px; }
	#pr-meta, #pr-description { margin-bottom: 8px; }
	#review-status { margin-top: 8px; margin-bottom: 8px; }
	.file-sidebar { padding-top: 12px; padding-bottom: 0; }
	#file-filter { margin-top: 8px; margin-bottom: 8px; }
	.diff-pane { padding-top: 12px; padding-bottom: 0; }
}
@media (max-width: 760px) {
	.review-workspace { grid-template-columns: minmax(0, 1fr); }
	.file-sidebar { border-right: 0; border-bottom: 1px solid var(--border); padding-right: 0; }
	#file-tree { max-height: 240px; min-height: 0; }
	.diff-pane { padding-left: 0; }
	#diff-content { max-height: 70dvh; }
	#review-view .review-toolbar { gap: 8px 16px; }
}
@media (max-width: 600px) {
	header { padding: 12px 16px; gap: 10px; }
	#enterprise { flex-basis: 100%; order: 2; }
	main { padding: 20px 16px; }
	fieldset { gap: 10px; }
	th, td { padding: 10px; }
	#queue-view th:nth-child(4), #queue-view td:nth-child(4) { display: none; }
}
