:root {
  --explore-blue: #2563eb;
  --explore-blue-dark: #1d4ed8;
  --explore-soft: #eff6ff;
  --explore-border: #dbeafe;
  --explore-text: #0f172a;
  --explore-muted: #64748b;
  --explore-surface: #ffffff;
}

.explore-page {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 70px;
}

.explore-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 24px;
}

.explore-hero-copy,
.explore-highlight,
.explore-control-bar,
.explore-section {
  background: var(--explore-surface);
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .07);
}

.explore-hero-copy {
  padding: clamp(28px, 5vw, 54px);
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.explore-hero h1 {
  max-width: 760px;
  margin: 16px 0 12px;
  color: var(--explore-text);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.explore-hero-copy > p {
  max-width: 720px;
  margin: 0;
  color: var(--explore-muted);
  font-size: 17px;
  line-height: 1.75;
}

.explore-search {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}

.explore-search input {
  min-width: 0;
  flex: 1;
  padding: 15px 17px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  font: inherit;
  outline: none;
}

.explore-search input:focus {
  border-color: var(--explore-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.explore-search button,
.explore-refresh,
.explore-load-more {
  border: 0;
  border-radius: 14px;
  background: var(--explore-blue);
  color: #fff;
  padding: 13px 20px;
  font-weight: 700;
  cursor: pointer;
}

.explore-search button:hover,
.explore-refresh:hover,
.explore-load-more:hover { background: var(--explore-blue-dark); }

.explore-quick-subjects {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.explore-quick-subjects a {
  padding: 8px 12px;
  border: 1px solid var(--explore-border);
  border-radius: 999px;
  background: #fff;
  color: #1e40af;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.explore-highlight {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
  color: #fff;
  background: linear-gradient(145deg, #1d4ed8, #4f46e5);
  border: none;
}

.explore-highlight-icon { font-size: 42px; }
.explore-highlight h2 { margin: 14px 0 8px; font-size: 26px; }
.explore-highlight p { margin: 0; color: #dbeafe; line-height: 1.6; }

.explore-highlight-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 24px;
}

.explore-highlight-stats div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .12);
}

.explore-highlight-stats strong,
.explore-highlight-stats span { display: block; }
.explore-highlight-stats strong { font-size: 25px; }
.explore-highlight-stats span { margin-top: 3px; color: #dbeafe; font-size: 13px; }

.explore-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  margin-bottom: 18px;
}

.explore-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.explore-tab {
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
}
.explore-tab.active { border-color: var(--explore-blue); background: var(--explore-soft); color: var(--explore-blue-dark); }
.explore-refresh { white-space: nowrap; }
.explore-refresh:disabled { opacity: .6; cursor: wait; }

.explore-status {
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--explore-soft);
  color: #1e40af;
  text-align: center;
  font-weight: 700;
}
.explore-status.error { background: #fef2f2; color: #b91c1c; }

.explore-section { margin-top: 24px; padding: 26px; }
.explore-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.explore-section-heading span { color: var(--explore-blue); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.explore-section-heading h2 { margin: 5px 0 0; color: var(--explore-text); font-size: clamp(23px, 3vw, 31px); }
.explore-section-heading a,
.explore-view-feed { color: var(--explore-blue); font-weight: 750; text-decoration: none; }
.explore-view-feed { border: 0; background: transparent; cursor: pointer; font: inherit; }
.explore-section-heading p { margin: 0; color: var(--explore-muted); }

.explore-doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.explore-doc-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 19px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.explore-doc-card:hover { transform: translateY(-4px); border-color: #bfdbfe; box-shadow: 0 14px 28px rgba(37, 99, 235, .1); }
.explore-doc-topline,
.explore-doc-meta,
.explore-doc-footer,
.explore-doc-stats { display: flex; align-items: center; gap: 10px; }
.explore-doc-topline { justify-content: space-between; }
.explore-subject-pill { padding: 6px 9px; border-radius: 999px; background: var(--explore-soft); color: #1d4ed8; font-size: 12px; font-weight: 800; }
.explore-doc-time { color: #94a3b8; font-size: 12px; }
.explore-doc-card h3 { margin: 15px 0 8px; font-size: 18px; line-height: 1.4; }
.explore-doc-card h3 a { color: var(--explore-text); text-decoration: none; }
.explore-doc-card > p { flex: 1; display: -webkit-box; overflow: hidden; margin: 0 0 14px; color: var(--explore-muted); line-height: 1.6; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.explore-doc-meta { flex-wrap: wrap; color: #475569; font-size: 13px; }
.explore-doc-author { margin-top: 11px; color: #64748b; font-size: 13px; }
.explore-doc-footer { justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid #eef2f7; }
.explore-doc-stats { color: #475569; font-size: 13px; }
.explore-doc-footer > a { color: var(--explore-blue); text-decoration: none; font-weight: 800; font-size: 13px; }

.explore-members-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.explore-member-card { position: relative; min-width: 0; padding: 20px 12px; border: 1px solid #e2e8f0; border-radius: 18px; color: var(--explore-text); text-align: center; text-decoration: none; }
.explore-member-card:hover { border-color: #93c5fd; background: #f8fbff; }
.explore-member-rank { position: absolute; top: 10px; left: 10px; color: var(--explore-blue); font-size: 12px; font-weight: 900; }
.explore-member-card img { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; border: 3px solid #dbeafe; }
.explore-member-card h3 { overflow: hidden; margin: 10px 0 5px; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.explore-member-card p { margin: 0; color: #7c3aed; font-size: 13px; font-weight: 800; }
.explore-member-card div { display: flex; justify-content: center; gap: 8px; margin-top: 10px; color: #64748b; font-size: 12px; }

.explore-subject-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 13px; }
.explore-subject-card { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid #e2e8f0; border-radius: 16px; color: var(--explore-text); text-decoration: none; }
.explore-subject-card:hover { border-color: #93c5fd; background: var(--explore-soft); }
.explore-subject-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: #f8fafc; font-size: 23px; }
.explore-subject-card div { min-width: 0; flex: 1; }
.explore-subject-card h3 { margin: 0 0 3px; font-size: 15px; }
.explore-subject-card p { margin: 0; color: var(--explore-muted); font-size: 12px; }
.explore-subject-card > span:last-child { color: var(--explore-blue); }

.explore-empty { grid-column: 1 / -1; padding: 34px; border: 1px dashed #cbd5e1; border-radius: 16px; color: var(--explore-muted); text-align: center; }
.explore-load-more-wrap { display: flex; justify-content: center; margin-top: 22px; }
.explore-feed-section { scroll-margin-top: 88px; }

@media (max-width: 1024px) {
  .explore-doc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explore-members-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .explore-subject-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .explore-page { width: min(100% - 20px, 1200px); padding-top: 20px; }
  .explore-hero { grid-template-columns: 1fr; }
  .explore-hero-copy,
  .explore-highlight,
  .explore-section { padding: 20px; border-radius: 19px; }
  .explore-search { flex-direction: column; }
  .explore-search button { width: 100%; }
  .explore-control-bar { align-items: stretch; flex-direction: column; }
  .explore-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; }
  .explore-tab { flex: 0 0 auto; }
  .explore-refresh { width: 100%; }
  .explore-section-heading { align-items: flex-start; flex-direction: column; }
  .explore-doc-grid { grid-template-columns: 1fr; }
  .explore-members-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explore-subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 430px) {
  .explore-members-grid,
  .explore-subject-grid { grid-template-columns: 1fr; }
  .explore-member-card { display: grid; grid-template-columns: 62px 1fr; column-gap: 12px; text-align: left; }
  .explore-member-card img { grid-row: 1 / span 3; width: 58px; height: 58px; }
  .explore-member-card h3 { margin: 3px 0; }
  .explore-member-card div { justify-content: flex-start; }
}
