.channel-explorer {
  display: grid;
  gap: clamp(20px, 3vw, 28px);
  max-width: var(--page-width);
  margin-inline: auto;
}

.explorer-introduction {
  max-width: 790px;
}

.explorer-eyebrow {
  margin-block-end: 8px;
  color: var(--color-brand-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}

[lang="ar"] .explorer-eyebrow {
  letter-spacing: normal;
}

.explorer-title {
  color: var(--color-ink);
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  font-weight: 780;
  letter-spacing: -0.04em;
  line-height: 1.16;
  text-wrap: balance;
}

[lang="ar"] .explorer-title,
[lang="fr"] .explorer-title {
  letter-spacing: normal;
}

.explorer-description {
  max-width: 62ch;
  margin-block-start: 12px;
  color: var(--color-muted-strong);
  font-size: 1rem;
  line-height: 1.75;
}

.explorer-sample-notice {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 15px 17px;
  border: 1px solid #cce9ed;
  border-radius: var(--radius-medium);
  color: #245663;
  background: #effafb;
}

.explorer-sample-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: #236b78;
  background: #d9f2f3;
}

.explorer-sample-mark .icon {
  width: 21px;
  height: 21px;
}

.explorer-sample-copy {
  align-self: center;
  font-size: 0.92rem;
  font-weight: 620;
  line-height: 1.65;
}

.explorer-controls {
  display: grid;
  gap: 21px;
  padding: clamp(17px, 3vw, 26px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.explorer-search-form {
  display: grid;
  gap: 7px;
  margin: 0;
}

.explorer-search-label,
.explorer-filter-label {
  color: var(--color-ink-soft);
  font-size: 0.88rem;
  font-weight: 700;
}

.explorer-search-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding-inline: 15px 7px;
  border: 1px solid #d5dfeb;
  border-radius: 14px;
  background: var(--color-surface);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.explorer-search-row:focus-within {
  border-color: var(--color-brand-dark);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 15%);
}

.explorer-search-icon {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  color: var(--color-brand-dark);
}

.explorer-search-icon .icon {
  width: 20px;
  height: 20px;
}

.explorer-search-input {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 7px 2px;
  border: 0;
  outline: 0;
  color: var(--color-ink);
  background: transparent;
}

.explorer-search-input::placeholder {
  color: var(--color-muted);
  opacity: 1;
}

.explorer-search-input:focus-visible {
  outline: 0;
}

.explorer-clear-search {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 9px;
  border: 0;
  border-radius: 10px;
  color: var(--color-muted-strong);
  background: transparent;
  font-size: 0.83rem;
  font-weight: 650;
  white-space: nowrap;
}

.explorer-clear-search .icon {
  width: 16px;
  height: 16px;
}

.explorer-clear-search:hover:not(:disabled) {
  color: var(--color-brand-deep);
  background: var(--color-brand-soft);
}

.explorer-clear-search:disabled {
  color: #9ba7b6;
  cursor: not-allowed;
}

.explorer-filters {
  min-width: 0;
  padding: 0;
  border: 0;
}

.explorer-filters-legend {
  margin-block-end: 9px;
  color: var(--color-ink-soft);
  font-size: 0.88rem;
  font-weight: 740;
}

.explorer-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.explorer-filter-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.explorer-filter-select {
  width: 100%;
  min-height: 46px;
  padding-block: 8px;
  padding-inline: 12px;
  border: 1px solid var(--color-border);
  border-radius: 11px;
  color: var(--color-ink);
  background: var(--color-surface);
}

.explorer-filter-select:disabled {
  color: var(--color-muted);
  background: var(--color-surface-tint);
  cursor: wait;
}

.explorer-clear-filters,
.explorer-retry,
.explorer-empty-clear,
.explorer-page-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border: 1px solid var(--color-border);
  border-radius: 11px;
  color: var(--color-ink-soft);
  background: var(--color-surface);
  font-size: 0.88rem;
  font-weight: 680;
  transition: border-color var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast);
}

.explorer-clear-filters {
  margin-block-start: 12px;
}

.explorer-clear-filters:hover:not(:disabled),
.explorer-empty-clear:hover:not(:disabled),
.explorer-page-button:hover:not(:disabled) {
  border-color: #b9cae5;
  color: var(--color-brand-deep);
  background: var(--color-brand-soft);
}

.explorer-clear-filters:disabled,
.explorer-page-button:disabled {
  color: #9ba7b6;
  background: var(--color-surface-tint);
  cursor: not-allowed;
}

.explorer-results {
  display: grid;
  gap: 16px;
}

.explorer-results-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.explorer-results-title {
  color: var(--color-ink);
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 740;
  line-height: 1.3;
}

.explorer-result-count {
  color: var(--color-muted);
  font-size: 0.88rem;
  text-align: end;
}

.explorer-status {
  min-height: 1.5em;
  color: var(--color-muted-strong);
  font-size: 0.92rem;
}

.explorer-status:not(:empty)::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-inline-end: 9px;
  border-radius: 50%;
  background: var(--color-accent);
  content: "";
  vertical-align: 0.06em;
}

.explorer-warning {
  padding: 11px 14px;
  border: 1px solid #edd5a4;
  border-radius: 12px;
  color: #73531c;
  background: #fff8e8;
  font-size: 0.88rem;
}

.explorer-warning[hidden],
.explorer-state-panel[hidden],
.explorer-pagination[hidden] {
  display: none;
}

.explorer-state-panel {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-surface);
}

.explorer-error-state {
  border-color: #e9c8bd;
  background: #fff8f5;
}

.explorer-state-title {
  color: var(--color-ink);
  font-size: 1.12rem;
  font-weight: 730;
  line-height: 1.4;
}

.explorer-state-description {
  max-width: 60ch;
  color: var(--color-muted-strong);
  font-size: 0.92rem;
  line-height: 1.65;
}

.explorer-retry {
  margin-block-start: 8px;
  border-color: transparent;
  color: #fff;
  background: var(--color-brand-dark);
}

.explorer-retry:hover {
  background: var(--color-brand-deep);
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.channel-grid-item {
  min-width: 0;
}

.channel-card {
  display: grid;
  min-height: 100%;
  align-content: start;
  gap: 14px;
  padding: clamp(16px, 2vw, 21px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.channel-card-header {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.channel-card-title-block {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.channel-card-title {
  overflow-wrap: anywhere;
  color: var(--color-ink);
  font-size: 1.06rem;
  font-weight: 740;
  line-height: 1.35;
}

.channel-sample-badge {
  justify-self: start;
  padding: 3px 8px;
  border: 1px solid #cce9ed;
  border-radius: 999px;
  color: #24616c;
  background: var(--color-accent-soft);
  font-size: 0.72rem;
  font-weight: 720;
  line-height: 1.4;
}

.channel-card-description {
  color: var(--color-muted-strong);
  font-size: 0.91rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.channel-metadata {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-block-start: 12px;
  border-block-start: 1px solid #edf0f4;
}

.channel-metadata-row {
  display: grid;
  grid-template-columns: minmax(76px, 0.36fr) minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.channel-metadata-label {
  color: var(--color-muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.channel-metadata-values {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
}

.channel-metadata-chip {
  max-width: 100%;
  padding: 2px 8px;
  border: 1px solid #e2e9f1;
  border-radius: 999px;
  color: var(--color-ink-soft);
  background: var(--color-surface-tint);
  font-size: 0.77rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.explorer-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-block-start: 6px;
}

.explorer-page-status {
  color: var(--color-muted-strong);
  font-size: 0.88rem;
  font-weight: 650;
}

@media (max-width: 900px) {
  .channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .explorer-filter-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .channel-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .explorer-results-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .explorer-result-count {
    text-align: start;
  }
}

@media (max-width: 440px) {
  .explorer-search-row {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 7px;
    padding: 7px 10px;
  }

  .explorer-search-input {
    min-height: 42px;
  }

  .explorer-clear-search {
    grid-column: 1 / -1;
    justify-self: end;
    min-height: 34px;
    padding-block: 4px;
  }

  .explorer-results-header {
    gap: 5px;
  }
}
