.cmp-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: -0.03em;
}
.cmp-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px 14px;
  align-items: end;
  margin-top: 18px;
}
.cmp-pick { position: relative; min-width: 0; }
.cmp-pick label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.cmp-pick[data-side="a"] label { color: #8eb4ff; }
.cmp-pick[data-side="b"] label { color: #f0b56a; }
.cmp-pick input { width: 100%; }
.cmp-swap {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--panel-edge);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  line-height: 0;
}
.cmp-swap svg { display: block; }
.cmp-swap:hover { border-color: var(--accent); }
.cmp-suggest {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 240px;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.cmp-suggest button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.cmp-suggest button:hover,
.cmp-suggest button.active { background: var(--inset); }
.cmp-suggest small { color: var(--faint); }
.cmp-depth {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.cmp-depth span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  margin-right: 4px;
}
.cmp-depth button,
.cmp-tabs button {
  border: 1px solid var(--panel-edge);
  background: var(--inset);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
}
.cmp-depth button.active,
.cmp-tabs button.active {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-text);
}
#cmpGo { grid-column: 1 / -1; justify-self: start; }
.cmp-status-error { color: var(--danger); }

.cmp-heads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0 18px;
}
.cmp-head {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--panel-edge);
  background: var(--panel);
  min-width: 0;
}
.cmp-head.is-a { box-shadow: inset 3px 0 0 #5b8def; }
.cmp-head.is-b { box-shadow: inset 3px 0 0 #e0a04a; }
.cmp-banner {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--chip);
  flex: 0 0 auto;
}
.cmp-head h2 {
  margin: 0;
  font-size: 1.15rem;
}
.cmp-change {
  margin-top: 6px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
  padding: 0;
}
.cmp-kvk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.cmp-kvk-table th,
.cmp-kvk-table td {
  text-align: left;
  padding: 6px 4px;
  border-bottom: 1px solid var(--header-border);
  white-space: nowrap;
}
.cmp-kvk-table a { color: inherit; font-weight: 700; }
.cmp-dialog {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
}
.cmp-dialog[hidden] { display: none !important; }
.cmp-dialog-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.cmp-dialog-card { position: relative; }
.cmp-dialog-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--inset);
  color: var(--text);
  cursor: pointer;
  line-height: 0;
}
.cmp-dialog-x svg { display: block; }
.cmp-dialog-card h2 { margin: 0 28px 10px 0; font-size: 1.1rem; }
.cmp-dialog-card input { width: 100%; }
.cmp-dialog-list {
  position: static;
  margin-top: 8px;
  max-height: 220px;
  box-shadow: none;
}
.cmp-dialog-card .btn-glow { margin-top: 12px; width: 100%; }
.cmp-head p { margin: 2px 0 0; color: var(--muted); font-size: 0.85rem; }
.cmp-head a { color: inherit; text-decoration: none; }
.cmp-head a:hover { color: var(--accent); }

.cmp-section { margin: 22px 0 8px; }
.cmp-section h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}
.cmp-section .section-sub { margin: 0 0 12px; }

.cmp-meter {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto auto;
  gap: 8px 12px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--header-border);
}
.cmp-meter b {
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--muted);
}
.cmp-meter > div { display: contents; }
.cmp-track { display: none; }
.cmp-vals {
  display: contents;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}
.cmp-vals span { text-align: right; min-width: 4.6rem; }
.cmp-vals .win-a { color: #9db7ee; font-weight: 750; }
.cmp-vals .win-b { color: #e2c08a; font-weight: 750; }

.cmp-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.cmp-tabs button { white-space: nowrap; flex: 0 0 auto; }
.cmp-board-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 8px;
}
.cmp-edge {
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 3px;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-bottom: 5px solid currentColor;
  vertical-align: 1px;
  flex: 0 0 auto;
}
.cmp-row {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--header-border);
}
.cmp-row .rank {
  color: var(--faint);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
}
.cmp-cell {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
.cmp-cell a { color: inherit; text-decoration: none; font-weight: 650; }
.cmp-cell a:hover { color: var(--accent); }
.cmp-cell .who {
  display: flex;
  gap: 4px;
  align-items: baseline;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 650;
}
.cmp-cell .who a {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.cmp-cell .sub {
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 650;
}
.cmp-cell .score {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}
.cmp-cell.lead-a .score { color: #9db7ee; font-weight: 750; }
.cmp-cell.lead-b .score { color: #e2c08a; font-weight: 750; }
.cmp-empty { color: var(--faint); }

.cmp-kvk {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cmp-card {
  border: 1px solid var(--panel-edge);
  border-radius: 14px;
  background: var(--panel);
  padding: 14px;
  min-width: 0;
}
.cmp-card h3 { margin: 0 0 8px; font-size: 1rem; }
.cmp-card ul { margin: 0; padding: 0; list-style: none; }
.cmp-card li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--header-border);
  font-size: 0.86rem;
}
.cmp-card li span:last-child { color: var(--muted); text-align: right; }
.cmp-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

@media (max-width: 720px) {
  .cmp-hero h1 { font-size: 1.45rem; }
  .cmp-form { grid-template-columns: 1fr auto 1fr; }
  .cmp-swap { align-self: end; }
  .cmp-heads,
  .cmp-kvk { grid-template-columns: 1fr; }
  .cmp-meter {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 6px 8px;
  }
  .cmp-vals span { min-width: 3.6rem; font-size: 0.82rem; }
  .cmp-row {
    grid-template-columns: 1.85rem minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
  }
  .cmp-row .rank { font-size: 0.68rem; }
  .cmp-cell .who { font-size: 0.68rem; }
  .cmp-cell .sub { display: none; }
  .cmp-cell .score { font-size: 0.68rem; }
}
#comparePanel { padding-bottom: 112px; }
.cmp-float {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(520px, calc(100% - 20px));
  padding: 8px;
  border-radius: 18px;
  border: 1px solid var(--panel-edge);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.cmp-float[hidden] { display: none !important; }
.cmp-float-side {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 42%;
  border: 0;
  border-radius: 12px;
  padding: 6px 10px;
  background: var(--inset);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  cursor: pointer;
}
.cmp-float-side img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
}
.cmp-float-side.is-a { box-shadow: inset 3px 0 0 #7ea2e8; }
.cmp-float-side.is-b { box-shadow: inset 3px 0 0 #d7b48a; }
.cmp-float .cmp-swap { width: 36px; height: 36px; flex: 0 0 auto; }
.cmp-float-depth {
  display: flex;
  gap: 4px;
  flex: 1 0 100%;
  justify-content: center;
}
.cmp-float-depth button {
  border: 1px solid var(--panel-edge);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 9px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 750;
  cursor: pointer;
}
.cmp-float-depth button.active {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-text);
}
.cmp-float-spin {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
}
.cmp-float-spin[hidden] { display: none !important; }
.cmp-float { position: fixed; }
#cmpBody.cmp-busy { opacity: 0.45; }
