/* ==========================================================================
   Pages, journal, search results, comments, 404
   ========================================================================== */

.tv-content-page { padding-bottom: clamp(48px, 7vw, 88px); }
.tv-commerce-page .tv-page-header { padding-bottom: 16px; }

.tv-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.tv-post-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--tv-color-border); border-radius: var(--tv-radius-card); background: var(--tv-color-surface); }
.tv-post-card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--tv-color-muted-bg); }
.tv-post-card-media img { width: 100%; height: 100%; object-fit: cover; }
.tv-post-card-body { padding: 20px; }
.tv-post-card-title { margin: 6px 0 8px; font-size: 1.15rem; line-height: 1.3; }
.tv-post-card-title a { color: inherit; text-decoration: none; }
.tv-post-card-title a:hover { text-decoration: underline; }
.tv-post-card-excerpt { color: var(--tv-color-text-muted); font-size: 14.5px; }
.tv-post-card-excerpt p { margin: 0; }
.tv-post-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; color: var(--tv-color-text-muted); font-size: 13px; font-weight: 600; }
.tv-article { max-width: 780px; }
.tv-article-header { padding-bottom: 12px; }
.tv-article-header .tv-post-meta { margin-top: 10px; }
.tv-article-media { margin: 8px 0 28px; }
.tv-article-media img { width: 100%; border-radius: var(--tv-radius-card); }
.tv-article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.tv-article-tags a { padding: 5px 12px; border: 1px solid var(--tv-color-border); border-radius: var(--tv-radius-pill); background: var(--tv-color-surface); font-size: 13px; font-weight: 600; text-decoration: none; }
.post-navigation { max-width: 780px; margin-top: 40px; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-navigation a { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--tv-color-border); border-radius: 16px; background: var(--tv-color-surface); text-decoration: none; }
.post-navigation .nav-next { text-align: right; }
.tv-nav-label { color: var(--tv-color-text-muted); font-size: 12.5px; font-weight: 600; }
.tv-nav-title { color: var(--tv-color-text-main); font-weight: 700; }
.navigation.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 40px; }
.navigation.pagination .page-numbers { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border: 1px solid var(--tv-color-border); border-radius: 12px; background: var(--tv-color-surface); font-weight: 700; text-decoration: none; }
.navigation.pagination .page-numbers.current { border-color: var(--tv-color-primary); background: var(--tv-color-primary); color: var(--tv-color-on-primary); }

.tv-comments { max-width: 780px; margin-top: 48px; }
.tv-comments-title { font-size: 1.3rem; }
.tv-comment-list { margin: 0 0 32px; padding: 0; list-style: none; }
.tv-comment-list .comment-body { margin-bottom: 14px; padding: 18px; border: 1px solid var(--tv-color-divider); border-radius: 16px; background: var(--tv-color-surface); }
.tv-comment-list .children { margin: 0; padding-left: 24px; list-style: none; }
.tv-comment-list .avatar { float: left; margin-right: 12px; border-radius: 50%; }
.tv-comment-list .comment-metadata { color: var(--tv-color-text-muted); font-size: 13px; }
.comment-respond .comment-form > p { margin-bottom: 14px; }
.comment-respond .submit { min-height: 46px; padding: 10px 22px; border: 0; border-radius: var(--tv-radius-button); background: var(--tv-color-primary); color: var(--tv-color-on-primary); font-weight: 700; }

.tv-search-again { max-width: 520px; margin-top: 16px; }
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; }
.search-form .search-submit { min-height: 44px; padding: 0 18px; border: 0; border-radius: var(--tv-radius-button); background: var(--tv-color-primary); color: var(--tv-color-on-primary); font-weight: 700; }
.tv-search-posts { margin-top: 32px; }
.tv-empty-state { display: grid; justify-items: start; gap: 8px; max-width: 560px; padding: 32px; border: 1.5px dashed var(--tv-color-border-hover); border-radius: var(--tv-radius-card); background: var(--tv-color-surface); }
.tv-empty-state h2 { margin: 0; }
.tv-empty-state p { color: var(--tv-color-text-muted); }

.tv-404 { display: grid; justify-items: center; padding-top: clamp(32px, 8vw, 96px); text-align: center; }
.tv-404-mark { margin: 0; color: var(--tv-color-accent); font-family: var(--tv-font-script); font-size: clamp(4rem, 12vw, 7rem); font-weight: 700; line-height: 1; }
.tv-404 .tv-page-intro { margin-inline: auto; }
.tv-404-search { width: min(100%, 480px); margin: 24px 0 20px; text-align: left; }
