/* The shared header and palette own the banner and saved site background. */
.updates-page {
  --blue: #aacaff;
}

.updates-page #sidebar a {
  text-decoration: none;
}

.updates-page #sidebar .account-avatar-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.updates-page .news-icon {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.updates-page .news-icon::before,
.updates-page .news-icon::after {
  position: absolute;
  left: 3px;
  right: 3px;
  height: 1.5px;
  content: "";
  background: currentColor;
}

.updates-page .news-icon::before { top: 4px; }
.updates-page .news-icon::after { top: 8px; }

.updates-settings {
  width: min(480px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 24px;
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  color: var(--site-text);
  background: var(--site-deep);
}

.updates-settings::backdrop {
  background: rgb(0 0 0 / 65%);
}

.updates-settings form {
  margin-top: 20px;
  text-align: right;
}

.updates-settings form button {
  min-height: 44px;
  padding: 10px 24px;
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  color: var(--site-text);
  background: var(--site-accent);
  font: inherit;
  cursor: pointer;
}

.updates-shell {
  width: min(1080px, calc(100% - 48px));
  padding-top: clamp(24px, 4vw, 40px);
}

.updates-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 24px;
  padding: 10px 16px;
  border: 1px solid var(--site-line);
  border-radius: 10px;
  color: var(--site-text);
  background: var(--site-deep);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .updates-back:hover {
    background: var(--site-raised);
  }
}

.content-nav-links [aria-current="page"] {
  color: var(--text);
}

.updates-filters {
  display: grid;
  grid-template-columns: minmax(190px, 1.5fr) minmax(160px, 1fr) minmax(140px, .8fr) minmax(150px, .9fr);
  gap: 16px;
}

.updates-filters label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
}

.updates-filters input,
.updates-filters select,
.updates-empty button {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

.updates-filters input::placeholder {
  color: var(--muted);
}

.updates-filters :focus-visible,
.updates-empty button:focus-visible,
.update-entry a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.updates-summary {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 18px 0 28px;
  color: var(--muted);
  font-size: 12px;
}

.updates-summary p {
  margin: 0;
}

.update-day {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 30px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.update-day h2 {
  margin: 4px 0 0;
  color: var(--soft);
  font-size: 15px;
  line-height: 1.6;
}

.update-day-entries {
  min-width: 0;
  padding-left: 26px;
  border-left: 1px solid var(--line);
}

.update-entry {
  position: relative;
  scroll-margin-top: 100px;
}

.update-entry::before {
  content: "";
  position: absolute;
  top: 10px;
  left: -31px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 5px var(--bg);
}

.update-entry + .update-entry {
  margin-top: 32px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.update-entry + .update-entry::before {
  top: 36px;
}

.update-entry h3 {
  margin: 0;
  font-size: clamp(19px, 2.2vw, 23px);
  letter-spacing: -.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.update-entry h3 a {
  text-decoration: none;
}

.update-entry h3 a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.update-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: 12px;
}

.update-meta > span:first-child {
  color: var(--blue);
  font-weight: 700;
}

.update-changes {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.update-changes li {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.update-kind {
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.update-kind-added {
  color: #9ae8c8;
  background: #153b32;
}

.update-kind-improved {
  color: #b7caff;
  background: #202e50;
}

.update-kind-fixed {
  color: #f3cc8e;
  background: #3b3020;
}

.updates-empty {
  padding: 38px 0;
  color: var(--soft);
  text-align: center;
}

.updates-empty button {
  width: auto;
  cursor: pointer;
}

.updates-archive-note {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

@media (max-width: 960px) {
  .updates-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .updates-search {
    grid-column: 1 / -1;
  }
}

.updates-skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 40;
  padding: 12px;
  background: var(--panel);
}

.updates-skip:focus {
  top: 12px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .update-day {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .update-day-entries {
    margin-left: 5px;
    padding-left: 22px;
  }

  .update-entry::before {
    left: -27px;
  }

  .updates-filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px 10px;
  }

  .updates-search {
    grid-column: 1 / -1;
  }

  .updates-area {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .updates-shell {
    width: calc(100% - 32px);
  }

  .update-changes li {
    grid-template-columns: 65px minmax(0, 1fr);
    gap: 9px;
    font-size: 13px;
  }

  .update-kind {
    padding-inline: 4px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
