/* Display Dimmer changelog timeline. Kept separate from the shared secondary-page system. */

.changelog-main {
  position: relative;
  overflow: clip;
  padding-bottom: 82px;
}

.changelog-hero {
  position: relative;
  isolation: isolate;
  padding: 156px 0 64px;
}

.changelog-hero::before {
  position: absolute;
  z-index: -1;
  top: -190px;
  left: 50%;
  width: 100vw;
  height: 620px;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse 58% 55% at 22% 18%, rgba(47, 134, 255, 0.16), rgba(47, 134, 255, 0.045) 52%, transparent 80%),
    radial-gradient(ellipse 42% 44% at 84% 20%, rgba(85, 157, 255, 0.07), transparent 74%);
  content: "";
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.94) 58%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.94) 58%, transparent 100%);
}

.changelog-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1100px, calc(100% - 44px));
  gap: 48px;
}

.changelog-hero-copy {
  flex: 1 1 760px;
  min-width: 0;
  max-width: 760px;
}

.changelog-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #92a0b2;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.055em;
  line-height: 1.35;
  text-transform: uppercase;
}

.changelog-eyebrow > span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: #4c93ff;
  box-shadow: 0 0 16px rgba(47, 134, 255, 0.4);
}

.changelog-hero h1 {
  max-width: 760px;
  margin: 18px 0 14px;
  color: #f5f7fa;
  font-size: clamp(44px, 5.4vw, 72px);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.changelog-hero h1 br {
  display: block;
}

.changelog-hero h1 span {
  color: #4c93ff;
  text-shadow: 0 0 32px rgba(47, 134, 255, 0.18);
}

.changelog-hero-copy > p {
  max-width: 760px;
  margin: 0;
  color: #aeb7c3;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.55;
}

.changelog-github-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  flex: 0 0 auto;
  padding: 0 17px;
  gap: 10px;
  border: 1px solid #3a4656;
  border-radius: 9px;
  background: rgba(17, 22, 29, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 12px 32px rgba(0, 0, 0, 0.2);
  color: #e7ecf2;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.changelog-github-link:hover {
  border-color: #536276;
  background: #161c24;
  color: #fff;
  transform: translateY(-1px);
}

.changelog-github-link:focus-visible,
.release-header a:focus-visible {
  outline: 2px solid #80b9ff;
  outline-offset: 3px;
}

.changelog-github-link > svg:first-child {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.changelog-link-arrow {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.changelog-history {
  width: min(1100px, calc(100% - 44px));
  padding: 20px 0 28px;
}

.release-timeline {
  --timeline-date-width: 142px;
  --timeline-rail-gap: 54px;
  --timeline-rail-x: calc(var(--timeline-date-width) + 22px);
  --release-line: #3a4656;
  --release-line-fade: rgba(58, 70, 86, 0.72);
  position: relative;
}

.release-timeline::before {
  position: absolute;
  top: 31px;
  bottom: 38px;
  left: calc(var(--timeline-rail-x) - 1px);
  width: 2px;
  background: linear-gradient(180deg, rgba(76, 147, 255, 0.68) 0%, #34404e 10%, #2c3642 91%, rgba(44, 54, 66, 0) 100%);
  content: "";
}

.release-entry {
  position: relative;
  display: grid;
  grid-template-columns: var(--timeline-date-width) minmax(0, 1fr);
  column-gap: var(--timeline-rail-gap);
  min-height: 150px;
  padding-bottom: 72px;
}

.release-entry:last-child {
  padding-bottom: 24px;
}

.release-date {
  padding-top: 10px;
  color: #909baa;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  text-align: right;
}

.release-node {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: calc(var(--timeline-rail-x) - 6.5px);
  width: 13px;
  height: 13px;
  border: 3px solid #080a0d;
  border-radius: 50%;
  background: #56616f;
  box-shadow: 0 0 0 1px #56616f;
}

.release-entry-latest .release-node {
  top: 9px;
  left: calc(var(--timeline-rail-x) - 11.5px);
  width: 23px;
  height: 23px;
  border: 5px solid #0b1118;
  background: #69aaff;
  box-shadow:
    0 0 0 3px rgba(105, 170, 255, 0.8),
    0 0 28px rgba(47, 134, 255, 0.46);
}

.release-entry-latest .release-node::after {
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: #d9ebff;
  content: "";
}

.release-content {
  position: relative;
  grid-column: 2;
  min-width: 0;
  padding-left: 41px;
}

.release-content::before {
  position: absolute;
  top: 19.5px;
  left: calc(var(--timeline-rail-gap) * -1 + 22px);
  right: 0;
  height: 32px;
  background: linear-gradient(90deg, var(--release-line) 0%, var(--release-line) 84%, var(--release-line-fade) 93%, transparent 100%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='2000'%20height='32'%3E%3Cpath%20d='M0%201H35L62%2031H2000'%20fill='none'%20stroke='white'%20stroke-width='2'%20stroke-linecap='butt'%20stroke-linejoin='miter'%20shape-rendering='geometricPrecision'/%3E%3C/svg%3E") 0 0 / 2000px 32px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='2000'%20height='32'%3E%3Cpath%20d='M0%201H35L62%2031H2000'%20fill='none'%20stroke='white'%20stroke-width='2'%20stroke-linecap='butt'%20stroke-linejoin='miter'%20shape-rendering='geometricPrecision'/%3E%3C/svg%3E") 0 0 / 2000px 32px no-repeat;
  content: "";
}

.release-content::after {
  content: none;
}

.release-entry-latest {
  --release-line: #405977;
  --release-line-fade: rgba(64, 89, 119, 0.72);
}

.release-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 52px;
  gap: 20px;
}

.release-header::after {
  content: none;
}

.release-title-row {
  display: flex;
  align-items: center;
  min-width: 0;
  padding-right: 12px;
  gap: 14px;
}

.release-title-row h2 {
  margin: 0;
  color: #f5f7fa;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 730;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.release-latest-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 14px;
  border: 1px solid rgba(91, 163, 255, 0.42);
  border-radius: 999px;
  background: rgba(47, 134, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #9ecaff;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.03em;
  line-height: 1;
  text-transform: uppercase;
}

.release-source-link {
  flex: 0 0 auto;
  margin-top: 11px;
  padding-left: 12px;
  color: #7f8b9a;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.release-source-link:hover {
  color: #80b9ff;
}

.release-source-link span {
  display: inline-block;
  margin-left: 3px;
  transition: transform 150ms ease;
}

.release-source-link:hover span {
  transform: translate(1px, -1px);
}

.release-summary {
  max-width: 850px;
  margin: 20px 0 0;
  color: #d0d7e0;
  font-size: 17px;
  line-height: 1.62;
}

.release-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 23px;
  gap: 14px;
}

.release-groups > :only-child {
  grid-column: 1 / -1;
}

.release-group {
  padding: 17px 19px 18px;
  border: 1px solid #242d38;
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.022), transparent 48%),
    rgba(14, 18, 24, 0.72);
}

.release-group h3 {
  display: flex;
  align-items: center;
  margin: 0 0 10px;
  gap: 9px;
  color: #eef2f7;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.045em;
  line-height: 1.3;
  text-transform: uppercase;
}

.release-group h3 > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6eaaff;
  box-shadow: 0 0 13px rgba(47, 134, 255, 0.38);
}

.release-group-new h3 > span {
  background: #87bdff;
}

.release-group-improved h3 > span {
  background: #4c93ff;
}

.release-group-fixed h3 > span {
  background: #75c9aa;
  box-shadow: 0 0 12px rgba(117, 201, 170, 0.3);
}

.release-group-changes h3 > span {
  background: #7790ae;
  box-shadow: 0 0 12px rgba(119, 144, 174, 0.3);
}

.release-group ul {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 8px;
  list-style: none;
}

.release-group li {
  position: relative;
  padding-left: 15px;
  color: #aeb7c3;
  font-size: 14px;
  line-height: 1.55;
}

.release-group li::before {
  position: absolute;
  top: 0.71em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #647185;
  content: "";
}

.release-group-note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid #28313d;
  color: #98a5b5;
  font-size: 13px;
  line-height: 1.45;
}

.release-groups-three > :last-child {
  grid-column: 1 / -1;
}

.release-group code {
  color: #c9d2dd;
  font: inherit;
  white-space: nowrap;
}

.release-entry-compact {
  padding-bottom: 58px;
}

.changelog-final-cta {
  position: relative;
  display: flex;
  overflow: hidden;
  align-items: center;
  justify-content: space-between;
  width: min(1100px, calc(100% - 44px));
  margin-top: 50px;
  padding: 36px 38px;
  gap: 42px;
  border: 1px solid #344254;
  border-radius: 16px;
  background:
    radial-gradient(ellipse 54% 160% at 91% 8%, rgba(47, 134, 255, 0.16), rgba(47, 134, 255, 0.045) 48%, transparent 74%),
    linear-gradient(112deg, #151d27 0%, #131b25 44%, #111923 72%, #0f151d 100%);
  box-shadow:
    0 24px 62px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.065);
}

.changelog-final-cta::after {
  position: absolute;
  top: 0;
  right: 8%;
  left: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(128, 185, 255, 0.32), transparent);
  content: "";
  pointer-events: none;
}

.changelog-final-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.changelog-final-label {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  gap: 8px;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 999px;
  background: rgba(47, 134, 255, 0.1);
  color: #79b3ff;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.changelog-final-cta h2 {
  margin: 12px 0 7px;
  color: #f5f7fa;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 740;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.changelog-final-cta p {
  max-width: 650px;
  margin: 0;
  color: #b5beca;
  font-size: 15.5px;
  line-height: 1.55;
}

.changelog-final-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
}

.changelog-final-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  gap: 9px;
  border: 1px solid #3a4758;
  border-radius: 10px;
  color: #edf3fa;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.changelog-final-actions .button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.changelog-final-actions .button-primary {
  border-color: rgba(105, 170, 255, 0.7);
  background: linear-gradient(180deg, #2474d8, #1f67c5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 9px 24px rgba(47, 134, 255, 0.2);
  color: #fff;
}

.changelog-final-actions .button-secondary {
  background: rgba(10, 15, 22, 0.72);
  color: #dce5ef;
}

.changelog-final-actions .button:hover {
  transform: translateY(-1px);
}

.changelog-final-actions .button-primary:hover {
  border-color: rgba(166, 208, 255, 0.76);
  background: linear-gradient(180deg, #2675dc, #236bd0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 12px 28px rgba(47, 134, 255, 0.28);
}

.changelog-final-actions .button-secondary:hover {
  border-color: #536276;
  background: rgba(20, 27, 37, 0.92);
}

.changelog-final-actions .button:active {
  transform: translateY(0);
}

.changelog-final-actions .button:focus-visible {
  outline: 2px solid #80b9ff;
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .changelog-hero {
    padding-top: 146px;
  }

  .changelog-hero-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 27px;
  }

  .release-timeline {
    --timeline-date-width: 116px;
    --timeline-rail-gap: 42px;
  }

  .release-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .release-groups > :only-child {
    grid-column: auto;
  }

  .changelog-final-cta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .changelog-main {
    padding-bottom: 76px;
  }

  .changelog-hero {
    padding: 140px 0 44px;
  }

  .changelog-hero-inner,
  .changelog-history,
  .changelog-final-cta {
    width: min(100% - 30px, 1100px);
  }

  .changelog-hero h1 {
    margin-top: 15px;
    font-size: clamp(34px, 10.6vw, 44px);
    letter-spacing: -0.045em;
  }

  .changelog-hero-copy > p {
    font-size: 17px;
  }

  .changelog-github-link {
    width: 100%;
    justify-content: center;
  }

  .changelog-history {
    padding-top: 12px;
  }

  .release-timeline {
    --mobile-rail-x: 12px;
  }

  .release-timeline::before {
    top: 38.5px;
    bottom: 20px;
    left: calc(var(--mobile-rail-x) - 1px);
  }

  .release-entry {
    display: block;
    min-height: 0;
    padding: 0 0 56px 42px;
  }

  .release-entry:last-child {
    padding-bottom: 8px;
  }

  .release-date {
    display: block;
    padding: 0 0 7px;
    color: #7f8b9a;
    font-size: 12px;
    font-weight: 620;
    letter-spacing: 0.025em;
    text-align: left;
    text-transform: uppercase;
  }

  .release-node {
    top: 33px;
    left: calc(var(--mobile-rail-x) - 5.5px);
    width: 11px;
    height: 11px;
  }

  .release-entry-latest .release-node {
    top: 29px;
    left: calc(var(--mobile-rail-x) - 9.5px);
    width: 19px;
    height: 19px;
    border-width: 4px;
  }

  .release-content {
    padding-left: 24px;
  }

  .release-content::before {
    top: 13.5px;
    left: -30px;
    right: 0;
    height: 22px;
    -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='2000'%20height='22'%3E%3Cpath%20d='M0%201H27L45%2021H2000'%20fill='none'%20stroke='white'%20stroke-width='2'%20stroke-linecap='butt'%20stroke-linejoin='miter'%20shape-rendering='geometricPrecision'/%3E%3C/svg%3E") 0 0 / 2000px 22px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='2000'%20height='22'%3E%3Cpath%20d='M0%201H27L45%2021H2000'%20fill='none'%20stroke='white'%20stroke-width='2'%20stroke-linecap='butt'%20stroke-linejoin='miter'%20shape-rendering='geometricPrecision'/%3E%3C/svg%3E") 0 0 / 2000px 22px no-repeat;
  }

  .release-content::after {
    content: none;
  }

  .release-header {
    min-height: 40px;
  }

  .release-header::after {
    content: none;
  }

  .release-title-row {
    padding-right: 9px;
    gap: 10px;
  }

  .release-title-row h2 {
    font-size: 28px;
  }

  .release-latest-badge {
    min-height: 23px;
    padding-inline: 10px;
    font-size: 10px;
  }

  .release-source-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 40px;
    min-height: 40px;
    padding: 0;
    color: #768293;
    font-size: 0;
    white-space: nowrap;
  }

  .release-source-link span {
    margin: 0;
    font-size: 17px;
  }

  .release-summary {
    margin-top: 15px;
    color: #c8d0da;
    font-size: 15px;
  }

  .release-groups {
    margin-top: 17px;
    gap: 10px;
  }

  .release-group {
    padding: 15px 16px 16px;
  }

  .release-group li {
    font-size: 13.5px;
  }

  .changelog-final-cta {
    margin-top: 34px;
    padding: 24px 21px;
    gap: 24px;
  }

  .changelog-final-actions {
    width: 100%;
    flex-direction: column;
  }

  .changelog-final-actions .button {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .changelog-hero {
    padding-top: 128px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .changelog-github-link,
  .release-source-link span,
  .changelog-final-actions .button {
    transition: none;
  }
}
