/* =============================================
   TOKENS
   ============================================= */
   :root {
    --bg:           #f0f2f5;
    --bg-card:      #ffffff;
    --bg-hover:     #f8f9fb;
    --border:       #e2e6ed;
    --border-dash:  #c8d0dc;
    --text-1:       #1a2035;
    --text-2:       #4a5568;
    --text-3:       #8a96a8;
    --accent:       #4f6ef7;
    --accent-light: #eef1fe;
    --accent-hover: #3d5ce8;
    --green:        #22c55e;
    --green-bg:     #f0fdf4;
    --green-border: #bbf7d0;
    --red:          #ef4444;
    --red-bg:       #fef2f2;
    --red-border:   #fecaca;
    --yellow:       #f59e0b;
    --yellow-bg:    #fffbeb;
    --yellow-border:#fde68a;
    --grey-bg:      #f1f5f9;
    --grey-border:  #cbd5e1;
  
    --diff-added-bg:      #f0fdf4;
    --diff-added-text:    #15803d;
    --diff-removed-bg:    #fef2f2;
    --diff-removed-text:  #b91c1c;
    --diff-modified-bg-l: #fffbeb;
    --diff-modified-bg-r: #fefce8;
    --diff-modified-text: #92400e;
    --diff-warn-bg:       #fff7ed;
    --diff-warn-text:     #c2410c;
    --diff-identical-bg:  #ffffff;
    --diff-identical-text:#64748b;
  
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  
    --toolbar-h: 60px;
  }
  
  /* =============================================
     RESET & BASE
     ============================================= */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  
  html, body {
    min-height: 100%;
    background: var(--bg);
    color: var(--text-1);
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }
  
  /* =============================================
     LOADING
     ============================================= */
  .app-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: 16px;
    color: var(--text-3);
  }
  
  .loading-spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }
  
  @keyframes spin { to { transform: rotate(360deg); } }
  
  /* =============================================
     LOADING OVERLAY
     ============================================= */
  .loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(240,242,245,0.85);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .loading-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-md);
  }
  
  .loading-spinner-lg {
    width: 48px; height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
  }
  
  .loading-title { font-size: 1rem; font-weight: 600; color: var(--text-1); }
  .loading-sub   { font-size: 0.82rem; color: var(--text-3); }
  
  /* =============================================
     TOP TOOLBAR
     ============================================= */
  .top-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: var(--toolbar-h);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 200;
  }
  
  .app-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-1);
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .app-title-icon {
    width: 32px; height: 32px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
  }
  
  .app-version {
    font-size: 0.65rem;
    font-weight: 400;
    color: #94a3b8;
    margin-left: 4px;
    letter-spacing: 0.02em;
    align-self: center;
  }
  
  .toolbar-options {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .toggle-label {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    color: var(--text-2);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: all 0.15s;
    user-select: none;
  }
  .toggle-label:hover { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }
  .toggle-label input[type="checkbox"] { accent-color: var(--accent); width: 14px; height: 14px; cursor: pointer; }
  
  .btn-compare {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 22px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 2px 8px rgba(79,110,247,0.3);
  }
  .btn-compare:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79,110,247,0.4);
  }
  .btn-compare:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
  
  .btn-reset {
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--border);
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.15s;
  }
  .btn-reset:hover { background: var(--grey-bg); color: var(--text-1); }
  
  /* =============================================
     ERROR BAR
     ============================================= */
  .error-bar {
    background: var(--red-bg);
    color: var(--red);
    padding: 10px 32px;
    font-size: 0.83rem;
    border-bottom: 1px solid var(--red-border);
    font-weight: 500;
  }
  
  /* =============================================
     MAIN LAYOUT
     ============================================= */
  .main-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 24px 32px;
    max-height: 340px;
    overflow: hidden;
  }
  
  .side-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
  }
  
  /* =============================================
     FOLDER PANELS
     ============================================= */
  .folder-panel { display: flex; flex-direction: column; gap: 12px; }
  .panel-header { margin-bottom: 4px; }
  .panel-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }
  
  .folder-entry {
    border: 1.5px dashed var(--border-dash);
    border-radius: var(--radius-md);
    padding: 14px;
    background: var(--bg-hover);
    transition: border-color 0.15s, background 0.15s;
  }
  .folder-entry:hover { border-color: var(--accent); background: var(--accent-light); }
  
  .folder-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
  }
  
  .folder-type-badge {
    background: var(--accent);
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    flex-shrink: 0;
    letter-spacing: 0.05em;
  }
  
  .folder-name-block {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
  }
  
  .folder-name-root {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .folder-name-full {
    font-size: 0.72rem;
    color: var(--text-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Consolas', monospace;
  }
  
  .btn-remove {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-3);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: 6px;
    transition: all 0.1s;
    line-height: 1.4;
  }
  .btn-remove:hover { background: var(--red-bg); border-color: var(--red-border); color: var(--red); }
  
  .folder-stats { font-size: 0.73rem; color: var(--text-3); margin-bottom: 8px; }
  .folder-file-list { display: flex; flex-wrap: wrap; gap: 4px; }
  
  .file-chip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.75rem;
    color: var(--text-2);
    font-family: 'Consolas', 'Cascadia Code', monospace;
  }
  .file-chip.more { color: var(--text-3); border-style: dashed; }
  
  .add-folder-row { margin-top: 4px; }
  
  .btn-pick {
    width: 100%;
    background: transparent;
    color: var(--accent);
    border: 1.5px dashed var(--accent);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.83rem;
    font-weight: 600;
    transition: all 0.15s;
    text-align: center;
  }
  .btn-pick:hover { background: var(--accent-light); border-style: solid; }
  
  /* =============================================
     RESULTS SECTION
     ============================================= */
  .results-section {
    padding: 0 32px 32px;
    flex: 1;
  }
  
  /* =============================================
     SUMMARY BAR
     ============================================= */
  .diff-summary {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
  }
  
  .summary-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid transparent;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    cursor: default;
    transition: all 0.15s;
  }
  .summary-card strong { font-size: 1.05rem; font-weight: 700; }
  .summary-card.total   { border-color: var(--border); color: var(--text-2); }
  .summary-card.diff    { background: var(--red-bg);    border-color: var(--red-border);    color: var(--red); }
  .summary-card.missing { background: var(--grey-bg);   border-color: var(--grey-border);   color: var(--text-2); }
  .summary-card.warn    { background: var(--yellow-bg); border-color: var(--yellow-border); color: var(--yellow); }
  .summary-card.same    { background: var(--green-bg);  border-color: var(--green-border);  color: var(--green); }
  
  .summary-card:not(.non-clickable) { cursor: pointer; opacity: 0.45; }
  .summary-card:not(.non-clickable):hover { opacity: 0.75; transform: translateY(-1px); }
  .summary-card:not(.non-clickable).active { opacity: 1; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
  
  .sc-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
  }
  .sc-dot-total   { background: var(--text-3); }
  .sc-dot-diff    { background: var(--red); }
  .sc-dot-missing { background: var(--text-2); }
  .sc-dot-warn    { background: var(--yellow); }
  .sc-dot-same    { background: var(--green); }
  
/* base hint style */
.sc-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px; height: 14px;
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 700;
  cursor: help;
  flex-shrink: 0;
}

/* each chip's hint matches its own color */
.sc-hint-diff {
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  color: var(--red);
}

.sc-hint-missing {
  background: var(--grey-bg);
  border: 1px solid var(--grey-border);
  color: var(--text-2);
}

.sc-hint-warn {
  background: var(--yellow-bg);
  border: 1px solid var(--yellow-border);
  color: var(--yellow);
}

.sc-hint-same {
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  color: var(--green);
}
  
  .path-filter-wrap {
    margin-left: auto;
    display: flex;
    align-items: center;
  }
  
  .search-box {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-1);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.8rem;
    width: 220px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
  }
  .search-box:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,110,247,0.12); }
  .search-box::placeholder { color: var(--text-3); }
  
  /* =============================================
     VIEWER TOOLBAR
     ============================================= */
  .viewer-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-sm);
  }
  
  .jump-label {
    font-size: 0.78rem;
    color: var(--text-3);
  }
  
  .file-jump-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: auto;
  }
  
  .jump-counter {
    font-size: 0.75rem;
    color: var(--text-3);
    min-width: 44px;
    text-align: center;
    font-variant-numeric: tabular-nums;
  }
  
  .expand-controls { display: flex; gap: 6px; }
  
  .btn-tool {
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--grey-border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-2);
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.4;
    font-family: inherit;
    transition: background 0.12s, border-color 0.12s;
  }
  .btn-tool:hover:not(:disabled) { background: var(--grey-bg); border-color: #94a3b8; }
  .btn-tool:disabled { opacity: 0.35; cursor: not-allowed; }
  
  .navbar-toggle-label {
    font-size: 0.78rem;
    color: var(--text-3);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    user-select: none;
    border: none;
    background: none;
    padding: 4px 8px;
  }
  
  /* =============================================
     FILE BLOCKS
     ============================================= */
     .file-block {
      border-radius: var(--radius-sm);
      border: 1px solid var(--border);
      margin-bottom: 8px;
      background: var(--bg-card);
      position: relative;
      overflow: visible;          /* ← must be visible, NOT hidden */
  }
  .file-block:hover { box-shadow: var(--shadow-md); }
  
  .block-identical { border-color: var(--border); }
  .block-diff      { border-color: var(--red-border); }
  .block-warning   { border-color: var(--yellow-border); }
  .block-missing   { border-color: var(--grey-border); }
  
  /* =============================================
     STICKY FILE HEADER  (JS-driven via transform)
     ============================================= */
     .sticky-file-header {
      position: sticky;           /* ← was: relative */
      top: 60px;                  /* ← exact toolbar height */
      z-index: 50;
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 14px;
      font-size: 0.82rem;
      font-weight: 600;
      cursor: pointer;
      user-select: none;
      border-bottom: 1px solid transparent;
      will-change: transform;
      backface-visibility: hidden;
  }
  .sticky-file-header:hover { filter: brightness(0.97); }
  
  /* Header colour per type — solid bg needed for sticky to cover content */
  .header-diff      { background: #fef2f2; color: var(--red);    border-bottom-color: var(--red-border); }
  .header-missing   { background: #f8fafc; color: var(--text-2); }
  .header-warning   { background: #fffbeb; color: var(--yellow); border-bottom-color: var(--yellow-border); }
  .header-identical { background: #f0fdf4; color: var(--green);  }
  
  .expand-icon {
    flex-shrink: 0;
    width: 16px;
    text-align: center;
    font-size: 0.85rem;
  }
  
  .file-path {
    flex: 1;
    min-width: 0;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.82rem;
    word-break: break-all;
    white-space: normal;
  }
  
  .header-badges {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    align-items: center;
  }
  
  .badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
  .ok-badge      { background: var(--green-bg);  color: var(--green);  border: 1px solid var(--green-border); }
  .warn-badge    { background: var(--yellow-bg); color: var(--yellow); border: 1px solid var(--yellow-border); }
  .missing-badge { background: var(--grey-bg);   color: var(--text-2); border: 1px solid var(--grey-border); }
  
  /* ── Per-file chunk nav — right side of header ── */
  .line-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 8px;
  }
  
  .btn-line-nav {
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid var(--grey-border);
    border-radius: 4px;
    background: rgba(255,255,255,0.85);
    color: var(--text-2);
    cursor: pointer;
    line-height: 1.4;
    font-family: inherit;
    transition: all 0.12s;
  }
  .btn-line-nav:hover:not(:disabled) { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }
  .btn-line-nav:disabled { opacity: 0.35; cursor: not-allowed; }
  
  .line-nav-counter {
    font-size: 0.72rem;
    color: var(--text-3);
    min-width: 38px;
    text-align: center;
    font-variant-numeric: tabular-nums;
  }
  
  /* =============================================
     DIFF TABLE
     ============================================= */
  .diff-cols-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--grey-bg);
    border-bottom: 1px solid var(--border);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-3);
  }
  .left-col-header, .right-col-header { padding: 5px 12px; }
  .left-col-header { border-right: 1px solid var(--border); }
  
  .diff-lines {
    font-family: 'Consolas', 'Cascadia Code', 'Courier New', monospace;
    font-size: 0.78rem;
  }
  
  /* ── Diff rows: NO borders, NO outlines ── */
  .diff-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: none;
    outline: none;
    box-shadow: none;
  }
  .diff-row:hover { filter: brightness(0.97); }
  
  /* Only a faint line between a diff chunk and identical lines */
  .diff-row-identical + .diff-row-added,
  .diff-row-identical + .diff-row-removed,
  .diff-row-identical + .diff-row-modified,
  .diff-row-identical + .diff-row-warning,
  .diff-row-added + .diff-row-identical,
  .diff-row-removed + .diff-row-identical,
  .diff-row-modified + .diff-row-identical,
  .diff-row-warning + .diff-row-identical {
    border-top: 1px solid rgba(0,0,0,0.05);
  }
  
/* ── Focused chunk highlight ── */
.diff-row-focused {
  border: none;
  outline: none;
  box-shadow: none;
  position: relative;
}

/* Blue left accent bar — visible marker */
.diff-row-focused .diff-left {
  box-shadow: inset 4px 0 0 var(--accent);
}

/* Slightly brighten the focused rows so they stand out */
.diff-row-focused .diff-added-right,
.diff-row-focused .diff-removed-left,
.diff-row-focused .diff-modified-left,
.diff-row-focused .diff-modified-right {
  filter: brightness(0.93);
}

/* Focused row indicator on the right col too */
.diff-row-focused .diff-right {
  box-shadow: inset -4px 0 0 var(--accent);
}
  
  .diff-col {
    padding: 2px 12px 2px 8px;
    display: flex;
    align-items: baseline;
    gap: 6px;
    white-space: pre-wrap;
    word-break: break-all;
    border: none;
  }
  .diff-left  { border-right: 1px solid rgba(0,0,0,0.05); }
  .diff-right { }
  
  .diff-gutter {
    min-width: 14px;
    flex-shrink: 0;
    font-size: 0.72rem;
    opacity: 0.5;
    user-select: none;
    text-align: right;
    font-weight: 700;
  }
  .diff-text { flex: 1; }
  
  /* IDENTICAL */
  .diff-identical-left,
  .diff-identical-right { background: var(--diff-identical-bg); color: var(--diff-identical-text); }
  
  /* ADDED */
  .diff-added-left  { background: #fafafa; color: #d1d5db; }
  .diff-added-right { background: var(--diff-added-bg); color: var(--diff-added-text); }
  .diff-added-right .diff-gutter { color: var(--green); opacity: 1; }
  
  /* REMOVED */
  .diff-removed-left  { background: var(--diff-removed-bg); color: var(--diff-removed-text); }
  .diff-removed-left .diff-gutter { color: var(--red); opacity: 1; }
  .diff-removed-right { background: #fafafa; color: #d1d5db; }
  
  /* MODIFIED */
  .diff-modified-left  { background: var(--diff-modified-bg-l); color: var(--diff-modified-text); }
  .diff-modified-right { background: var(--diff-modified-bg-r); color: #854d0e; }
  .diff-modified-left .diff-gutter,
  .diff-modified-right .diff-gutter { color: var(--yellow); opacity: 1; }
  
  /* WARNING */
  .diff-warning-left,
  .diff-warning-right { background: var(--diff-warn-bg); color: var(--diff-warn-text); font-style: italic; }
  .diff-warning-left .diff-gutter,
  .diff-warning-right .diff-gutter { color: var(--yellow); opacity: 1; }
  
  /* word diff highlight */
  mark.word-diff {
    background: #fde68a;
    border-radius: 2px;
    padding: 0 1px;
  }
  
  /* =============================================
     DIFF CONTAINER
     ============================================= */
     .diff-container {
      padding-bottom: 40px;
      padding-right: 0;
      padding-left: 0;
  }
  
  /* =============================================
     PLACEHOLDER
     ============================================= */
  .diff-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 14px;
    height: 280px;
    color: var(--text-3);
    font-size: 0.9rem;
    font-weight: 500;
    border: 2px dashed var(--border-dash);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
  }
  .diff-placeholder::before { content: '🔍'; font-size: 2.5rem; }
  
  /* =============================================
     COMPARE NAVBAR — fixed right, full viewport
     ============================================= */
     .compare-navbar-fixed {
      position: fixed;
      right: 0;
      top: var(--toolbar-h);
      bottom: 0;
      width: 28px;          /* consistent 28px everywhere */
      z-index: 150;
      background: #1a2035;
      border-left: 2px solid #334155;
      display: flex;
      flex-direction: column;
      box-shadow: -2px 0 8px rgba(0,0,0,0.3);
  }
  
  .cnb-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.6rem;
    color: #64748b;
    padding: 6px 0;
    text-align: center;
    overflow: hidden;
    max-height: 120px;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
    transform: rotate(180deg);
  }
  
  .cnb-track {
    flex: 1;
    position: relative;
    overflow: hidden;
  }
  
  .cnb-mark {
    position: absolute;
    left: 2px;
    right: 2px;
    height: 3px;
    border-radius: 1px;
    cursor: pointer;
    opacity: 0.85;
    transition: height 0.1s, opacity 0.1s;
  }
  .cnb-mark:hover       { height: 6px; opacity: 1; left: 0; right: 0; }
  .cnb-mark-active      { height: 5px; opacity: 1; left: 0; right: 0; outline: 1px solid #fff; }
  
  .cnb-added    { background: #22c55e; }
  .cnb-removed  { background: #ef4444; }
  .cnb-modified { background: #f59e0b; }
  .cnb-warning  { background: #f97316; }
  
  .cnb-viewport-indicator {
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: rgba(255,255,255,0.35);
    pointer-events: none;
    border-radius: 1px;
  }
  
  /* =============================================
     BLAZOR ERROR UI
     ============================================= */
  #blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
  }
  #blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
  }
  
  .blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
  }
  .blazor-error-boundary::after { content: "An error has occurred." }

  /* ── All identical banner ── */
.all-identical-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 32px;
  margin-bottom: 16px;
  background: var(--green-bg);
  border: 2px solid var(--green-border);
  border-radius: var(--radius-md);
  color: var(--green);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
}


/* only shrink when navbar is visible */
.diff-container-with-navbar {
  padding-right: 28px;  /* exactly the navbar width, not 36px */
}
/* ── Compare navbar — starts below toolbar ── */


.cnb-track {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.cnb-mark {
  position: absolute;
  left: 2px;
  right: 2px;
  height: 3px;
  border-radius: 1px;
  cursor: pointer;
  opacity: 0.85;
  transition: height 0.1s, opacity 0.1s;
}
.cnb-mark:hover      { height: 6px; opacity: 1; left: 0; right: 0; }
.cnb-mark-active     { height: 5px; opacity: 1; left: 0; right: 0; box-shadow: 0 0 4px #fff; }

.cnb-added    { background: #22c55e; }
.cnb-removed  { background: #ef4444; }
.cnb-modified { background: #f59e0b; }
.cnb-warning  { background: #f97316; }

.cnb-viewport-indicator {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: rgba(255,255,255,0.3);
  pointer-events: none;
  border-radius: 1px;
}
