/* OCT Scholar Rank */
.scholars-page,
.scholar-profile-page {
  padding-bottom: 80px;
}

.scholars-hero {
  padding: clamp(42px, 6vw, 74px) 0 30px;
}

.scholars-hero h1 {
  max-width: 12em;
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.scholars-hero .page-dek {
  max-width: 48em;
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.9;
}

.scholar-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--line);
}

.scholar-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--surface);
}

.scholar-stat strong {
  color: var(--brand-deep);
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
}

.scholar-stat span {
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

.scholar-hero-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 9.5px;
}

.scholars-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 160px;
  gap: 10px;
  margin: 30px 0 12px;
}

.scholar-search,
.scholar-select {
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.scholar-search {
  gap: 8px;
  padding: 0 12px;
}

.scholar-search svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
  flex: none;
}

.scholar-search input {
  width: 100%;
  min-width: 0;
  padding: 11px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  outline: none;
}

.scholar-select {
  gap: 8px;
  padding: 0 10px;
}

.scholar-select span {
  color: var(--muted);
  font-size: 8.5px;
  white-space: nowrap;
}

.scholar-select select {
  width: 100%;
  min-width: 0;
  padding: 11px 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 10.5px;
  outline: none;
}

.scholar-status {
  padding: 0 2px 10px;
  color: var(--muted);
  font-size: 9px;
}

.scholar-list {
  border-top: 1px solid var(--line);
}

.scholar-row {
  display: grid;
  grid-template-columns: 46px 46px minmax(0, 1fr) 240px 112px;
  gap: 14px;
  align-items: center;
  padding: 18px 10px;
  border-bottom: 1px solid var(--line);
}

.scholar-row.is-top {
  background: linear-gradient(90deg, var(--brand-soft), transparent 58%);
}

.scholar-rank {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-decoration: none;
}

.scholar-row.is-top .scholar-rank {
  color: var(--accent-deep);
  font-weight: 700;
}

.scholar-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.scholar-main {
  min-width: 0;
}

.scholar-main h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.scholar-main h2 a {
  color: var(--ink);
  text-decoration: none;
}

.scholar-main h2 a:hover {
  color: var(--accent-deep);
}

.scholar-affiliation {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scholar-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.scholar-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 8.5px;
  text-decoration: none;
}

.scholar-chip em {
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
}

.scholar-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.scholar-metrics div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.scholar-metrics strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.1;
}

.scholar-metrics span {
  color: var(--muted);
  font-size: 7.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.scholar-score {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}

.scholar-score strong {
  color: var(--brand-deep);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1;
}

.scholar-score span {
  color: var(--muted);
  font-size: 8px;
}

.scholar-score i {
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.scholar-score i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.scholar-more-wrap {
  display: flex;
  justify-content: center;
  padding: 24px 0 0;
}

.scholar-empty {
  padding: 40px 0;
  color: var(--muted);
  text-align: center;
}

.scholar-empty strong {
  display: block;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 20px;
}

.scholar-empty p {
  margin: 8px 0 0;
  font-size: 11px;
}

.scholar-empty--page {
  padding: 90px 0;
}

.scholar-empty--page .btn {
  margin-top: 18px;
}

.scholar-method {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  margin-top: 56px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.scholar-method-head h2 {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
}

.scholar-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
}

.scholar-method-grid h3 {
  margin: 0 0 5px;
  color: var(--brand-deep);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scholar-method-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.8;
}

/* profile */
.scholar-profile-loading {
  padding: 90px 0;
  color: var(--muted);
  text-align: center;
}

.scholar-profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 38px 0 28px;
  border-bottom: 1px solid var(--line);
}

.scholar-profile-avatar {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border-radius: 24px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
}

.scholar-profile-copy {
  min-width: 0;
}

.scholar-profile-copy h1 {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}

.scholar-profile-aff {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.scholar-profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.scholar-tier,
.scholar-rank-tag {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 8.5px;
}

.scholar-rank-tag {
  background: var(--surface-2);
  color: var(--muted);
}

.scholar-profile-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  text-align: right;
}

.scholar-profile-score strong {
  color: var(--brand-deep);
  font-family: var(--serif);
  font-size: 54px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.scholar-profile-score span {
  color: var(--muted);
  font-size: 9px;
}

.scholar-profile-score em {
  color: var(--muted);
  font-size: 8.5px;
  font-style: normal;
}

.scholar-profile-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin: 26px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--line);
}

.scholar-profile-stats > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 15px 16px;
  background: var(--surface);
}

.scholar-profile-stats strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1;
}

.scholar-profile-stats span {
  color: var(--muted);
  font-size: 8px;
}

.scholar-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
  align-items: start;
}

.scholar-panel {
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.scholar-panel h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}

.scholar-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.scholar-panel-head span {
  color: var(--muted);
  font-size: 8.5px;
}

.scholar-paper-list {
  border-top: 1px solid var(--line);
}

.scholar-paper {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 78px;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.scholar-paper-index {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.scholar-paper-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.scholar-paper-copy strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.scholar-paper-copy em {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 10px;
  font-style: normal;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.scholar-paper-copy small {
  color: var(--muted);
  font-size: 8.5px;
}

.scholar-paper-cite {
  color: var(--brand);
  font-size: 8.5px;
  text-align: right;
  white-space: nowrap;
}

.scholar-chips--large {
  margin-bottom: 16px;
}

.scholar-journal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.scholar-journal {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 8px;
}

.scholar-journal em {
  color: var(--ink-soft);
  font-style: normal;
}

.scholar-bar-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
}

.scholar-bar-row span {
  color: var(--muted);
  font-size: 8.5px;
}

.scholar-bar-row i {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.scholar-bar-row i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.scholar-bar-row em {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 8.5px;
  font-style: normal;
  text-align: right;
}

.scholar-side-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.scholar-side-links h2 {
  margin-bottom: 10px;
}

.scholar-side-links a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 10px;
  text-decoration: none;
}

.scholar-side-links a:last-child {
  border-bottom: 0;
}

.scholar-side-links a:hover {
  color: var(--accent-deep);
}

.scholar-method-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.7;
}

.scholar-muted {
  color: var(--muted);
  font-size: 10.5px;
}

/* boards, comparison and follow */
.scholar-board-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 22px;
}

.scholar-board-tab {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 9.5px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.scholar-board-tab:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.scholar-board-tab.is-active {
  border-color: var(--btn-bg);
  background: var(--btn-bg);
  color: var(--btn-ink);
}

.scholar-quickbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 2px 10px;
}

.scholar-followed-toggle {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 8.5px;
  cursor: pointer;
}

.scholar-followed-toggle span {
  color: var(--brand);
  font-family: var(--mono);
}

.scholar-followed-toggle.is-active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.scholar-quickbar-note {
  color: var(--muted);
  font-size: 8.5px;
}

.scholar-quickbar-note button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-deep);
  font: inherit;
  font-size: inherit;
  cursor: pointer;
}

.scholar-overall-rank {
  padding-left: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7.5px;
}

.scholar-compare-toggle {
  margin-top: 3px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 7.5px;
  cursor: pointer;
}

.scholar-compare-toggle:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.scholar-compare-toggle.is-selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.scholar-compare-bar {
  position: sticky;
  bottom: 14px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 0;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  color: var(--ink-soft);
  font-size: 9.5px;
}

.scholar-compare-bar > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scholar-compare-clear {
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 8.5px;
  cursor: pointer;
}

.scholar-compare-panel {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  overflow-x: auto;
}

.scholar-compare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.scholar-compare-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}

.scholar-compare-table {
  display: grid;
  min-width: 620px;
  border-top: 1px solid var(--line);
}

.scholar-compare-row {
  display: contents;
}

.scholar-compare-row > span,
.scholar-compare-row > a {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 9.5px;
  line-height: 1.4;
}

.scholar-compare-row > a {
  color: var(--brand-deep);
  font-weight: 600;
  text-decoration: none;
}

.scholar-compare-row--head > * {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.scholar-compare-label {
  color: var(--muted) !important;
  font-family: var(--mono);
  font-size: 8px !important;
}

.scholar-row--institution .scholar-score strong {
  font-size: 18px;
}

/* profile extras */
.scholar-profile-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.scholar-profile-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.scholar-follow-btn {
  padding: 6px 12px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: transparent;
  color: var(--brand-deep);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.scholar-follow-btn:hover,
.scholar-follow-btn.is-following {
  background: var(--brand);
  color: var(--btn-ink);
}

.scholar-trend-wrap {
  overflow-x: auto;
}

.scholar-trend-wrap svg {
  display: block;
  width: 100%;
  min-width: 520px;
  height: auto;
}

.scholar-trend-grid {
  stroke: var(--line);
  stroke-width: 1;
}

.scholar-trend-bar {
  fill: var(--brand);
  opacity: 0.78;
}

.scholar-trend-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scholar-trend-dot {
  fill: var(--accent);
}

.scholar-trend-axis {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 7.5px;
}

.scholar-trend-axis-line {
  stroke: var(--line-strong);
  stroke-width: 1;
}

.scholar-trend-tick {
  stroke: var(--line-strong);
  stroke-width: 1;
}

.scholar-trend-axis-title {
  fill: var(--muted);
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.scholar-trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 8.5px;
}

.scholar-trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.scholar-trend-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.scholar-trend-legend .is-bar {
  background: var(--brand);
}

.scholar-trend-legend .is-line {
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

@media (max-width: 1080px) {
  .scholar-row {
    grid-template-columns: 40px 42px minmax(0, 1fr) 200px 98px;
    gap: 10px;
  }

  .scholar-profile-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
  }
}

@media (max-width: 900px) {
  .scholars-toolbar {
    grid-template-columns: minmax(0, 1fr) 160px 150px;
  }

  .scholar-row {
    grid-template-columns: 36px 40px minmax(0, 1fr);
    gap: 10px;
  }

  .scholar-metrics {
    grid-column: 3;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 360px;
  }

  .scholar-score {
    grid-column: 3;
    align-items: flex-start;
    max-width: 220px;
    text-align: left;
  }

  .scholar-profile-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .scholar-profile-score {
    grid-column: 2;
    align-items: flex-start;
    text-align: left;
  }

  .scholar-profile-actions {
    grid-column: 2;
    align-items: flex-start;
  }

  .scholar-profile-buttons {
    justify-content: flex-start;
  }

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

  .scholar-method {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
}

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

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

  .scholar-row {
    grid-template-columns: 30px 36px minmax(0, 1fr);
    padding: 14px 4px;
  }

  .scholar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 12px;
  }

  .scholar-main h2 {
    font-size: 17px;
  }

  .scholar-metrics {
    grid-column: 3;
    gap: 5px;
  }

  .scholar-metrics strong {
    font-size: 12px;
  }

  .scholar-profile-avatar {
    width: 66px;
    height: 66px;
    border-radius: 18px;
    font-size: 20px;
  }

  .scholar-profile-copy h1 {
    font-size: 34px;
  }

  .scholar-profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scholar-paper {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .scholar-paper-cite {
    grid-column: 2;
    text-align: left;
  }

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

  .scholar-compare-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .scholar-compare-head {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* --------------------------------------------------------------------------
   Scholar card grid (2026 refresh)
   Replaces the wide table-like rows with two-column scholar cards and adds
   an explicit country badge next to the affiliation.
   -------------------------------------------------------------------------- */
.scholar-country {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2, #f5f3ee);
  color: var(--brand-deep);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.scholar-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  border-top: 0;
}

.scholar-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface, #fff);
  box-shadow: 0 1px 0 rgba(8, 63, 59, 0.04);
}

.scholar-card.is-top {
  border-color: rgba(8, 63, 59, 0.2);
  background: linear-gradient(145deg, var(--brand-soft), var(--surface, #fff) 58%);
}

.scholar-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.scholar-tier {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-2, #f5f3ee);
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.scholar-card-identity {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.scholar-card-identity .scholar-main {
  flex: 1;
  min-width: 0;
}

.scholar-card .scholar-affiliation {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  white-space: normal;
}

.scholar-card .scholar-affiliation > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scholar-card-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.scholar-card-metrics div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.scholar-card-metrics strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.1;
}

.scholar-card-metrics span {
  color: var(--muted);
  font-size: 7.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.scholar-card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.scholar-card-foot .scholar-score {
  flex: 1;
  align-items: stretch;
  text-align: left;
}

.scholar-card-foot .scholar-score strong {
  font-size: 20px;
}

.scholar-card-foot .scholar-score i {
  width: 100%;
}

.scholar-card-foot .scholar-compare-toggle {
  flex: 0 0 auto;
}

.scholar-card-link {
  flex: 0 0 auto;
  color: var(--brand-deep);
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.scholar-card-link:hover {
  color: var(--accent-deep);
}

.scholar-card--institution .scholar-score {
  flex: 1;
}

@media (max-width: 1000px) {
  .scholar-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .scholar-card {
    padding: 14px;
    border-radius: 14px;
  }

  .scholar-card-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scholar-card-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .scholar-card-foot .scholar-compare-toggle {
    align-self: flex-start;
  }
}


/* --------------------------------------------------------------------------
   Scholar table (2026-11-29)
   Cool slate / cobalt palette, explicit country column.
   -------------------------------------------------------------------------- */
body[data-page="scholars"],
body[data-page="scholar"] {
  background: #f3f5fa;
}

body[data-page="scholars"] .eyebrow,
body[data-page="scholar"] .eyebrow {
  color: #4f6ef7;
}

body[data-page="scholars"] .scholar-board-tab.is-active,
body[data-page="scholar"] .scholar-board-tab.is-active {
  background: #3552c7;
  border-color: #3552c7;
  color: #fff;
}

body[data-page="scholars"] .scholar-tier,
body[data-page="scholar"] .scholar-tier {
  background: #eef2ff;
  color: #3552c7;
}

.scholar-list {
  display: block;
  border-top: 0;
}

.scholar-table-wrap {
  overflow-x: auto;
  border: 1px solid #dfe4ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(23, 32, 51, 0.045);
  -webkit-overflow-scrolling: touch;
}

.scholar-table {
  width: 100%;
  min-width: 1060px;
  border-collapse: collapse;
  color: #172033;
  font-size: 11px;
}

.scholar-table th {
  padding: 12px 14px;
  border-bottom: 1px solid #dfe4ef;
  background: #eef2f9;
  color: #5b6578;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.scholar-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf0f6;
  vertical-align: middle;
}

.scholar-table tbody tr:last-child td {
  border-bottom: 0;
}

.scholar-table tbody tr:hover {
  background: #f8faff;
}

.scholar-table-row.is-top {
  background: linear-gradient(90deg, #f0f4ff, #fff 48%);
}

.scholar-table-row.is-top td:first-child {
  box-shadow: inset 3px 0 #4f6ef7;
}

.scholar-table-rank {
  width: 58px;
  white-space: nowrap;
}

.scholar-table .scholar-rank {
  color: #4f6ef7;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.scholar-table .scholar-overall-rank {
  display: block;
  margin-top: 4px;
  color: #8a93a6;
  font-size: 8px;
}

.scholar-table-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 230px;
}

.scholar-table-person .scholar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #e9edff;
  color: #3552c7;
  font-size: 11px;
}

.scholar-table-name {
  min-width: 0;
}

.scholar-table-name h2 {
  margin: 0;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scholar-table-name h2 a {
  color: #172033;
  text-decoration: none;
}

.scholar-table-name h2 a:hover {
  color: #3552c7;
}

.scholar-table-name .scholar-affiliation {
  margin: 3px 0 0;
  overflow: hidden;
  color: #6e7789;
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scholar-table .scholar-country {
  border-color: #dbe2ff;
  background: #eef2ff;
  color: #3552c7;
  font-size: 8px;
}

.scholar-table .scholar-chips {
  margin: 0;
  gap: 4px;
  min-width: 120px;
}

.scholar-table .scholar-chip {
  border: 1px solid #e6eaf2;
  background: #f2f4f8;
  color: #5b6578;
  font-size: 8px;
}

.scholar-table .scholar-chip em {
  color: #8a93a6;
}

.scholar-table-number {
  color: #172033;
  font-family: var(--mono);
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
}

.scholar-table-score {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 92px;
}

.scholar-table-score strong {
  color: #3552c7;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1;
}

.scholar-table-score span {
  color: #8a93a6;
  font-size: 7.5px;
  letter-spacing: 0.04em;
}

.scholar-table-score i {
  display: block;
  width: 88px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4e8f2;
}

.scholar-table-score i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #4f6ef7;
}

.scholar-table-action {
  text-align: right;
  white-space: nowrap;
}

.scholar-table .scholar-compare-toggle {
  border-color: #dbe2ff;
  background: #fff;
  color: #3552c7;
}

.scholar-table .scholar-compare-toggle:hover {
  background: #eef2ff;
}

.scholar-table-note {
  color: #6e7789;
  font-size: 10px;
  white-space: nowrap;
}

.scholar-table .scholar-card-link {
  color: #3552c7;
  font-size: 9px;
}

[data-theme="dark"] body[data-page="scholars"],
[data-theme="dark"] body[data-page="scholar"] {
  background: #0d1321;
}

[data-theme="dark"] .scholar-table-wrap {
  border-color: #2a3446;
  background: #141c2b;
  box-shadow: none;
}

[data-theme="dark"] .scholar-table {
  color: #e6ebf5;
}

[data-theme="dark"] .scholar-table th {
  border-color: #2a3446;
  background: #1b2536;
  color: #9ba8bf;
}

[data-theme="dark"] .scholar-table td {
  border-color: #222d3f;
}

[data-theme="dark"] .scholar-table tbody tr:hover {
  background: #182234;
}

[data-theme="dark"] .scholar-table-row.is-top {
  background: linear-gradient(90deg, #17233c, #141c2b 48%);
}

[data-theme="dark"] .scholar-table-name h2 a {
  color: #e6ebf5;
}

[data-theme="dark"] .scholar-table-name .scholar-affiliation,
[data-theme="dark"] .scholar-table-note {
  color: #9ba8bf;
}

[data-theme="dark"] .scholar-table .scholar-chip {
  border-color: #2a3446;
  background: #1b2536;
  color: #b7c1d4;
}

[data-theme="dark"] .scholar-table .scholar-country {
  border-color: #33446c;
  background: #1d2b4a;
  color: #a9bbff;
}

[data-theme="dark"] .scholar-table-score i {
  background: #2a3446;
}

[data-theme="dark"] .scholar-table .scholar-compare-toggle {
  border-color: #33446c;
  background: #141c2b;
  color: #a9bbff;
}

@media (max-width: 700px) {
  .scholar-table {
    min-width: 900px;
  }

  .scholar-table th,
  .scholar-table td {
    padding: 10px 11px;
  }

  .scholar-table-person {
    min-width: 190px;
  }
}
