/* spudnote.com/updates (tools/updates.py): every version's App Store notes, in all four languages.
 * Sits on blog.css (paper type, .index-head, .app-cta) like the FAQ; this is the switch and the list.
 * New look = new ?v= on the link in tools/updates.py. */

.updates-lede { margin: 14px 0 0; max-width: 34em; color: var(--ink-dim); font-size: 1.04rem; line-height: 1.55; }

/* the device switch: two radios (works without script), drawn as one pill with a sliding half */
.dev-switch {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; margin: 24px 0 4px; padding: 4px;
  border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 8px 20px -14px rgba(90, 52, 12, .45);
}
.dev-switch::before {   /* the pressed half */
  content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  border-radius: 999px; background: var(--soft); border: 1px solid var(--soft-edge);
  transition: transform .25s ease;
}
.dev-switch:has(#dev-mac:checked)::before { transform: translateX(100%); }
.dev-switch input { position: absolute; opacity: 0; pointer-events: none; }
.dev-switch label {
  position: relative; z-index: 1; padding: 9px 20px; text-align: center; cursor: pointer; white-space: nowrap;
  font: 500 1rem var(--fred); color: var(--ink-dim); border-radius: 999px; -webkit-tap-highlight-color: transparent;
  transition: color .2s ease;
}
.dev-switch input:checked + label { color: var(--brand); }
.dev-switch input:focus-visible + label { outline: 2px solid var(--sprout); outline-offset: 2px; }
:root[data-theme="dark"] .dev-switch { box-shadow: 0 8px 20px -12px rgba(0, 0, 0, .7); }

/* one list per platform; the switch shows one */
.rel-list { list-style: none; margin: 18px 0 0; padding: 0; }
.rel-mac { display: none; }
.updates-page:has(#dev-mac:checked) .rel-mac { display: block; }
.updates-page:has(#dev-mac:checked) .rel-ios { display: none; }

.rel { padding: 26px 0 24px; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.rel-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.rel-v { font-weight: 600; font-size: clamp(1.25rem, 3.4vw, 1.45rem); line-height: 1.2; }
.rel-v a { color: inherit; text-decoration: none; }
.rel-v a:hover { color: var(--brand); }
.rel-v a:focus-visible { outline: 2px solid var(--sprout); outline-offset: 3px; border-radius: 6px; }
.rel-tag {
  align-self: center; padding: 3px 10px; border-radius: 999px; background: var(--sprout); color: #FFFDF8;
  font: 600 .72rem var(--fred); letter-spacing: .06em; text-transform: lowercase;
}
:root[data-theme="dark"] .rel-tag { color: #1D2238; }
.rel-date { margin-left: auto; font-weight: 600; font-size: .85rem; color: var(--ink-faint); white-space: nowrap; }

.rel-notes { margin-top: 12px; font-size: 1.04rem; line-height: 1.7; color: var(--body-ink); overflow-wrap: break-word; }
.rel-notes p { margin: 0 0 12px; }
.rel-notes ul { margin: 0 0 12px; padding-left: 1.2em; }
.rel-notes li { margin: 0 0 6px; }
.rel-notes li::marker { color: var(--sprout); }
.rel-notes > :last-child { margin-bottom: 0; }
.rel-notes .rel-sign { font-family: var(--fred); font-weight: 500; color: var(--brand); }

.updates-page .app-cta { margin-top: 48px; }

@media (max-width: 520px) {
  .dev-switch { display: grid; }
  .dev-switch label { padding: 9px 10px; }
  .rel-date { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .dev-switch::before, .dev-switch label { transition: none; }
}

/* "spudnote" in the heading, colored like the header logo (site.css .app-brand .app-name) */
.index-head h1 .wm .spud { color: var(--s-brand); }
.index-head h1 .wm .note { color: var(--s-ink); }
