/* ── Benchmark comparison table ────────────────────────────────────── */
.bm-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.bm-table thead th {
  background: var(--glass-dark);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  position: sticky; top: 0; z-index: 3;
  padding: 6px 4px; font-size: 11px; font-weight: 600;
  letter-spacing: -0.1px;
  color: var(--text); text-align: center;
  border-bottom: 1px solid var(--border-std);
  white-space: nowrap;
}
.bm-table thead th .bm-th-icon {
  display: inline-block; margin-right: 3px; font-size: 9px;
  vertical-align: 1px; opacity: .7;
}
.bm-table thead th .bm-th-name {
  display: inline-block; max-width: 90px;
  overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
}
.bm-table thead th.bm-col-comp { color: #ff9f0a; }
.bm-table thead th.bm-col-proj { color: #5b8dee; }
.bm-table thead th.bm-col-data {
  cursor: grab; user-select: none;
  transition: background .15s ease, transform .15s ease;
}
.bm-table thead th.bm-col-data:active { cursor: grabbing; }
.bm-table thead th.bm-col-data.bm-drag-from { opacity: .35; }
.bm-table thead th.bm-col-data.bm-drag-over {
  background: rgba(91,141,238,.18);
  box-shadow: inset 3px 0 0 #5b8dee, inset -3px 0 0 #5b8dee;
}
.bm-table thead th.bm-col-kw,
.bm-table thead th.bm-col-freq,
.bm-table tbody td.bm-cell-kw,
.bm-table tbody td.bm-cell-freq {
  position: sticky; left: 0; z-index: 2;
  background: var(--bg);
}
.bm-table thead th.bm-col-kw   { text-align: left;  text-transform: uppercase; font-size: 10.5px; letter-spacing: .6px; color: var(--muted); }
.bm-table thead th.bm-col-freq { text-align: right; text-transform: uppercase; font-size: 10.5px; letter-spacing: .6px; color: var(--muted); left: 200px; }
.bm-table tbody td.bm-cell-freq { left: 200px; text-align: right; }
.bm-table thead th.bm-col-kw   { z-index: 4; }
.bm-table thead th.bm-col-freq { z-index: 4; }
.bm-table tbody td {
  padding: 3px 4px;
  border-bottom: 1px solid var(--border-dim);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.bm-table tbody td.bm-cell-kw {
  padding: 5px 10px;
  font-weight: 500; color: var(--text); text-align: left;
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bm-table tbody td.bm-cell-freq { padding: 5px 10px; font-weight: 600; color: var(--text2); }
.bm-table tbody tr:hover td { background: rgba(255,255,255,.03); }
.bm-table tbody tr:hover td.bm-cell-kw,
.bm-table tbody tr:hover td.bm-cell-freq { background: rgba(255,255,255,.05); }
.bm-pos {
  font-weight: 700; font-size: 16px;
  padding: 2px 5px; border-radius: 6px;
  min-width: 28px; display: inline-block;
  letter-spacing: -0.4px;
}
/* Position color palette: 1-3 dark blue · 4-5 blue · 6-10 green · 11-30 yellow · 31-50 orange · 51+/нет красный */
.bm-pos.bm-pos-1to3    { background: rgba(29,78,216,.28);   color: #93c5fd; }
.bm-pos.bm-pos-4to5    { background: rgba(34,197,94,.22);  color: #4ade80; }
.bm-pos.bm-pos-6to10   { background: rgba(34,197,94,.18);  color: #4ade80; }
.bm-pos.bm-pos-11to30  { background: rgba(249,115,22,.20); color: #fb923c; }
.bm-pos.bm-pos-31to50  { background: rgba(107,114,128,.18);color: #9ca3af; }
.bm-pos.bm-pos-51plus  { background: rgba(75,85,99,.15);   color: #6b7280; }
.bm-pos.bm-pos-none    { background: transparent;           color: rgba(255,255,255,.18); font-weight: 400; }
[data-theme="light"] .bm-table thead th { background: rgba(255,255,255,.85); }
[data-theme="light"] .bm-table thead th.bm-col-kw,
[data-theme="light"] .bm-table thead th.bm-col-freq,
[data-theme="light"] .bm-table tbody td.bm-cell-kw,
[data-theme="light"] .bm-table tbody td.bm-cell-freq { background: var(--bg); }
[data-theme="light"] .bm-table tbody tr:hover td { background: rgba(0,0,0,.025); }
[data-theme="light"] .bm-pos.bm-pos-1to3 { background: rgba(29,78,216,.18); color: #1d4ed8; }
[data-theme="light"] .bm-pos.bm-pos-4to5 { background: rgba(59,130,246,.14); color: #3b82f6; }

/* glass-surface (React Bits) — removed */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Unified form fields — frozen glass style
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Native pickers (date, time, color) follow theme */
:root, [data-theme="dark"]  { color-scheme: dark;  }
[data-theme="light"]        { color-scheme: light; }

/* <option> elements — fix white-on-white in OS popup */
select option, .sb-select option {
  background: var(--bg2);
  color: var(--text);
  padding: 6px 10px;
}

/* Unified frozen glass look */
.sb-select,
.custom-dates input,
.bm-date-input,
.form-input,
.freq-csv-input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(0,0,0,0.20);
  transition: border-color .15s, background .15s;
}
.sb-select          { padding: 9px 32px 9px 12px; font-size: 13px; }
.custom-dates input,
.bm-date-input      { padding: 9px 12px; font-size: 13px; border-radius: 10px; }
.form-input         { padding: 11px 14px; font-size: 14px; border-radius: 12px; }

/* Hover */
.sb-select:hover:not(:focus),
.custom-dates input:hover:not(:focus),
.bm-date-input:hover:not(:focus),
.form-input:hover:not(:focus) {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.16);
}

/* Amber focus ring */
.sb-select:focus,
.custom-dates input:focus,
.bm-date-input:focus,
.form-input:focus,
.freq-csv-input:focus {
  outline: none;
  border-color: rgba(245,158,11,0.60);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.14);
}

/* Clean SVG chevron caret */
.sb-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(255,255,255,.40)' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Custom Select — floating transparent panel, no OS chrome
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.cs-wrap {
  position: relative;
  display: block;
}
.cs-wrap select { display: none !important; }

/* Trigger button — matches .sb-select frozen glass look */
.cs-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.20);
}
.cs-trigger:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.16);
}
.cs-open .cs-trigger,
.cs-trigger:focus {
  outline: none;
  border-color: rgba(245,158,11,0.60);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.14);
}

/* Label text inside trigger */
.cs-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}
.cs-label--placeholder { color: var(--muted); }

/* Caret icon */
.cs-caret {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  color: rgba(255,255,255,0.38);
  transition: transform .22s cubic-bezier(.4,0,.2,1), color .15s;
}
.cs-open .cs-caret { transform: rotate(180deg); color: rgba(245,158,11,0.80); }

