/* "Co nowego w grze" (landing/zmiany/). Builds on ../style.css (tokens, top bar, buttons, footer, cards);
   everything of its own is prefixed cl-. The teaser on the home page (teaser.js) brings its own styles. */

.cl-page [hidden] {
  display: none !important;
}

.cl-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* the top bar: "Strona gry" is a button on narrow screens, a link in the wide menu */
.cl-home {
  display: inline-flex;
}

/* ---------------------------------------------------------------- hero */
.cl-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: calc(var(--topbar-h) + env(safe-area-inset-top, 0px) + 26px) 0 0;
}

.cl-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: 4px;
}

.cl-hero__text {
  padding-bottom: 10px;
}

.cl-title {
  margin: 0 0 12px;
  font: 800 clamp(40px, 10vw, 68px) / 1 var(--display);
  color: #fff;
  text-shadow: var(--outline), 0 12px 32px rgba(20, 2, 14, 0.45);
  text-wrap: balance;
}

.cl-hero .lead {
  max-width: 34em;
}

.cl-current {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 0 0 18px;
  padding: 9px 16px;
  border-radius: 18px;
  font: 600 16px / 1.3 var(--body);
  color: var(--gold-pale);
  background: rgba(42, 10, 31, 0.55);
  border: 1px solid rgba(244, 220, 154, 0.5);
}

/* it holds its place (with a stand-in text) until the version is known, so the buttons below do not jump */
.cl-current.is-wait {
  visibility: hidden;
}

.cl-current b {
  font: 800 22px / 1 var(--display);
  color: var(--gold-light);
}

.cl-current__date {
  flex-basis: 100%;
  font-size: 15px;
  color: rgba(255, 246, 232, 0.85);
}

@media (min-width: 480px) {
  .cl-current__date {
    flex-basis: auto;
  }
  .cl-current__date::before {
    content: '· ';
  }
}

.cl-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cl-cta .btn {
  flex: 1 1 150px;
  max-width: 320px;
  padding-inline: 16px;
}

.cl-hero__albert {
  width: min(44vw, 170px);
  height: auto;
  justify-self: end;
  margin-top: 6px;
  filter: drop-shadow(0 10px 18px rgba(20, 2, 14, 0.55));
}

/* ---------------------------------------------------------------- the list */
.cl-body {
  position: relative;
  /* the footer waits below the first screen until the list is in, instead of jumping down */
  min-height: 100svh;
  padding: 30px 0 clamp(56px, 8vw, 96px);
  color: var(--ink);
  background:
    radial-gradient(ellipse 60% 40% at 10% 0%, rgba(206, 171, 91, 0.22), transparent 70%),
    linear-gradient(to bottom, var(--paper), #f8e9d4);
  box-shadow: 0 -2px 0 var(--gold);
}

.cl-body__inner {
  max-width: 920px;
}

.cl-body :focus-visible {
  outline: 3px solid var(--bordo);
  outline-offset: 3px;
}

.cl-body a {
  color: var(--bordo);
}

.cl-tools {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.cl-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cl-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border: 2px solid rgba(134, 0, 79, 0.3);
  border-radius: 999px;
  font: 700 16px / 1 var(--body);
  color: var(--bordo);
  background: #fff;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease-bounce);
}

.cl-chip:hover {
  border-color: var(--bordo);
}

.cl-chip:active {
  transform: scale(0.97);
}

.cl-chip[aria-pressed='true'] {
  color: #fff;
  background: var(--bordo);
  border-color: var(--bordo);
}

.cl-chip__n {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.85;
}

.cl-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font: 600 15px / 1.2 var(--body);
  color: var(--ink-soft);
}

.cl-jump__list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cl-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  background: rgba(134, 0, 79, 0.08);
}

.cl-jump a:hover {
  background: rgba(134, 0, 79, 0.16);
}

.cl-status {
  margin: 0 0 16px;
  font: 500 15px / 1.4 var(--body);
  color: var(--ink-soft);
}

.cl-status--error {
  font-weight: 600;
  color: #8a1d3d;
}

.cl-retry {
  margin-top: 8px;
}

.cl-versions {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cl-ver {
  padding: 18px 18px 20px;
}

.cl-ver__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}

.cl-badge {
  padding: 7px 14px 8px;
  border-radius: 999px;
  font: 800 20px / 1 var(--display);
  color: #fff;
  background: linear-gradient(to bottom, #a8105f, var(--bordo));
  box-shadow: 0 2px 0 var(--bordo-deep);
}

.cl-date {
  font: 600 15px / 1.2 var(--body);
  color: var(--ink-soft);
}

.cl-latest {
  padding: 6px 10px;
  border-radius: 999px;
  font: 700 12px / 1 var(--body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #17603f;
  background: #e1f6ea;
  border: 1px solid #9fd8b8;
}

.cl-ver__title {
  margin: 10px 0 6px;
  font: 800 clamp(23px, 3.2vw, 30px) / 1.1 var(--display);
  color: var(--bordo);
  text-wrap: balance;
}

.cl-ver__summary {
  margin: 0 0 14px;
  font: 500 17px / 1.5 var(--body);
  color: var(--ink);
}

.cl-items {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px 0 0;
  list-style: none;
  border-top: 2px solid rgba(206, 171, 91, 0.55);
}

.cl-item {
  padding-top: 10px;
  border-top: 1px solid rgba(206, 171, 91, 0.45);
  font: 500 16.5px / 1.5 var(--body);
}

.cl-item:first-child {
  padding-top: 0;
  border-top: 0;
}

/* older versions: the changes behind a button */
.cl-more {
  border-top: 2px solid rgba(206, 171, 91, 0.55);
}

.cl-more > .cl-items {
  padding-top: 14px;
  border-top: 0;
}

.cl-more__summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  margin: 14px 0 0;
  padding: 10px 16px;
  border-radius: 14px;
  font: 700 16px / 1.2 var(--body);
  color: var(--bordo);
  background: rgba(134, 0, 79, 0.08);
  cursor: pointer;
  list-style: none;
  transition: background-color 0.2s;
}

.cl-more__summary::-webkit-details-marker {
  display: none;
}

.cl-more__summary:hover {
  background: rgba(134, 0, 79, 0.16);
}

.cl-more__summary::after {
  content: '';
  width: 9px;
  height: 9px;
  margin-top: -3px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s;
}

.cl-more[open] > .cl-more__summary {
  margin-bottom: 14px;
}

.cl-more[open] > .cl-more__summary::after {
  margin-top: 3px;
  transform: rotate(-135deg);
}

.cl-more__hide,
.cl-more[open] .cl-more__show {
  display: none;
}

.cl-more[open] .cl-more__hide {
  display: inline;
}

/* a label with an icon and a word: the kind is never told by colour alone */
.cl-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
  padding: 5px 10px 5px 8px;
  border: 1px solid;
  border-radius: 999px;
  font: 700 13px / 1 var(--body);
  vertical-align: 1px;
  white-space: nowrap;
}

.cl-tag svg {
  width: 14px;
  height: 14px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cl-tag--nowe {
  color: #17603f;
  background: #e1f6ea;
  border-color: #9fd8b8;
}

.cl-tag--zmiana {
  color: #6b4a00;
  background: #fbefcf;
  border-color: #e3c777;
}

.cl-tag--poprawka {
  color: #8a1d3d;
  background: #fde5ec;
  border-color: #f1a9bd;
}

@media (min-width: 640px) {
  .cl-ver {
    padding: 24px 28px 26px;
  }
  .cl-item {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
  }
  .cl-tag {
    justify-self: start;
    margin: 2px 0 0;
  }
}

@media (min-width: 760px) {
  .cl-hero__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 40px;
  }
  .cl-hero__text {
    padding-bottom: 54px;
  }
  .cl-hero__albert {
    width: 270px;
    margin-top: 0;
  }
}

@media (min-width: 1180px) {
  .cl-home {
    display: none;
  }
}

@media (max-width: 360px) {
  .cl-cta .btn {
    flex-basis: 100%;
    max-width: none;
  }
}
