.xmh-detail-page .xmh-model-back {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: #8796a8;
  font-size: 13px;
}

.xmh-detail-page .xmh-model-back a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #d5e3f4;
  border-radius: 10px;
  background: rgba(255, 255, 255, .92);
  color: #245f9f;
  font-weight: 700;
  box-shadow: 0 5px 14px rgba(37, 93, 151, .08);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.xmh-detail-page .xmh-model-back a:hover {
  border-color: #91bcec;
  box-shadow: 0 8px 20px rgba(37, 93, 151, .14);
  transform: translateY(-1px);
}

.xmh-detail-page .xmh-model-back a:focus-visible {
  outline: 3px solid rgba(37, 111, 214, .2);
  outline-offset: 2px;
}

.xmh-detail-page .xmh-model-back > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #dce9f7;
  border-radius: 10px;
  background: linear-gradient(135deg, #edf5ff 0%, #f7fbff 100%);
  color: #244c79;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.xmh-detail-page .xmh-model-back > span::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2473d4;
  box-shadow: 0 0 0 4px rgba(36, 115, 212, .1);
  content: "";
}

.xmh-detail-page .xmh-model-eyebrow,
.xmh-detail-page .xmh-model-repo,
.xmh-detail-page .xmh-model-note,
.xmh-detail-page .xmh-os-label,
.xmh-detail-page .xmh-download-reassure,
.xmh-detail-page .xmh-guided-step p,
.xmh-detail-page .xmh-full-status,
.xmh-detail-page .xmh-download-result p,
.xmh-detail-page .xmh-download-faq {
  font-size: 13px;
  line-height: 1.65;
}

.xmh-detail-page .xmh-model-publisher {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 9px 0 0;
  color: #496886;
  font-size: 13px;
  line-height: 1.6;
}

.xmh-detail-page .xmh-model-publisher span {
  color: #8394a8;
}

.xmh-detail-page .xmh-model-publisher strong {
  color: #244f79;
  font-weight: 700;
}

.xmh-detail-page .xmh-model-publisher em {
  padding: 2px 7px;
  border: 1px solid #cfe9dc;
  border-radius: 999px;
  background: #eef9f3;
  color: #2f805b;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.xmh-detail-page .xmh-detail-label span,
.xmh-detail-page .xmh-detail-label b,
.xmh-detail-page .xmh-model-glance dt,
.xmh-detail-page .xmh-glance-route {
  font-size: 11px;
}

.xmh-detail-page .xmh-model-glance > p,
.xmh-detail-page .xmh-full-footnote p {
  font-size: 12px;
  line-height: 1.65;
}

.xmh-detail-page .xmh-model-glance dd {
  font-size: 16px;
}

.xmh-detail-page .xmh-purpose-overview {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.xmh-detail-page .xmh-purpose-overview > strong {
  display: block;
  margin-bottom: 12px;
  color: #526d8b;
  font-size: 14px;
  font-weight: 600;
}

.xmh-detail-page .xmh-purpose-tags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.xmh-detail-page .xmh-purpose-tags span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 0;
  min-height: 46px;
  padding: 10px 8px;
  border: 1px solid #d0e3fa;
  border-radius: 11px;
  background: linear-gradient(135deg, #edf5ff, #f7fbff);
  color: #195cad;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: anywhere;
}

/* A compact summary card with a clear title, purpose tiles and download note. */
.xmh-detail-page .xmh-detail-hero > .xmh-model-glance {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-self: center;
  min-width: 0;
  box-sizing: border-box;
  padding: 26px;
  border: 1px solid #d5e4f6;
  border-radius: 20px;
  background: linear-gradient(155deg, #fff 0%, #f8fbff 100%);
  box-shadow: 0 12px 32px rgba(34, 83, 143, .08), inset 0 1px 0 #fff;
}

.xmh-detail-page .xmh-model-glance > p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #173d67;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
}

.xmh-detail-page .xmh-model-glance > p::before {
  content: "";
  width: 5px;
  height: 20px;
  flex: 0 0 5px;
  border-radius: 5px;
  background: linear-gradient(180deg, #1974e4, #70b7ff);
}

.xmh-detail-page .xmh-model-glance .xmh-glance-generic {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 17px 18px;
  border: 1px solid #e0eaf6;
  border-radius: 12px;
  background: #f4f8fd;
}

.xmh-detail-page .xmh-glance-generic strong {
  color: #244b77;
  font-size: 15px;
  line-height: 1.5;
}

.xmh-detail-page .xmh-glance-generic span {
  color: #5c7490;
  font-size: 14px;
  line-height: 1.8;
}

.xmh-detail-page .xmh-model-glance .xmh-glance-route {
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid #e3ebf6;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
}

.xmh-detail-page .xmh-model-glance .xmh-glance-route span {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .xmh-detail-page .xmh-detail-hero > .xmh-model-glance {
    width: 100%;
    gap: 18px;
    padding: 20px;
    border-radius: 16px;
  }
}

.xmh-detail-page .xmh-glance-route {
  gap: 9px;
  color: #486b91;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.xmh-detail-page .xmh-glance-route b {
  color: #1f73d2;
  font-size: 16px;
  line-height: 1;
}

.xmh-detail-page .xmh-download-lead {
  font-size: 15px;
  line-height: 1.75;
}

@media (max-width: 760px) {
  .xmh-detail-page .xmh-model-back {
    gap: 10px;
    font-size: 12px;
  }

  .xmh-detail-page .xmh-model-back a {
    min-height: 36px;
    padding: 0 12px;
  }

  .xmh-detail-page .xmh-model-back > span {
    min-height: 36px;
    padding: 0 12px;
  }

  .xmh-detail-page .xmh-glance-route {
    gap: 7px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .xmh-detail-page .xmh-model-back a {
    transition: none;
  }
}

.xmh-detail-page .xmh-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.xmh-detail-page .xmh-card-heading span {
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px solid #cfe2f7;
  border-radius: 999px;
  background: #edf6ff;
  color: #2368ad;
  font-size: 12px;
  font-weight: 700;
}

.xmh-detail-page .xmh-card-copy {
  max-height: 900px;
  overflow: auto;
  margin-top: 16px;
  padding: 20px;
  border: 1px solid #dce8f5;
  border-radius: 14px;
  background: #f8fbff;
  color: #294968;
  font-size: 15px;
  line-height: 1.9;
  white-space: normal;
}

.xmh-detail-page .xmh-card-copy h3 {
  margin: 24px 0 8px;
  color: #173f69;
  font-size: 17px;
  line-height: 1.45;
}

.xmh-detail-page .xmh-card-copy h3:first-child {
  margin-top: 0;
}

.xmh-detail-page .xmh-card-copy p {
  margin: 0 0 12px;
}

.xmh-detail-page .xmh-card-copy ul {
  margin: 8px 0 16px;
  padding-left: 22px;
}

.xmh-detail-page .xmh-card-copy li {
  margin: 6px 0;
}

.xmh-detail-page .xmh-generic-summary {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid #d8e7f7;
  border-radius: 14px;
  background: linear-gradient(135deg, #f4f9ff 0%, #fbfdff 100%);
  color: #294d72;
  font-size: 15px;
  line-height: 1.85;
}

.xmh-detail-page .xmh-generic-summary p {
  margin: 0;
}

.xmh-detail-page .xmh-generic-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 0;
}

.xmh-detail-page .xmh-generic-facts > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e0eaf5;
  border-radius: 12px;
  background: #fff;
}

.xmh-detail-page .xmh-generic-facts dt {
  margin-bottom: 6px;
  color: #7b8fa5;
  font-size: 12px;
}

.xmh-detail-page .xmh-generic-facts dd {
  overflow-wrap: anywhere;
  margin: 0;
  color: #183f69;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .xmh-detail-page .xmh-generic-facts {
    grid-template-columns: 1fr;
  }

  .xmh-detail-page .xmh-card-copy,
  .xmh-detail-page .xmh-generic-summary {
    padding: 16px;
  }
}

/* Download panel: make the main action easier to scan and operate. */
.xmh-detail-page #xmh-download-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid #cfe0f5;
  background:
    radial-gradient(circle at 100% 0, rgba(57, 137, 235, .12), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 18px 42px rgba(31, 83, 138, .12);
}

.xmh-detail-page #xmh-download-panel::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #176ed8 0%, #59a8ff 72%, #8ed2ff 100%);
  content: "";
}

.xmh-detail-page #xmh-download-panel .xmh-detail-label {
  display: inline-flex;
  align-items: center;
  width: auto;
  margin-bottom: 10px;
  padding: 6px 10px;
  border: 1px solid #d4e6fa;
  border-radius: 999px;
  background: #edf6ff;
  color: #1763b6;
}

.xmh-detail-page #xmh-download-panel h2 {
  margin-bottom: 8px;
  color: #0c315a;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.xmh-detail-page #xmh-download-panel .xmh-download-lead {
  margin-bottom: 18px;
  color: #4b6d91;
}

.xmh-detail-page #xmh-download-panel select {
  width: 100%;
  min-height: 48px;
  padding: 0 42px 0 15px;
  border: 1px solid #bdd5f0;
  border-radius: 12px;
  background-color: #fff;
  color: #123d6d;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 5px 14px rgba(31, 91, 153, .06);
}

.xmh-detail-page #xmh-download-panel select:focus {
  border-color: #2473d4;
  outline: 3px solid rgba(36, 115, 212, .14);
}

.xmh-detail-page #xmh-download-panel .xmh-download-reassure {
  margin: 14px 0 16px;
  padding: 11px 13px;
  border-radius: 10px;
  background: #eaf4ff;
  color: #315d8c;
}

.xmh-detail-page #xmh-download-panel .xmh-guided-step {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid #dbe8f6;
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 7px 18px rgba(31, 83, 138, .06);
}

.xmh-detail-page #xmh-download-panel .xmh-guided-step h3 {
  color: #153f6f;
  font-size: 15px;
  line-height: 1.45;
}

.xmh-detail-page #xmh-download-panel button {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #126bd4 0%, #2588ed 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(24, 109, 211, .2);
  transition: box-shadow .2s ease, transform .2s ease;
}

.xmh-detail-page #xmh-download-panel button:hover {
  box-shadow: 0 11px 24px rgba(24, 109, 211, .28);
  transform: translateY(-1px);
}

.xmh-detail-page #xmh-download-panel button:focus-visible {
  outline: 3px solid rgba(36, 115, 212, .22);
  outline-offset: 2px;
}

.xmh-detail-page #xmh-download-panel .xmh-full-status {
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid #d5e8fb;
  border-radius: 10px;
  background: #f0f7ff;
  color: #41688e;
}

.xmh-detail-page #xmh-download-panel .xmh-download-result,
.xmh-detail-page #xmh-download-panel details {
  margin-top: 12px;
  border: 1px solid #dce8f5;
  border-radius: 12px;
  background: rgba(255, 255, 255, .86);
}

.xmh-detail-page #xmh-download-panel details summary {
  padding: 13px 14px;
  color: #245789;
  font-weight: 700;
  cursor: pointer;
}

.xmh-detail-page #xmh-download-panel .xmh-full-footnote {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed #cfdeed;
  color: #71869d;
}

@media (max-width: 760px) {
  .xmh-detail-page #xmh-download-panel h2 {
    font-size: 24px;
  }

  .xmh-detail-page #xmh-download-panel .xmh-guided-step {
    padding: 14px;
  }

  .xmh-detail-page #xmh-download-panel button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .xmh-detail-page #xmh-download-panel button {
    transition: none;
  }
}

/* Hero alignment: both columns share the same top and bottom baselines. */
.xmh-detail-page .xmh-detail-hero {
  align-items: stretch;
}

.xmh-detail-page .xmh-detail-identity {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.xmh-detail-page .xmh-detail-heading {
  display: flex;
  align-items: flex-start;
  min-width: 0;
}

.xmh-detail-page .xmh-detail-heading .xmh-detail-mark {
  float: none;
  flex: 0 0 64px;
  margin: 2px 18px 0 0;
}

.xmh-detail-page .xmh-detail-heading .xmh-detail-title {
  min-width: 0;
  flex: 1 1 auto;
}

.xmh-detail-page .xmh-detail-hero .xmh-model-description {
  max-width: none;
  margin: 24px 0 0;
}

.xmh-detail-page .xmh-detail-hero .xmh-capability-tags {
  margin: 18px 0 0;
}

.xmh-detail-page .xmh-detail-hero .xmh-model-intro-actions {
  margin-top: auto;
  padding-top: 22px;
}

.xmh-detail-page .xmh-detail-hero > .xmh-model-glance {
  align-self: stretch;
  min-height: 100%;
  padding: 28px;
}

.xmh-detail-page .xmh-model-glance .xmh-glance-generic {
  align-content: center;
  min-height: 84px;
}

.xmh-detail-page .xmh-model-glance .xmh-glance-route {
  margin-top: auto;
}

@media (max-width: 760px) {
  .xmh-detail-page .xmh-detail-heading .xmh-detail-mark {
    flex-basis: 52px;
    margin-right: 13px;
  }

  .xmh-detail-page .xmh-detail-hero .xmh-model-intro-actions {
    margin-top: 0;
    padding-top: 20px;
  }

  .xmh-detail-page .xmh-detail-hero > .xmh-model-glance {
    min-height: 0;
    padding: 20px;
  }
}

/* Keep the detail and download columns visually aligned as one paired section. */
.xmh-detail-page .xmh-model-layout {
  align-items: stretch;
}

.xmh-detail-page .xmh-model-layout > article,
.xmh-detail-page #xmh-download-panel {
  position: relative;
  top: 0 !important;
  align-self: stretch;
  overflow: hidden;
  margin-top: 0 !important;
  padding-top: 30px !important;
  border: 1px solid #d5e3f2;
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0, rgba(71, 145, 234, .08), transparent 28%),
    linear-gradient(180deg, #fafdff 0, #ffffff 210px);
  box-shadow: 0 14px 34px rgba(31, 83, 138, .09);
}

/* Use the available page height instead of hiding long model cards in a nested scroller. */
.xmh-detail-page .xmh-model-layout > article {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.xmh-detail-page .xmh-card-copy {
  max-height: none;
  overflow: visible;
}

.xmh-detail-page .xmh-model-layout > article::before,
.xmh-detail-page #xmh-download-panel::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #176ed8 0%, #59a8ff 72%, #8ed2ff 100%);
  content: "";
}

.xmh-detail-page .xmh-model-layout > article > .xmh-model-eyebrow,
.xmh-detail-page #xmh-download-panel > .xmh-model-eyebrow {
  margin-top: 0;
}

@media (max-width: 980px) {
  .xmh-detail-page .xmh-model-layout {
    align-items: flex-start;
  }

  .xmh-detail-page .xmh-model-layout > article,
  .xmh-detail-page #xmh-download-panel {
    width: 100%;
    align-self: flex-start;
  }
}

@media (max-width: 760px) {
  .xmh-detail-page .xmh-model-layout > article,
  .xmh-detail-page #xmh-download-panel {
    padding-top: 24px !important;
    border-radius: 18px;
  }
}

/* Put source checks beside the model title and expose the upstream update date. */
.xmh-detail-page .xmh-detail-heading > .xmh-detail-label {
  display: grid;
  flex: 0 0 auto;
  align-self: flex-start;
  gap: 8px;
  min-width: 116px;
  margin: 1px 0 0 22px;
}

.xmh-detail-page .xmh-detail-heading > .xmh-detail-label span,
.xmh-detail-page .xmh-detail-heading > .xmh-detail-label b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #d6e5f7;
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
  line-height: 1.35;
  white-space: nowrap;
}

.xmh-detail-page .xmh-detail-heading > .xmh-detail-label b {
  border-color: #d5eadf;
  background: #eef8f3;
}

.xmh-detail-page .xmh-glance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
}

.xmh-detail-page .xmh-glance-head > p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #173d67;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
}

.xmh-detail-page .xmh-glance-head > p::before {
  width: 5px;
  height: 20px;
  flex: 0 0 5px;
  border-radius: 5px;
  background: linear-gradient(180deg, #1974e4, #70b7ff);
  content: "";
}

.xmh-detail-page .xmh-glance-head > span {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid #d5e4f6;
  border-radius: 8px;
  background: #f4f8fd;
  color: #587494;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .xmh-detail-page .xmh-detail-heading {
    flex-wrap: wrap;
  }

  .xmh-detail-page .xmh-detail-heading > .xmh-detail-label {
    display: flex;
    width: calc(100% - 65px);
    min-width: 0;
    margin: 12px 0 0 65px;
  }

  .xmh-detail-page .xmh-detail-heading > .xmh-detail-label span,
  .xmh-detail-page .xmh-detail-heading > .xmh-detail-label b {
    min-height: 30px;
  }
}

@media (max-width: 430px) {
  .xmh-detail-page .xmh-glance-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
