/* ── CUSTOM PROPERTIES ── */
:root {
  --bg:           #0d1117;
  --surface:      #161b22;
  --surface-2:    #21262d;
  --border:       #30363d;
  --border-focus: #58a6ff;
  --text-1:       #e6edf3;
  --text-2:       #8b949e;
  --text-3:       #484f58;
  --accent:       #2f81f7;
  --accent-hover: #388bfd;
  --green:        #3fb950;
  --amber:        #d29922;
  --red:          #f85149;
  --rent:         #a371f7;
  --rent-hover:   #bf8fff;

  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 64px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-card:    0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-focus:   0 0 0 3px rgba(47,129,247,0.3);
  --shadow-recbest: 0 0 0 1px var(--accent), 0 4px 16px rgba(47,129,247,0.15);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img, video { max-width: 100%; }
/* Ensure [hidden] works on elements with explicit display rules (e.g. display:grid) */
[hidden] { display: none !important; }

/* ── BASE TYPOGRAPHY ── */
body {
  background: var(--bg);
  color: var(--text-1);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

strong {
  font-weight: 600;
}

/* ── LAYOUT: HEADER ── */
#site-header {
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-1);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
}

.site-logo:hover {
  text-decoration: none;
}

.logo-icon {
  color: var(--accent);
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  gap: 24px;
}

.nav-link {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}

.nav-link:hover {
  color: var(--text-1);
  text-decoration: none;
}

/* ── LAYOUT: MAIN ── */
#main-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
}

#recommender {
  background: var(--bg);
}

#benchmark-table {
  background: var(--surface);
}

#model-deep-dive {
  background: var(--bg);
}

/* ── LAYOUT: FOOTER ── */
#site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.footer-col {
  flex: 1;
}

.footer-heading {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-2);
  margin: 0 0 12px;
}

.footer-text {
  font-size: 0.8125rem;
  color: var(--text-2);
  line-height: 1.7;
  margin: 0 0 8px;
}

.footer-disclosure {
  font-size: 0.75rem;
  color: var(--text-3);
  margin: 0 0 16px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-nav a {
  color: var(--text-2);
  font-size: 0.875rem;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--text-1);
  text-decoration: none;
}

/* ── SECTION CARDS ── */
.section-h2 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
}

/* ── RECOMMENDER ── */
.recommender-header {
  margin-bottom: 32px;
}

#recommender-heading {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text-1);
}

.recommender-subhead {
  color: var(--text-2);
  margin: 0;
  font-size: 0.9375rem;
}

.recommender-controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-readout {
  color: var(--text-1);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.control-select {
  background: var(--surface-2);
  color: var(--text-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.875rem;
  width: 100%;
  font-family: inherit;
}

.control-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

.control-input {
  background: var(--surface-2);
  color: var(--text-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.875rem;
  width: 100%;
  font-family: inherit;
}

.control-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  height: 4px;
  cursor: pointer;
}

.toggle-group {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.toggle-btn {
  flex: 1;
  padding: 7px 14px;
  background: transparent;
  color: var(--text-2);
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-family: inherit;
  transition: all 0.15s;
}

.toggle-btn:hover {
  background: var(--surface-2);
  color: var(--text-1);
}

.toggle-btn.is-active {
  background: var(--accent);
  color: white;
}

.control-hint {
  font-size: 0.75rem;
  color: var(--text-2);
  margin: 0;
  min-height: 1.2em;
}

.affiliate-disclosure {
  font-size: 0.75rem;
  color: var(--text-3);
  margin-bottom: 20px;
}

/* ── REC CARDS ── */
#rec-loading,
.rec-empty {
  color: var(--text-2);
  text-align: center;
  padding: 32px 0;
  font-size: 0.9375rem;
}

.rec-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.rec-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.15s;
  animation: fadeIn 0.2s ease-out;
}

.rec-card--best {
  border-color: var(--accent);
  box-shadow: var(--shadow-recbest);
}

.rec-card:nth-child(2) {
  animation-delay: 0.05s;
}

.rec-card:nth-child(3) {
  animation-delay: 0.1s;
}

.rec-card-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rec-rank-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  width: fit-content;
}

.rec-rank-badge--best {
  background: rgba(47,129,247,0.15);
  color: var(--accent);
  border-color: rgba(47,129,247,0.3);
}

.rec-gpu-name {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-1);
  margin: 0;
}

.rec-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
}

.rec-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rec-stat-label {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-2);
}

.rec-stat-value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}

.rec-stat-value--speed {
  color: var(--green);
}

.rec-stat-value--price {
  color: var(--text-1);
}

.rec-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.rec-low-confidence {
  font-size: 0.75rem;
  color: var(--amber);
  margin: 0;
}

/* ── BUILD DETAILS (Full Build condition) ── */
.rec-build-details {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 4px;
}

.rec-build-details-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-2);
  margin: 0 0 8px 0;
}

.rec-build-parts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rec-build-part {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-1);
}

.rec-build-part-name {
  flex: 1;
  min-width: 0;
}

.rec-build-part-name a {
  color: var(--text-1);
  text-decoration: none;
  font-size: 0.8125rem;
}

.rec-build-part-name a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.rec-build-part-label {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  flex-shrink: 0;
  width: 40px;
  text-align: right;
}

.rec-build-part-price {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
  width: 48px;
  text-align: right;
}

.rec-build-part--gpu .rec-build-part-name a {
  color: var(--accent);
}

.rec-build-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-1);
}

.rec-build-validated-note {
  font-size: 0.6875rem;
  color: var(--green);
  margin: 6px 0 0 0;
  font-style: italic;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: white;
}

.btn--primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.btn--rent {
  background: rgba(163,113,247,0.15);
  color: var(--rent);
  border: 1px solid rgba(163,113,247,0.3);
}

.btn--rent:hover {
  background: rgba(163,113,247,0.25);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--text-2);
  color: var(--text-1);
  text-decoration: none;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.75rem;
}

/* ── FORM CONTROLS ── */
/* (select and input styling already defined under RECOMMENDER) */

/* ── BENCHMARK TABLE ── */
.table-section-header {
  margin-bottom: 20px;
}

#table-heading {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
}

.section-subhead {
  color: var(--text-2);
  font-size: 0.875rem;
  margin: 4px 0 0;
}

.table-controls {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.model-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.model-pill {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.model-pill:hover {
  border-color: var(--text-2);
}

.model-pill--active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.table-scroll-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
}

/* .table-scroll-wrapper::after gradient removed — was causing a distracting right-edge fade */

.benchmark-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.benchmark-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-2);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.benchmark-table th:hover {
  color: var(--text-1);
}

.benchmark-table th.col-sorted-desc::after {
  content: " ↓";
}

.benchmark-table th.col-sorted-asc::after {
  content: " ↑";
}

.benchmark-table td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(48,54,61,0.6);
  vertical-align: middle;
}

.benchmark-table tr:last-child td {
  border-bottom: none;
}

.benchmark-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

.col-gpu {
  min-width: 120px;
  font-weight: 500;
}

.col-gpu a {
  color: var(--text-1);
  text-decoration: none;
}

.col-gpu a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.col-vram,
.col-price {
  white-space: nowrap;
  color: var(--text-2);
}

.col-speed {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.col-speed--na {
  color: var(--text-3);
  text-align: right;
}

.col-speed--hot {
  background: rgba(63,185,80,0.2);
}

.col-speed--warm {
  background: rgba(63,185,80,0.10);
}

/* .col-speed--offload and .col-speed--partial removed — offload type shown via .offload-icon superscript */

/* Dim unusably-slow CPU offload cells (< 15 tok/s) */
.col-speed--offload-slow {
  color: var(--text-3);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* OOM / ERR failure cell */
.col-speed--failed { text-align: right; white-space: nowrap; }

.failed-cell {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--red, #f85149);
  background: rgba(248, 81, 73, 0.08);
  border: 1px solid rgba(248, 81, 73, 0.25);
  cursor: help;
  letter-spacing: 0.02em;
}

.cell-loading {
  text-align: center;
  padding: 32px;
  color: var(--text-2);
}

/* ── TABLE COLUMN TOGGLES ── */
/* (model-pills and pill styling already defined above) */

/* ── TABLE HEATMAP ── */
/* (col-speed--hot, col-speed--warm already defined above) */

/* ── TABLE BADGES ── */
.badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  border: 1px solid;
}

.badge--low {
  color: var(--amber);
  background: rgba(210,153,34,0.1);
  border-color: rgba(210,153,34,0.3);
}

/* .badge--offload and .badge--partial removed — replaced by .offload-icon */

/* ── MODEL DEEP DIVE ── */
.deep-dive-header {
  margin-bottom: 28px;
}

.deep-dive-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
  max-width: 640px;
}

.deep-dive-chart-wrap {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 24px 16px;
  margin-bottom: 12px;
  position: relative;
  min-height: 200px;
}

.deep-dive-chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--text-3);
  font-size: 0.9375rem;
}

.deep-dive-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-left: 4px;
}

.dd-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-2);
}

.dd-legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.dd-legend-swatch--gpu-full    { background: rgba(63,185,80,0.75); }
.dd-legend-swatch--gpu-partial { background: rgba(210,153,34,0.75); }
.dd-legend-swatch--cpu-offload { background: rgba(248,81,73,0.75); }

/* Config Impact panel */
.deep-dive-config-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px 24px;
}

.deep-dive-config-heading {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text-1);
}

.deep-dive-config-sub {
  font-size: 0.8125rem;
  color: var(--text-2);
  margin: 0 0 16px;
}

.deep-dive-config-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dd-config-gpu {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.dd-config-gpu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-1);
  border-bottom: 1px solid var(--border);
}

.dd-config-gpu-speed {
  font-variant-numeric: tabular-nums;
  color: var(--green);
}

.dd-config-entries {
  display: flex;
  flex-direction: column;
}

.dd-config-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 0.78rem;
  border-bottom: 1px solid rgba(48,54,61,0.5);
}

.dd-config-entry:last-child {
  border-bottom: none;
}

.dd-config-entry-label {
  color: var(--text-2);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dd-config-entry-speed {
  color: var(--text-1);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 70px;
  text-align: right;
}

.dd-config-variance-bar-wrap {
  width: 80px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  flex-shrink: 0;
  overflow: hidden;
}

.dd-config-variance-bar {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
  .deep-dive-controls {
    grid-template-columns: 1fr;
  }
}

/* ── ANIMATIONS ── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── RESPONSIVE: 768px ── */
@media (max-width: 768px) {
  .site-nav {
    display: none;
  }

  .section-inner {
    padding: 32px 16px;
  }

  .recommender-controls {
    grid-template-columns: 1fr 1fr;
  }

  .rec-cards {
    grid-template-columns: 1fr;
  }

  .deep-dive-controls {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 32px;
  }

  #recommender-heading {
    font-size: 1.375rem;
  }

  .col-gpu {
    position: sticky;
    left: 0;
    background: var(--surface);
  }
}

@media (max-width: 480px) {
  .recommender-controls {
    grid-template-columns: 1fr;
  }
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ── SPEED SIMULATION WIDGET ── */
.speed-sim {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 20px;
  transition: opacity 0.2s;
}

.speed-sim.is-off {
  opacity: 0.45;
}

.speed-sim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}

.speed-sim-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-2);
}

.speed-sim-toggle {
  flex-shrink: 0;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: inherit;
  background: rgba(47,129,247,0.12);
  color: var(--accent);
  border: 1px solid rgba(47,129,247,0.3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  min-width: 36px;
  text-align: center;
}

.speed-sim-toggle:hover {
  background: rgba(47,129,247,0.2);
}

.speed-sim-toggle.is-off {
  background: transparent;
  color: var(--text-3);
  border-color: var(--border);
}

.speed-sim-toggle.is-off:hover {
  color: var(--text-2);
  border-color: var(--text-3);
}

.speed-sim-output {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--text-1);
  min-height: 3.3em;
  max-height: 3.3em;
  overflow: hidden;
  word-break: break-word;
}

.speed-sim-cursor {
  display: inline;
  color: var(--accent);
  font-weight: 300;
  animation: simCursorBlink 0.9s step-end infinite;
}

.speed-sim.is-off .speed-sim-cursor {
  animation: none;
  opacity: 0;
}

@keyframes simCursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── TABLE CONTROLS LAYOUT (GPU + model row stacking) ── */
.table-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
}

.table-controls > #table-reset-btn {
  align-self: flex-end;
  margin-top: 4px;
}

.controls-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.controls-row-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-2);
  line-height: 1;
  padding-top: 6px;
  white-space: nowrap;
  min-width: 44px;
}

.controls-row-actions {
  display: flex;
  gap: 4px;
}

/* ── GPU PILLS (row toggle — squared corners vs capsule model pills) ── */
.gpu-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.gpu-pill {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}

.gpu-pill:hover {
  border-color: var(--text-2);
  color: var(--text-1);
}

.gpu-pill--active {
  background: var(--surface-2);
  color: var(--text-1);
  border-color: var(--text-2);
}

.row-no-gpus td {
  text-align: center;
  padding: 24px 12px;
  color: var(--text-2);
  font-size: 0.875rem;
  font-style: italic;
}

/* ── OFFLOAD ICONS (superscript warning symbols with JS tooltip) ── */
.offload-icon {
  display: inline-block;
  vertical-align: super;
  font-size: 0.65em;
  line-height: 1;
  font-weight: 700;
  color: var(--amber);
  cursor: help;
  margin-left: 2px;
}

.offload-icon--partial {
  color: var(--text-3);
  font-size: 0.75em;
  font-weight: 400;
}

/* ── TABLE LEGEND ── */
.table-legend {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.5;
}

.table-legend strong {
  color: var(--text-2);
}

/* JS-driven fixed-position tooltip (escapes table overflow:auto context) */
#offload-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: 240px;
  background: var(--surface-2);
  color: var(--text-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.75rem;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
  transform: translateX(-50%) translateY(-100%);
  margin-top: -8px;
  white-space: normal;
  word-break: normal;
}
