/* What's new on the website (to-do batch 2). The page itself is written from
   lib/whats-new/entries.json by scripts/whats-new-site.mjs; this is its look, on top of styles.css. */

.wn-hero {
  padding-block: clamp(40px, 6vw, 72px) clamp(24px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
}
.wn-hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.wn-hero .lede {
  max-width: 60ch;
  color: var(--muted);
  font-size: 18px;
}
.wn-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

/* The big ones: pictures to jump to (a row that scrolls on a phone). */
.wn-highlights {
  padding-block: clamp(28px, 4vw, 44px) 0;
}
.wn-highlights h2 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
}
.wn-highlights ul {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 72%);
  gap: 14px;
  margin: 0 calc(var(--gutter) * -1);
  padding: 0 var(--gutter) 6px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  list-style: none;
}
@media (min-width: 700px) {
  .wn-highlights ul {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    overflow: visible;
  }
}
.wn-highlights li {
  scroll-snap-align: start;
}
.wn-highlights a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 10px 10px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.wn-highlights a:hover {
  border-color: var(--line-strong);
}
.wn-highlights img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 6px;
  border-radius: 10px;
  background: var(--bg);
}
.wn-highlights span {
  padding-inline: 4px;
  font-weight: 600;
  line-height: 1.3;
}
.wn-highlights small {
  padding-inline: 4px;
  color: var(--muted);
  font-size: 13px;
}

.wn-days {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 6vw, 64px);
  padding-block: clamp(32px, 5vw, 56px) var(--section);
}
.wn-day {
  display: grid;
  gap: 16px;
}
@media (min-width: 900px) {
  .wn-day {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 32px;
  }
  .wn-day > h2 {
    position: sticky;
    top: 88px;
    align-self: start;
    padding-top: 22px;
  }
}
.wn-day > h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
.wn-day > h2 span {
  display: block;
  color: var(--muted);
  font-weight: 500;
}
.wn-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wn-entry {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  scroll-margin-top: 96px;
}
.wn-entry:target {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(242, 169, 59, 0.28);
}
.wn-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.wn-tag {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--sidebar);
}
.wn-entry h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.wn-entry p {
  margin: 0;
  max-width: 65ch;
  line-height: 1.6;
}
.wn-entry ul {
  margin: 0;
  padding-left: 20px;
  list-style: disc;
  max-width: 65ch;
  color: var(--muted);
  line-height: 1.55;
}
.wn-entry figure {
  margin: 4px 0 0;
  max-width: 640px;
}
.wn-entry img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}
.wn-entry .wn-link {
  align-self: flex-start;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.wn-entry .wn-link:hover {
  color: var(--ink);
}

/* The "Latest" strip on the home page. */
.wn-latest {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  font-size: 14.5px;
}
.wn-latest .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding-block: 10px;
}
.wn-latest b {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
}
.wn-latest a {
  font-weight: 600;
}

/* "Since then": a later change overtook what this entry says. */
.wn-since {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--sidebar);
  font-size: 14px;
}
