:root {
  color-scheme: light;
  --bg: #f5efe5;
  --panel: rgba(255, 250, 242, 0.92);
  --panel-strong: #fffdf8;
  --text: #182126;
  --muted: #5e686f;
  --border: rgba(24, 33, 38, 0.12);
  --accent: #0e7c66;
  --accent-strong: #095646;
  --accent-soft: rgba(14, 124, 102, 0.12);
  --shadow: 0 24px 60px rgba(53, 44, 28, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Helvetica Neue", helvetica, arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 124, 102, 0.16), transparent 32%),
    radial-gradient(circle at top right, rgba(235, 123, 77, 0.18), transparent 28%),
    linear-gradient(180deg, #f8f1e7 0%, #f2eadf 100%);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hero,
.panel,
.member-card {
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.hero {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 247, 236, 0.94)),
    var(--panel);
}

.stat-label,
.field span,
.source-note,
.results-header p {
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Helvetica Neue", helvetica, arial, sans-serif;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.25rem);
  line-height: 0.98;
  max-width: 16ch;
}

.hero-home-link {
  color: inherit;
  text-decoration: none;
}

.hero-project-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  margin-top: 14px;
}

.hero-project-logo {
  width: 150px;
  height: auto;
  display: block;
}

.hero-copy {
  max-width: 58ch;
  margin: 16px 0 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
}

.layout,
.controls-panel,
.results-header,
.member-card-header,
.member-links {
  display: flex;
}

.primary-button,
.ghost-button,
input,
select {
  border-radius: 999px;
  font: inherit;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.primary-button {
  background: var(--accent);
  color: white;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  border-color: var(--border);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.layout {
  flex-direction: column;
  gap: 18px;
  margin-top: 22px;
}

body.member-route .layout {
  margin-top: 12px;
}

#overview-panel[hidden],
#filters-panel[hidden],
#results-panel[hidden] {
  display: none !important;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.stats-panel {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.stat-card {
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
  font-family: "Helvetica Neue", helvetica, arial, sans-serif;
}

.source-note {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 8px 4px;
}

.source-note-footer {
  align-items: flex-start;
  margin-top: 4px;
  opacity: 0.9;
}

.project-footer-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 2px;
}

.project-footer-copy {
  margin: 0;
  color: var(--muted);
}

.project-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-footer-anchor {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  text-decoration: none;
}

.project-footer-icon {
  width: 20px;
  height: 20px;
  display: block;
  opacity: 0.85;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  min-height: 28px;
  padding: 0 10px;
}

.badge {
  background: var(--accent-soft);
  color: var(--accent-strong);
  width: fit-content;
}

.controls-panel {
  gap: 14px;
  align-items: end;
  flex-wrap: wrap;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 230px;
}

input,
select {
  min-height: 50px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  padding: 0 16px;
}

.results-header {
  align-items: end;
  justify-content: space-between;
  padding: 0 4px;
}

.results-header h2 {
  font-size: 1.75rem;
}

.results-header p {
  margin: 8px 0 0;
}

.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.member-route-actions {
  display: flex;
  justify-content: flex-start;
}

.member-route-actions[hidden] {
  display: none !important;
}

.member-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100%;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 249, 241, 0.92)),
    var(--panel-strong);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.member-card-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.member-avatar-link {
  display: block;
}

.member-avatar {
  width: 144px;
  height: 144px;
  flex: 0 0 144px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(14, 124, 102, 0.16), rgba(235, 123, 77, 0.18)),
    rgba(255, 255, 255, 0.92);
}

.member-avatar.is-missing {
  opacity: 0.45;
}

.member-name {
  font-size: 1.3rem;
  line-height: 1.1;
}

.member-heading {
  min-width: 0;
}

.member-identities {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
}

.member-github-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.member-display-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  text-decoration: none;
}

.member-zulip-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  text-decoration: none;
}

.member-github-row[hidden],
.member-zulip-link[hidden] {
  display: none;
}

.member-see-also[hidden] {
  display: none;
}

.member-display-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  opacity: 0.85;
}

.member-bio {
  margin: 0;
  line-height: 1.5;
  color: var(--text);
  overflow-wrap: anywhere;
}

.member-meta {
  display: grid;
  gap: 10px;
  margin: 0;
}

.member-meta div {
  display: grid;
  gap: 3px;
}

.member-meta dt {
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 600;
}

.member-meta dd {
  margin: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.inline-filter-link {
  color: var(--accent-strong);
  text-decoration: none;
}

.inline-filter-label {
  color: var(--accent-strong);
}

.inline-filter-link:hover {
  text-decoration: underline;
}

.external-inline-link {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
}

.external-inline-link:hover {
  color: var(--accent-strong);
}

.external-inline-icon {
  width: 14px;
  height: 14px;
  display: block;
}

.gdcc-inline-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.gdcc-inline-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.coretrust-inline-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.coretrust-inline-icon {
  width: 18px;
  height: 18px;
  display: block;
  border-radius: 3px;
}

.installation-description-preview {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.member-meta dd a,
.member-bio a,
.installation-description-preview a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.member-see-also {
  display: grid;
  gap: 4px;
}

.member-see-also-title {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 600;
}

.member-see-also-link {
  color: var(--accent-strong);
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.description-expand-button {
  border: 0;
  padding: 0;
  margin-left: 2px;
  background: transparent;
  color: var(--accent-strong);
  font: inherit;
  cursor: pointer;
}

.description-expand-button:hover {
  text-decoration: underline;
}

.member-links {
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.member-links a {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 700;
}

.dataversetv-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
}

.dataversetv-link-image {
  width: 76px;
  height: auto;
  display: block;
  flex: 0 0 auto;
}

.empty-state {
  padding: 30px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  text-align: center;
}

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

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 20px;
  }

  .hero,
  .panel,
  .member-card {
    padding: 18px;
  }

  .panel.controls-panel {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .stats-panel {
    grid-template-columns: 1fr 1fr;
  }

  .controls-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .field {
    width: 100%;
    flex: 0 0 auto;
    gap: 2px;
    margin: 0;
  }

  .field span {
    font-size: 0.9rem;
    line-height: 1.2;
  }

  input,
  select {
    min-height: 38px;
    padding: 0 14px;
  }
}
