/* Post-only reading layout. The original font, sidebar, and article content stay intact. */
.ypost-page { width: 100%; max-width: 688px; min-width: 0; color: #000; }
.ypost-page .post-header { padding: 0 0 1.1rem; margin: 0 0 2rem; border-bottom: 1px solid #111; }
.ypost-page .ypost-topic { font-size: 16px; line-height: 1.4; margin: 0 0 .75rem; }
.ypost-page .ypost-topic a { color: #000; text-decoration: underline; text-underline-offset: .12em; }
.ypost-page .post-title { font-size: clamp(36px, 3vw, 40px); font-weight: 700; letter-spacing: -.018em; line-height: 1.15; margin: 0 0 .75rem; text-wrap: balance; }
.ypost-page .ypost-deck { font-size: 20px; line-height: 1.5; color: #444; margin: 0 0 .75rem; }
.ypost-page .post-meta { display: block; font-size: 16px; line-height: 1.5; text-transform: none; letter-spacing: normal; color: #666; }
.ypost-page .post-meta-dates { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.ypost-page .post-date, .ypost-page .post-reading-time { font-size: 16px; line-height: 1.5; color: #666; }
.ypost-page .post-reading-time::before, .ypost-page .post-share::before { content: none; }
.ypost-page .post-share { min-width: 44px; min-height: 44px; padding: .25rem .4rem; border: 0; background: none; font: inherit; font-size: 16px; color: #000; text-transform: none; letter-spacing: normal; text-decoration: underline; text-underline-offset: .12em; cursor: pointer; }
.ypost-page .post-share:hover { text-decoration: none; }
.ypost-page .post-content { width: 100%; min-width: 0; font-size: 18px; line-height: 1.6; overflow-wrap: break-word; }
.ypost-page .post-content > p { margin: 0 0 1rem; }
.ypost-page .post-content > h2 { font-size: 24px; line-height: 1.3; font-weight: 600; margin: 2.5rem 0 1rem; }
.ypost-page .post-content > h3, .ypost-page .post-content > h4 { font-size: 20px; line-height: 1.35; font-weight: 600; margin: 2rem 0 .75rem; }
.ypost-page .post-content > :first-child { margin-top: 0; }
.ypost-page .post-content > :last-child { margin-bottom: 0; }
.ypost-page .post-content > ul, .ypost-page .post-content > ol { margin: 1rem 0; padding-left: 1.5rem; }
.ypost-page .post-content > ul > li, .ypost-page .post-content > ol > li { margin-bottom: .3rem; }
.ypost-page .post-content blockquote { color: #000; font-style: normal; border-left: 1px solid #111; padding: 0 0 0 1.25rem; margin: 1.75rem 0; }
.ypost-page .post-content blockquote p:last-child { margin-bottom: 0; }
.ypost-page .post-content hr { border: 0; border-top: 1px solid #111; margin: 2rem 0; }
.ypost-page .post-content hr + h2, .ypost-page .post-content hr + h3, .ypost-page .post-content hr + h4 { margin-top: 0; }

/* Keep media within the reading area, including Ghost's wide/full card settings. */
.ypost-page .post-content .kg-width-wide, .ypost-page .post-content .kg-width-full { width: 100%; max-width: 100%; margin-left: 0; margin-right: 0; }
.ypost-page .post-feature-image { margin: 0 0 2rem; }
.ypost-page .post-content > figure, .ypost-page .post-content > .kg-card { margin-top: 1.75rem; margin-bottom: 1.75rem; }
.ypost-page .post-feature-image img, .ypost-page .post-content > img, .ypost-page .post-content > p img, .ypost-page .post-content figure:not(.kg-gallery-card) > img, .ypost-page .post-content .kg-image-card img { display: block; max-width: 100%; height: auto; margin: 0; }
.ypost-page .post-content > img { margin: 1.75rem 0; }
.ypost-page .post-feature-image figcaption, .ypost-page .post-content figcaption { font-size: 16px; line-height: 1.5; color: #666; text-align: left; margin: .6rem 0 0; }
.ypost-page figcaption p { font-size: inherit; line-height: inherit; margin: 0; }
.ypost-page .post-content .kg-card img { margin: 0; }
.ypost-page .post-content img.kg-audio-thumbnail { margin: 8px; }
.ypost-page .post-content img.kg-bookmark-icon { width: 20px; height: 20px; margin: 0 6px 0 0; }
.ypost-page .post-content img.kg-nft-opensea-logo { margin-top: 2px; }
.ypost-page .post-content .kg-bookmark-thumbnail img { margin: 0; height: 100%; }
.ypost-page .post-content .kg-bookmark-card { border: 0; }
.ypost-page .post-content .kg-bookmark-card .kg-bookmark-container { border-radius: 0; border-color: #111; }
.ypost-page .post-content .kg-bookmark-content { font-family: inherit; }
.ypost-page .post-content .kg-gallery-container { display: block; position: relative; gap: 0; }
.ypost-page .post-content .kg-gallery-image img { display: block; width: 100%; height: 100%; margin: 0; }
.ypost-page .post-content .kg-embed-card { max-width: 100%; }
.ypost-page .post-content .kg-embed-card iframe { max-width: 100%; }
.ypost-page .post-content .ypost-video-embed { display: block; width: 100%; height: auto; aspect-ratio: var(--ypost-video-ratio, 16 / 9); }

/* The existing opening podcast paragraph is moved intact into this note by post.js. */
.ypost-page .ypost-listen-note { padding: 1rem; margin: 0 0 1.5rem; border: 1px solid #111; }
.ypost-page .ypost-listen-label { display: block; font-size: 16px; line-height: 1.4; font-weight: 600; margin: 0 0 .4rem; }
.ypost-page .ypost-listen-note p { font-size: 16px; line-height: 1.55; margin: 0; }
.ypost-page .ypost-listen-note em { font-style: normal; }
.ypost-page .ypost-listen-note + hr { display: none; }
.ypost-page .ypost-more-topics { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin: 2rem 0 0; padding-top: 1rem; border-top: 1px solid #e0e0e0; font-size: 16px; line-height: 1.5; }

/* Reading onward and the native newsletter signup. */
.ypost-page .ypost-read-next { margin: 3rem 0 0; }
.ypost-page .ypost-read-next > h2, .ypost-page .post-subscribe > h2 { font-size: 24px; font-weight: 600; line-height: 1.3; margin: 0 0 1rem; }
.ypost-page .ypost-next-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.ypost-page .ypost-next-card { min-width: 0; border: 1px solid #111; padding: 1.25rem; }
.ypost-page .ypost-next-card h3 { font-size: 20px; line-height: 1.3; font-weight: 600; margin: 0 0 .75rem; }
.ypost-page .ypost-next-card h3 a { color: #000; text-decoration: underline; text-underline-offset: .12em; }
.ypost-page .ypost-next-card p { font-size: 16px; line-height: 1.55; margin: 0 0 1rem; }
.ypost-page .ypost-next-meta { color: #666; font-size: 14px; line-height: 1.5; }
.ypost-page .post-subscribe { border: 1px solid #111; padding: 1.5rem; margin: 2rem 0 0; }
.ypost-page .post-subscribe-heading { max-width: 52ch; font-size: 18px; font-weight: 400; line-height: 1.5; margin: 0 0 1rem; }
.ypost-page .post-subscribe-field { display: flex; width: 100%; max-width: 440px; border: 1px solid #111; }
.ypost-page .post-subscribe-field:focus-within { outline: 2px solid #111; outline-offset: 3px; }
.ypost-page .post-subscribe-input { flex: 1; min-width: 0; border: 0; border-radius: 0; padding: .65rem .75rem; background: #fff; color: #000; font: inherit; font-size: 18px; line-height: 1.4; }
.ypost-page .post-subscribe-input:focus { outline: none; }
.ypost-page .post-subscribe-btn { flex-shrink: 0; min-height: 44px; padding: .6rem .85rem; border: 0; border-radius: 0; background: #000; color: #fff; font: inherit; font-size: 16px; line-height: 1.4; text-transform: none; letter-spacing: normal; cursor: pointer; }
.ypost-page .post-subscribe-success, .ypost-page .post-subscribe-error { font-size: 16px; line-height: 1.5; margin: .65rem 0 0; }
.ypost-page .post-subscribe-success { display: none; color: #000; }
.ypost-page .post-subscribe-error { color: #b00020; }
.ypost-page .post-subscribe-error:empty { display: none; }
.ypost-page .post-subscribe-form.success .post-subscribe-field { display: none; }
.ypost-page .post-subscribe-form.success .post-subscribe-success { display: block; }
.ypost-page .post-subscribe-form.loading .post-subscribe-btn { opacity: .5; pointer-events: none; }
.ypost-page .ypost-account-link { display: inline-block; border: 1px solid #111; padding: .6rem .85rem; font-size: 16px; line-height: 1.4; }
.ypost-page .post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin: 2rem 0 0; padding: 1rem 0 0; border-top: 1px solid #e0e0e0; }
.ypost-page .post-nav:not(:has(a)) { display: none; }
.ypost-page .post-nav-link { display: flex; flex-direction: column; min-width: 0; max-width: none; gap: .4rem; margin: 0; font-size: 16px; text-decoration: none; }
.ypost-page .post-nav-next { grid-column: 2; text-align: right; }
.ypost-page .post-nav-label { font-size: 14px; line-height: 1.5; color: #666; text-transform: none; letter-spacing: normal; }
.ypost-page .post-nav-title { font-size: 16px; line-height: 1.4; }
.ypost-page .post-nav-link:hover .post-nav-title { text-decoration: underline; }
.ypost-page a:focus-visible, .ypost-page button:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.ypost-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Ordinary article images open in a native, keyboard-accessible dialog. */
.ypost-page .ypost-image-open { display: block; position: relative; width: 100%; padding: 0; margin: 0; border: 0; background: none; color: #000; cursor: zoom-in; text-align: inherit; }
.ypost-page .ypost-image-open img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.ypost-page .ypost-image-open::after { content: "Enlarge"; position: absolute; right: .5rem; bottom: .5rem; padding: .2rem .5rem; border: 1px solid #111; background: #fff; color: #000; font-size: 14px; line-height: 1.5; opacity: 0; }
.ypost-page .ypost-image-open:hover::after, .ypost-page .ypost-image-open:focus-visible::after { opacity: 1; }
.ypost-image-dialog { width: calc(100vw - 3rem); max-width: 1440px; max-height: calc(100dvh - 3rem); padding: 1rem; border: 1px solid #111; border-radius: 0; background: #fff; color: #000; font-family: var(--font-body, "Helvetica Neue", Helvetica, Arial, sans-serif); }
.ypost-image-dialog::backdrop { background: rgba(0,0,0,.75); }
.ypost-image-dialog .ypost-dialog-bar { display: flex; justify-content: flex-end; gap: 1rem; align-items: center; margin-bottom: .75rem; }
.ypost-image-dialog .ypost-dialog-close { min-height: 44px; padding: .4rem .75rem; border: 1px solid #111; background: #fff; color: #000; font: inherit; font-size: 16px; cursor: pointer; }
.ypost-image-dialog figure { margin: 0; }
.ypost-image-dialog img { display: block; width: auto; max-width: 100%; max-height: calc(100dvh - 10rem); height: auto; margin: 0 auto; object-fit: contain; }
.ypost-image-dialog figcaption { font-size: 16px; line-height: 1.5; margin: .75rem 0 0; }
.ypost-image-dialog button:focus-visible { outline: 2px solid #111; outline-offset: 4px; }
html.ypost-dialog-open { overflow: hidden; }

@media (max-width: 600px) {
    .ypost-page .post-title { font-size: 32px; }
    .ypost-page .ypost-deck { font-size: 18px; }
    .ypost-page .post-header { margin-bottom: 1.5rem; }
    .ypost-page .post-meta-dates { gap: .2rem .75rem; }
    .ypost-page .ypost-next-grid { grid-template-columns: 1fr; }
    .ypost-page .ypost-next-card { padding: 1.1rem; }
    .ypost-page .post-subscribe { padding: 1.1rem; }
    .ypost-page .post-nav { grid-template-columns: 1fr; gap: 1rem; }
    .ypost-page .post-nav-next { grid-column: auto; text-align: left; }
    .ypost-page .post-content .kg-bookmark-thumbnail { width: 100px; min-width: 28%; }
    .ypost-image-dialog { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); padding: .75rem; }
}
@media (max-width: 380px) {
    .ypost-page .post-subscribe-field { flex-direction: column; }
    .ypost-page .post-subscribe-btn { width: 100%; }
}
@media (pointer: coarse) {
    .ypost-page .ypost-image-open::after { opacity: 1; }
}
