/* Versions & progress page. Builds on site-pages.css cards and tokens. */
.nc-rel-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 19rem);
  gap: 1.4rem 2rem;
  align-items: start;
}

.nc-rel-hero__copy { min-width: 0; }

.nc-rel-num {
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}

.nc-rel-now {
  position: relative;
  display: grid;
  justify-items: start;
  gap: .45rem;
  min-width: 0;
  padding: 1.15rem 1.2rem 1.2rem;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ds-gold, #a56d16) 55%, transparent);
  border-radius: 1.1rem;
  background:
    radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--ds-gold, #a56d16) 30%, transparent), transparent 12rem),
    linear-gradient(160deg, #17201c, #0c1210);
  box-shadow: 0 18px 40px -24px rgb(7 19 17 / .55);
  color: #f4efe6;
}

.nc-rel-now__label {
  color: color-mix(in srgb, #f4efe6 70%, transparent);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .04em;
}

.nc-rel-now__tag {
  color: var(--ds-gold, #e3b15e);
  font-size: clamp(2.2rem, 4.2vw, 2.9rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.01em;
}

.nc-rel-now__name {
  font-size: .95rem;
  font-weight: 900;
  line-height: 1.6;
}

.nc-rel-now__live {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-top: .15rem;
  padding: .2rem .65rem;
  border-radius: 999px;
  background: rgb(255 255 255 / .07);
  color: color-mix(in srgb, #f4efe6 85%, transparent);
  font-size: .7rem;
  font-weight: 850;
}

.nc-rel-now__live i,
.nc-rel.is-current .nc-rel__dot,
.nc-rel-rail li.is-current i {
  animation: nc-rel-pulse 2.2s ease-out infinite;
}

.nc-rel-now__live i {
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: var(--ds-positive, #16a34a);
}

@keyframes nc-rel-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ds-gold, #a56d16) 55%, transparent); }
  70% { box-shadow: 0 0 0 .5rem transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.nc-rel-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--ds-gold, #a56d16) 20%, var(--ds-border, #d5d0c5));
  border-radius: 1rem;
  background: color-mix(in srgb, var(--ds-surface-raised, #fff) 75%, transparent);
}

.nc-rel-stats > div {
  display: grid;
  gap: .2rem;
  min-width: 0;
  padding: .85rem 1rem;
}

.nc-rel-stats > div + div {
  border-inline-start: 1px solid color-mix(in srgb, var(--ds-border, #d5d0c5) 85%, transparent);
}

.nc-rel-stats dt {
  color: var(--ds-muted, #64706c);
  font-size: .7rem;
  font-weight: 800;
}

.nc-rel-stats dd {
  display: flex;
  align-items: baseline;
  gap: .35rem;
  margin: 0;
  color: var(--ds-ink-strong, #071311);
}

.nc-rel-stats dd .nc-rel-num {
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1.2;
}

.nc-rel-stats dd small {
  color: var(--ds-muted, #64706c);
  font-size: .74rem;
  font-weight: 800;
}

/* Rail: oldest on the right, newest on the left (RTL reading order). */
.nc-rel-rail {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.nc-rel-rail ol {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(7.2rem, 1fr);
  margin: 0;
  padding: .2rem 0 .4rem;
  list-style: none;
}

.nc-rel-rail ol::before {
  content: "";
  position: absolute;
  inset-inline: 3.6rem;
  top: 1.05rem;
  height: 2px;
  background: linear-gradient(to left,
    color-mix(in srgb, var(--ds-teal, #0f766e) 55%, transparent),
    var(--ds-gold, #a56d16));
}

.nc-rel-rail a {
  position: relative;
  display: grid;
  justify-items: center;
  gap: .3rem;
  padding: 0 .3rem;
  color: var(--ds-ink, #1c2422);
  text-align: center;
  text-decoration: none;
}

.nc-rel-rail i {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: .5rem;
  border: 3px solid var(--ds-surface, #fffdf8);
  border-radius: 50%;
  background: var(--ds-teal, #0f766e);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ds-teal, #0f766e) 45%, transparent);
  transition: transform .18s ease;
}

.nc-rel-rail li.is-current i {
  background: var(--ds-gold, #a56d16);
  box-shadow: 0 0 0 1px var(--ds-gold, #a56d16);
}

.nc-rel-rail bdi {
  font-size: .82rem;
  font-weight: 900;
}

.nc-rel-rail span {
  color: var(--ds-muted, #64706c);
  font-size: .68rem;
  font-weight: 750;
  line-height: 1.5;
}

.nc-rel-rail a:hover i,
.nc-rel-rail a:focus-visible i { transform: scale(1.25); }

.nc-rel-rail a:hover bdi,
.nc-rel-rail li.is-current bdi { color: var(--ds-gold, #a56d16); }

/* Timeline */
.nc-rel-timeline {
  position: relative;
  display: grid;
  gap: 1.35rem;
  min-width: 0;
}

.nc-rel-timeline::before {
  content: "";
  position: absolute;
  inset-block: .9rem 1.5rem;
  inset-inline-start: .95rem;
  width: 2px;
  background: linear-gradient(to bottom,
    var(--ds-gold, #a56d16),
    color-mix(in srgb, var(--ds-teal, #0f766e) 50%, transparent) 85%,
    transparent);
}

.nc-rel {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: .9rem;
  min-width: 0;
  scroll-margin-top: 6rem;
}

.nc-rel__marker {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 1.55rem;
}

.nc-rel__dot {
  width: 1.05rem;
  height: 1.05rem;
  border: 3px solid var(--ds-canvas, #f2efe8);
  border-radius: 50%;
  background: var(--ds-teal, #0f766e);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ds-teal, #0f766e) 50%, transparent);
}

.nc-rel.is-current .nc-rel__dot {
  width: 1.25rem;
  height: 1.25rem;
  background: var(--ds-gold, #a56d16);
  box-shadow: 0 0 0 1px var(--ds-gold, #a56d16);
}

.nc-rel__card {
  display: grid;
  gap: .9rem;
  min-width: 0;
  padding: 1.3rem 1.35rem 1.4rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.nc-rel.is-current .nc-rel__card {
  border-color: color-mix(in srgb, var(--ds-gold, #a56d16) 60%, transparent);
  background:
    radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--ds-gold, #a56d16) 12%, transparent), transparent 22rem),
    var(--ds-surface, #fffdf8);
  box-shadow: 0 22px 48px -32px color-mix(in srgb, var(--ds-gold, #a56d16) 80%, transparent);
}

.nc-rel__card:hover {
  border-color: color-mix(in srgb, var(--ds-gold, #a56d16) 45%, var(--ds-border, #d5d0c5));
}

.nc-rel__head {
  display: grid;
  gap: .35rem;
  min-width: 0;
}

.nc-rel__id {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

.nc-rel__tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0 .75rem;
  border-radius: .55rem;
  background: #111916;
  color: var(--ds-gold, #e3b15e);
  font-size: .9rem;
  font-weight: 900;
  letter-spacing: .02em;
}

.nc-rel__pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  padding: 0 .65rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 900;
}

.nc-rel__pill--live {
  background: var(--ds-gold, #a56d16);
  color: var(--nc-on-gold, #14110c);
}

.nc-rel__head h2 {
  margin: .15rem 0 0;
  color: var(--ds-ink-strong, #071311);
  font-size: clamp(1.15rem, 2.1vw, 1.45rem);
  font-weight: 900;
  line-height: 1.4;
}

.nc-rel__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 0;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ds-muted, #64706c);
  font-size: .76rem;
  font-weight: 800;
}

.nc-rel__meta li + li::before {
  content: "·";
  margin-inline: .55rem;
  color: var(--ds-gold, #a56d16);
}

.nc-site-card p.nc-rel__summary {
  max-width: 52rem;
  margin: 0;
  color: var(--ds-ink, #1c2422);
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.95;
}

.nc-rel__highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nc-rel__highlights li {
  position: relative;
  padding-inline-start: 1.5rem;
  color: var(--ds-ink, #1c2422);
  font-size: .85rem;
  font-weight: 750;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.nc-rel__highlights li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 0;
  top: .2rem;
  display: grid;
  place-items: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ds-gold, #a56d16) 16%, transparent);
  color: var(--ds-gold, #a56d16);
  font-size: .62rem;
  font-weight: 900;
}

/* Gallery: lead image large, the rest stacked beside it. */
.nc-rel__gallery {
  display: grid;
  gap: .75rem;
  min-width: 0;
  margin-top: .2rem;
}

.nc-rel__gallery--3 {
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
}

.nc-rel__gallery--3 .is-lead { grid-row: 1 / span 2; }

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

.nc-rel__shot {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: .4rem;
  min-width: 0;
  margin: 0;
}

.nc-rel__shot a {
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ds-border, #d5d0c5) 90%, transparent);
  border-radius: .8rem;
  background: #0e1412;
  cursor: zoom-in;
}

.nc-rel__shot a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06);
  pointer-events: none;
}

.nc-rel__shot img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top center;
  transition: transform .45s ease;
}

.nc-rel__shot img[height="365"] {
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.nc-rel__shot a:hover img,
.nc-rel__shot a:focus-visible img { transform: scale(1.035); }

.nc-rel__shot a:focus-visible {
  outline: 3px solid var(--ds-gold, #a56d16);
  outline-offset: 2px;
}

.nc-rel__shot figcaption {
  color: var(--ds-muted, #64706c);
  font-size: .74rem;
  font-weight: 750;
  line-height: 1.6;
}

.nc-rel-note h2 { margin-top: 0; }

/* Viewer */
.nc-rel-viewer {
  width: min(96vw, 84rem);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--ds-gold, #a56d16) 45%, transparent);
  border-radius: 1rem;
  background: #0c1210;
  color: #f4efe6;
}

.nc-rel-viewer::backdrop {
  background: rgb(4 8 7 / .82);
  backdrop-filter: blur(3px);
}

.nc-rel-viewer figure {
  display: grid;
  gap: .6rem;
  margin: 0;
  padding: .8rem .8rem 0;
}

.nc-rel-viewer img {
  display: block;
  width: 100%;
  max-height: calc(94vh - 7.5rem);
  object-fit: contain;
  border-radius: .6rem;
  background: #000;
}

.nc-rel-viewer figcaption {
  font-size: .85rem;
  font-weight: 800;
  line-height: 1.7;
}

.nc-rel-viewer__bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem .8rem .8rem;
}

.nc-rel-viewer__bar button {
  min-width: 2.6rem;
  min-height: 2.4rem;
  padding: .3rem .9rem;
  border: 1px solid rgb(255 255 255 / .18);
  border-radius: 999px;
  background: rgb(255 255 255 / .06);
  color: inherit;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.nc-rel-viewer__bar button:hover { border-color: var(--ds-gold, #e3b15e); }

.nc-rel-viewer__bar [data-release-viewer-count] {
  color: color-mix(in srgb, #f4efe6 70%, transparent);
  font-size: .8rem;
  font-weight: 800;
}

.nc-rel-viewer__close {
  margin-inline-start: auto;
  border-color: var(--ds-gold, #e3b15e) !important;
}

/* Dark theme */
html[data-market-theme="dark"] .nc-rel-stats {
  border-color: color-mix(in srgb, var(--ds-gold, #e3b15e) 22%, var(--ds-border, #3a3a32));
  background: color-mix(in srgb, var(--ds-surface-raised, #1b1914) 80%, transparent);
}

html[data-market-theme="dark"] .nc-rel-stats dd,
html[data-market-theme="dark"] .nc-rel__head h2 {
  color: var(--ds-ink-strong, #fffdf8);
}

html[data-market-theme="dark"] .nc-rel-rail a,
html[data-market-theme="dark"] .nc-site-card p.nc-rel__summary,
html[data-market-theme="dark"] .nc-rel__highlights li {
  color: var(--ds-ink, #f4efe6);
}

html[data-market-theme="dark"] .nc-rel-rail i {
  border-color: var(--ds-surface, #161410);
}

html[data-market-theme="dark"] .nc-rel__dot {
  border-color: var(--ds-canvas, #0f0e0b);
}

html[data-market-theme="dark"] .nc-rel.is-current .nc-rel__card {
  background:
    radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--ds-gold, #e3b15e) 12%, transparent), transparent 22rem),
    var(--ds-surface, #161410);
}

html[data-market-theme="dark"] .nc-rel__tag {
  background: color-mix(in srgb, var(--ds-gold, #e3b15e) 14%, #000);
}

html[data-market-theme="dark"] .nc-rel__shot a {
  border-color: color-mix(in srgb, var(--ds-gold, #e3b15e) 18%, var(--ds-border, #3a3a32));
}

@media (prefers-reduced-motion: reduce) {
  .nc-rel-now__live i,
  .nc-rel.is-current .nc-rel__dot,
  .nc-rel-rail li.is-current i { animation: none; }

  .nc-rel__shot img { transition: none; }
}

@media (max-width: 900px) {
  .nc-rel-hero { grid-template-columns: 1fr; }

  .nc-rel-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .nc-rel-stats > div:nth-child(3) { border-inline-start: 0; }

  .nc-rel-stats > div:nth-child(n + 3) {
    border-block-start: 1px solid color-mix(in srgb, var(--ds-border, #d5d0c5) 85%, transparent);
  }

  .nc-rel__highlights { grid-template-columns: 1fr; }

  .nc-rel__gallery--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }

  .nc-rel__gallery--3 .is-lead {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  .nc-rel { grid-template-columns: 1.4rem minmax(0, 1fr); gap: .55rem; }

  .nc-rel-timeline::before { inset-inline-start: .65rem; }

  .nc-rel__card { padding: 1rem .95rem 1.1rem; }

  .nc-rel__gallery--3,
  .nc-rel__gallery--2 { grid-template-columns: 1fr; }
}
