/* The Social Web — What's new window (whatsnew.js) and the screenshot grid on /changelog. Builds on the app.css tokens
   (never redefines them). whatsnew.js links this file the first time the window opens; /changelog links it itself. */

/* --- the window: SW.modal gets .wn-modal, so the title and the buttons stay put while the notes scroll --- */
.modal.wn-modal { display: flex; flex-direction: column; overflow: hidden; }
.wn-modal .modal-head { flex: none; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.wn-modal .modal-head h3 { font-size: clamp(1.1rem, 2.4vw, 1.35rem); line-height: 1.25; text-wrap: balance; }
.wn-modal .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-top: 14px; }
.wn-modal .modal-foot { flex: none; align-items: center; gap: 10px; padding: 14px 20px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.wn-foot [data-wn-done] { margin-left: auto; }
.wn-more { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.wn-more:hover, .wn-more:focus-visible { color: var(--accent); text-decoration-color: currentColor; }

.wn-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
.wn-intro { margin: 0 0 8px; color: var(--ink); line-height: 1.6; }

/* --- sections: a small label, then the entries --- */
.wn-h { display: flex; align-items: center; gap: 10px; margin: 20px 0 12px; font: 800 .74rem var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.wn-h::before { content: ""; flex: none; width: 18px; height: 3px; border-radius: 999px; background: var(--grad); }
.wn-h::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.wn-list { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 12px; }
.wn-list li { position: relative; padding-left: 22px; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
.wn-list li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 9px; height: 9px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 10px -1px var(--accent-glow); }
.wn-list li strong { color: var(--ink); font-weight: 700; }

/* --- screenshots: 2 across on a phone, as many as fit from there; each one opens full size in a new tab --- */
.wn-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 14px 0 8px; align-items: start; }
.wn-shots[hidden], .wn-fig[hidden] { display: none; }
.wn-fig { margin: 0; min-width: 0; }
.wn-fig a { display: inline-block; max-width: 100%; overflow: hidden; vertical-align: top; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.wn-fig a:hover, .wn-fig a:focus-visible { transform: translateY(-2px); border-color: var(--accent-glow); box-shadow: var(--shadow-sm); text-decoration: none; }
.wn-fig a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wn-fig img { width: auto; height: auto; max-width: 100%; max-height: 260px; }
.wn-fig figcaption { margin-top: 6px; font-size: .8rem; line-height: 1.35; color: var(--muted); }
@media (min-width: 561px) { .wn-shots { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; } }

/* the replay button on /changelog */
.changelog .wn-replay { margin: 0 0 18px; }
