:root {
  --bg: #11111b; --panel: #1e1e2e; --line: #2a2a3c; --line2: #45475a;
  --text: #cdd6f4; --dim: #8e95b3;
  --green: #40a02b; --yellow: #df8e1d; --red: #d20f39; --blue: #89b4fa;
}
* { box-sizing: border-box; margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  padding: 18px; max-width: 1280px; margin: 0 auto;
}
h1 { font-size: 20px; margin-bottom: 8px; }
.dim { color: var(--dim); font-size: 12px; }
.hidden { display: none !important; }

/* Back link */
.back-link {
  display: inline-block; color: var(--dim); font-size: 13px;
  text-decoration: none; margin-bottom: 14px;
}
.back-link:hover { color: var(--blue); }

/* Unsupported banner */
.unsupported {
  background: rgba(210,15,57,.18); border: 1px solid var(--red);
  border-radius: 8px; padding: 12px 16px; margin-bottom: 16px;
  font-size: 14px;
}
.unsupported a { color: var(--blue); }

/* Hero / visitor header */
.hero { margin-bottom: 18px; }
.hero h1 { font-size: 26px; margin-bottom: 6px; }
.tagline { color: var(--dim); font-size: 14px; margin-bottom: 10px; }
.notes {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  font-size: 12px; color: var(--dim);
}
.notes a { color: var(--blue); text-decoration: none; }
.notes a:hover { text-decoration: underline; }

/* Toolbar */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar button {
  background: var(--blue); color: var(--bg); border: 0; border-radius: 6px;
  padding: 9px 22px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.toolbar button:disabled { opacity: .5; cursor: default; }

/* Picker buttons */
.pick-btn {
  background: var(--panel) !important; color: var(--text) !important;
  border: 1px solid var(--line2) !important; font-weight: 400 !important;
  padding: 10px 18px !important; font-size: 14px !important;
  border-radius: 6px; cursor: pointer; white-space: nowrap;
  flex: 1; min-width: 200px; text-align: left;
  transition: border-color .15s;
}
.pick-btn:hover { border-color: var(--blue) !important; }
.pick-btn.picked {
  border-color: var(--green) !important;
  background: rgba(64,160,43,.12) !important;
  color: var(--text) !important;
}

.message { margin-top: 10px; padding: 8px 12px; border-radius: 6px;
  background: rgba(210,15,57,.2); border: 1px solid var(--red); font-size: 13px; }

.progress { display: flex; gap: 12px; align-items: center; margin-top: 16px;
  background: var(--panel); border-radius: 8px; padding: 14px; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line2);
  border-top-color: var(--blue); border-radius: 50%;
  animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
#progress-path { max-width: 900px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-family: Consolas, monospace; }

.stats { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.stat { flex: 1; min-width: 160px; text-align: center; border-radius: 8px;
  padding: 12px 8px; display: flex; flex-direction: column; gap: 2px;
  font-size: 13px; }
.stat .big { font-size: 24px; font-weight: 700; }
.stat .sub { color: var(--dim); font-size: 12px; }
.stat.red { background: rgba(210,15,57,.22); }
.stat.yellow { background: rgba(223,142,29,.22); }
.stat.green { background: rgba(64,160,43,.18); }
.stat.blue { background: rgba(137,180,250,.16); }

.breadcrumb { margin: 16px 0 8px; font-size: 13px;
  font-family: Consolas, monospace; }
.breadcrumb a { color: var(--blue); cursor: pointer; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--dim); margin: 0 6px; }

.grid { display: grid; grid-template-columns: 1fr 150px 1fr;
  background: var(--panel); border-radius: 8px; overflow: hidden;
  font-family: Consolas, monospace; font-size: 13px; }
.colhead { font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--dim); padding: 8px 6px; text-align: center;
  border-bottom: 1px solid var(--line2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell { padding: 4px 10px; display: flex; justify-content: space-between;
  align-items: center; gap: 8px; border-bottom: 1px solid var(--line);
  min-height: 30px; overflow: hidden; }
.cell .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; align-items: center; gap: 6px; }
.cell .meta { color: var(--dim); font-size: 12px; white-space: nowrap; }
.cell.mid { justify-content: center; }
.cell.clickable { cursor: pointer; }
.arrow { width: 14px; display: inline-block; color: var(--dim);
  flex-shrink: 0; }
.zoom { color: var(--blue); cursor: pointer; padding: 0 4px;
  flex-shrink: 0; opacity: 0; }
.cell:hover .zoom { opacity: 1; }
.ghost { color: var(--dim); font-style: italic; opacity: .6; }

.row-same  { background: rgba(64,160,43,.08); }
.row-diff  { background: rgba(223,142,29,.12); }
.row-missing { background: rgba(210,15,57,.12); }
.row-extra { background: rgba(137,180,250,.10); }

.badge { font-size: 10px; padding: 2px 8px; border-radius: 10px;
  font-weight: 700; white-space: nowrap; font-family: "Segoe UI", sans-serif; }
.badge-same { background: var(--green); color: #fff; }
.badge-diff { background: var(--yellow); color: #fff; }
.badge-missing { background: var(--red); color: #fff; }
.badge-extra { background: var(--blue); color: var(--bg); }

.footnote { margin-top: 10px; font-size: 12px; color: var(--dim); }

.breadcrumb .back-btn { display: inline-block; background: var(--panel);
  border: 1px solid var(--line2); border-radius: 6px; padding: 3px 12px;
  margin-right: 12px; font-weight: 700; }
.breadcrumb .back-btn:hover { border-color: var(--blue);
  text-decoration: none; }

.copy-btn { background: var(--blue); color: var(--bg); border: 0;
  border-radius: 6px; padding: 2px 9px; font-weight: 700; cursor: pointer;
  font-size: 13px; flex-shrink: 0; line-height: 1.4; }
.copy-btn:hover { filter: brightness(1.2); }

/* Footer note */
.footer-note {
  margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--dim);
}
