/* Story blocks (ticket #118): galleries, pull quotes, callouts, documents, maps, social posts,
   forms, polls and cards. Plain enough to sit inside any paper's theme: they take its fonts
   and colours, and set only layout. */
.cms-gallery, .cms-document, .cms-map, .cms-social, .cms-form-embed, .cms-poll, .cms-card, .cms-callout, .cms-pull-quote, .cms-embed { margin: 1.5em 0; max-width: 100%; box-sizing: border-box; }
.cms-gallery img, .cms-card img { max-width: 100%; height: auto; display: block; }
.cms-gallery-title { font-weight: bold; margin-bottom: .5em; }
.cms-caption { display: block; font-size: .85em; margin-top: .35em; opacity: .85; }
.cms-credit { font-style: italic; opacity: .8; }
.cms-gallery-grid ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.cms-gallery-grid li { margin: 0; }
.cms-gallery-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.cms-gallery-slideshow { position: relative; }
.cms-slides { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; gap: 0; }
.cms-slide { flex: 0 0 100%; scroll-snap-align: center; margin: 0; padding: 0; border: 0; }
/* Every photo in the same frame, so the page doesn't jump from one to the next. */
.cms-gallery .cms-slide img { width: 100%; height: auto; aspect-ratio: 3 / 2; max-height: 75vh; object-fit: contain; background: #111; border: 0; padding: 0; margin: 0; }
.cms-slides-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: .9em; }
.cms-slides-nav button { font: inherit; padding: 6px 14px; border: 1px solid currentColor; background: transparent; color: inherit; border-radius: 4px; cursor: pointer; min-width: 44px; min-height: 36px; }
.cms-slides-nav button:disabled { opacity: .35; cursor: default; }
.cms-js .cms-slides { scrollbar-width: none; }
.cms-js .cms-slides::-webkit-scrollbar { display: none; }
.cms-pull-quote { border-left: 4px solid currentColor; padding: .25em 0 .25em 1em; font-size: 1.35em; line-height: 1.35; font-style: italic; }
.cms-pull-quote p { margin: 0; }
.cms-pull-quote cite { display: block; font-size: .65em; font-style: normal; margin-top: .4em; }
.cms-pull-quote cite::before { content: "— "; }
.cms-callout { border: 1px solid rgba(0,0,0,.18); border-left-width: 5px; border-radius: 4px; padding: .75em 1em; background: rgba(0,0,0,.03); }
.cms-callout-alert { border-left-color: #b42318; background: rgba(180,35,24,.05); }
.cms-callout p:first-child { margin-top: 0; }
.cms-callout p:last-child { margin-bottom: 0; }
.cms-document object { width: 100%; height: 75vh; max-height: 900px; border: 1px solid rgba(0,0,0,.15); }
.cms-map iframe { width: 100%; aspect-ratio: 4 / 3; max-height: 480px; border: 0; }
.cms-map figcaption, .cms-document figcaption { font-size: .85em; margin-top: .35em; }
.cms-social { border: 1px solid rgba(0,0,0,.18); border-radius: 8px; padding: .75em 1em; }
.cms-social p { margin: 0 0 .5em; }
.cms-social footer { font-size: .85em; }
.cms-social-author { font-weight: bold; }
.cms-muted { opacity: .7; }
.cms-card a { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; border: 1px solid rgba(0,0,0,.15); border-radius: 6px; padding: 10px; }
.cms-card a:hover strong { text-decoration: underline; }
.cms-card-img { flex: 0 0 110px; }
.cms-card-img img { width: 110px; height: 80px; object-fit: cover; }
.cms-card-text { display: flex; flex-direction: column; gap: 2px; }
.cms-card-kicker { font-size: .75em; text-transform: uppercase; letter-spacing: .04em; opacity: .7; }
.cms-form-title { margin-bottom: .5em; }
.cms-poll { border: 1px solid rgba(0,0,0,.15); border-radius: 6px; padding: .75em 1em; }
.cms-poll fieldset { border: 0; margin: 0; padding: 0; }
.cms-poll-q { font-weight: bold; margin: 0 0 .5em; padding: 0; }
.cms-poll-form label { display: flex; gap: .5em; align-items: center; padding: .35em 0; cursor: pointer; }
.cms-poll-form button { font: inherit; margin-top: .5em; padding: 6px 18px; cursor: pointer; }
.cms-poll-results ol { list-style: none; margin: 0; padding: 0; }
.cms-poll-results li { display: grid; grid-template-columns: 1fr 3.5em; gap: 2px 8px; margin: .4em 0; }
.cms-poll-bar { grid-column: 1; height: 8px; background: rgba(0,0,0,.1); border-radius: 4px; overflow: hidden; }
.cms-poll-bar span { display: block; height: 100%; background: currentColor; opacity: .6; }
.cms-poll-pct { grid-column: 2; grid-row: 1 / span 2; text-align: right; align-self: center; }
@media (max-width: 600px) { .cms-card-img { flex-basis: 84px; } .cms-card-img img { width: 84px; height: 64px; } .cms-pull-quote { font-size: 1.15em; } }
/* Embeds from other services (podcast players, social posts, video players). */
.cms-embed { margin-left: auto; margin-right: auto; }
.cms-embed iframe { display: block; max-width: 100%; }
.cms-embed figcaption { font-size: .85em; margin-top: .4em; }
