:root {
  --ink: #22231f;
  --muted: #6f7068;
  --paper: #f3f0e8;
  --surface: #fbfaf6;
  --line: #d9d5ca;
  --orange: #e4562f;
  --green: #267a68;
  --red-bg: #f8e2db;
  --green-bg: #dceee6;
  --move-bg: #e9e8e3;
  --mono: "SFMono-Regular", "Cascadia Code", Consolas, monospace;
  --sans: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  min-height: 100vh;
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.topbar {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4vw;
  border-bottom: 1px solid rgba(34, 35, 31, .12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: -.03em;
}

.brand-mark {
  display: block;
  width: 34px;
  height: 28px;
  color: #4e5049;
}

.brand-mark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cow-ear { stroke-width: 1.5; stroke-linejoin: round; }
.cow-ear-old { fill: var(--red-bg); stroke: #b85a45; }
.cow-ear-new { fill: var(--green-bg); stroke: var(--green); }
.cow-diff { fill: none; stroke-width: 1.5; stroke-linecap: round; }
.cow-diff-old { stroke: #a74935; }
.cow-diff-new { stroke: var(--green); }
.cow-head { fill: var(--surface); stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.cow-spot { fill: #777a72; }
.cow-eye, .cow-nostril { fill: var(--ink); }
.cow-eye-shine { fill: var(--surface); }
.cow-muzzle { fill: #dfded8; stroke: currentColor; stroke-width: 1.25; }
.cow-smile { fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; }

.pulse-dot, .quiet-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.progress-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(243, 240, 232, .72);
  backdrop-filter: blur(2px);
}
.progress-card {
  width: min(340px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid #c9c5ba;
  border-radius: 3px;
  background: var(--surface);
  box-shadow: 0 12px 36px rgba(55, 50, 39, .16);
}
.progress-heading { display: flex; align-items: center; gap: 10px; }
.progress-heading strong { font-size: 12px; font-weight: 600; }
.progress-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #d4d0c5;
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: progress-spin .8s linear infinite;
}
.progress-track {
  position: relative;
  overflow: hidden;
  height: 3px;
  margin-top: 13px;
  background: #e2ded4;
}
.progress-track i {
  position: absolute;
  width: 42%;
  height: 100%;
  background: var(--orange);
  animation: progress-slide 1.15s ease-in-out infinite;
  will-change: transform;
}
@keyframes progress-spin { to { transform: rotate(360deg); } }
@keyframes progress-slide {
  from { transform: translateX(-110%); }
  to { transform: translateX(340%); }
}

.landing {
  width: min(760px, 92vw);
  margin: 0 auto;
  padding: 56px 0 48px;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 5vw, 46px);
  font-weight: 600;
  letter-spacing: -.05em;
  line-height: 1.1;
}

.lede {
  width: min(620px, 100%);
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.import-card {
  margin-top: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(61, 54, 41, .05);
}

.import-panel { padding: 22px 24px 20px; }
.import-panel label { display: block; margin-bottom: 9px; color: var(--muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.github-import { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }

textarea {
  width: 100%;
  min-height: 175px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 2px;
  outline: none;
  background: #f6f4ed;
  color: var(--ink);
  padding: 16px;
  font: 12px/1.65 var(--mono);
  transition: border-color .15s, box-shadow .15s;
}

textarea:focus, .url-row input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(228, 86, 47, .09);
}

.import-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
}

.file-button {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  color: var(--ink) !important;
  cursor: pointer;
  font: 600 12px var(--sans) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.file-button input { position: absolute; opacity: 0; pointer-events: none; }
.file-button span { color: var(--orange); font-size: 17px; }
.submit-group { display: flex; align-items: center; gap: 22px; }
.text-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }

.primary-button {
  border: 0;
  border-radius: 2px;
  background: var(--ink);
  color: white;
  padding: 12px 18px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: transform .15s, background .15s;
}

.primary-button span { margin-left: 18px; color: #ff8d69; }
.primary-button:hover { transform: translateY(-1px); background: #3b3c36; }
button:disabled { opacity: .5; cursor: wait; }

.url-row { display: flex; gap: 10px; }
.url-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  outline: 0;
  background: #f6f4ed;
  padding: 14px;
  font: 12px var(--mono);
}

.hint { margin: 14px 0 2px; color: var(--muted); font-size: 12px; }
.hint code { font-family: var(--mono); }
.error-message { display: none; padding: 0 24px 18px; color: #a33424; font-size: 12px; }
.error-message.visible { display: block; }

.viewer {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}

.viewer[hidden], .landing[hidden] { display: none; }

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow: auto;
  padding: 26px 18px;
  border-right: 1px solid var(--line);
  background: rgba(246, 244, 237, .72);
}

.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 12px;
  color: var(--muted);
  font: 500 10px var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}

.sidebar-heading b {
  min-width: 21px;
  padding: 3px 6px;
  border-radius: 20px;
  background: #dfdcd3;
  color: var(--ink);
  text-align: center;
}

.file-link {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px;
  border-radius: 3px;
  color: var(--ink);
  text-decoration: none;
  font: 11px var(--mono);
}

.file-link:hover { background: #e9e6dd; }
.file-link i { font-style: normal; font-weight: 600; }
.file-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-added { color: var(--green); }
.status-deleted { color: #b54331; }
.status-renamed { color: #7657c8; }
.status-modified { color: #a77413; }

.move-legend { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.legend-title { display: block; padding: 0 8px 11px; color: var(--muted); font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: .07em; }
.move-link {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.move-link:hover { background: #e9e6dd; }
.move-link i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--move-color); }
.move-link span { min-width: 0; }
.move-link strong, .move-link small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.move-link strong { font: 500 10px var(--mono); }
.move-link small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.empty-moves { margin: 0; padding: 2px 8px; color: var(--muted); font-size: 11px; }

.diff-view { min-width: 0; padding: 30px clamp(20px, 4vw, 64px) 80px; }
.summary-bar { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.back-button { padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; }
.summary-bar h2 { margin: 5px 0 0; font-size: 26px; letter-spacing: -.04em; }
.summary-actions { display: flex; align-items: end; gap: 24px; }
.review-toggle,
.move-collapse-toggle {
  display: flex;
  flex-direction: column;
  align-items: end;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: right;
}
.review-toggle span, .move-collapse-toggle span { font: 500 10px var(--mono); }
.review-toggle b, .move-collapse-toggle b { margin-top: 2px; color: var(--orange); font-size: 9px; font-weight: 600; }
.move-collapse-toggle.is-active b { color: var(--muted); }
.move-collapse-toggle:disabled { opacity: .45; cursor: default; }
.review-toggle.showing-reviewed b { color: var(--muted); }
.review-toggle:disabled { opacity: .45; cursor: default; }
.stats { display: flex; gap: 26px; }
.stat { display: flex; flex-direction: column; text-align: right; }
.stat strong { font: 500 14px var(--mono); }
.stat span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.stat.positive strong { color: var(--green); }
.stat.negative strong { color: #b54331; }
.stat.moved strong { color: var(--orange); }

.explanation {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  background: rgba(251, 250, 246, .62);
  color: var(--muted);
  font-size: 11px;
}

.explanation strong { color: var(--ink); }
.pulse-dot { flex: 0 0 auto; background: var(--orange); box-shadow: 0 0 0 4px rgba(228, 86, 47, .12); }
.quiet-dot { flex: 0 0 auto; background: #a5a69f; }

.diff-stage { position: relative; min-width: 680px; }
.move-preview-space {
  height: 28px;
  background: repeating-linear-gradient(
    135deg,
    transparent,
    transparent 7px,
    rgba(48, 46, 40, .018) 7px,
    rgba(48, 46, 40, .018) 8px
  );
}
.move-preview-space.header-space {
  border-top: 1px solid color-mix(in srgb, var(--move-color) 14%, transparent);
}
.move-preview-space.body-space {
  border-bottom: 1px solid color-mix(in srgb, var(--move-color) 14%, transparent);
}
.move-preview {
  position: absolute;
  z-index: 4;
  box-sizing: border-box;
  pointer-events: auto;
  border: 1px solid color-mix(in srgb, var(--move-color) 58%, #b7b4aa);
  border-left: 3px solid var(--move-color);
  background: var(--move-bg);
  box-shadow: 0 5px 14px rgba(34, 35, 31, .13);
  transition: opacity .15s, box-shadow .15s;
}

.move-preview-source {
  border-right: 3px solid var(--move-color);
  border-left-width: 1px;
}

.move-preview-header {
  position: absolute;
  right: 0;
  bottom: 100%;
  left: -3px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--move-color) 58%, #b7b4aa);
  border-bottom: 0;
  background: #deddd8;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.move-preview-header span {
  color: var(--move-color);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.move-preview-header code {
  overflow: hidden;
  font: 500 9px var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.move-preview-header b {
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.move-preview-body { overflow: hidden; }
.preview-collapse-placeholder {
  width: 100%;
  min-height: 24px;
  border: 0;
  border-block: 1px dashed color-mix(in srgb, var(--move-color) 35%, transparent);
  background: color-mix(in srgb, var(--move-color) 7%, var(--surface));
  color: var(--muted);
  cursor: pointer;
  font: 500 8px var(--mono);
}
.preview-collapse-placeholder:hover { color: var(--move-color); }

.preview-line {
  position: relative;
  display: grid;
  grid-template-columns: 43px 20px minmax(0, 1fr);
  min-height: 24px;
  background: var(--move-bg);
  font: 10px/24px var(--mono);
}
.preview-line:has(.comment-line-button) {
  grid-template-columns: 43px 20px minmax(0, 1fr) auto;
}
.preview-line + .preview-line { border-top: 1px solid rgba(38, 122, 104, .05); }
.preview-line code {
  position: relative;
  overflow: hidden;
  padding-right: 8px;
  color: #33342f;
  font: inherit;
  scrollbar-width: none;
  white-space: pre;
}
.move-preview-target .preview-line .line-marker { color: var(--green); }
.move-preview-source .preview-line .line-marker { color: #a53c2d; }
.move-preview-target .preview-line.comparison-deleted,
.move-preview-source .preview-line.comparison-added {
  background: #f2f0e9;
}
.move-preview-target .preview-line.comparison-deleted .line-number,
.move-preview-target .preview-line.comparison-deleted code,
.move-preview-source .preview-line.comparison-added .line-number,
.move-preview-source .preview-line.comparison-added code {
  opacity: .45;
}
.move-preview.muted { opacity: .08; }
.move-preview.active-move { box-shadow: 0 7px 18px rgba(34, 35, 31, .2); }

.move-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: visible;
  pointer-events: none;
}

.move-path {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  opacity: .72;
  filter: url(#glow);
  pointer-events: stroke;
  cursor: pointer;
  transition: opacity .15s, stroke-width .15s;
}

#arrowhead path { fill: context-stroke; }
.move-endpoint { pointer-events: none; transition: opacity .15s; }
.move-path:hover, .move-path.active-move { opacity: 1; stroke-width: 3.5; }
.move-path.muted, .move-endpoint.muted { opacity: .08; }

.files { display: grid; gap: 20px; }
.file-card {
  position: relative;
  z-index: 1;
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-block-size: auto var(--file-intrinsic-height, 480px);
  border: 1px solid #cfcbc0;
  border-radius: 3px;
  background: var(--surface);
  box-shadow: 0 7px 24px rgba(55, 50, 39, .05);
  scroll-margin-top: 18px;
}
.file-horizontal-scroll {
  position: relative;
  z-index: 8;
  overflow-x: auto;
  overflow-y: hidden;
  height: 1px;
  max-width: 100%;
  scrollbar-color: #aaa69c #e7e4dc;
  scrollbar-width: thin;
}
.file-card.has-horizontal-overflow .file-horizontal-scroll { height: 12px; }
.file-horizontal-scroll-extent {
  width: 100%;
  height: 1px;
}
.file-horizontal-scroll::-webkit-scrollbar { height: 8px; }
.file-horizontal-scroll::-webkit-scrollbar-track { background: #e7e4dc; }
.file-horizontal-scroll::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: #aaa69c;
}

.file-card > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #ebe8df;
}

.file-card > header.rename-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 52px;
  padding: 0;
}

.rename-path {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 100%;
  padding: 0 12px;
}

.rename-path-old { border-right: 1px solid #c9c5ba; }
.rename-label {
  color: var(--muted);
  font: 600 8px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.rename-path code {
  overflow: hidden;
  min-width: 0;
  font: 500 10px var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rename-path .path-change {
  border-radius: 2px;
  background: #efa998;
  color: inherit;
}
.rename-path-new .path-change { background: #9ed8c1; }

.file-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.file-title > span { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid #c7c3b8; border-radius: 2px; color: var(--muted); font: 500 8px var(--mono); }
.file-title code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 11px var(--mono); }
.file-status { padding: 2px 5px; border: 1px solid currentColor; border-radius: 2px; font: 500 8px var(--mono); text-transform: uppercase; }
.file-counts { display: flex; gap: 9px; font: 500 10px var(--mono); }
.file-counts span { color: var(--green); }
.file-counts i { color: #b54331; font-style: normal; }

.hunk + .hunk { border-top: 1px solid var(--line); }
.hunk-header {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 32px;
  padding: 0 13px;
  background: #e7e9e1;
  color: #69706a;
  font-size: 9px;
}
.hunk-header > span { color: var(--green); font: 500 10px var(--mono); }
.hunk-header code { font: 400 9px var(--mono); }
.hunk-header em { overflow: hidden; color: #777b74; font: 400 9px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.hunk-review-button {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 4px 7px;
  border: 1px solid #c4c1b7;
  border-radius: 2px;
  background: rgba(251, 250, 246, .7);
  color: var(--muted);
  cursor: pointer;
  font: 600 8px var(--sans);
}
.hunk-review-button:hover { border-color: #99968d; color: var(--ink); }
.hunk-review-button.is-partial { border-color: #d0ad88; color: #9a6035; }
.hunk-review-button.is-reviewed { border-color: #c9a58a; color: var(--orange); }

.review-placeholder {
  min-height: 24px;
  border-top: 1px solid rgba(90, 86, 76, .08);
  border-bottom: 1px solid rgba(90, 86, 76, .08);
  background: #efede6;
}
.review-placeholder button {
  width: 100%;
  height: 24px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: #85857d;
  cursor: pointer;
  font: 500 8px var(--mono);
  letter-spacing: .03em;
  text-align: center;
}
.review-placeholder button:hover { background: #e7e4dc; color: var(--orange); }
.hunk-review-placeholder {
  min-height: 30px;
  background: #ebe8df;
}
.hunk-review-placeholder button {
  width: 100%;
  height: 30px;
  border: 0;
  background: transparent;
  color: #777870;
  cursor: pointer;
  font: 600 8px var(--mono);
  letter-spacing: .04em;
}
.hunk-review-placeholder button:hover { background: #e2ded4; color: var(--orange); }

.move-collapse-placeholder {
  display: grid;
  grid-template-columns: 43px 1fr auto;
  align-items: center;
  width: 100%;
  min-height: 28px;
  padding: 0 12px 0 0;
  border: 0;
  border-block: 1px dashed color-mix(in srgb, var(--move-color) 35%, #cbc7bc);
  background: color-mix(in srgb, var(--move-color) 5%, #ebe8df);
  color: var(--muted);
  cursor: pointer;
  font: 500 9px var(--mono);
}
.move-collapse-placeholder span { color: var(--move-color); text-align: center; }
.move-collapse-placeholder b { font-weight: 500; text-align: left; }
.move-collapse-placeholder em { color: var(--move-color); font-style: normal; }
.move-collapse-placeholder:hover { background: color-mix(in srgb, var(--move-color) 9%, #ebe8df); }

.diff-line {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 24px;
  font: 10px/24px var(--mono);
}

.review-change-button {
  position: absolute;
  z-index: 6;
  top: 3px;
  min-width: 62px;
  height: 18px;
  padding: 0 6px;
  border: 1px solid #bbb7ac;
  border-radius: 2px;
  background: #f7f5ef;
  color: var(--muted);
  cursor: pointer;
  font: 600 8px var(--sans);
  opacity: 0;
  transition: opacity .12s, background .12s, color .12s;
}
.review-change-button.review-old { right: calc(50% + 7px); }
.review-change-button.review-new { right: 7px; }
body.github-source .review-change-button.review-old { right: calc(50% + 72px); }
body.github-source .review-change-button.review-new { right: 72px; }
.diff-line:hover .review-change-button,
.review-change-button:focus-visible,
.review-change-button.is-reviewed { opacity: 1; }
.review-change-button:hover { border-color: #98958c; background: #fff; color: var(--ink); }
.review-change-button.is-reviewed { color: var(--orange); }
.reviewed-visible { opacity: .4 !important; }

.diff-line:hover .line-cell:not(.empty) { filter: brightness(.975); }
.line-cell {
  position: relative;
  display: grid;
  grid-template-columns: 43px 20px minmax(0, 1fr);
  min-width: 0;
}
.line-cell.old { border-right: 1px solid #d8d4ca; }
.line-cell.empty {
  background: repeating-linear-gradient(135deg, transparent, transparent 7px, rgba(48, 46, 40, .025) 7px, rgba(48, 46, 40, .025) 8px);
}
.line-number { padding-right: 9px; border-right: 1px solid rgba(90, 86, 76, .1); color: #a2a097; text-align: right; user-select: none; }
.comment-select-number { cursor: crosshair; }
.comment-range-selected {
  background-image:
    linear-gradient(rgba(50, 115, 170, .38), rgba(50, 115, 170, .38)),
    linear-gradient(rgba(50, 115, 170, .38), rgba(50, 115, 170, .38));
  background-position: left top, right top;
  background-repeat: no-repeat;
  background-size: 1px 100%;
}
.comment-range-start {
  border-radius: 3px 3px 0 0;
  box-shadow: inset 0 1px rgba(50, 115, 170, .38);
}
.comment-range-end {
  border-radius: 0 0 3px 3px;
  box-shadow: inset 0 -1px rgba(50, 115, 170, .38);
}
.comment-range-start.comment-range-end {
  border-radius: 3px;
  box-shadow:
    inset 0 1px rgba(50, 115, 170, .38),
    inset 0 -1px rgba(50, 115, 170, .38);
}
.comment-range-selected > .line-number {
  background: #dceafb;
  color: #245f91;
}
.line-marker { text-align: center; user-select: none; }
.line-cell code {
  position: relative;
  overflow: hidden;
  padding-right: 10px;
  color: #33342f;
  font: inherit;
  scrollbar-width: none;
  white-space: pre;
}
.line-cell .code-content,
.preview-line .code-content {
  display: inline-block;
  min-width: max-content;
}
.comment-line-button {
  position: absolute;
  z-index: 6;
  top: 3px;
  right: 7px;
  height: 18px;
  padding: 0 6px;
  border: 1px solid #aeb8c5;
  border-radius: 2px;
  background: #f6f8fa;
  color: #3e596f;
  font: 600 8px/16px var(--sans);
  opacity: 0;
  text-decoration: none;
  user-select: none;
  transition: opacity .12s, border-color .12s, color .12s;
}
.comment-line-button::before { content: attr(data-label); }
.line-cell:hover > .comment-line-button,
.preview-line:hover > .comment-line-button,
.comment-range-end > .comment-line-button,
.comment-line-button:focus-visible { opacity: 1; }
.comment-line-button:hover { border-color: #70869a; color: #1f3f59; }
.preview-line > .comment-line-button {
  position: static;
  align-self: center;
  margin-right: 7px;
}
.word-change {
  border-radius: 2px;
  background: #f4c96b;
  color: inherit;
  box-shadow: 0 0 0 1px rgba(153, 103, 10, .08);
}
.line-deletion .word-change { background: #efa998; }
.line-edit-aligned .line-cell.new .word-change { background: #9ed8c1; }
.line-addition .word-change,
.move-preview-target .word-change { background: #9ed8c1; }
.move-preview-source .word-change { background: #efa998; }
.line-cell.comparison-peer,
.preview-line.comparison-peer {
  position: relative;
  z-index: 5;
  box-shadow: inset 0 0 0 2px var(--move-color);
  filter: brightness(.97) saturate(1.2);
}
.line-cell.comparison-origin,
.preview-line.comparison-origin {
  position: relative;
  z-index: 5;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--move-color) 72%, transparent);
}
.word-change[data-word-comparison-id] { cursor: crosshair; }
.word-change.word-comparison-peer {
  position: relative;
  z-index: 2;
  outline: 2px solid var(--move-color);
  outline-offset: 1px;
  filter: saturate(1.3);
}
.word-change.word-comparison-origin {
  outline: 1px solid color-mix(in srgb, var(--move-color) 75%, transparent);
  outline-offset: 1px;
}
.line-deletion .line-cell.old { background: var(--red-bg); }
.line-addition .line-cell.new,
.line-edit-aligned .line-cell.new { background: var(--green-bg); }
.line-deletion .line-cell.move-source,
.line-addition .line-cell.move-target {
  background: var(--move-bg);
}
.line-deletion .line-marker { color: #a53c2d; }
.line-edit-aligned .line-cell.new .line-marker { color: var(--green); }
.line-addition .line-marker { color: var(--green); }

.line-cell.move-source, .line-cell.move-target {
  box-shadow: inset 3px 0 var(--move-color);
  cursor: pointer;
  transition: opacity .15s, filter .15s;
}
.line-cell.move-source::after, .line-cell.move-target::after {
  content: "";
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 7px;
  height: 7px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--move-color);
  transform: translateY(-50%);
}
.line-cell.move-source::after { right: -5px; }
.line-cell.move-target::after { left: -5px; }
.line-cell.muted, .move-link.muted { opacity: .24; }
.line-cell.active-move { filter: saturate(1.35); }
.meta-cell { grid-column: 1 / -1; padding: 0 12px; color: var(--muted); background: #f1efe8; }
.binary-message { margin: 0; padding: 30px; color: var(--muted); font: 11px var(--mono); text-align: center; }
.unicode-warning {
  display: flex;
  align-items: start;
  gap: 9px;
  padding: 11px 14px;
  border-bottom: 1px solid #d8b867;
  background: #fff4cf;
  color: #65501d;
  font-size: 10px;
  line-height: 1.45;
}
.unicode-warning > span:first-child { color: #9b7010; }
.unicode-warning strong { color: #493a18; }
.unicode-warning a { color: #76550c; font-weight: 600; }
.unicode-control {
  display: inline-block;
  margin: 0 1px;
  padding: 0 3px;
  border: 1px solid currentColor;
  border-radius: 2px;
  direction: ltr;
  background: #ffe5a8;
  color: #815d0b;
  font: 600 .78em/1.45 var(--mono);
  letter-spacing: 0;
  unicode-bidi: isolate;
  vertical-align: .08em;
}
.unicode-control-bidi { background: #f8cbc2; color: #8e2f20; }
.unicode-control-control { background: #e8d5ec; color: #673877; }

@media (max-width: 820px) {
  .landing { padding-top: 40px; }
  .viewer { display: block; }
  .sidebar { display: none; }
  .diff-view { overflow-x: auto; padding: 24px 14px 60px; }
  .summary-bar { align-items: start; }
  .summary-actions { align-items: start; flex-direction: column-reverse; gap: 10px; }
  .review-toggle, .move-collapse-toggle { align-items: start; text-align: left; }
  .stats { gap: 12px; }
}

@media (max-width: 560px) {
  .top-actions a { display: none; }
  .import-footer, .url-row { align-items: stretch; flex-direction: column; }
  .submit-group { justify-content: space-between; }
  .summary-bar { display: block; }
  .stats { justify-content: flex-start; margin-top: 16px; }
  .stat { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .progress-spinner { animation-duration: 1.8s; }
  .progress-track i { width: 100%; animation: none; opacity: .7; }
}
