/* koenig.css : v3 styles for the cards the Ghost editor can put inside a post body ({{content}}).
   Scoped to .rec-body and built on the v3 tokens (v3.css). Written by port-theme-v4.py; the cards
   are listed because Ghost expects a theme to style every one of them. */
.story { overflow-x: clip; }
.rec-body figure { margin: 1.6em 0; }
.rec-body img, .rec-body video, .rec-body iframe { max-width: 100%; }
.rec-body img { height: auto; display: block; }
.rec-body figcaption { margin-top: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; line-height: 1.5; color: var(--mute); text-align: center; }
.rec-body figcaption a { color: var(--soft); }

/* wide and full width images: no transforms (the reading column reveals with one) */
.rec-body .kg-width-wide { width: min(1040px, 100vw); margin-left: calc(50% - min(520px, 50vw)); }
.rec-body .kg-width-full { width: 100vw; margin-left: calc(50% - 50vw); }
.rec-body .kg-width-wide img, .rec-body .kg-width-full img { width: 100%; }

/* gallery */
.rec-body .kg-gallery-container { display: flex; flex-direction: column; gap: 12px; }
.rec-body .kg-gallery-row { display: flex; gap: 12px; }
.rec-body .kg-gallery-image { flex: 1 1 0; min-width: 0; }
.rec-body .kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }

/* bookmark */
.rec-body .kg-bookmark-card { width: 100%; }
.rec-body a.kg-bookmark-container { display: flex; min-height: 148px; border: 1px solid var(--hair2); color: var(--soft); text-decoration: none; transition: border-color .2s; }
.rec-body a.kg-bookmark-container:hover { border-color: var(--brass); }
.rec-body .kg-bookmark-content { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: flex-start; padding: 20px; min-width: 0; }
.rec-body .kg-bookmark-title { font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.rec-body .kg-bookmark-description { margin-top: 8px; font-size: 14.5px; line-height: 1.45; color: var(--body); max-height: 4.4em; overflow: hidden; }
.rec-body .kg-bookmark-metadata { display: flex; align-items: center; margin-top: auto; padding-top: 14px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; color: var(--mute); }
.rec-body .kg-bookmark-icon { width: 20px; height: 20px; margin-right: 8px; }
.rec-body .kg-bookmark-author { color: var(--soft); }
.rec-body .kg-bookmark-author::after { content: "\00b7"; margin: 0 .6em; }
.rec-body .kg-bookmark-publisher { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-body .kg-bookmark-thumbnail { position: relative; flex: 0 0 33%; min-width: 33%; max-height: 100%; }
.rec-body .kg-bookmark-thumbnail img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* callout */
.rec-body .kg-callout-card { display: flex; gap: 14px; padding: 20px 24px; border: 1px solid var(--hair2); background: rgba(255, 255, 255, 0.03); color: var(--soft); }
.rec-body .kg-callout-emoji { flex: none; font-size: 1.25em; line-height: 1.4; }
.rec-body .kg-callout-text { flex: 1 1 auto; font-size: .92em; line-height: 1.55; }
.rec-body .kg-callout-card-grey { background: rgba(255, 255, 255, 0.04); }
.rec-body .kg-callout-card-white { background: rgba(229, 226, 225, 0.10); }
.rec-body .kg-callout-card-blue { background: rgba(120, 160, 200, 0.12); }
.rec-body .kg-callout-card-green { background: rgba(130, 170, 130, 0.12); }
.rec-body .kg-callout-card-yellow { background: rgba(200, 170, 90, 0.12); }
.rec-body .kg-callout-card-red { background: rgba(200, 100, 90, 0.12); }
.rec-body .kg-callout-card-pink { background: rgba(200, 120, 150, 0.12); }
.rec-body .kg-callout-card-purple { background: rgba(150, 120, 200, 0.12); }
.rec-body .kg-callout-card-accent { background: rgba(192, 154, 107, 0.12); border-color: var(--brass-deep); }

/* toggle */
.rec-body .kg-toggle-card { padding: 16px 20px; border: 1px solid var(--hair2); }
.rec-body .kg-toggle-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; cursor: pointer; }
.rec-body .kg-toggle-heading-text { margin: 0; font-size: 1.05em; font-weight: 600; color: var(--ink); }
.rec-body .kg-toggle-card-icon { flex: none; background: none; border: 0; color: var(--brass); cursor: pointer; }
.rec-body .kg-toggle-card-icon svg { width: 16px; height: 16px; fill: currentColor; transition: transform .2s; }
.rec-body .kg-toggle-content { margin-top: 12px; }
.rec-body .kg-toggle-card[data-kg-toggle-state="close"] .kg-toggle-content { display: none; }
.rec-body .kg-toggle-card[data-kg-toggle-state="open"] .kg-toggle-card-icon svg { transform: rotate(45deg); }

/* button */
.rec-body .kg-button-card { display: flex; margin: 1.6em 0; }
.rec-body .kg-button-card.kg-align-center { justify-content: center; }
.rec-body .kg-button-card.kg-align-left { justify-content: flex-start; }
.rec-body a.kg-btn { display: inline-block; padding: 14px 26px; border: 1px solid var(--brass); color: var(--ink); font-family: var(--mono); font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; transition: background .2s, color .2s; }
.rec-body a.kg-btn:hover { background: var(--brass); color: var(--stone); }
.rec-body a.kg-btn-accent { background: var(--brass); color: var(--stone); }

/* product */
.rec-body .kg-product-card { width: 100%; }
.rec-body .kg-product-card-container { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--hair2); }
.rec-body .kg-product-card-image { width: 100%; }
.rec-body .kg-product-card-title-container { display: flex; justify-content: space-between; gap: 12px; }
.rec-body .kg-product-card-title { margin: 0; font-size: 1.1em; font-weight: 600; color: var(--ink); }
.rec-body .kg-product-card-description { font-size: .92em; line-height: 1.5; color: var(--body); }
.rec-body .kg-product-card-rating { display: flex; gap: 2px; }
.rec-body .kg-product-card-rating-star svg { width: 16px; height: 16px; fill: currentColor; color: var(--mute); }
.rec-body .kg-product-card-rating-active svg { color: var(--brass); }
.rec-body a.kg-product-card-button { display: inline-block; align-self: flex-start; padding: 12px 22px; border: 1px solid var(--brass); color: var(--ink); text-decoration: none; }
.rec-body a.kg-product-card-btn-accent { background: var(--brass); color: var(--stone); }

/* before and after */
.rec-body .kg-before-after-card { position: relative; width: 100%; }
.rec-body .kg-before-after-card img { width: 100%; }
.rec-body .kg-before-after-card-image-before, .rec-body .kg-before-after-card-image-after { position: relative; }

/* file */
.rec-body .kg-file-card { margin: 1.6em 0; }
.rec-body a.kg-file-card-container { display: flex; align-items: stretch; justify-content: space-between; gap: 16px; padding: 14px 18px; border: 1px solid var(--hair2); color: var(--soft); text-decoration: none; transition: border-color .2s; }
.rec-body a.kg-file-card-container:hover { border-color: var(--brass); }
.rec-body .kg-file-card-contents { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rec-body .kg-file-card-title { font-weight: 600; color: var(--ink); }
.rec-body .kg-file-card-caption { font-size: .9em; color: var(--body); }
.rec-body .kg-file-card-filename, .rec-body .kg-file-card-filesize { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--mute); }
.rec-body .kg-file-card-medium, .rec-body .kg-file-card-small { min-height: 0; }

/* audio */
.rec-body .kg-audio-card { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--hair2); }
.rec-body .kg-audio-thumbnail { flex: none; width: 80px; height: 80px; object-fit: cover; background: var(--well); }
.rec-body .kg-audio-thumbnail.placeholder { display: flex; align-items: center; justify-content: center; color: var(--brass); }
.rec-body .kg-audio-player-container { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.rec-body .kg-audio-title { width: 100%; font-weight: 600; color: var(--ink); }
.rec-body .kg-audio-player { display: flex; flex: 1 1 100%; align-items: center; gap: 10px; }
.rec-body .kg-audio-current-time, .rec-body .kg-audio-time, .rec-body .kg-audio-duration { font-family: var(--mono); font-size: 12px; color: var(--mute); }
.rec-body .kg-audio-play-icon, .rec-body .kg-audio-pause-icon, .rec-body .kg-audio-mute-icon, .rec-body .kg-audio-unmute-icon { background: none; border: 0; color: var(--brass); cursor: pointer; }
.rec-body .kg-audio-pause-icon, .rec-body .kg-audio-unmute-icon { display: none; }
.rec-body .kg-audio-seek-slider { flex: 1 1 auto; }
.rec-body .kg-audio-playback-rate { background: none; border: 0; color: var(--soft); font-family: var(--mono); font-size: 12px; cursor: pointer; }
.rec-body .kg-audio-volume-slider { width: 80px; }

/* video */
.rec-body .kg-video-card { position: relative; }
.rec-body .kg-video-card.kg-width-full { max-width: none; }
.rec-body .kg-video-hide { display: none; }
.rec-body .kg-video-container { position: relative; }
.rec-body .kg-video-container video { width: 100%; display: block; background: var(--well); }
.rec-body .kg-video-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.rec-body .kg-video-large-play-icon { background: none; border: 0; color: var(--ink); cursor: pointer; }
.rec-body .kg-video-large-play-icon svg { width: 56px; height: 56px; fill: currentColor; }
.rec-body .kg-video-player-container { position: absolute; left: 0; right: 0; bottom: 0; opacity: 0; transition: opacity .2s; }
.rec-body .kg-video-container:hover .kg-video-player-container { opacity: 1; }
.rec-body .kg-video-player { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: rgba(20, 19, 18, 0.8); }
.rec-body .kg-video-current-time, .rec-body .kg-video-time, .rec-body .kg-video-duration { font-family: var(--mono); font-size: 12px; color: var(--soft); }
.rec-body .kg-video-play-icon, .rec-body .kg-video-pause-icon, .rec-body .kg-video-mute-icon, .rec-body .kg-video-unmute-icon { background: none; border: 0; color: var(--ink); cursor: pointer; }
.rec-body .kg-video-pause-icon, .rec-body .kg-video-unmute-icon { display: none; }
.rec-body .kg-video-seek-slider { flex: 1 1 auto; }
.rec-body .kg-video-playback-rate { background: none; border: 0; color: var(--soft); font-family: var(--mono); font-size: 12px; cursor: pointer; }
.rec-body .kg-video-volume-slider { width: 80px; }

/* NFT */
.rec-body .kg-nft-card { width: 100%; }
.rec-body a.kg-nft-card-container { display: flex; flex-direction: column; border: 1px solid var(--hair2); color: var(--soft); text-decoration: none; }
.rec-body .kg-nft-image { width: 100%; }
.rec-body .kg-nft-metadata { padding: 16px 20px; }
.rec-body .kg-nft-header { display: flex; justify-content: space-between; gap: 12px; }
.rec-body .kg-nft-title { margin: 0; font-weight: 600; color: var(--ink); }
.rec-body .kg-nft-opensea-logo { width: 90px; fill: currentColor; color: var(--mute); }
.rec-body .kg-nft-creator { margin-top: 6px; font-family: var(--mono); font-size: 12px; color: var(--mute); }
.rec-body .kg-nft-description { margin-top: 10px; font-size: .9em; color: var(--body); }

/* alternative blockquote */
.rec-body blockquote.kg-blockquote-alt { border: 0; padding: var(--s3) 0; text-align: center; font-style: italic; font-size: 25px; line-height: 1.45; color: var(--glow); }

@media (max-width: 640px) {
  .rec-body .kg-gallery-row { flex-direction: column; }
  .rec-body a.kg-bookmark-container { flex-direction: column-reverse; }
  .rec-body .kg-bookmark-thumbnail { flex: none; min-height: 160px; }
  .rec-body .kg-audio-card { flex-direction: column; }
}
