/* ---------- Devices page ---------- */
.devices-page { max-width: 100%; }

.devices-header {
  margin-bottom: 2rem;
}
.devices-header h1 {
  margin: 0 0 0.5rem;
  font-size: 2.25rem;
  letter-spacing: -0.025em;
}
.devices-header .lede {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 65ch;
}

/* ---------- Controls ---------- */
.devices-controls {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input:focus {
  outline: none;
  border-color: var(--info);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--info) 25%, transparent);
}
.search-input::placeholder { color: var(--text-muted); }

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.filter-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 0.4rem;
  min-width: 6.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.filter-chip {
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 500;
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.filter-chip:hover {
  color: var(--text);
  border-color: var(--text-muted);
}
.filter-chip.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.results-count {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Grid ---------- */
.devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

/* ---------- Card ---------- */
.device-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.15s, transform 0.15s;
}
.device-card:hover {
  border-color: var(--text-muted);
  transform: translateY(-1px);
}
.device-card[hidden] { display: none; }

.device-card-header {
  margin-bottom: 0.75rem;
}
.device-name {
  margin: 0 0 0.15rem;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.device-manufacturer {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.device-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

/* Status & category badges */
.status-badge,
.category-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.status-fully-supported {
  background: var(--accent-dim);
  color: var(--accent);
}
.status-partial {
  background: var(--warn-dim);
  color: var(--warn);
}
.status-experimental {
  background: var(--info-dim);
  color: var(--info);
}
.status-unsupported {
  background: var(--danger-dim);
  color: var(--danger);
}
.category-badge {
  background: var(--bg-soft);
  color: var(--text-muted);
}

/* Detail rows */
.device-details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 0.75rem;
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
}
.device-details dt {
  color: var(--text-muted);
  font-weight: 500;
}
.device-details dd {
  margin: 0;
  color: var(--text);
}

.device-notes {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-soft);
  border-left: 3px solid var(--info);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text);
}

.device-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}
.device-source {
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

@media (max-width: 600px) {
  .filter-label { min-width: auto; width: 100%; margin-bottom: 0.25rem; }
  .devices-header h1 { font-size: 1.75rem; }
}
