/* Shared styling for the refreshed XRICE module pages
   (Varieties, Mutation Details, XRice Select, Tools, About). */
.xm-page main {
  background: #f7fafb;
}
.xm-page [id] {
  scroll-margin-top: 90px;
}
/* The hero carries the fixed-nav offset so its gradient starts behind the nav. */
.xm-page main:not(.sample-page) {
  padding-top: 0;
}
.xm-hero {
  padding: calc(76px + 2.2rem) 0 2.1rem;
  border-bottom: 1px solid var(--xr-line);
  background: linear-gradient(125deg, #eef5f8 0%, #f9fbfa 62%, #edf4f1 100%);
}
.xm-hero h1 {
  max-width: 860px;
  margin: 0;
  color: var(--xr-navy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
}
.xm-hero p.xm-lead {
  max-width: 760px;
  margin: 0.9rem 0 0;
  color: #3d556b;
  font-size: 1.02rem;
  line-height: 1.6;
}
.xm-kicker {
  margin: 0 0 0.55rem;
  color: var(--xr-blue);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.xm-section {
  padding: 2.1rem 0;
}
.xm-section--paper {
  border-top: 1px solid var(--xr-line);
  border-bottom: 1px solid var(--xr-line);
  background: #fff;
}
.xm-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.xm-section-head h2 {
  margin: 0;
  color: var(--xr-navy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.6rem;
  line-height: 1.2;
}
.xm-section-head p {
  max-width: 640px;
  margin: 0.35rem 0 0;
  color: #5b7084;
  font-size: 0.9rem;
}
.xm-note {
  margin: 0.75rem 0 0;
  color: #6b7f90;
  font-size: 0.78rem;
  line-height: 1.5;
}
.xm-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--xr-line);
  background: #fff;
}
.xm-stat {
  min-height: 96px;
  padding: 0.85rem 0.95rem;
  border-right: 1px solid var(--xr-line);
}
.xm-stat:last-child {
  border-right: 0;
}
.xm-stat span {
  display: block;
  color: #5b7084;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}
.xm-stat strong {
  display: block;
  margin-top: 0.3rem;
  color: var(--xr-navy);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.xm-stat small {
  display: block;
  margin-top: 0.25rem;
  color: #7a8d9c;
  font-size: 0.7rem;
}
.xm-table-wrap {
  overflow: auto;
  max-height: 72vh;
  border: 1px solid var(--xr-line);
  background: #fff;
}
.xm-table {
  width: 100%;
  min-width: 900px;
  margin: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.84rem;
}
.xm-table th,
.xm-table td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid #e8eef3;
  text-align: left;
  vertical-align: middle;
}
.xm-table thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  color: #334c61;
  background: #f1f6f9;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.xm-table tbody tr:hover {
  background: #f7fbfc;
}
.xm-table td.xm-num {
  font-variant-numeric: tabular-nums;
}
.xm-table .xm-col-id {
  width: 110px;
}
.xm-table .xm-col-snp {
  width: 130px;
}
.xm-table .xm-col-exon {
  width: 120px;
}
.xm-table .xm-col-zyg {
  width: 130px;
}
.xm-table .xm-col-status {
  width: 120px;
}
.xm-table .xm-col-link {
  width: 150px;
}
.xm-badge {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border-radius: 2px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.xm-badge--yes {
  color: #1f5d43;
  background: #e4f3ea;
}
.xm-badge--no {
  color: #7d5a12;
  background: #fbf0d8;
}
.xm-badge--soon {
  color: #73520d;
  background: #fff4d8;
}
.xm-table a {
  font-weight: 600;
}
.xm-split {
  display: flex;
  height: 28px;
  margin-top: 1rem;
  border: 1px solid var(--xr-line);
  background: #fff;
}
.xm-split span {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}
.xm-split .xm-split-het {
  background: #176b8d;
}
.xm-split .xm-split-hom {
  background: #2e8b83;
}
.xm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin-top: 0.55rem;
  color: #4e6579;
  font-size: 0.78rem;
}
.xm-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 0.35rem;
}
.xm-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.xm-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.xm-card {
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--xr-line);
  background: #fff;
}
.xm-card h3 {
  margin: 0 0 0.45rem;
  color: var(--xr-navy);
  font-size: 1.08rem;
}
.xm-card p {
  margin: 0 0 0.6rem;
  color: #4e6579;
  font-size: 0.88rem;
  line-height: 1.55;
}
.xm-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #5b7084;
  font-size: 0.8rem;
  line-height: 1.55;
}
.xm-card-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 0.7rem;
  color: var(--xr-blue);
  background: #eaf3f8;
}
.xm-placeholder {
  padding: 1.6rem 1.3rem;
  border: 1px dashed #b9cbd8;
  background: repeating-linear-gradient(
    -45deg,
    #fbfdfe,
    #fbfdfe 10px,
    #f5f9fb 10px,
    #f5f9fb 20px
  );
}
.xm-placeholder h3 {
  margin: 0 0 0.4rem;
  color: var(--xr-navy);
  font-size: 1rem;
}
.xm-placeholder p {
  margin: 0;
  color: #5b7084;
  font-size: 0.86rem;
  line-height: 1.55;
}
.xm-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.2rem;
  padding: 1.15rem;
  border: 1px solid var(--xr-line);
  background: #fff;
}
.xm-form label {
  display: block;
  margin-bottom: 0.3rem;
  color: #334c61;
  font-size: 0.8rem;
  font-weight: 700;
}
.xm-form .form-control {
  font-size: 0.88rem;
}
.xm-form .xm-form-actions {
  grid-column: 1 / -1;
}
.xm-form textarea.form-control {
  min-height: 110px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
}
.xm-tool-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.3rem;
  border: 1px solid var(--xr-line);
  background: #fff;
}
.xm-tool-card h2 {
  margin: 0 0 0.5rem;
  color: var(--xr-navy);
  font-size: 1.25rem;
}
.xm-tool-card p {
  color: #4e6579;
  font-size: 0.9rem;
  line-height: 1.55;
}
.xm-tool-card .xm-tool-actions {
  margin-top: auto;
  padding-top: 0.8rem;
}
.xm-about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: start;
  gap: 1.6rem;
}
.xm-about-copy p {
  color: #3d556b;
  font-size: 0.94rem;
  line-height: 1.65;
}
.xm-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}
.xm-photo-grid figure {
  margin: 0;
  border: 1px solid var(--xr-line);
  background: #fff;
}
.xm-photo-grid img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.xm-photo-grid figcaption {
  padding: 0.45rem 0.55rem;
  color: #5b7084;
  font-size: 0.72rem;
  line-height: 1.4;
}
@media (max-width: 991.98px) {
  .xm-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .xm-about-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 767.98px) {
  .xm-hero {
    padding: calc(68px + 1.5rem) 0 1.6rem;
  }
  .xm-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .xm-stat:nth-child(2) {
    border-right: 0;
  }
  .xm-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--xr-line);
  }
  .xm-stat {
    min-height: 88px;
    padding: 0.7rem;
  }
  .xm-stat strong {
    font-size: 1.25rem;
  }
  .xm-card-grid,
  .xm-tool-grid,
  .xm-form,
  .xm-photo-grid {
    grid-template-columns: 1fr;
  }
  .xm-section-head {
    display: block;
  }
}
