/* Update log (dist/updates.html, built by tools/build-updates.mjs). Loaded after site.css. */

.updates-page { --page-w: 920px; --new: #2f8f3e; --fix: #2a75bb; }

.update-legend {
  display: flex;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.update-legend .update-badge + .update-badge { margin-left: 8px; }

.update + .update { margin-top: 28px; }

.update-head { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.update-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  color: var(--gray);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.update-latest {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--navy);
  font-size: 12px;
  letter-spacing: .04em;
}
.update-head h2 { font-size: clamp(28px, 4vw, 40px); }
.update-head p { margin: 12px 0 0; color: var(--gray); line-height: 1.7; }
.update-stats { font-weight: 700; }

.update-jump { margin-top: 20px; }
.update-jump ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.update-jump a {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #dce7f3;
  border-radius: 999px;
  background: #f6faff;
  color: var(--blue-dark);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
}
.update-jump a:hover { border-color: var(--blue); background: #eaf3fd; }

.update-section { margin-top: 36px; scroll-margin-top: 96px; }
.update-section h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 21px;
}
.update-section h3::after { flex: 1; height: 1px; background: var(--line); content: ""; }
.update-section > p { margin: 14px 0 0; color: var(--gray); line-height: 1.75; }

.update-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.update-list li {
  position: relative;
  padding: 7px 0 7px 36px;
  color: var(--ink);
  line-height: 1.6;
}
.update-list li + li { border-top: 1px solid #f0f3f8; }
.update-list .update-badge { position: absolute; top: 9px; left: 0; }

/* Plus for new or changed, wrench-ish tilde for fixed. */
.update-badge {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}
.update-badge::before { content: "+"; }
.is-new > .update-badge, .update-badge.is-new { background: #e5f5e8; color: var(--new); }
.is-fix > .update-badge, .update-badge.is-fix { background: #e4f0fb; color: var(--fix); }
.is-fix > .update-badge::before, .update-badge.is-fix::before { content: "~"; font-size: 18px; }
.is-removed > .update-badge { background: #fde6e0; color: #a3230a; }
.is-removed > .update-badge::before { content: "−"; }

.update-note {
  margin: 16px 0 0;
  padding: 14px 18px;
  border: 1px solid #ffe27a;
  border-radius: 12px;
  background: #fff7d6;
  color: var(--navy);
}
.update-note strong { margin-right: 6px; }

.update-table {
  width: auto;
  min-width: min(360px, 100%);
  margin: 14px 0 0;
  border-collapse: collapse;
  font-size: 15px;
}
.update-table th,
.update-table td { padding: 8px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.update-table th { color: var(--navy); font-weight: 700; }
.update-table td { color: var(--gray); font-weight: 700; font-variant-numeric: tabular-nums; }

.update-archive { margin-bottom: 20px; padding: 20px 28px; }
.update-archive h2 { font-size: 18px; }
.update-archive ul { margin: 10px 0 0; padding: 0; list-style: none; }
.update-archive li { padding: 6px 0; }
.update-archive a { color: var(--blue-dark); font-weight: 700; text-decoration: none; }
.update-archive a:hover { text-decoration: underline; text-underline-offset: 3px; }
.update-archive time { display: inline-block; min-width: 150px; color: var(--gray); font-weight: 700; }

@media (max-width: 600px) {
  .update-section h3 { font-size: 19px; }
  .update-list li { padding-left: 32px; }
}
