:root {
  --archive-bg: #eee5d6;
  --archive-paper: #fffaf2;
  --archive-ink: #211b16;
  --archive-muted: #6f6459;
  --archive-line: rgba(42, 33, 26, .14);
  --archive-navy: #142535;
  --archive-coral: #e67147;
  --archive-max: 1460px;
}

/* Version history only: reuse the portal palette, typography and surrounding layout. */
.release-list { list-style: none; padding: 0 0 0 24px; margin: 36px 0; border-left: 1px solid var(--archive-line); display: grid; gap: 32px; }
.release { position: relative; min-width: 0; }
.release::before { content: ""; position: absolute; left: -30px; top: 28px; width: 11px; height: 11px; border-radius: 50%; background: var(--archive-navy); border: 2px solid var(--archive-paper); }
.release > article { padding: clamp(24px, 4vw, 54px); border: 1px solid var(--archive-line); border-radius: 24px; background: var(--archive-paper); }
.release--previous { width: 88%; }
.release--previous > article { padding-block: 28px; }
.release--current > article { background: linear-gradient(128deg, #142535, #20384a); color: #f8f4ec; border-color: #526f84; }
.release-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; font-size: .8rem; line-height: 1.6; }
.release-meta > span { font-weight: 800; }
.release-meta time { white-space: nowrap; }
.archive-page .release h3 { margin: 16px 0; font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.15; color: inherit; }
.archive-page .release--current h3 { font-size: clamp(2.5rem, 5vw, 4rem); }
.release h3 span { font-variant-numeric: tabular-nums; }
.release p, .release-changes { max-width: 76ch; line-height: 1.75; }
.archive-page .release--current p, .archive-page .release--current li, .archive-page .release--current .release-meta { color: #e0e9ef; }
.release-lead { font-size: 1.25rem; font-weight: 750; }
.release-changes { padding-left: 20px; }
.release-changes li + li { margin-top: 6px; }
.release-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; margin-top: 24px; }
.archive-page .release-actions a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 0; color: inherit; text-decoration: underline; text-underline-offset: 5px; font-weight: 750; }
.archive-page .release-actions a:hover { text-decoration-thickness: 2px; }
.archive-page .release-actions .release-primary { padding: 14px 22px; border-radius: 12px; background: #f8f4ec; color: #142535; text-decoration: none; }
.archive-page .release-actions .release-primary:hover { background: #e0e9ef; }
.release-history a:focus-visible { outline: 3px solid #639aca; outline-offset: 5px; }
.release-note { max-width: 86ch; font-size: .95rem; line-height: 1.75; }
.archive-hero > div, .archive-hero aside { min-width: 0; }
.archive-page .archive-hero h1 { overflow-wrap: anywhere; }
html.kz-theme-light .archive-page .release--current :is(h3, p, li, span, time) { color: #f8f4ec !important; }
html.kz-theme-light .archive-page .archive-hero aside { background: rgba(20, 37, 53, .06); border-color: rgba(20, 37, 53, .18); }
html.kz-theme-light .archive-page .archive-hero aside strong { color: #142535 !important; }
html .archive-page .release-history a:focus-visible { outline: 3px solid #639aca; outline-offset: 5px; }
@media (max-width: 600px) {
  .archive-page .archive-hero h1 { font-size: 2.35rem !important; line-height: 1.04 !important; }
  .release-list { padding-left: 16px; gap: 24px; }
  .release::before { left: -22px; }
  .release--previous { width: 100%; }
  .release-actions { align-items: stretch; flex-direction: column; gap: 8px; }
  .release-actions a { justify-content: center; text-align: center; }
}

.archive-page,
.archive-page *,
.archive-page *::before,
.archive-page *::after { box-sizing: border-box; }

.archive-page {
  color: var(--archive-ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(230, 113, 71, .08), transparent 28rem),
    linear-gradient(180deg, #f4ede1, var(--archive-bg));
  overflow: clip;
}

.archive-page a { color: inherit; }

.archive-article {
  width: min(100%, 1680px);
  margin-inline: auto;
  padding-bottom: clamp(70px, 8vw, 130px);
}

.archive-breadcrumbs,
.archive-section {
  width: min(calc(100% - 36px), var(--archive-max));
  margin-inline: auto;
}

.archive-breadcrumbs { padding: 24px 0 18px; }

.archive-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: #8d8072;
  font-size: .78rem;
  list-style: none;
}

.archive-breadcrumbs li + li::before {
  content: "/";
  margin-right: 8px;
  color: #b9aa99;
}

.archive-breadcrumbs a { text-decoration: none; }
.archive-breadcrumbs a:hover { color: var(--archive-coral); }

.archive-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr);
  gap: clamp(36px, 7vw, 110px);
  align-items: center;
  width: min(calc(100% - 24px), 1620px);
  min-height: 570px;
  margin-inline: auto;
  padding: clamp(46px, 6vw, 96px);
  color: #f8f4ec;
  border-radius: clamp(30px, 4vw, 58px);
  background:
    radial-gradient(circle at 83% 20%, rgba(230, 113, 71, .25), transparent 24rem),
    linear-gradient(128deg, #111f2d, #20384a);
}

.archive-eyebrow,
.archive-kicker {
  margin: 0;
  color: var(--archive-coral);
  font-size: .73rem;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.archive-page .archive-hero h1 {
  margin: 22px 0 28px;
  color: #f8f4ec;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 6vw, 6.2rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .95;
}

.archive-hero > div > p:last-child {
  max-width: 800px;
  margin: 0;
  color: #c7d3d8;
  font-size: clamp(1.06rem, 1.6vw, 1.35rem);
  line-height: 1.75;
}

.archive-hero aside {
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 28px;
  background: rgba(3, 12, 18, .28);
}

.archive-hero aside span {
  color: #f09b79;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.archive-hero aside strong {
  display: block;
  margin: 16px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 500;
  line-height: .85;
}

.archive-hero aside p {
  margin: 0;
  color: #bdc9cf;
  font-size: .86rem;
}

.archive-section {
  padding: clamp(74px, 9vw, 136px) 0;
}

.archive-section + .archive-section {
  border-top: 1px solid var(--archive-line);
}

.archive-section__head {
  display: grid;
  grid-template-columns: minmax(210px, .52fr) minmax(0, 1.48fr);
  gap: 8px clamp(30px, 6vw, 100px);
  margin-bottom: clamp(38px, 6vw, 72px);
}

.archive-section__head .archive-kicker {
  grid-row: 1 / span 2;
  padding-top: 12px;
}

.archive-section__head h2,
.archive-section--empty h2 {
  max-width: 960px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.3rem, 4.5vw, 5rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1.02;
}

.archive-current {
  display: grid;
  grid-template-columns: minmax(300px, .7fr) minmax(0, 1.3fr);
  gap: clamp(30px, 6vw, 90px);
  padding: clamp(30px, 5vw, 66px);
  border: 1px solid var(--archive-line);
  border-radius: 32px;
  background: var(--archive-paper);
}

.archive-current__status {
  display: flex;
  gap: 20px;
  align-items: center;
}

.archive-current__status > span {
  display: grid;
  place-items: center;
  width: 78px;
  aspect-ratio: 1;
  color: #fff;
  border-radius: 22px;
  background: var(--archive-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
}

.archive-current__status p {
  margin: 0 0 5px;
  color: var(--archive-muted);
  font-size: .76rem;
}

.archive-current__status strong { font-size: 1.05rem; }

.archive-current__copy h3 {
  margin: 0 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 3.1rem);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.archive-current__copy p {
  margin: 0;
  color: var(--archive-muted);
  line-height: 1.75;
}

.archive-current__copy > div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.archive-current__copy a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid var(--archive-line);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
}

.archive-current__copy a:first-child {
  color: #fff;
  border-color: var(--archive-navy);
  background: var(--archive-navy);
}

.archive-gates {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--archive-line);
  border-bottom: 1px solid var(--archive-line);
  list-style: none;
}

.archive-gates li {
  min-height: 250px;
  padding: 28px;
  border-right: 1px solid var(--archive-line);
}

.archive-gates li:last-child { border-right: 0; }

.archive-gates > li > span {
  color: var(--archive-coral);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
}

.archive-gates h3 {
  margin: 44px 0 12px;
  font-size: 1rem;
}

.archive-gates p {
  margin: 0;
  color: var(--archive-muted);
  font-size: .84rem;
  line-height: 1.58;
}

.archive-section--empty {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: clamp(36px, 7vw, 110px);
  align-items: center;
  width: min(calc(100% - 24px), 1620px);
  padding-inline: clamp(24px, 5vw, 84px);
  color: #f8f4ec;
  border: 0;
  border-radius: 46px;
  background:
    radial-gradient(circle at 85% 25%, rgba(230, 113, 71, .22), transparent 22rem),
    #211813;
}

.archive-section--empty h2 {
  margin-top: 18px;
  color: #fffaf2;
}

.archive-section--empty > div > p:last-child {
  max-width: 820px;
  color: #bfb1a5;
  line-height: 1.75;
}

.archive-empty__mark {
  display: grid;
  place-items: center;
  min-height: 260px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 28px;
  background: rgba(255, 255, 255, .04);
}

.archive-empty__mark span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 8rem;
  line-height: .8;
}

.archive-empty__mark small {
  color: #c7b8aa;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.archive-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.archive-links a {
  display: grid;
  align-content: end;
  min-height: 210px;
  padding: 24px;
  border: 1px solid var(--archive-line);
  border-radius: 22px;
  background: var(--archive-paper);
  text-decoration: none;
  transition: transform .18s ease;
}

.archive-links a:hover { transform: translateY(-3px); }

.archive-links strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 500;
}

.archive-links span {
  margin-top: 8px;
  color: var(--archive-muted);
  font-size: .78rem;
}

.archive-to-top {
  position: fixed;
  right: clamp(16px, 2.2vw, 34px);
  bottom: clamp(16px, 2.2vw, 34px);
  z-index: 45;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  background: rgba(20, 37, 53, .92);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  cursor: pointer;
  transition: opacity .18s ease, transform .18s ease;
}

.archive-to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.archive-page :focus-visible {
  outline: 3px solid rgba(230, 113, 71, .42);
  outline-offset: 4px;
}

@media (max-width: 1120px) {
  .archive-hero,
  .archive-current,
  .archive-section--empty {
    grid-template-columns: 1fr;
  }

  .archive-hero aside { max-width: 650px; }
  .archive-gates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-gates li { border-bottom: 1px solid var(--archive-line); }
  .archive-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .archive-breadcrumbs,
  .archive-section {
    width: min(calc(100% - 24px), var(--archive-max));
  }

  .archive-hero {
    width: calc(100% - 12px);
    min-height: 0;
    padding: 38px 24px 46px;
    border-radius: 28px;
  }

  .archive-section__head { grid-template-columns: 1fr; }
  .archive-section__head .archive-kicker { grid-row: auto; }
}

@media (max-width: 560px) {
  .archive-gates,
  .archive-links {
    grid-template-columns: 1fr;
  }

  .archive-gates li {
    min-height: 0;
    border-right: 0;
  }

  .archive-current__status {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .archive-page *,
  .archive-page *::before,
  .archive-page *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
