.explore-view {
  display: grid;
  gap: 1.35rem;
}

.explore-hero {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.explore-hero h1 {
  margin: .25rem 0 .5rem;
  font-size: clamp(1.5rem, 6vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.explore-hero p:last-child {
  max-width: 48rem;
  margin: 0;
  color: #5b6473;
  font-size: var(--text-sm);
}

.explore-sources {
  display: grid;
  gap: .75rem;
}

.explore-section {
  display: grid;
  gap: .9rem;
  margin-top: 1.1rem;
}

.explore-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.explore-section-heading h2 {
  margin: .2rem 0 0;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  color: #172033;
}

.explore-source-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .65rem;
}

.explore-source-card {
  min-width: 0;
  min-height: 0;
  padding: .85rem;
  border: 1px solid #e1e5ee;
  border-radius: 1rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .7rem;
  align-items: start;
  background: #fff;
  box-shadow: 0 1px 2px rgba(24, 28, 50, .05), 0 1px 6px rgba(24, 28, 50, .04);
}

.explore-source-card h3 {
  margin: 0;
  color: #172033;
  font-size: .9rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.explore-source-card p {
  margin: .25rem 0 0;
  color: #667085;
  font-size: .74rem;
  line-height: 1.4;
}

.explore-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .8rem;
  min-width: 0;
}

.explore-filters {
  min-width: 0;
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding: .1rem 0 .35rem;
  scrollbar-width: thin;
}

.explore-filters button {
  flex: 0 0 auto;
  min-height: 2.75rem;
  border: 1px solid #d8ddea;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  padding: .65rem .95rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.explore-filters button[aria-pressed="true"] {
  border-color: #3347d6;
  background: #eef0ff;
  color: #2435b8;
}

.explore-layout-toggle {
  flex: 0 0 auto;
  padding: .2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: inline-grid;
  grid-template-columns: repeat(2, auto);
  gap: .16rem;
  background: var(--color-surface-2);
}

.explore-layout-toggle button {
  min-height: 2.35rem;
  padding: .5rem .65rem;
  border: 0;
  border-radius: .65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .38rem;
  color: var(--color-ink-600);
  background: transparent;
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
}

.explore-layout-toggle button[aria-pressed="true"] {
  color: var(--color-brand-700);
  background: var(--color-surface-1);
  box-shadow: var(--shadow-sm);
}

.explore-layout-toggle svg {
  width: 1rem;
  height: 1rem;
}

.explore-resource-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .9rem;
}

.explore-resource-card {
  min-width: 0;
  border: 1px solid #e1e5ee;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 24px rgba(30, 41, 59, .055);
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding: 1rem;
}

.explore-resource-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.explore-type,
.explore-status {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  border-radius: 999px;
  padding: .2rem .6rem;
  font-size: .78rem;
  font-weight: 800;
}

.explore-type {
  background: #f1f5f9;
  color: #475569;
}

.explore-status {
  background: #eef0ff;
  color: #3347d6;
}

.explore-resource-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .8rem;
  align-items: start;
}

.explore-resource-body h3 {
  margin: 0;
  color: #172033;
  overflow-wrap: anywhere;
}

.explore-resource-body p {
  margin: .35rem 0 0;
  color: #667085;
  line-height: 1.48;
}

.explore-resource-body .explore-source-name {
  color: #344054;
  font-weight: 750;
}

.explore-source-mark {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: .85rem;
  background: #eef0ff;
  color: #3347d6;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .02em;
}

.explore-resource-actions {
  display: flex;
  gap: .65rem;
  justify-content: flex-end;
  margin-top: auto;
}

.explore-resource-actions .button {
  min-width: 6.5rem;
}

.explore-resource-grid.is-list {
  grid-template-columns: minmax(0, 1fr);
}

.explore-resource-grid.is-list .explore-resource-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "topline topline"
    "body actions";
  align-items: center;
}

.explore-resource-grid.is-list .explore-resource-topline {
  grid-area: topline;
}

.explore-resource-grid.is-list .explore-resource-body {
  grid-area: body;
}

.explore-resource-grid.is-list .explore-resource-actions {
  grid-area: actions;
  align-self: center;
  margin-top: 0;
}

.explore-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 1rem;
  background: #f8fafc;
  padding: 1.35rem;
}

.explore-empty h2 {
  margin: 0;
  font-size: 1.1rem;
}

.explore-empty p {
  margin: .45rem 0 0;
  color: #64748b;
}

.explore-empty .button {
  margin-top: .9rem;
}

.explore-dialog {
  width: min(34rem, calc(100vw - 2rem));
  border: 0;
  border-radius: 1rem;
  padding: 0;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .25);
}

.explore-dialog::backdrop {
  background: rgba(15, 23, 42, .42);
}

.explore-dialog-shell {
  padding: 1rem;
}

.explore-dialog-shell header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}

.explore-dialog-shell h2 {
  margin: .2rem 0 0;
}

.explore-dialog-shell > p {
  color: #5b6473;
  line-height: 1.5;
}

@media (max-width: 47.99rem) {
  .explore-toolbar {
    display: grid;
    gap: .7rem;
  }

  .explore-layout-toggle {
    justify-self: end;
  }

  .explore-resource-grid.is-list .explore-resource-card {
    display: flex;
  }

  .explore-resource-grid.is-list .explore-resource-actions {
    margin-top: auto;
  }
}

@media (min-width: 36rem) {
  .explore-source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 51.25rem) {
  .explore-resource-grid:not(.is-list) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 68.75rem) {
  .explore-source-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 80rem) {
  .explore-resource-grid:not(.is-list) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .explore-resource-grid:not(.is-list).is-single .explore-resource-card {
    grid-column: span 2;
  }
}

@media (max-width: 24.375rem) {
  .explore-resource-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .explore-resource-actions .button {
    min-width: 0;
    width: 100%;
  }

  .explore-layout-toggle span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
}
