/* 9to5stuff magazine layer (astra-child). Fonts come from Customizer (Archivo/Inter). */
:root{--mag-accent:#A8323E;--mag-accent-hover:#86272F;--mag-accent-on-dark:#E8A0A8;--mag-ink:#0B0B0F;--mag-muted:#6B7280;--mag-line:#E5E7EB;--mag-radius:6px;--mag-gap:1.5rem}

/* ---------- shared card bits ---------- */
.mag-card .wp-block-post-featured-image,.mag-hero .wp-block-post-featured-image{margin:0 0 .75rem;overflow:hidden;border-radius:var(--mag-radius);aspect-ratio:16/9}
.mag-card .wp-block-post-featured-image img,.mag-hero .wp-block-post-featured-image img{width:100%;height:100%;object-fit:cover;aspect-ratio:16/9;border-radius:var(--mag-radius);transition:transform .35s ease}
.mag-card .wp-block-post-featured-image a:hover img,.mag-hero .wp-block-post-featured-image a:hover img{transform:scale(1.04)}
.mag-kicker,.mag-kicker a,.mag-card .wp-block-post-terms a,.ast-archive-post .cat-links a,.ast-article-post .cat-links a,.single .entry-header .cat-links a{font-size:.75rem;line-height:1.2;text-transform:uppercase;letter-spacing:.08em;font-weight:700;color:var(--mag-accent);text-decoration:none}
.mag-card .wp-block-post-terms,.mag-kicker{margin:0 0 .4rem}
.mag-card .wp-block-post-title{font-family:Archivo,sans-serif;font-weight:800;font-size:1.05rem;line-height:1.25;margin:0 0 .4rem;letter-spacing:-.01em}
.mag-card .wp-block-post-title a,.mag-hero .wp-block-post-title a{color:var(--mag-ink);text-decoration:none;background-image:linear-gradient(var(--mag-accent),var(--mag-accent));background-size:0 2px;background-position:0 100%;background-repeat:no-repeat;transition:background-size .25s ease,color .2s}
.mag-card .wp-block-post-title a:hover,.mag-hero .wp-block-post-title a:hover{color:var(--mag-accent);background-size:100% 2px}
.mag-card .wp-block-post-excerpt{margin:0 0 .4rem;color:#374151;font-size:.95rem;line-height:1.5}
.mag-card .wp-block-post-excerpt__excerpt{margin:0}
.mag-card .wp-block-post-date,.mag-card .wp-block-post-date a{font-size:.8rem;color:var(--mag-muted);text-decoration:none}
.mag-latest .wp-block-post-template,.mag-cat-query .wp-block-post-template{gap:var(--mag-gap)}

/* ---------- homepage wrapper ---------- */
.home .entry-content>.alignwide,.home .entry-content>.mag-hero,.home .entry-content>.mag-latest,.home .entry-content>.mag-cat-section{max-width:1240px;margin-left:auto;margin-right:auto}
.home .entry-content>*+*{margin-top:3rem}
/* header-to-content gap (overrides Astra 60px plain / 4em separate container) */
#page #primary{margin-top:32px}
.home #primary .entry-content>.mag-hero{padding-top:0!important}
@media (max-width:921px){#page #primary{margin-top:20px}.ast-separate-container #page #primary{padding-top:0}}

/* ---------- hero ---------- */
.mag-hero>.wp-block-columns{gap:2rem;margin-bottom:0}
.mag-hero-main .wp-block-post-template,.mag-hero-side .wp-block-post-template{margin:0;padding:0;list-style:none}
.mag-hero-main .wp-block-post-title{font-size:clamp(1.9rem,1.2rem + 2vw,2.6rem);line-height:1.1;letter-spacing:-.02em;font-weight:800;margin:.25rem 0 .6rem}
.mag-hero-main .wp-block-post-excerpt{font-size:1.05rem;color:#374151;max-width:60ch}
.mag-hero-side li.wp-block-post{padding:0 0 1rem;margin:0 0 1rem;border-bottom:1px solid var(--mag-line)}
.mag-hero-side li.wp-block-post:last-child{border-bottom:0;margin-bottom:0;padding-bottom:0}
.mag-hero-side .wp-block-post-featured-image{margin-bottom:.5rem}
.mag-hero-side .wp-block-post-title{font-size:1rem;line-height:1.25;margin:0}

/* ---------- section heads ---------- */
.mag-section-head,.mag-latest>.wp-block-heading{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;border-top:4px solid var(--mag-ink);padding-top:.6rem;margin-bottom:1.25rem}
.mag-section-head h2,.mag-latest>h2.wp-block-heading{font-size:1.4rem;line-height:1.1;letter-spacing:-.01em;margin:0}
.mag-view-all{margin:0;font-size:.8rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;white-space:nowrap}
.mag-view-all a{color:var(--mag-accent);text-decoration:none}
.mag-view-all a:hover{text-decoration:underline}

/* ---------- blog / archive / search grid ---------- */
:is(.blog,.archive,.search) #main>.ast-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2rem var(--mag-gap);margin:0}
:is(.blog,.archive,.search) #main>.ast-row>article.ast-article-post{width:auto;max-width:none;padding:0;margin:0;float:none}
:is(.blog,.archive,.search).ast-separate-container .ast-article-post,:is(.blog,.archive,.search).ast-separate-container .ast-article-inner{background:transparent;padding:0;box-shadow:none}
:is(.blog,.archive,.search) .ast-article-post .post-content{padding:0}
:is(.blog,.archive,.search) .ast-article-post .post-thumb-img-content{margin-left:0!important;margin-right:0!important;margin-top:0!important;overflow:hidden;border-radius:var(--mag-radius);aspect-ratio:16/9;margin-bottom:.75rem}
:is(.blog,.archive,.search) .ast-article-post .post-thumb-img-content img{width:100%;height:100%;object-fit:cover;aspect-ratio:16/9;transition:transform .35s ease}
:is(.blog,.archive,.search) .ast-article-post .post-thumb-img-content a:hover img{transform:scale(1.04)}
:is(.blog,.archive,.search) .ast-article-post .entry-title{font-size:1.05rem;font-weight:800;line-height:1.2;margin:.35rem 0 .4rem}
:is(.blog,.archive,.search) .ast-article-post .entry-title a{color:var(--mag-ink);text-decoration:none}
:is(.blog,.archive,.search) .ast-article-post .entry-title a:hover{color:var(--mag-accent);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}
:is(.blog,.archive,.search) .ast-article-post .entry-meta,:is(.blog,.archive,.search) .ast-article-post .entry-meta a{font-size:.8rem;color:var(--mag-muted)}
:is(.blog,.archive,.search) .ast-article-post .ast-excerpt-container{font-size:.95rem;line-height:1.5;color:#374151}
:is(.blog,.archive,.search) .ast-article-post .ast-excerpt-container p{margin:0}
:is(.blog,.archive,.search) .ast-article-post .entry-content:empty{display:none}
.ast-archive-description{border-top:4px solid var(--mag-ink);padding-top:.75rem!important}
.ast-archive-description .ast-archive-title{font-size:clamp(1.8rem,1.4rem + 1.2vw,2.4rem);letter-spacing:-.02em}

/* ---------- single post: wide magazine layout ----------
   desktop: image up to 1140px, title/meta column 880px, body text column 680px at 18px (desktop) / 640px at 17px (tablet), ~77 chars/line */
.single .entry-header .entry-title{font-size:clamp(1.75rem,1.2rem + 2vw,2.75rem);font-weight:800;line-height:1.1;letter-spacing:-.02em;margin-bottom:.6rem}
.single .entry-header .entry-meta,.single .entry-header .entry-meta *{color:var(--mag-muted);font-size:.9rem;font-weight:500}
.single .entry-header .entry-meta a,.single .entry-header .entry-meta a *{color:var(--mag-accent);font-weight:700;text-decoration:none}
.single .entry-header .entry-meta a:hover,.single .entry-header .entry-meta a:hover *{color:var(--mag-accent-hover);text-decoration:underline}
.single .entry-header{margin-bottom:2rem}
.single .site-content .ast-single-post-featured-section{overflow:hidden;border-radius:var(--mag-radius);aspect-ratio:16/9;margin:0 auto 2.25rem;width:auto;max-width:1140px}
.single .ast-single-post-featured-section img{width:100%;max-width:100%;height:100%;object-fit:cover;aspect-ratio:16/9;display:block}
.single.ast-separate-container .site-content .ast-single-post-featured-section+article{margin-top:0;position:static}
.single.ast-separate-container #primary article.ast-article-single:not(.ast-related-post){padding:0;max-width:880px;margin-left:auto;margin-right:auto;background:transparent}
.single #primary :is(.post-navigation,.comments-area,.ast-single-related-posts-container,.ast-author-meta,.ast-author-box){max-width:880px;margin-left:auto;margin-right:auto}
.single .entry-content{font-size:17px;line-height:1.7;--mag-measure:640px}
.single .entry-content>*:not(.alignwide):not(.alignfull){max-width:var(--mag-measure,640px);margin-left:auto;margin-right:auto}
.single .entry-content>:is(.alignwide,.alignfull){max-width:880px;margin-left:auto;margin-right:auto}
@media (min-width:922px){
 .single.ast-narrow-container .site-content>.ast-container{max-width:1240px}
 .single .entry-content{font-size:18px;--mag-measure:680px}
 .single .entry-header{text-align:center;max-width:880px;margin-left:auto;margin-right:auto}
 .single.ast-no-sidebar .site-content .ast-single-post-featured-section.ast-article-image-container--wide{margin-left:auto;margin-right:auto;max-width:1140px;width:100%}
}
@media (max-width:921px){
 :is(.single,.blog,.archive,.search).ast-separate-container #content .ast-container{padding-left:20px;padding-right:20px}
 .single .site-content .ast-single-post-featured-section{margin-bottom:1.5rem}
 .single .entry-header{margin-bottom:1.5rem;max-width:640px;margin-left:auto;margin-right:auto;text-align:left}
}
@media (max-width:544px){
 :is(.single,.blog,.archive,.search).ast-separate-container #content .ast-container{padding-left:16px;padding-right:16px}
 .single .site-content .ast-single-post-featured-section{margin-left:-16px;margin-right:-16px;max-width:none;border-radius:0}
 .single .ast-single-post-featured-section img{border-radius:0}
}
@media (min-width:922px){.single #secondary .sidebar-main,:is(.blog,.archive,.search) #secondary .sidebar-main{position:sticky;top:2rem}}

/* ---------- responsive ---------- */
@media (max-width:1024px){:is(.blog,.archive,.search) #main>.ast-row{grid-template-columns:repeat(2,minmax(0,1fr))}
 .mag-cat-query .wp-block-post-template{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media (max-width:781px){.mag-hero>.wp-block-columns{flex-direction:column;gap:1.5rem}
 .mag-hero>.wp-block-columns>.wp-block-column{flex-basis:100%!important}
 .mag-latest .wp-block-post-template{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .home .entry-content>*+*{margin-top:2.25rem}}
@media (max-width:600px){:is(.blog,.archive,.search) #main>.ast-row,.mag-latest .wp-block-post-template,.mag-cat-query .wp-block-post-template{grid-template-columns:1fr!important}
 .mag-section-head h2,.mag-latest>h2.wp-block-heading{font-size:1.25rem}
 .home .entry-content>.alignwide,.home .entry-content>.mag-hero{padding-left:0;padding-right:0}}

/* ---------- dark footer ---------- */
.site-footer,.site-footer .site-primary-footer-wrap[data-section="section-primary-footer-builder"],.site-footer .site-below-footer-wrap[data-section="section-below-footer-builder"]{background:#0B0B0F;background-image:none;color:#E5E7EB;border-top-color:#1F2937}
.site-footer .site-primary-footer-wrap[data-section="section-primary-footer-builder"]{padding-top:3.5rem;padding-bottom:2.5rem}
.site-footer .site-below-footer-wrap[data-section="section-below-footer-builder"]{padding-top:1.25rem;padding-bottom:1.25rem;border-top:1px solid #1F2937}
.site-footer p,.site-footer li,.site-footer .ast-footer-copyright,.site-footer .ast-footer-copyright p{color:#E5E7EB}
.site-footer a,.site-footer .widget a,.site-footer .ast-footer-copyright a{color:#FFFFFF;text-decoration:none}
.site-footer a:hover,.site-footer a:focus,.site-footer .widget a:hover{color:var(--mag-accent-on-dark)}
.site-footer .widget :is(h2,h3,h4,.widget-title),.site-footer .footer-widget-area .wp-block-heading{color:#FFFFFF;text-transform:uppercase;font-size:.8rem;letter-spacing:.08em;font-weight:700;margin:0 0 .9rem}
.site-footer .wp-block-list{list-style:none;margin:0;padding:0}
.site-footer .wp-block-list li{margin:0 0 .45rem}
.site-footer .ast-footer-copyright{font-size:.85rem}
@media (max-width:921px){.site-footer .site-primary-footer-wrap[data-section="section-primary-footer-builder"]{padding-top:2.5rem;padding-bottom:1.5rem}.site-footer .site-footer-section+.site-footer-section{margin-top:1.5rem}}

/* ---------- magazine header ---------- */
#masthead::before{content:"";display:block;height:4px;background:var(--mag-accent)}
#masthead .ast-primary-header-bar{background:#fff;border-bottom:4px solid #0B0B0F}
#masthead .ast-primary-header-bar .site-primary-header-wrap,#masthead .ast-mobile-header-wrap .ast-primary-header-bar{min-height:84px}
/* text title stays in DOM for SEO/a11y, hidden visually next to the logo */
#masthead .site-branding:has(.custom-logo) .ast-site-title-wrap{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
#masthead .site-branding{display:flex;align-items:center}
#masthead .site-logo-img{padding-right:0;display:flex;align-items:center}
#masthead .site-logo-img .custom-logo-link{display:block;line-height:0}
/* logo file has ~7.6% transparent padding on the right: 216px box = ~200px visible ink; negative margin cancels the padding */
#masthead .site-header-primary-section-left,#masthead .site-branding,#masthead .site-logo-img,#masthead .site-logo-img .custom-logo-link{flex-shrink:0}
#masthead .site-logo-img img.custom-logo{width:216px!important;max-width:none!important;max-height:60px;height:auto!important;object-fit:contain;margin-right:-16px}
/* desktop menu */
.ast-desktop #masthead .ast-builder-menu-1 .main-header-menu>.menu-item{line-height:84px;margin:0 .2rem}
#masthead .ast-builder-menu-1 .main-header-menu>.menu-item>.menu-link{position:relative;font-family:Archivo,sans-serif;font-weight:800;text-transform:uppercase;font-size:.9rem;letter-spacing:.06em;color:#0B0B0F;padding:0 .85rem}
#masthead .ast-builder-menu-1 .main-header-menu>.menu-item>.menu-link::after{content:"";position:absolute;left:.85rem;bottom:calc(50% - 1em);height:3px;width:0;background:var(--mag-accent);transition:width .2s ease}
#masthead .ast-builder-menu-1 .main-header-menu>.menu-item>.menu-link:hover,#masthead .ast-builder-menu-1 .main-header-menu>.menu-item:hover>.menu-link,#masthead .ast-builder-menu-1 .main-header-menu>.menu-item.current-menu-item>.menu-link,#masthead .ast-builder-menu-1 .main-header-menu>.menu-item.current-menu-ancestor>.menu-link{color:var(--mag-accent)}
#masthead .ast-builder-menu-1 .main-header-menu>.menu-item>.menu-link:hover::after,#masthead .ast-builder-menu-1 .main-header-menu>.menu-item:hover>.menu-link::after,#masthead .ast-builder-menu-1 .main-header-menu>.menu-item.current-menu-item>.menu-link::after,#masthead .ast-builder-menu-1 .main-header-menu>.menu-item.current-menu-ancestor>.menu-link::after{width:calc(100% - 1.7rem)}
/* search icon */
#masthead .ast-header-search{margin-left:.5rem}
#masthead .ast-header-search .astra-search-icon{color:#0B0B0F;font-size:22px}
#masthead .ast-header-search .astra-search-icon svg{fill:currentColor;width:22px;height:22px}
#masthead .ast-header-search .astra-search-icon:hover,#masthead .ast-header-search .astra-search-icon:focus-visible{color:var(--mag-accent)}
/* mobile header */
#masthead .ast-mobile-header-wrap .ast-primary-header-bar{border-bottom:4px solid #0B0B0F;background:#fff}
#masthead .ast-mobile-header-wrap .site-logo-img img.custom-logo{width:152px!important;max-width:none!important;max-height:44px;margin-right:-12px}
#masthead .ast-mobile-header-wrap .site-header-primary-section-right{justify-content:flex-end}
#masthead [data-section="section-header-mobile-trigger"] .menu-toggle{background:transparent;border:0;padding:.5rem;color:#0B0B0F}
#masthead [data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg{fill:#0B0B0F;width:26px;height:26px}
#masthead .ast-builder-menu-mobile .main-navigation .main-header-menu .menu-item>.menu-link{font-family:Archivo,sans-serif;font-weight:800;text-transform:uppercase;letter-spacing:.06em;font-size:.95rem;color:#0B0B0F}
#masthead .ast-builder-menu-mobile .main-navigation .main-header-menu .menu-item>.menu-link:hover,#masthead .ast-builder-menu-mobile .main-navigation .main-header-menu .menu-item.current-menu-item>.menu-link{color:var(--mag-accent)}
#masthead .ast-builder-menu-mobile .main-navigation .main-header-menu>.menu-item{border-bottom:1px solid #E5E7EB}
#masthead .ast-mobile-header-content{border-bottom:4px solid #0B0B0F}

/* ---------- Typography: Archivo headings/titles/menu, Inter body ---------- */
body,button,input,select,textarea,.entry-content,.ast-button,.wp-block-button__link{font-family:'Inter',sans-serif}
h1,h2,h3,h4,h5,h6,.entry-content :where(h1,h2,h3,h4,h5,h6),.site-title,.entry-title,.wp-block-post-title,.ast-archive-title,.widget-title,.wp-block-heading,#masthead .main-header-menu .menu-link,.ast-builder-menu-mobile .menu-link{font-family:'Archivo',sans-serif}

/* ---------- accent (muted crimson #A8323E, 6.6:1 on white) ----------
   Astra prints the Customizer theme/link colour into its inline CSS; functions.php rewrites it there too,
   these rules keep the key states on the accent even if that filter is ever removed. */
a{color:var(--mag-accent)}
a:hover,a:focus{color:var(--mag-accent-hover)}
::selection{background-color:var(--mag-accent);color:#fff}
.entry-meta,.entry-meta *,.ast-comment-meta,.single .nav-links .nav-previous,.single .nav-links .nav-next{color:var(--mag-accent)}
.single .post-navigation a:hover,.post-navigation a:hover{color:var(--mag-accent-hover)}
:is(.wp-block-button:not(.is-style-outline) .wp-block-button__link,.wp-block-search .wp-block-search__button,.wp-block-file .wp-block-file__button,.search .search-submit,#ast-scroll-top){background-color:var(--mag-accent);border-color:var(--mag-accent)}
:is(.wp-block-button:not(.is-style-outline) .wp-block-button__link,.wp-block-search .wp-block-search__button,.search .search-submit,#ast-scroll-top):hover{background-color:var(--mag-accent-hover);border-color:var(--mag-accent-hover)}
.wp-block-button.is-style-outline .wp-block-button__link,.ast-outline-button{border-color:var(--mag-accent)}
.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-text-color),.ast-outline-button{color:var(--mag-accent)}
.post-page-numbers.current .page-link,.ast-pagination .page-numbers.current,.tagcloud a:hover,.tagcloud a:focus,.tagcloud a.current-item{background-color:var(--mag-accent);border-color:var(--mag-accent);color:#fff}
:is(input,textarea,select):focus{border-color:var(--mag-accent)}
.ast-desktop .ast-builder-menu-1 .main-header-menu .sub-menu,.ast-builder-menu-1 .inline-on-mobile .sub-menu{border-color:var(--mag-accent)}
:focus-visible{outline-color:var(--mag-accent)}

/* keep visually-hidden search labels from causing horizontal scroll on mobile */
.wp-block-search__label.screen-reader-text{width:1px!important;height:1px!important;overflow:hidden!important;white-space:nowrap}
