/* ---------- Buttons ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  height: 52px; padding: 0 24px; border-radius: var(--r-pill);
  font-size: 16px; font-weight: 700; white-space: nowrap;
  transition: transform .25s ease, box-shadow .25s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.pill svg { flex: none; transition: transform .2s ease; }
.pill:hover .icon-ne { transform: translate(2px, -2px); }
.pill--white { background: #fff; color: var(--ink); box-shadow: 0 8px 24px rgba(20, 14, 30, .16); }
.pill--white:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 16px 32px rgba(20, 14, 30, .24); }
.pill--ink { background: var(--ink); color: #fff; }
.pill--ink:hover { color: #fff; background: var(--cobalt); }
.pill--line { border: 1.5px solid var(--ink); color: var(--ink); }
.pill--line:hover { color: var(--ink); background: #fff; }
.pill--ghost { border: 1.5px solid rgba(255, 255, 255, .55); color: #fff; }
.pill--ghost:hover { color: #fff; background: rgba(255, 255, 255, .14); }
.pill--sm { height: 46px; font-size: 15px; padding: 0 20px; }

.textlink {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 0;
  color: #fff; font-size: 16px; font-weight: 700; border-bottom: 2px solid rgba(255, 255, 255, .5);
}
.textlink:hover { color: #fff; border-color: #fff; }

.icon-btn {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, .42); color: #fff;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .16); }

.round-btn {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: #fff; transition: background-color .2s ease;
}
.round-btn:hover { background: var(--cobalt); }
.round-btn:disabled { background: var(--line); color: #8E939D; cursor: default; }

.text-btn { font-size: 14px; font-weight: 700; color: var(--lavender); padding: 12px 0; }

/* ---------- Chips & tabs ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  height: 44px; padding: 0 18px; border-radius: var(--r-pill);
  border: 1px solid var(--line-chip); background: #fff; color: var(--ink-2);
  font-size: 15px; font-weight: 650; white-space: nowrap;
  transition: border-color .2s, background-color .2s, color .2s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip__mark { width: 26px; height: 26px; margin-left: -8px; border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: center; }
.chip__mark img { width: 17px; height: 17px; object-fit: contain; }

.tabs { display: flex; gap: 34px; }
.tab {
  height: 56px; font-size: 17px; font-weight: 700; color: var(--muted); white-space: nowrap;
  border-bottom: 3px solid transparent; transition: color .2s, border-color .2s;
}
.tab:hover { color: var(--ink); }
.tab[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--cobalt); }

@media (max-width: 719px) {
  .chip-row:not(.chip-row--wrap) {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px;
  }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip { padding: 0 16px; }
  .chip-row--wrap { gap: 8px; }
  .tabs { gap: 24px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { height: 52px; font-size: 16px; flex: none; }
}

/* ---------- Marks, badges, tags ---------- */
.mark {
  width: 36px; height: 36px; flex: none; border-radius: var(--r-mark);
  background: #fff; border: 1px solid #E2E5EA;
  display: inline-flex; align-items: center; justify-content: center;
}
.mark img { width: 22px; height: 22px; object-fit: contain; }
.mark--sm { width: 30px; height: 30px; border-radius: 9px; }
.mark--sm img { width: 18px; height: 18px; }
.mark--bare { border: 0; }

.stack-marks { display: flex; align-items: center; }
.stack-marks .mark + .mark { margin-left: -6px; }

.badge {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
  border-radius: var(--r-pill); font-size: 12px; font-weight: 700; white-space: nowrap;
}
.b-direct { background: var(--b-direct-bg); color: var(--b-direct-fg); }
.b-gateway { background: var(--b-gateway-bg); color: var(--b-gateway-fg); }
.b-record { background: var(--b-record-bg); color: var(--b-record-fg); }
.b-warn { background: var(--b-warn-bg); color: var(--b-warn-fg); }
.b-ok { background: var(--b-ok-bg); color: var(--b-ok-fg); }

.sample-tag {
  display: inline-flex; align-items: center; align-self: flex-start; height: 26px; padding: 0 10px;
  border-radius: var(--r-pill); border: 1px solid var(--line-chip);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .05em; color: var(--muted-2); white-space: nowrap;
}
.mono-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: rgba(255, 255, 255, .66); }
.mono-num { font-family: var(--font-mono); font-size: 12px; font-weight: 600; }

.bar { display: block; height: 8px; border-radius: 8px; background: #EDEFF3; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 8px; background: var(--cobalt); transition: width .5s var(--ease); }

/* ---------- Form controls ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.select-wrap { position: relative; }
.select-wrap svg { position: absolute; right: 14px; top: 15px; pointer-events: none; color: var(--ink); }
.select {
  width: 100%; height: 48px; padding: 0 42px 0 14px; border-radius: 12px;
  border: 1px solid var(--line-input); background: #fff; font-size: 15px; font-weight: 650;
  appearance: none; -webkit-appearance: none; cursor: pointer;
}
.range { width: 100%; height: 32px; accent-color: var(--cobalt); cursor: pointer; }
.util-value { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
