/* Homepage-only styling. Keep selectors scoped to .xr-homepage. */
.xr-homepage {
  --xh-ink: #102a3d;
  --xh-navy: #063b67;
  --xh-blue: #176b8d;
  --xh-teal: #2e8b83;
  --xh-gold: #d9a441;
  --xh-muted: #627588;
  --xh-line: #dbe5eb;
  --xh-paper: #fff;
  --xh-section-space: clamp(2.75rem, 4vw, 4rem);
  background: #f5f8fa;
  color: var(--xh-ink);
}
.xr-homepage .xr-kicker {
  margin-bottom: 0.6rem;
  color: var(--xh-blue);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
}
.xr-homepage h1,
.xr-homepage h2,
.xr-homepage h3 {
  color: var(--xh-navy);
}
.xr-homepage .xh-gallery {
  padding: calc(68px + clamp(0.75rem, 1.6vw, 1.25rem)) 0 clamp(1.75rem, 3vw, 2.5rem);
  background: linear-gradient(130deg, #eef5f6, #f8faf9 64%, #edf4f2);
}
.xr-homepage .xh-gallery-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(0.9rem, 1.5vw, 1.25rem);
}
.xr-homepage .xh-gallery-heading h1 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.12;
}
.xr-homepage .xh-gallery-intro {
  max-width: 360px;
  margin: 0 0 0.1rem;
  color: var(--xh-muted);
  font-size: 0.94rem;
  line-height: 1.45;
}
.xr-homepage .xh-carousel {
  position: relative;
}
.xr-homepage .xh-slides {
  min-height: 250px;
}
.xr-homepage .xh-slide {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin: 0;
}
.xr-homepage .xh-slide[hidden] {
  display: none;
}
.xr-homepage .xh-slide img {
  display: block;
  width: 100%;
  height: clamp(260px, 36vw, 440px);
  object-fit: cover;
  object-position: center;
  background: #fff;
}
.xr-homepage .xh-slide-portrait img {
  object-fit: contain;
  background: #f2f7fa;
}
.xr-homepage .xh-slide figcaption {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  max-width: min(85%, 26rem);
  padding: 0.5rem 0.7rem;
  color: var(--xh-ink);
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
}
.xr-homepage .xh-slide figcaption span {
  display: block;
  margin-top: 0.15rem;
  color: var(--xh-muted);
  font-size: 0.75rem;
  font-weight: 400;
}
.xr-homepage .xh-arrow {
  position: absolute;
  z-index: 2;
  top: 45%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background-color: transparent;
  text-shadow: 0 1px 6px rgba(6, 30, 50, 0.55);
  cursor: pointer;
  transition:
    background-color 0.5s ease,
    color 0.5s ease;
}
.xr-homepage .xh-hero-media:hover .xh-arrow,
.xr-homepage .xh-arrow:focus-visible {
  color: var(--xh-navy);
  background-color: rgba(255, 255, 255, 0.94);
  text-shadow: none;
}
.xr-homepage .xh-hero-media:hover .xh-arrow:hover,
.xr-homepage .xh-hero-media:hover .xh-arrow:focus-visible {
  color: #fff;
  background-color: var(--xr-cta);
}
/* 覆盖 Bootstrap 的 button:focus 黑色描边 */
.xr-homepage .xh-arrow:focus,
.xr-homepage .xh-arrow:focus-visible,
.xr-homepage .xh-arrow:active {
  outline: none;
  box-shadow: none;
}
.xr-homepage .xh-dots button:focus,
.xr-homepage .xh-dots button:active {
  outline: none;
}
.xr-homepage .xh-dots button:focus-visible {
  outline: 3px solid #e0ad46;
  outline-offset: 2px;
}
.xr-homepage .xh-previous {
  left: 1rem;
}
.xr-homepage .xh-next {
  right: 1rem;
}
.xr-homepage .xh-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 0.65rem 0 0.1rem;
}
.xr-homepage .xh-dots {
  display: flex;
  gap: 0.45rem;
}
.xr-homepage .xh-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #b8c8d1;
  cursor: pointer;
}
.xr-homepage .xh-dots button.is-active {
  background: var(--xh-blue);
  box-shadow: 0 0 0 3px #e3eff1;
}
.xr-homepage .xh-image-credit {
  margin: 0.45rem 0 0;
  color: var(--xh-muted);
  text-align: right;
  font-size: 0.72rem;
}
.xr-homepage .xh-image-credit a {
  color: var(--xh-navy);
  text-decoration: underline;
}
.xr-homepage .xh-quick {
  padding: var(--xh-section-space) 0;
}
.xr-homepage .xh-section-label {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(0.9rem, 1.5vw, 1.25rem);
}
.xr-homepage .xh-section-label h2,
.xr-homepage .xh-about h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.7rem;
  line-height: 1.2;
}
.xr-homepage .xh-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.xr-homepage .xh-tool {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 92px;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--xh-line);
  color: var(--xh-ink);
  background: #fff;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.xr-homepage a.xh-tool:hover,
.xr-homepage a.xh-tool:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(16, 54, 75, 0.1);
  text-decoration: none;
}
.xr-homepage .xh-tool-icon {
  display: grid;
  flex: 0 0 40px;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--xh-blue);
  background: #eaf3f4;
}
.xr-homepage .xh-tool strong {
  display: block;
  color: var(--xh-navy);
  font-size: 0.92rem;
  line-height: 1.2;
}
.xr-homepage .xh-tool small {
  display: block;
  margin-top: 0.28rem;
  color: var(--xh-muted);
  font-size: 0.75rem;
  line-height: 1.3;
}
.xr-homepage .xh-tool-arrow {
  margin-left: auto;
  color: var(--xh-blue);
  font-size: 0.75rem;
}
.xr-homepage .xh-tool-soon em {
  display: inline-block;
  margin-left: 0.2rem;
  padding: 0.1rem 0.32rem;
  color: #73520d;
  background: #fff4d8;
  font-size: 0.61rem;
  font-style: normal;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
}
.xr-homepage .xh-data {
  padding: var(--xh-section-space) 0;
  background: #fff;
  border-top: 1px solid var(--xh-line);
  border-bottom: 1px solid var(--xh-line);
}
.xr-homepage .xh-section-subtitle {
  margin: 0.3rem 0 0;
  color: var(--xh-muted);
  font-size: 0.88rem;
}
.xr-homepage .xh-version {
  padding: 0.32rem 0.55rem;
  border: 1px solid var(--xh-line);
  color: var(--xh-muted);
  font-size: 0.72rem;
  white-space: nowrap;
}
.xr-homepage .xh-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.1rem;
  border: 1px solid var(--xh-line);
}
.xr-homepage .xh-metric {
  padding: 1rem 1.25rem;
  border-right: 1px solid var(--xh-line);
}
.xr-homepage .xh-metric:last-child {
  border-right: 0;
}
.xr-homepage .xh-metric > span {
  display: block;
  color: var(--xh-muted);
  font-size: 0.76rem;
  line-height: 1.25;
}
.xr-homepage .xh-metric strong {
  display: block;
  margin: 0.45rem 0 0.2rem;
  color: var(--xh-navy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.xr-homepage .xh-metric small {
  display: block;
  color: #758696;
  font-size: 0.68rem;
}
.xr-homepage .xh-charts {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.1rem;
}
.xr-homepage .xh-chart {
  min-width: 0;
  padding: 1.1rem 1.25rem 1rem;
  border: 1px solid var(--xh-line);
  background: #fbfcfd;
}
.xr-homepage .xh-chart-head h3 {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
}
.xr-homepage .xh-chart-head p {
  margin: 0.2rem 0 0.85rem;
  color: var(--xh-muted);
  font-size: 0.72rem;
}
.xr-homepage .xh-histogram {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 0.45rem;
  height: 107px;
  padding: 0.05rem 0.15rem 0;
  border-bottom: 1px solid #cedbe2;
}
.xr-homepage .xh-bin {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  height: 100%;
  min-width: 0;
}
.xr-homepage .xh-bin-value {
  margin-bottom: 0.2rem;
  color: var(--xh-navy);
  font-size: 0.7rem;
  font-weight: 700;
}
.xr-homepage .xh-bar {
  display: block;
  width: min(36px, 72%);
  height: var(--bar);
  min-height: 4px;
  background: linear-gradient(180deg, #3b9a95, #176b8d);
}
.xr-homepage .xh-bin-label {
  min-height: 27px;
  padding-top: 0.24rem;
  color: var(--xh-muted);
  font-size: 0.62rem;
  line-height: 1.15;
  text-align: center;
}
.xr-homepage .xh-axis-note {
  margin: 0.12rem 0 0;
  color: #82919e;
  font-size: 0.63rem;
  text-align: right;
}
.xr-homepage .xh-stacked {
  display: flex;
  overflow: hidden;
  height: 25px;
  margin: 1.1rem 0 0.9rem;
  border-radius: 2px;
  background: #e4ebef;
}
.xr-homepage .xh-stacked .xh-het {
  background: #2e8b83;
}
.xr-homepage .xh-stacked .xh-hom {
  background: #176b8d;
}
.xr-homepage .xh-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}
.xr-homepage .xh-legend > span {
  display: grid;
  grid-template-columns: 10px 1fr;
  column-gap: 0.4rem;
  align-items: center;
}
.xr-homepage .xh-legend-swatch {
  grid-row: 1/4;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.xr-homepage .xh-legend-swatch.xh-het {
  background: #2e8b83;
}
.xr-homepage .xh-legend-swatch.xh-hom {
  background: #176b8d;
}
.xr-homepage .xh-legend strong {
  color: var(--xh-muted);
  font-size: 0.7rem;
}
.xr-homepage .xh-legend b {
  color: var(--xh-navy);
  font-size: 0.83rem;
}
.xr-homepage .xh-legend small {
  color: var(--xh-muted);
  font-size: 0.68rem;
}
.xr-homepage .xh-secondary-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  padding: 1rem 0.1rem 0.5rem;
  color: var(--xh-muted);
  font-size: 0.78rem;
}
.xr-homepage .xh-secondary-stats strong {
  color: var(--xh-navy);
}
.xr-homepage .xh-footnote,
.xr-homepage .xh-scope-note {
  margin: 0.15rem 0 0;
  color: #657889;
  font-size: 0.7rem;
  line-height: 1.4;
}
.xr-homepage .xh-scope-note {
  color: #7a8996;
}
.xr-homepage .xh-about {
  padding: var(--xh-section-space) 0;
  background: #eef4f3;
}
.xr-homepage .xh-about-inner {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 2rem;
}
.xr-homepage .xh-about h2 {
  max-width: 320px;
}
.xr-homepage .xh-about-copy p {
  margin: 0 0 0.7rem;
  color: #445b6e;
  font-size: 0.88rem;
  line-height: 1.6;
}
.xr-homepage .xh-about-copy p:last-child {
  margin-bottom: 0;
}
.xr-homepage .xh-publications {
  padding: var(--xh-section-space) 0;
}
.xr-homepage .xh-publication-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--xh-line);
}
.xr-homepage .xh-publication {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 0.55rem;
  padding: 0.7rem 0.2rem;
  border-bottom: 1px solid var(--xh-line);
}
.xr-homepage .xh-publication-index {
  padding-top: 0.12rem;
  color: #8797a3;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.88rem;
}
.xr-homepage .xh-publication h3 {
  margin: 0;
  font-family: "Source Sans Pro", Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}
.xr-homepage .xh-publication h3 a {
  color: var(--xh-navy);
  text-decoration: none;
}
.xr-homepage .xh-publication h3 a:hover,
.xr-homepage .xh-publication h3 a:focus {
  text-decoration: underline;
}
.xr-homepage .xh-publication p {
  margin: 0.2rem 0 0;
  color: var(--xh-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}
.xr-homepage .xh-publication .xh-doi {
  color: var(--xh-blue);
  overflow-wrap: anywhere;
}
.xr-homepage .xh-publication-featured {
  background: rgba(255, 255, 255, 0.56);
}
.xr-homepage .xh-publication-note {
  margin: 0.55rem 0 0;
  color: var(--xh-muted);
  font-size: 0.73rem;
}
.xh-news {
  padding: var(--xh-section-space) 0;
  border-top: 1px solid var(--xh-line);
  background: #fff;
}
.xh-news .xh-news-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--xh-line);
}
.xh-news .xh-news-item {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--xh-line);
}
.xh-news .xh-news-item time {
  padding-top: 0.1rem;
  color: var(--xh-muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.xh-news .xh-news-tag {
  display: inline-block;
  margin-bottom: 0.25rem;
  padding: 0.08rem 0.36rem;
  color: var(--xh-blue);
  background: #eaf3f4;
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.xh-news .xh-news-item h3 {
  margin: 0;
  color: var(--xh-ink);
  font-family: "Source Sans Pro", Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
}
.xh-news .xh-news-item h3 a {
  color: var(--xh-navy);
}
.xh-news .xh-news-item h3 a:hover,
.xh-news .xh-news-item h3 a:focus {
  color: var(--xh-blue);
}
@media (max-width: 575.98px) {
  .xh-news .xh-news-item {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}
.xr-homepage .xr-footer {
  margin-top: 0;
}
@media (max-width: 991.98px) {
  .xr-homepage .xh-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .xr-homepage .xh-about-inner {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
}
@media (max-width: 767.98px) {
  .xr-homepage .xh-gallery {
    padding: calc(68px + 0.6rem) 0 1.6rem;
  }
  .xr-homepage .xh-gallery-heading {
    display: block;
  }
  .xr-homepage .xh-gallery-intro {
    margin-top: 0.45rem;
  }
  .xr-homepage .xh-slides {
    min-height: 230px;
  }
  .xr-homepage .xh-slide img {
    height: clamp(230px, 64vw, 340px);
  }
  .xr-homepage .xh-arrow {
    width: 36px;
    height: 36px;
  }
  .xr-homepage .xh-previous {
    left: 0.8rem;
  }
  .xr-homepage .xh-next {
    right: 0.8rem;
  }
  .xr-homepage .xh-tools {
    gap: 0.75rem;
  }
  .xr-homepage .xh-tool {
    min-height: 96px;
    gap: 0.6rem;
    padding: 0.9rem;
  }
  .xr-homepage .xh-tool-icon {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
  }
  .xr-homepage .xh-tool small {
    font-size: 0.72rem;
  }
  .xr-homepage .xh-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .xr-homepage .xh-metric:nth-child(2) {
    border-right: 0;
  }
  .xr-homepage .xh-metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--xh-line);
  }
  .xr-homepage .xh-metric {
    padding: 0.85rem 0.9rem;
  }
  .xr-homepage .xh-charts {
    grid-template-columns: 1fr;
  }
  .xr-homepage .xh-chart {
    padding: 0.95rem;
  }
  .xr-homepage .xh-section-label h2,
  .xr-homepage .xh-about h2 {
    font-size: 1.5rem;
  }
}
@media (max-width: 420px) {
  .xr-homepage .xh-section-label {
    align-items: start;
  }
  .xr-homepage .xh-version {
    padding: 0.25rem 0.35rem;
    font-size: 0.64rem;
  }
  .xr-homepage .xh-tool {
    align-items: flex-start;
  }
  .xr-homepage .xh-tool-arrow {
    display: none;
  }
  .xr-homepage .xh-tool strong {
    font-size: 0.85rem;
  }
  .xr-homepage .xh-tool-soon em {
    display: table;
    margin: 0.22rem 0 0;
  }
  .xr-homepage .xh-legend {
    grid-template-columns: 1fr;
  }
  .xr-homepage .xh-bin-label {
    font-size: 0.56rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .xr-homepage *,
  .xr-homepage *::before,
  .xr-homepage *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Requested homepage layout: carousel left, About XRICE right; summary before tools. */
.xr-homepage .xh-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(1.5rem, 3.2vw, 2.75rem);
}
.xr-homepage .xh-hero-media {
  min-width: 0;
}
.xr-homepage .xh-hero-about {
  min-width: 0;
  padding: clamp(0.5rem, 1.2vw, 1.5rem) 0;
}
.xr-homepage .xh-hero-about h1 {
  margin: 0 0 clamp(1rem, 1.6vw, 1.4rem);
  color: var(--xh-navy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.12;
}
.xr-homepage .xh-hero-about .xh-about-copy p {
  margin: 0 0 0.9rem;
  color: #445b6e;
  font-size: 0.88rem;
  line-height: 1.62;
}
.xr-homepage .xh-hero-about .xh-about-copy p:last-child {
  margin-bottom: 0;
}
@media (max-width: 991.98px) {
  .xr-homepage .xh-hero-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
    gap: 1.1rem;
  }
  .xr-homepage .xh-hero-about h1 {
    font-size: 1.8rem;
  }
  .xr-homepage .xh-hero-about .xh-about-copy p {
    font-size: 0.82rem;
    line-height: 1.45;
  }
}
@media (max-width: 767.98px) {
  .xr-homepage .xh-hero-layout {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  .xr-homepage .xh-hero-about {
    padding: 0.35rem 0.1rem 0.1rem;
  }
  .xr-homepage .xh-hero-about h1 {
    font-size: 1.7rem;
  }
  .xr-homepage .xh-hero-about .xh-about-copy p {
    font-size: 0.88rem;
    line-height: 1.55;
  }
}
