/*
Theme Name: Anewser Archive
Theme URI: https://anewser.cc/
Author: Anewser
Description: Fast, text-first archive theme for the existing Anewser collection.
Version: 1.0.5
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: anewser-archive
*/

:root {
    --ink: #142a3c;
    --paper: #ffffff;
    --mist: #eff5f8;
    --cloud: #dce9ef;
    --blue: #24658f;
    --sky: #97c8db;
    --muted: #617889;
    --line: #d5e1e7;
    --heading: Georgia, 'Times New Roman', serif;
    --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #d47c35; outline-offset: 3px; }
::selection { color: var(--ink); background: var(--sky); }
.wrap { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: absolute; left: 12px; top: -100px; z-index: 9999; padding: 10px 16px; color: white; background: var(--ink); }
.skip-link:focus { top: 12px; }
.screen-reader-text { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.screen-reader-text:focus { position: static !important; clip: auto; clip-path: none; width: auto; height: auto; }

.site-header { border-bottom: 1px solid var(--line); background: white; }
.header-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: flex; align-items: center; gap: 20px; }
.brand-link { display: inline-flex; align-items: center; gap: 11px; }
.brand-name { font-family: var(--heading); font-size: 30px; line-height: 1; letter-spacing: -.06em; font-weight: 700; }
.brand-mark { width: 28px; height: 30px; display: flex; flex-direction: column; justify-content: center; gap: 4px; transform: skewY(-13deg); }
.brand-mark span { display: block; height: 4px; width: 100%; border-radius: 1px; background: var(--blue); }
.brand-mark span:nth-child(2) { width: 79%; background: #5e9fbd; }
.brand-mark span:nth-child(3) { width: 58%; background: var(--sky); }
.brand-descriptor { border-left: 1px solid var(--line); padding-left: 20px; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; }
.main-nav { display: flex; align-items: center; gap: 30px; font-size: 14px; font-weight: 650; }
.main-nav a { padding-block: 10px; }
.main-nav a:last-child { border: 1px solid var(--ink); border-radius: 3px; padding: 8px 16px; }
.main-nav a:last-child:hover { border-color: var(--blue); }

.eyebrow { margin: 0; color: var(--blue); font-size: 12px; font-weight: 750; line-height: 1.4; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow span { color: var(--sky); padding-inline: 6px; }
.home-intro { overflow: hidden; color: white; background: var(--ink); }
.intro-grid { position: relative; min-height: 470px; display: grid; grid-template-columns: minmax(0, 780px) 1fr; align-items: center; gap: 50px; padding-block: 64px; }
.intro-copy { position: relative; z-index: 2; }
.home-intro .eyebrow { color: var(--sky); }
.intro-copy h1 { max-width: 780px; margin: 18px 0 19px; font-family: var(--heading); font-weight: 400; font-size: clamp(40px, 5.1vw, 72px); line-height: 1.12; letter-spacing: -.046em; }
.intro-description { max-width: 600px; margin: 0 0 30px; color: #d6e7ee; font-size: 17px; }
.intro-signature { position: absolute; right: -26px; top: 16%; width: 27%; height: 75%; opacity: .82; display: flex; flex-direction: column; justify-content: center; gap: 28px; transform: rotate(-9deg); pointer-events: none; }
.signature-bar { display: block; width: 100%; height: 52px; border: 12px solid var(--sky); border-right: none; border-radius: 36px 0 0 36px; }
.signature-bar:nth-child(2) { width: 82%; margin-left: auto; border-color: #5da4be; }
.signature-bar:nth-child(3) { width: 64%; margin-left: auto; border-color: #397997; }
.signature-dot { position: absolute; right: -15px; top: 10%; width: 16px; height: 16px; border-radius: 50%; background: var(--sky); }
.search-form { max-width: 635px; }
.search-form label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.search-fields { display: flex; gap: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 4px; background: white; }
.search-fields input { width: 100%; min-width: 0; min-height: 44px; padding: 8px 13px; border: 0; border-radius: 2px; outline: none; color: var(--ink); background: white; }
.search-fields input::placeholder { color: #748795; opacity: 1; }
.search-fields input:focus-visible { outline: 3px solid #d47c35; outline-offset: -2px; }
.search-fields button { flex: none; min-width: 100px; padding: 8px 15px; border: 0; border-radius: 3px; color: white; background: var(--blue); font-size: 14px; font-weight: 750; }
.search-fields button:hover { background: #174b6c; }
.search-fields button span { margin-left: 8px; }
.archive-years { display: flex; align-items: baseline; gap: 14px; margin-top: 20px; color: #bfd6e1; font-size: 13px; }
.archive-years span { font-weight: 650; }
.archive-years ul { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.archive-years a { color: white; border-bottom: 1px solid #719bb1; }
.archive-years a:hover { color: var(--sky); }

.archive-section { padding-block: 72px 95px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.section-heading h1, .section-heading h2 { margin: 8px 0 0; font-family: var(--heading); font-size: clamp(32px, 3.4vw, 45px); font-weight: 400; line-height: 1.15; letter-spacing: -.04em; }
.archive-count { color: var(--muted); font-size: 13px; white-space: nowrap; }
.story-list { max-width: 1060px; }
.featured-story { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr); min-height: 390px; gap: 0; margin-block: 32px 12px; background: var(--mist); }
.featured-story--text { display: block; max-width: 800px; min-height: 330px; }
.featured-copy { display: flex; flex-direction: column; padding: clamp(26px, 4vw, 52px); }
.featured-copy h3 { margin: 17px 0 17px; max-width: 680px; font-family: var(--heading); font-weight: 400; font-size: clamp(29px, 3vw, 43px); line-height: 1.17; letter-spacing: -.036em; }
.featured-copy > p:not(.eyebrow) { max-width: 560px; margin: 0; color: var(--muted); font-size: 15px; }
.featured-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: auto; padding-top: 38px; color: var(--muted); font-size: 13px; }
.featured-bottom a { color: var(--blue); font-weight: 750; }
.featured-image { display: grid; place-items: center; overflow: hidden; min-height: 0; background: var(--cloud); }
.featured-image img { display: block; width: 100%; max-height: 390px; object-fit: contain; }
.story-card { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 32px; align-items: center; min-height: 195px; padding-block: 30px; border-bottom: 1px solid var(--line); }
.story-card--text { display: block; min-height: 0; }
.story-card:first-child { border-top: 1px solid var(--line); }
.card-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 650; }
.card-meta span:first-child { color: var(--blue); text-transform: uppercase; letter-spacing: .07em; }
.story-card h3 { max-width: 700px; margin: 8px 0; font-family: var(--heading); font-weight: 400; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.24; letter-spacing: -.025em; }
.story-card p { max-width: 760px; margin: 0 0 8px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.text-link { color: var(--blue); font-size: 13px; font-weight: 750; }
.text-link span { margin-left: 5px; }
.card-image { display: grid; place-items: center; width: 170px; height: 128px; overflow: hidden; background: var(--mist); }
.card-image img { width: 100%; height: 100%; object-fit: contain; }

.pagination { margin-top: 44px; }
.pagination .page-numbers { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0; padding: 0; list-style: none; }
.pagination .page-numbers li { margin: 0; }
.pagination .page-numbers a, .pagination .page-numbers span { display: grid; place-items: center; min-width: 42px; min-height: 42px; padding-inline: 10px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); font-size: 13px; font-weight: 650; }
.pagination .page-numbers a:hover, .pagination .page-numbers .current { border-color: var(--blue); color: white; background: var(--blue); }
.pagination .page-numbers .dots { border: 0; }
.page-jump { display: flex; align-items: center; gap: 8px; margin-top: 19px; color: var(--muted); font-size: 13px; }
.page-jump input { width: 68px; height: 36px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); }
.page-jump button { height: 36px; padding: 3px 12px; border: 1px solid var(--blue); border-radius: 3px; color: var(--blue); background: white; font-weight: 700; }
.page-jump button:hover { color: white; background: var(--blue); }

.listing-page { min-height: 65vh; padding-block: 60px 90px; }
.listing-intro { max-width: 800px; padding-bottom: 34px; }
.listing-intro h1 { margin: 14px 0 24px; font-family: var(--heading); font-size: clamp(36px, 4.6vw, 62px); line-height: 1.15; font-weight: 400; letter-spacing: -.046em; overflow-wrap: anywhere; }
.listing-intro .search-form { margin-top: 25px; }
.listing-description, .results-count { color: var(--muted); }
.results-count { font-size: 14px; }
.no-results { padding: 36px; background: var(--mist); }
.no-results h2 { margin: 0 0 10px; font-family: var(--heading); font-weight: 400; }

.article-layout { max-width: 1100px; padding-block: 37px 90px; }
.breadcrumbs { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.breadcrumbs a:hover { color: var(--blue); }
.article-header { max-width: 830px; margin: 42px auto 32px; }
.article-header h1 { margin: 14px 0 0; font-family: var(--heading); font-size: clamp(37px, 5vw, 64px); line-height: 1.14; letter-spacing: -.045em; font-weight: 400; overflow-wrap: anywhere; }
.fiction-note { max-width: 660px; margin: 22px 0 0; padding: 13px 17px; border-left: 3px solid var(--blue); color: var(--muted); background: var(--mist); font-size: 14px; }
.article-cover { display: flex; justify-content: center; align-items: center; max-width: 830px; max-height: 480px; margin: 0 auto 48px; overflow: hidden; background: var(--mist); }
.article-cover img { display: block; width: auto; max-width: 100%; max-height: 480px; object-fit: contain; }
.article-content { max-width: 740px; margin-inline: auto; color: #263847; font-size: clamp(17px, 1.7vw, 19px); line-height: 1.82; overflow-wrap: break-word; }
.article-content > :first-child { margin-top: 0; }
.article-content p { margin: 0 0 1.35em; }
.article-content h2, .article-content h3, .article-content h4 { margin: 1.6em 0 .6em; color: var(--ink); font-family: var(--heading); line-height: 1.25; font-weight: 400; }
.article-content h2 { font-size: 1.7em; }
.article-content h3 { font-size: 1.4em; }
.article-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.article-content img { display: block; max-width: 100%; height: auto; margin-inline: auto; }
.article-content figure { max-width: 100%; margin: 1.8em auto; }
.article-content figcaption { margin-top: .5em; color: var(--muted); font-size: 13px; line-height: 1.5; text-align: center; }
.article-content iframe, .article-content video, .article-content embed { max-width: 100%; }
.article-content .wp-block-embed__wrapper { overflow: hidden; }
.article-content blockquote { margin: 2em 0; padding: 4px 0 4px 25px; border-left: 3px solid var(--sky); color: var(--ink); font-family: var(--heading); font-size: 1.18em; line-height: 1.55; }
.article-content ul, .article-content ol { padding-left: 1.5em; }
.article-content li { margin-bottom: .5em; }
.article-content table { width: 100%; border-collapse: collapse; font-size: .84em; }
.article-content td, .article-content th { border-bottom: 1px solid var(--line); padding: 9px 11px; text-align: left; }
.article-content .code-block { max-width: 100%; }
.article-pages { display: flex; gap: 8px; }
.related-stories { max-width: 830px; margin: 72px auto 0; }
.related-stories .section-heading { padding-bottom: 20px; }
.related-item { display: grid; grid-template-columns: 120px 1fr 28px; gap: 22px; align-items: center; padding-block: 23px; border-bottom: 1px solid var(--line); }
.related-item > span { color: var(--muted); font-size: 12px; }
.related-item h3 { margin: 0; font-family: var(--heading); font-size: 21px; line-height: 1.3; font-weight: 400; }
.related-arrow { color: var(--blue); font-size: 23px; }
.comments-area { max-width: 740px; margin: 80px auto 0; padding-top: 28px; border-top: 1px solid var(--line); }
.comments-area h2, .comments-area .comment-reply-title { font-family: var(--heading); font-size: 28px; font-weight: 400; }
.comment-list { padding-left: 0; list-style: none; }
.comment-list .comment { padding: 20px 0; border-bottom: 1px solid var(--line); }
.comment-form label { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 700; }
.comment-form input:not([type="submit"]), .comment-form textarea { width: 100%; max-width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 3px; }
.comment-form input[type="submit"] { padding: 11px 18px; border: 0; border-radius: 3px; color: white; background: var(--blue); font-weight: 700; }
.site-footer { color: #d2e2ea; background: var(--ink); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 25px; min-height: 130px; font-size: 13px; }
.footer-brand { color: white; font-family: var(--heading); font-size: 26px; letter-spacing: -.05em; }
.footer-inner > a:last-child { color: white; }

@media (max-width: 820px) {
    .wrap { width: min(100% - 36px, 700px); }
    .header-inner { min-height: 70px; }
    .brand-descriptor { display: none; }
    .main-nav { gap: 14px; font-size: 13px; }
    .intro-grid { display: block; min-height: 0; padding-block: 55px; }
    .intro-signature { right: -100px; opacity: .18; width: 50%; }
    .featured-story { grid-template-columns: minmax(0, 1fr) 240px; min-height: 0; }
    .featured-image img { max-height: 360px; }
    .article-layout { width: min(100% - 36px, 780px); }
}
@media (max-width: 600px) {
    .wrap { width: calc(100% - 32px); }
    .header-inner { flex-wrap: wrap; gap: 7px; padding-block: 14px; }
    .brand-name { font-size: 26px; }
    .brand-mark { width: 23px; height: 23px; }
    .main-nav { width: 100%; justify-content: space-between; gap: 8px; }
    .main-nav a:last-child { padding: 5px 12px; }
    .intro-grid { padding-block: 46px 51px; }
    .intro-copy h1 { font-size: clamp(38px, 10vw, 55px); }
    .intro-description { font-size: 15px; }
    .intro-signature { display: none; }
    .search-fields button { min-width: 75px; padding-inline: 10px; }
    .search-fields button span { display: none; }
    .archive-years { flex-wrap: wrap; }
    .archive-section { padding-block: 48px 68px; }
    .section-heading { align-items: start; }
    .archive-count { margin-top: 6px; font-size: 11px; }
    .featured-story { display: flex; flex-direction: column; margin-top: 22px; }
    .featured-copy { padding: 25px 22px; }
    .featured-copy h3 { font-size: 29px; }
    .featured-bottom { padding-top: 24px; }
    .featured-image { max-height: 280px; }
    .featured-image img { max-height: 280px; }
    .story-card { grid-template-columns: minmax(0, 1fr) 88px; gap: 13px; padding-block: 23px; }
    .story-card h3 { font-size: 21px; }
    .story-card p { display: none; }
    .card-image { width: 88px; height: 100px; }
    .card-meta { flex-wrap: wrap; gap: 4px; font-size: 11px; }
    .card-meta span:nth-child(2) { display: none; }
    .card-meta time { width: 100%; }
    .listing-page { padding-block: 43px 65px; }
    .article-layout { padding-block: 25px 65px; }
    .article-header { margin-block: 30px 28px; }
    .article-header h1 { font-size: clamp(35px, 9vw, 51px); }
    .article-cover { margin-bottom: 36px; max-height: 330px; }
    .article-cover img { max-height: 330px; }
    .article-content { font-size: 17px; line-height: 1.78; }
    .related-item { grid-template-columns: 1fr 25px; gap: 8px 12px; }
    .related-item > span { grid-column: 1 / -1; }
    .related-item h3 { font-size: 19px; }
    .footer-inner { flex-wrap: wrap; padding-block: 28px; min-height: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
