/*
 * Search results v2
 * A quiet journal-like list: source in the title line, one type line,
 * then a single compact facts row. Shared by China, Global and the root shell.
 */

.results {
  margin-top: 10px;
}

.results-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px 12px;
  margin-bottom: 10px;
  padding: 8px 0 10px;
}

.results-head .results-searchbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.results-head .back-btn {
  grid-column: 1;
  grid-row: 2;
}

.results-head .count {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}

.search-filter-host {
  margin: 0 0 10px;
}

.result-filter-panel {
  padding: 13px 15px 11px;
  background: rgba(255,255,255,.92);
  border: 1px solid #e5e9f1;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
}

.result-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.result-filter-head > div {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}

.rf-label {
  color: #1d2c4f;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.rf-hint {
  color: #8993a7;
  font-size: 11px;
  white-space: nowrap;
}

.result-filter-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid #f0f2f6;
}

.result-filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 16px;
}

.result-filter-column + .result-filter-column {
  padding-left: 16px;
  border-left: 1px solid #f0f2f6;
}

.result-filter-column .result-filter-row:first-child {
  border-top: 0;
}

.rf-row-label {
  padding-top: 6px;
  color: #7e899e;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.rf-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.rf-option {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 29px;
  padding: 4px 10px;
  border: 1px solid #e0e5ee;
  border-radius: 999px;
  background: #fff;
  color: #52617d;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s, box-shadow .15s;
}

.rf-option:hover {
  color: #2456e6;
  border-color: #b8c9f3;
  background: #f7f9ff;
}

.rf-option.is-active {
  color: #fff;
  border-color: #2456e6;
  background: #2456e6;
  box-shadow: 0 2px 7px rgba(36,86,230,.16);
}

.rf-option small {
  color: #99a3b5;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.rf-option.is-active small {
  color: rgba(255,255,255,.78);
}

.rf-options-wide {
  max-height: 160px;
  overflow-y: auto;
  align-content: flex-start;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: #c3ccdb transparent;
}

.rf-options-wide::-webkit-scrollbar {
  width: 6px;
}

.rf-options-wide::-webkit-scrollbar-track {
  background: transparent;
}

.rf-options-wide::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #c3ccdb;
}

.rf-reset {
  appearance: none;
  flex: none;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #e0e5ee;
  border-radius: 8px;
  background: #fff;
  color: #7c879b;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.rf-reset:hover {
  color: #2456e6;
  border-color: #b8c9f3;
  background: #f7f9ff;
}

/* 首页热点课题：沿用 Journal 的 Top 5 列表，但把课题的来源/年份放到副信息行。 */
.grant-hot-section {
  margin: 28px 0 34px;
}

.grant-hot-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.grant-hot-head h2 {
  margin: 0;
  color: #1d2a44;
  font-size: 17px;
  font-weight: 780;
  letter-spacing: -.01em;
}

.grant-hot-head p {
  margin: 4px 0 0;
  color: #98a2b3;
  font-size: 12px;
}

.grant-hot-list {
  overflow: hidden;
  border: 1px solid #e4e9f2;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(24, 39, 75, .045);
}

.grant-hot-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 15px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid #eef1f6;
  transition: background .16s ease;
}

.grant-hot-row:last-child {
  border-bottom: 0;
}

.grant-hot-row:hover {
  background: #f8faff;
}

.grant-hot-rank {
  color: #aab3c3;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.grant-hot-row:nth-child(-n+3) .grant-hot-rank {
  color: #2456e6;
}

.grant-hot-main {
  min-width: 0;
}

.grant-hot-title {
  display: block;
  overflow: hidden;
  color: #263653;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.45;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.grant-hot-meta {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #98a2b3;
  font-size: 11.5px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.grant-hot-views {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 48px;
  justify-content: flex-end;
  color: #2456e6;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.grant-hot-views b {
  font-size: 14px;
  font-weight: 800;
}

.grant-hot-views small {
  color: #98a2b3;
  font-size: 11px;
}

.grant-hot-empty {
  padding: 22px 16px;
  color: #98a2b3;
  font-size: 12.5px;
  text-align: center;
}

/* Compact result card */
.project-card {
  margin-bottom: 7px;
  padding: 12px 88px 11px 16px;
  border: 1px solid #e1e6ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,.025);
  position: relative;
}

.project-card:hover {
  border-color: #b8c9f3;
  box-shadow: 0 5px 16px rgba(36,86,230,.07);
}

/* 收藏 / 分享：收进同一组轻量操作条，不再用突兀的大字符图标。 */
.card-actions {
  position: absolute;
  top: 10px;
  right: 11px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid #e8edf5;
  border-radius: 10px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 2px 8px rgba(15,23,42,.055);
}

.card-actions .favorite-btn,
.card-actions .share-btn {
  width: 27px;
  height: 27px;
  min-width: 27px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #98a2b3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}

.card-actions .favorite-btn:hover {
  color: #c47a12;
  background: #fff7e8;
}

.card-actions .favorite-btn.active {
  color: #2456e6;
  background: #edf3ff;
}

.card-actions .share-btn:hover {
  color: #2456e6;
  background: #eef3ff;
}

.card-actions .favorite-btn:active,
.card-actions .share-btn:active {
  transform: scale(.94);
}

.action-icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-actions .favorite-btn.active .action-icon {
  fill: currentColor;
  stroke: currentColor;
}

.project-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.project-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: #1b2b4b;
  font-size: 15.5px;
  font-weight: 760;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.project-source {
  flex: 0 1 auto;
  width: fit-content;
  max-width: 42%;
  min-width: 0;
  padding: 4px 9px;
  border: 1px solid #dce6fb;
  border-radius: 8px;
  background: #f4f7ff;
  color: #3159ae;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-type {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 6px;
  color: #52617d;
  font-size: 12px;
  line-height: 1.35;
}

.project-type .label,
.project-fact .label {
  flex: none;
  color: #98a2b3;
}

.project-type .value {
  min-width: 0;
  color: #52617d;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-facts {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(110px, .75fr) auto;
  gap: 6px 18px;
  align-items: center;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid #f0f2f6;
  color: #52617d;
  font-size: 12px;
  line-height: 1.35;
}

.project-fact {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.project-fact .value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-fact-year {
  justify-self: end;
}

/* These legacy blocks are intentionally not part of the compact result card. */
.project-card > .card-country,
.project-card > .card-province,
.project-card > .card-badges,
.project-card > .card-topics,
.project-card > .card-abstract {
  display: none !important;
}

/* Search result rows: align with the clear "recent projects" table on the home page. */
.project-table-list {
  overflow: hidden;
  border: 1px solid #e1e7f1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(24, 39, 75, .045);
}

.project-table-head,
.project-table-list .project-row {
  display: grid;
  grid-template-columns: minmax(0, 2.35fr) minmax(112px, .9fr) minmax(180px, 1.15fr) 70px 70px;
  column-gap: 18px;
  align-items: center;
}

.project-table-head {
  min-height: 49px;
  padding: 0 15px;
  background: #f7f9fd;
  border-bottom: 1px solid #e3e8f1;
  color: #7b88a1;
  font-size: 11.5px;
  font-weight: 800;
}

.project-table-head > span:nth-child(4) {
  text-align: center;
}

.project-table-list > .project-table-body > .project-card {
  min-height: 76px;
  margin: 0;
  padding: 10px 15px;
  border: 0;
  border-bottom: 1px solid #edf0f5;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}

.project-table-list > .project-table-body > .project-card:last-child {
  border-bottom: 0;
}

.project-table-list > .project-table-body > .project-card:hover {
  border-color: #edf0f5;
  background: #f8faff;
  box-shadow: none;
}

.project-cell {
  min-width: 0;
}

.project-title-cell .project-heading {
  align-items: center;
  gap: 10px;
}

.project-title-cell .project-title {
  font-size: 13.5px;
  line-height: 1.42;
}

.project-title-cell .project-source {
  flex-shrink: 0;
  max-width: 48%;
  padding: 4px 8px;
  font-size: 11px;
}

.project-type-cell,
.project-year-cell {
  min-width: 0;
}

.project-type-pill,
.project-year-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 27px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f1f4fa;
  color: #52617d;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-year-cell {
  text-align: center;
}

.project-year-pill {
  justify-content: center;
  min-width: 52px;
  color: #405477;
  font-variant-numeric: tabular-nums;
}

.project-person-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  line-height: 1.3;
}

.project-person-cell strong,
.project-person-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-person-cell strong {
  color: #263653;
  font-size: 12.5px;
  font-weight: 750;
}

.project-person-cell span {
  color: #8995ab;
  font-size: 11.5px;
}

.project-muted {
  color: #b1bac9;
  font-size: 12px;
}

.project-actions-cell {
  display: flex;
  justify-content: flex-end;
}

.project-table-list .card-actions {
  position: static;
  padding: 2px;
  border-color: #edf0f5;
  box-shadow: none;
}

/* Homepage density pass: keep the hero useful, but give the project lists the visual priority. */
body.grant-saas .gs-hero-in {
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 20px;
  padding-top: 42px;
  padding-bottom: 42px;
}

body.grant-saas .gs-hero h1 {
  font-size: 42px;
}

body.grant-saas .hero-sub {
  margin-top: 12px;
  font-size: 15px;
}

body.grant-saas .gs-searchbar {
  margin-top: 18px;
}

body.grant-saas .globe-zone {
  height: 370px;
}

body.grant-saas .gs-hero-stat {
  min-width: 178px;
  padding: 15px 20px;
  border-radius: 14px;
}

body.grant-saas .gs-hero-stat b {
  font-size: 29px;
}

body.grant-saas .gs-hero-stat small {
  margin-top: 5px;
  font-size: 14px;
}

body.grant-saas #home-view > section {
  padding-top: 46px;
}

body.grant-saas .feats {
  gap: 12px;
  margin-top: 22px;
}

body.grant-saas .feat {
  padding: 18px 17px;
}

body.grant-saas .grant-hot-section {
  padding-top: 40px !important;
}

body.grant-redesign:not(.grant-saas) #home-view > .rd-sec {
  padding-top: 16px;
  padding-bottom: 16px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

body.grant-redesign:not(.grant-saas) #home-view > .grant-hot-section {
  padding: 16px 18px;
  border: 1px solid #e1e7f1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(24, 39, 75, .045);
}

@media (max-width: 900px) {
  body.grant-saas .gs-hero-in {
    grid-template-columns: 1fr;
    padding-top: 38px;
    padding-bottom: 32px;
  }

  body.grant-saas .globe-zone {
    height: 300px;
  }
}

@media (max-width: 720px) {
  body.grant-saas .gs-hero h1 {
    font-size: 32px;
  }

  body.grant-saas .globe-zone {
    height: 260px;
  }

  .grant-hot-section {
    margin: 24px 0 28px;
  }

  .grant-hot-head {
    align-items: flex-start;
  }

  .grant-hot-row {
    grid-template-columns: 25px minmax(0, 1fr) auto;
    gap: 9px;
    min-height: 58px;
    padding: 9px 11px;
  }

  .grant-hot-title {
    font-size: 12.5px;
  }

  .grant-hot-meta {
    font-size: 11px;
  }

  .results-head {
    gap: 8px;
  }

  .result-filter-panel {
    padding: 11px 12px 9px;
  }

  .result-filter-row {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 8px;
  }

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

  .result-filter-column + .result-filter-column {
    padding-left: 0;
    border-left: 0;
  }

  .result-filter-column + .result-filter-column .result-filter-row:first-child {
    border-top: 1px solid #f0f2f6;
  }

  .rf-hint {
    display: none;
  }

  .rf-option {
    min-height: 28px;
    padding: 4px 9px;
    font-size: 11px;
  }

  .project-card {
    padding: 11px 78px 10px 13px;
  }

  .project-table-head {
    display: none;
  }

  .project-table-list > .project-table-body > .project-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 10px;
    min-height: 0;
    padding: 11px 12px;
  }

  .project-title-cell {
    grid-column: 1 / -1;
    padding-right: 70px;
  }

  .project-title-cell .project-title {
    font-size: 13.5px;
    -webkit-line-clamp: 2;
  }

  .project-title-cell .project-source {
    display: inline-block;
    max-width: 100%;
    margin-top: 4px;
    text-align: left;
  }

  .project-type-cell {
    grid-column: 1;
  }

  .project-year-cell {
    grid-column: 2;
    grid-row: 2;
  }

  .project-person-cell {
    grid-column: 1 / -1;
    padding-top: 5px;
    border-top: 1px solid #f0f2f6;
  }

  .project-actions-cell {
    position: absolute;
    top: 10px;
    right: 10px;
  }

  .project-table-list .card-actions {
    position: static;
  }

  .card-actions {
    top: 9px;
    right: 8px;
  }

  .project-heading {
    display: block;
  }

  .project-title {
    font-size: 14.5px;
    -webkit-line-clamp: 3;
  }

  .project-source {
    display: inline-block;
    max-width: 100%;
    margin-top: 5px;
    text-align: left;
  }

  .project-facts {
    grid-template-columns: 1fr 1fr;
    gap: 5px 10px;
  }

  .project-fact-inst {
    grid-column: 1 / -1;
  }

  .project-fact-year {
    justify-self: start;
  }
}

/* Result metadata density: keep discipline visible without adding another wide column. */
body.grant-saas .project-type-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

body.grant-saas .project-discipline-tag {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #7f8ba2;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.grant-saas .project-person-cell {
  gap: 3px;
}

/* Homepage v2 compact pass: keep the first screen focused and the list breathable. */
body.grant-saas .gs-hero-in {
  min-height: 300px;
  padding-top: 38px;
  padding-bottom: 34px;
  gap: 24px;
}

body.grant-saas .globe-zone {
  height: 250px;
}

body.grant-saas #projects {
  padding-top: 28px;
  padding-bottom: 64px;
}

body.grant-saas .rec-panel {
  padding: 16px 18px;
}

body.grant-saas .rec-list {
  margin-top: 10px;
  gap: 10px;
}

body.grant-saas .rec-loading,
body.grant-saas .rec-empty {
  padding: 12px 8px;
}

body.grant-saas #projects .grant-hot-section {
  margin-top: 22px;
}

body.grant-saas #projects #latest-projects {
  margin-top: 26px !important;
  margin-bottom: 10px;
}

body.grant-saas .gs-footer {
  margin-top: 0;
}

body.grant-saas #projects .table-card {
  overflow: hidden;
}

body.grant-saas #projects .table-card table {
  table-layout: fixed;
}

body.grant-saas #projects .table-card th:nth-child(1),
body.grant-saas #projects .table-card td:nth-child(1) {
  width: 46%;
}

body.grant-saas #projects .table-card td .t {
  max-width: none;
  white-space: normal;
}

@media (max-width: 900px) {
  body.grant-saas #projects .table-card {
    overflow-x: auto;
  }

  body.grant-saas #projects .table-card table {
    min-width: 690px;
  }
}

@media (max-width: 720px) {
  body.grant-saas .gs-hero-in {
    min-height: 0;
    padding-top: 30px;
    padding-bottom: 22px;
  }

  body.grant-saas .globe-zone {
    height: 170px;
  }

  body.grant-saas #projects {
    padding-top: 22px;
    padding-bottom: 52px;
  }
}

/* ---------- Homepage v2: remove decorative copy, keep one clear action ---------- */
body.grant-saas .gs-hero {
  position: relative;
  background: linear-gradient(120deg, #f7f9fd 0%, #edf3ff 58%, #f9fbff 100%);
  border-bottom: 1px solid #e8edf6;
}

body.grant-saas .gs-hero-in {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 42px;
  min-height: 360px;
  padding-top: 58px;
  padding-bottom: 56px;
}

body.grant-saas .gs-hero h1 {
  max-width: 620px;
  font-size: clamp(42px, 4.6vw, 56px);
  line-height: 1.12;
  letter-spacing: -.06em;
}

body.grant-saas .hero-sub {
  max-width: none;
  margin-top: 18px;
  color: #62708d;
  font-size: 17px;
  line-height: 1.7;
}

body.grant-saas .gs-hero-kicker,
body.grant-saas .gs-hero-quick,
body.grant-saas .gs-hero-note,
body.grant-saas .gs-globe-badge,
body.grant-saas .gs-hero-stats,
body.grant-saas .trusted,
body.grant-saas .gs-searchbar .bar-ai-toggle {
  display: none !important;
}

body.grant-saas .gs-searchbar {
  grid-template-columns: minmax(0, 1fr) auto;
  width: min(610px, 100%);
  max-width: 610px;
  margin-top: 28px;
  padding: 9px 10px;
  border-radius: 15px;
  box-shadow: 0 16px 34px rgba(35, 62, 110, .09), 0 1px 2px rgba(16, 24, 40, .04);
}

body.grant-saas .gs-searchbar .bar-tools {
  gap: 0;
}

body.grant-saas .gs-searchbar .bar-tools .gs-btn {
  min-width: 76px;
  border-radius: 10px;
}

body.grant-saas .globe-zone {
  position: relative;
  height: 300px;
  filter: none;
  isolation: isolate;
}

body.grant-saas .globe-zone::before {
  content: "";
  position: absolute;
  width: 286px;
  height: 286px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, rgba(255,255,255,.96), rgba(220,230,252,.72) 56%, rgba(201,216,248,.26) 74%, transparent 75%);
  box-shadow: 0 28px 54px rgba(49, 82, 148, .10), inset 0 0 0 1px rgba(36,86,230,.08);
  z-index: -2;
}

body.grant-saas .globe-zone::after {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(36,86,230,.11);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(36,86,230,.025), 0 0 0 38px rgba(36,86,230,.018);
  z-index: -1;
}

body.grant-saas .globe-zone canvas {
  z-index: 1;
}

body.grant-saas #projects {
  padding-top: 54px;
}

body.grant-saas #projects .grant-hot-section {
  margin: 32px 0 0;
  padding: 0;
}

body.grant-saas #projects .grant-hot-head {
  margin-bottom: 12px;
}

body.grant-saas #projects .grant-hot-head h2,
body.grant-saas #projects #latest-projects h2 {
  font-size: 22px;
}

body.grant-saas #projects #latest-projects {
  margin-top: 42px !important;
  margin-bottom: 14px;
}

body.grant-saas .grant-hot-views.is-latest {
  min-width: auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2456e6;
}

body.grant-saas .grant-hot-views.is-latest b {
  font-size: 11px;
  font-weight: 750;
}

@media (max-width: 900px) {
  body.grant-saas .gs-hero-in {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 0;
    padding-top: 48px;
    padding-bottom: 30px;
  }

  body.grant-saas .globe-zone {
    height: 230px;
    max-width: 360px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 720px) {
  body.grant-saas .gs-hero h1 {
    font-size: 34px;
    letter-spacing: -.045em;
  }

  body.grant-saas .hero-sub {
    font-size: 15px;
  }

  body.grant-saas .gs-searchbar {
    grid-template-columns: 1fr;
  }

  body.grant-saas .gs-searchbar .bar-tools {
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px solid #edf1f7;
  }

  body.grant-saas .globe-zone {
    height: 198px;
  }

  body.grant-saas .globe-zone::before {
    width: 192px;
    height: 192px;
  }

  body.grant-saas .globe-zone::after {
    width: 224px;
    height: 224px;
  }
}

/* Homepage hero refresh: stronger hierarchy, clearer search action, less empty space. */
body.grant-saas .gs-hero {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 78% 42%, rgba(126, 164, 255, .18), transparent 29%),
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, .72), transparent 28%),
    linear-gradient(118deg, #f4f7fd 0%, #eaf1fc 54%, #f7faff 100%);
}

body.grant-saas .gs-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .32;
  background-image:
    linear-gradient(rgba(36, 86, 230, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 86, 230, .045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.55) 60%, transparent 100%);
}

body.grant-saas .gs-hero-in {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: 30px;
  min-height: 450px;
  padding-top: 50px;
  padding-bottom: 48px;
}

body.grant-saas .gs-hero-in > div:first-child {
  position: relative;
  z-index: 2;
}

.gs-hero-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #687795;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .11em;
}

.gs-kicker-dot,
.gs-note-dot,
.gs-live-dot {
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2456e6;
  box-shadow: 0 0 0 4px rgba(36, 86, 230, .1);
}

.gs-kicker-rule {
  width: 30px;
  height: 1px;
  margin: 0 2px;
  background: #c8d3e7;
}

body.grant-saas .gs-hero h1 {
  max-width: 640px;
  font-size: clamp(40px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -.055em;
}

body.grant-saas .hero-sub {
  max-width: 500px;
  margin-top: 18px;
  font-size: 15.5px;
  line-height: 1.8;
}

body.grant-saas .gs-searchbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(600px, 100%);
  max-width: 600px;
  margin-top: 24px;
  padding: 9px 10px;
  border-radius: 17px;
  border-color: rgba(36, 86, 230, .12);
  box-shadow: 0 16px 34px rgba(35, 62, 110, .1), 0 1px 2px rgba(16, 24, 40, .04);
}

body.grant-saas .gs-searchbar .bar-input {
  min-width: 0;
  min-height: 42px;
  padding: 0 8px;
}

body.grant-saas .gs-searchbar .bar-tools {
  gap: 6px;
}

body.grant-saas .gs-searchbar .bar-tools .gs-btn {
  margin-left: 0;
  min-height: 40px;
  padding: 9px 20px;
  border-radius: 10px;
}

.gs-hero-quick {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.gs-quick-label {
  margin-right: 3px;
  color: #8793aa;
  font-size: 11px;
  font-weight: 650;
}

.gs-hero-quick button {
  appearance: none;
  border: 1px solid #dce4f1;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255,255,255,.62);
  color: #586783;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  transition: .15s ease;
}

.gs-hero-quick button:hover {
  color: #2456e6;
  border-color: #b9c9e8;
  background: #fff;
  transform: translateY(-1px);
}

.gs-hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 19px;
  color: #7d89a0;
  font-size: 11.5px;
}

.gs-note-dot {
  width: 5px;
  height: 5px;
  box-shadow: none;
  background: #18a775;
}

body.grant-saas .globe-zone {
  height: 350px;
  filter: drop-shadow(0 12px 24px rgba(45, 78, 140, .05));
}

.gs-globe-badge {
  position: absolute;
  top: 20px;
  left: 24px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid rgba(36, 86, 230, .1);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #6d7c98;
  font-size: 10.5px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(35, 62, 110, .06);
}

.gs-live-dot {
  width: 6px;
  height: 6px;
  background: #18a775;
  box-shadow: 0 0 0 4px rgba(24, 167, 117, .1);
}

body.grant-saas .gs-hero-stat {
  min-width: 190px;
  padding: 17px 23px;
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(35, 62, 110, .14), 0 2px 4px rgba(16,24,40,.04);
}

body.grant-saas .gs-hero-stat b {
  font-size: 32px;
}

body.grant-saas .gs-hero-stat small {
  margin-top: 6px;
  font-size: 13.5px;
}

body.grant-saas .gs-hero-stat:nth-child(1) { top: 49px; right: 112px; }
body.grant-saas .gs-hero-stat:nth-child(2) { top: 43%; right: 2px; }
body.grant-saas .gs-hero-stat:nth-child(3) { bottom: 24px; left: 25%; }

@media (max-width: 1020px) {
  body.grant-saas .gs-hero-in {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: 0;
    padding-top: 50px;
    padding-bottom: 40px;
  }

  body.grant-saas .globe-zone {
    height: 360px;
    max-width: 560px;
    margin: 0 auto;
  }
}

@media (max-width: 720px) {
  body.grant-saas .gs-hero-in {
    padding-top: 36px;
    padding-bottom: 30px;
  }

  body.grant-saas .gs-hero h1 {
    font-size: 32px;
  }

  body.grant-saas .gs-searchbar {
    grid-template-columns: 1fr;
  }

  body.grant-saas .gs-searchbar .bar-tools {
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid #edf1f7;
  }

  body.grant-saas .globe-zone {
    height: 270px;
  }

  .gs-globe-badge {
    top: 8px;
    left: 14px;
  }
}

/* Final homepage compact overrides */
body.grant-saas .gs-hero-in {
  min-height: 320px;
  padding-top: 34px;
  padding-bottom: 32px;
  gap: 24px;
}

body.grant-saas .globe-zone {
  height: 260px;
}

body.grant-saas #projects {
  padding-top: 28px;
  padding-bottom: 64px;
}

body.grant-saas .rec-panel {
  padding: 16px 18px;
}

body.grant-saas .rec-list {
  margin-top: 10px;
  gap: 10px;
}

body.grant-saas .rec-loading,
body.grant-saas .rec-empty {
  padding: 12px 8px;
}

body.grant-saas #projects .grant-hot-section {
  margin-top: 22px;
}

body.grant-saas #projects #latest-projects {
  margin-top: 26px !important;
  margin-bottom: 10px;
}

body.grant-saas .gs-footer {
  margin-top: 0;
}

body.grant-saas #projects .table-card {
  overflow: hidden;
}

body.grant-saas #projects .table-card table {
  table-layout: fixed;
}

body.grant-saas #projects .table-card th:nth-child(1),
body.grant-saas #projects .table-card td:nth-child(1) {
  width: 46%;
}

body.grant-saas #projects .table-card td .t {
  max-width: none;
  white-space: normal;
}

@media (max-width: 900px) {
  body.grant-saas #projects .table-card {
    overflow-x: auto;
  }

  body.grant-saas #projects .table-card table {
    min-width: 690px;
  }
}

@media (max-width: 720px) {
  body.grant-saas .gs-hero-in {
    min-height: 0;
    padding-top: 28px;
    padding-bottom: 20px;
  }

  body.grant-saas .globe-zone {
    height: 170px;
  }

  body.grant-saas #projects {
    padding-top: 22px;
    padding-bottom: 52px;
  }
}
