/* XRM5 profile extension - isolated from the global stylesheet. */

.xrm5-profile-page {
  --xrm-gold: #d6a944;
  --xrm-gold-soft: rgba(214,169,68,.10);
  --xrm-blue: #5b8fc9;
  --xrm-green: #58bd82;
  --xrm-panel: #11161e;
}

.xrm5-profile-page .section[id] {
  scroll-margin-top: 76px;
}

.xrm5-profile-page .section__head .kicker {
  display: inline-block;
  width: auto;
  max-width: 100%;
  line-height: 1.25;
}

.xrm5-profile-page .section--compact {
  padding-top: clamp(46px, 6vw, 68px);
  padding-bottom: clamp(46px, 6vw, 68px);
}

.xrm5-hero .lead {
  max-width: 840px;
}

.xrm5-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.xrm5-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  border-bottom: 1px solid var(--line);
}

.xrm5-kpi-strip article {
  min-width: 0;
  padding: 22px 18px;
  border-right: 1px solid var(--line);
}

.xrm5-kpi-strip article:last-child {
  border-right: 0;
}

.xrm5-kpi-strip span,
.xrm5-kpi-strip small {
  display: block;
  color: var(--dim);
  font-size: 10px;
  line-height: 1.4;
}

.xrm5-kpi-strip span {
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.xrm5-kpi-strip strong {
  display: block;
  margin: 10px 0 5px;
  color: var(--gold2);
  font-size: clamp(20px,2.3vw,30px);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.xrm5-architecture {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  border: 1px solid var(--line);
  background: rgba(17,22,30,.62);
}

.xrm5-architecture article {
  min-height: 220px;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.xrm5-architecture article:last-child {
  border-right: 0;
}

.xrm5-architecture span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .16em;
}

.xrm5-architecture h3 {
  margin-top: 42px;
}

.xrm5-architecture p,
.xrm5-list {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.62;
}

.xrm5-progress-table {
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 13px;
}

.xrm5-progress-table th,
.xrm5-progress-table td {
  padding: 15px 18px;
  line-height: 1.38;
  vertical-align: middle;
}

.xrm5-progress-table thead th {
  color: #8290a4;
  background: rgba(255,255,255,.025);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .12em;
}

.xrm5-progress-table tbody th {
  width: 14%;
  color: var(--gold2);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.xrm5-progress-table tbody td {
  color: #d8e2ee;
  font-size: 14px;
}

.xrm5-progress-table th:nth-child(2),
.xrm5-progress-table td:nth-child(2) {
  width: 22%;
}

.xrm5-progress-table th:nth-child(3),
.xrm5-progress-table td:nth-child(3),
.xrm5-progress-table th:nth-child(4),
.xrm5-progress-table td:nth-child(4),
.xrm5-progress-table th:nth-child(5),
.xrm5-progress-table td:nth-child(5),
.xrm5-progress-table th:nth-child(6),
.xrm5-progress-table td:nth-child(6) {
  width: 11%;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.xrm5-progress-table th:nth-child(7),
.xrm5-progress-table td:nth-child(7) {
  width: 19%;
}

.xrm5-progress-table tbody tr {
  background: rgba(255,255,255,.006);
}

.xrm5-progress-table tbody tr + tr th,
.xrm5-progress-table tbody tr + tr td {
  border-top: 1px solid rgba(232,238,245,.065);
}

.xrm5-progress-table tbody tr.is-selected {
  background: linear-gradient(90deg, rgba(214,169,68,.14), rgba(214,169,68,.055));
  box-shadow: inset 3px 0 0 var(--xrm-gold);
}

.xrm5-progress-table tbody tr.is-selected th,
.xrm5-progress-table tbody tr.is-selected td {
  color: var(--text);
}

.xrm5-progress-table tbody tr.is-selected th {
  color: #f1c766;
}

.xrm5-chart-gallery {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
}

.xrm5-chart {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  background: #07090c;
  overflow: hidden;
}

.xrm5-chart--wide,
.xrm5-chart:last-child {
  grid-column: 1 / -1;
}

.xrm5-chart img {
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  object-fit: contain;
  background: #07090c;
}

.xrm5-chart figcaption {
  min-height: 74px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.xrm5-chart figcaption strong {
  color: var(--text);
}

.xrm5-gates {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  border: 1px solid var(--line);
  background: rgba(17,22,30,.52);
}

.xrm5-gates article {
  min-height: 190px;
  padding: 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.xrm5-gates article:nth-child(3n) {
  border-right: 0;
}

.xrm5-gates article:nth-child(n+4) {
  border-bottom: 0;
}

.xrm5-gates span {
  display: inline-block;
  color: var(--dim);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.xrm5-gates .is-pass span {
  color: var(--xrm-green);
}

.xrm5-gates .is-pending span {
  color: var(--gold);
}

.xrm5-gates h3 {
  margin-top: 30px;
  font-size: 17px;
}

.xrm5-gates p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.xrm5-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding-left: 19px;
}

.xrm5-list li::marker {
  color: var(--gold);
}

@media (max-width: 1080px) {
  .xrm5-kpi-strip {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }

  .xrm5-kpi-strip article:nth-child(3) {
    border-right: 0;
  }

  .xrm5-kpi-strip article:nth-child(n+4) {
    border-top: 1px solid var(--line);
  }

  .xrm5-architecture {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .xrm5-architecture article:nth-child(2) {
    border-right: 0;
  }

  .xrm5-architecture article:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .xrm5-hero-actions {
    display: grid;
  }

  .xrm5-hero-actions .btn {
    width: 100%;
  }

  .xrm5-kpi-strip,
  .xrm5-architecture,
  .xrm5-chart-gallery,
  .xrm5-gates {
    grid-template-columns: 1fr;
  }

  .xrm5-kpi-strip article,
  .xrm5-kpi-strip article:nth-child(3) {
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .xrm5-kpi-strip article:first-child {
    border-top: 0;
  }

  .xrm5-architecture article,
  .xrm5-architecture article:nth-child(2) {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .xrm5-architecture article:last-child {
    border-bottom: 0;
  }

  .xrm5-architecture h3 {
    margin-top: 24px;
  }

  .xrm5-chart,
  .xrm5-chart--wide,
  .xrm5-chart:last-child {
    grid-column: auto;
  }

  .xrm5-chart figcaption {
    min-height: 0;
  }

  .xrm5-gates article,
  .xrm5-gates article:nth-child(3n),
  .xrm5-gates article:nth-child(n+4) {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .xrm5-gates article:last-child {
    border-bottom: 0;
  }
}

.xrm5-section-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 6px;
  margin: 0 auto 18px;
  padding: 8px;
  width: min(var(--max), calc(100% - 32px));
  overflow-x: auto;
  border-block: 1px solid var(--line);
  background: rgba(7, 9, 12, .94);
  backdrop-filter: blur(14px);
  scroll-padding-inline: 8px;
}
.xrm5-section-nav a {
  flex: 0 0 auto;
  padding: 9px 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}
.xrm5-section-nav a:hover,
.xrm5-section-nav a:focus-visible { color: var(--text); }
.xrm5-evidence-details { grid-column: 1 / -1; }
.xrm5-evidence-details > summary {
  cursor: pointer;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--gold2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.xrm5-evidence-details[open] > summary { margin-bottom: 16px; }
.xrm5-chart-gallery--details { margin-top: 0; }
.xrm5-forward-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.xrm5-forward-status article,
.xrm5-forward-protocol article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(16, 19, 24, .58);
}
.xrm5-forward-status span,
.xrm5-forward-protocol span {
  display: block;
  color: var(--gold2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.xrm5-forward-status strong {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.xrm5-forward-protocol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.xrm5-forward-protocol h3 { margin: 12px 0 8px; font-size: 17px; }
.xrm5-forward-protocol p { margin: 0; }
.xrm5-forward-link { margin: 18px 0 0; }
.xrm5-interest-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 24px;
  border-block: 1px solid var(--line);
}
.xrm5-interest-band h2 { margin: 6px 0 10px; }
.xrm5-interest-band p { margin-bottom: 0; }
@media (max-width: 760px) {
  .xrm5-section-nav { top: 0; width: calc(100% - 32px); }
  .xrm5-chart-gallery--details { grid-template-columns: 1fr; }
  .xrm5-forward-status,
  .xrm5-forward-protocol { grid-template-columns: 1fr; }
  .xrm5-interest-band { grid-template-columns: 1fr; padding-inline: 0; }
}

@media (min-width: 761px) and (max-width: 1080px) {
  .xrm5-forward-status,
  .xrm5-forward-protocol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
