/* Nexfinity theme: layout details theme.json can't express. */

:root { --nx-sans: var(--wp--preset--font-family--sans); }

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { height: auto; }
a { text-underline-offset: 2px; }

/* ---------- Top bar ---------- */
.nx-topbar { font-family: var(--nx-sans); font-size: 12px; letter-spacing: .02em; }
.nx-topbar p { margin: 0; }
.nx-topbar-links a { color: #fff; text-decoration: none; margin-left: 18px; opacity: .85; }
.nx-topbar-links a:hover { opacity: 1; color: var(--wp--preset--color--amber); }

/* ---------- Masthead ---------- */
.nx-masthead .wp-block-site-logo img { display: block; }
.nx-search { max-width: 320px; width: 100%; }
.nx-search .wp-block-search__inside-wrapper { border: 1px solid var(--wp--preset--color--line) !important; border-radius: 999px; padding: 2px 4px 2px 14px; background: var(--wp--preset--color--paper); }
.nx-search .wp-block-search__input { border: 0; background: transparent; font-family: var(--nx-sans); font-size: 14px; }
.nx-search .wp-block-search__button { background: transparent; color: var(--wp--preset--color--navy); padding: 6px 8px; margin: 0; }

/* ---------- Nav ---------- */
.nx-navbar { border-top: 3px solid var(--wp--preset--color--red); border-bottom: 1px solid var(--wp--preset--color--line); position: sticky; top: 0; z-index: 50; }
.admin-bar .nx-navbar { top: 32px; }
.nx-nav { gap: 0 !important; }
.nx-nav .wp-block-navigation-item__content { display: block; padding: 13px 14px; color: var(--wp--preset--color--navy); text-decoration: none; }
.nx-nav .wp-block-navigation-item:first-child .wp-block-navigation-item__content { padding-left: 0; }
.nx-nav .wp-block-navigation-item__content:hover,
.nx-nav .current-menu-item > .wp-block-navigation-item__content { color: var(--wp--preset--color--red); }
.nx-nav .wp-block-navigation__responsive-container-open { padding: 12px 0; color: var(--wp--preset--color--navy); }

/* ---------- Shared ---------- */
.nx-section-title { font-family: var(--nx-sans) !important; font-size: 13px !important; font-weight: 800 !important; text-transform: uppercase; letter-spacing: .1em; color: var(--wp--preset--color--navy); border-top: 3px solid var(--wp--preset--color--navy); padding-top: 10px; margin: 0 0 16px; }
.nx-section-title a { color: inherit; text-decoration: none; }
.wp-block-post-title a { text-decoration: none; }
.wp-block-post-terms a { text-decoration: none; }
.wp-block-post-featured-image { margin-bottom: 12px; overflow: hidden; border-radius: 4px; background: var(--wp--preset--color--paper); }
.wp-block-post-featured-image img { transition: transform .35s ease; }
.wp-block-post-featured-image a:hover img { transform: scale(1.03); }
.wp-block-post-template { margin-top: 0; }
.wp-block-post-template > li .wp-block-post-title { margin: 4px 0 6px; }
.wp-block-post-excerpt__excerpt { margin: 0; }
.wp-block-post-excerpt__more-text { display: none; }

/* ---------- Front page: lead + latest ---------- */
.nx-top { margin-bottom: var(--wp--preset--spacing--50) !important; }
.nx-lead-title { line-height: 1.12 !important; margin: 6px 0 10px !important; }
.nx-lead-excerpt { color: var(--wp--preset--color--ink) !important; }
.nx-meta { gap: 10px !important; font-family: var(--nx-sans); font-size: 12px; color: var(--wp--preset--color--muted); margin-top: 10px; }
.nx-meta .wp-block-post-author-name { font-weight: 700; color: var(--wp--preset--color--ink); }

.nx-latest-list .wp-block-post-template > li { padding: 12px 0; border-bottom: 1px solid var(--wp--preset--color--line); margin: 0; }
.nx-latest-list .wp-block-post-template > li:first-child { padding-top: 0; }
.nx-latest-list .wp-block-post-title { line-height: 1.3; }

.nx-numbered .wp-block-post-template { counter-reset: nx; }
.nx-numbered .wp-block-post-template > li { counter-increment: nx; position: relative; padding-left: 38px !important; }
.nx-numbered .wp-block-post-template > li::before { content: counter(nx); position: absolute; left: 0; top: 10px; font: 800 26px/1 var(--wp--preset--font-family--serif); color: var(--wp--preset--color--red); }
.nx-numbered .wp-block-post-template > li:first-child::before { top: 0; }

.nx-strip { border-top: 1px solid var(--wp--preset--color--line); padding-top: var(--wp--preset--spacing--40); margin-bottom: var(--wp--preset--spacing--50); }
.nx-strip .wp-block-post-title { line-height: 1.3; }

/* ---------- Category sections ---------- */
.nx-cat { margin-bottom: var(--wp--preset--spacing--50); }
.nx-cat-head { border-top: 3px solid var(--wp--preset--color--navy); margin-bottom: 16px; }
.nx-cat-head .nx-section-title { border-top: 0; margin: 0; }
.nx-more { margin: 0; padding-top: 10px; font-family: var(--nx-sans); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.nx-more a { color: var(--wp--preset--color--red); text-decoration: none; }
.nx-cat-list .wp-block-post-template > li { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--wp--preset--color--line); }
.nx-cat-list .wp-block-post-template > li:last-child { border-bottom: 0; }
.nx-row { gap: 14px !important; margin: 0 !important; align-items: flex-start !important; }
.nx-row .wp-block-post-featured-image { margin: 0; }
.nx-row .wp-block-post-title { margin-top: 0 !important; line-height: 1.3; }

/* ---------- Single ---------- */
.nx-headline { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.85rem) !important; line-height: 1.12 !important; letter-spacing: -.01em; margin-top: 8px !important; margin-bottom: 12px !important; }
.nx-dek { font-size: 1.2rem !important; color: var(--wp--preset--color--muted); line-height: 1.5; margin-bottom: 16px; }
.nx-dek:empty { display: none; }
.nx-byline { gap: 14px !important; align-items: center; border-top: 1px solid var(--wp--preset--color--line); border-bottom: 1px solid var(--wp--preset--color--line); padding: 12px 0; margin-bottom: 22px; font-family: var(--nx-sans); font-size: 14px; }
.nx-byline .wp-block-post-author { align-items: center; }
.nx-byline .wp-block-post-author__avatar img { border-radius: 50%; }
.nx-byline .wp-block-post-author__name { font-weight: 700; }
.nx-byline .wp-block-post-author__byline { display: inline; margin-right: 4px; font-size: 14px; }
.nx-byline .wp-block-post-author__content { display: flex; align-items: baseline; }
.nx-byline-meta { gap: 10px !important; color: var(--wp--preset--color--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.nx-byline-meta p { margin: 0; }
.nx-hero { margin-bottom: 8px; }

.nx-body { font-size: 1.125rem; line-height: 1.75; }
.nx-body > * { max-width: 720px; }
.nx-body h2 { font-size: 1.6rem; margin-top: 2.2em; }
.nx-body h3 { font-size: 1.25rem; margin-top: 1.8em; }
.nx-body a { color: var(--wp--preset--color--blue); text-decoration: underline; text-decoration-thickness: 1px; }
.nx-body a:hover { color: var(--wp--preset--color--red); }
.nx-body blockquote { border-left: 4px solid var(--wp--preset--color--red); margin-left: 0; padding-left: 20px; font-style: italic; }
.nx-body figure { margin-left: 0; margin-right: 0; }
.nx-body figcaption, .nx-body .wp-caption-text { font-family: var(--nx-sans); font-size: 13px; color: var(--wp--preset--color--muted); }
.nx-body img { border-radius: 4px; max-width: 100%; }
.nx-body table { width: 100%; border-collapse: collapse; font-family: var(--nx-sans); font-size: 15px; }
.nx-body th, .nx-body td { border-bottom: 1px solid var(--wp--preset--color--line); padding: 8px; text-align: left; }
.nx-body ul, .nx-body ol { padding-left: 1.3em; }
.nx-body li { margin-bottom: .4em; }

.nx-tags { font-family: var(--nx-sans); font-size: 13px; margin-top: 28px; }
.nx-tags a { display: inline-block; background: var(--wp--preset--color--paper); color: var(--wp--preset--color--navy); padding: 3px 10px; border-radius: 999px; margin: 0 4px 6px 0; text-decoration: none; }
.nx-tags .wp-block-post-terms__separator { display: none; }
.nx-author-box { margin-top: 28px; }
.nx-author-box .wp-block-post-author__avatar img { border-radius: 50%; }
.nx-author-box .wp-block-post-author__name { font-family: var(--nx-sans); font-weight: 800; }
.nx-author-box .wp-block-post-author__bio { font-size: 15px; color: var(--wp--preset--color--muted); margin-top: 4px; }
.nx-corrections { color: var(--wp--preset--color--muted); font-family: var(--nx-sans); }

.nx-sticky { position: sticky; top: 72px; }
.nx-side-cta { margin-top: var(--wp--preset--spacing--40); }
.nx-side-cta .wp-block-button__link { background: var(--wp--preset--color--red); }
.nx-side-cta .wp-block-button__link:hover { background: var(--wp--preset--color--amber); color: var(--wp--preset--color--navy); }

/* ---------- Archive ---------- */
.nx-archive-head { border-bottom: 1px solid var(--wp--preset--color--line); padding-bottom: 14px; margin-bottom: var(--wp--preset--spacing--40); }
.nx-archive-head .wp-block-term-description { color: var(--wp--preset--color--muted); }
.nx-grid .wp-block-post-template { row-gap: var(--wp--preset--spacing--50) !important; }
.wp-block-query-pagination { margin-top: var(--wp--preset--spacing--50); font-weight: 700; }
.wp-block-query-pagination a, .wp-block-query-pagination span { padding: 6px 10px; }
.wp-block-query-pagination .current { background: var(--wp--preset--color--navy); color: #fff; border-radius: 4px; }

/* ---------- Newsletter ---------- */
.nx-newsletter { border-top: 4px solid var(--wp--preset--color--amber); }

/* ---------- Footer ---------- */
.nx-footer a { color: #fff; text-decoration: none; opacity: .85; }
.nx-footer a:hover { opacity: 1; color: var(--wp--preset--color--amber); }
.nx-footer-brand { font: 800 28px/1 var(--wp--preset--font-family--serif); margin-bottom: 12px; }
.nx-footer-brand span { color: var(--wp--preset--color--red); margin-left: 2px; }
.nx-footer-h { font-family: var(--nx-sans) !important; font-size: 12px !important; text-transform: uppercase; letter-spacing: .1em; color: var(--wp--preset--color--amber) !important; }
.nx-footer-list { list-style: none; padding: 0; font-family: var(--nx-sans); font-size: 14px; line-height: 2; }
.nx-footer-sep { border-color: rgba(255,255,255,.15) !important; margin: 28px 0 18px; }
.nx-legal { font-family: var(--nx-sans); opacity: .7; }
.nx-legal a { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
	.nx-strip .wp-block-post-template, .nx-related-q .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	.nx-grid .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 781px) {
	.nx-topbar-links { display: none; }
	.nx-masthead .wp-block-site-logo img { width: 170px !important; }
	.nx-search { max-width: 44px; }
	.nx-search .wp-block-search__input { display: none; }
	.nx-search .wp-block-search__inside-wrapper { padding: 2px; }
	.nx-sticky { position: static; }
	.nx-grid .wp-block-post-template { grid-template-columns: 1fr !important; }
	.nx-headline { font-size: 1.85rem !important; }
	.nx-body { font-size: 1.0625rem; }
}
@media (max-width: 600px) {
	.admin-bar .nx-navbar { top: 0; }
	.nx-strip .wp-block-post-template, .nx-related-q .wp-block-post-template { grid-template-columns: 1fr !important; }
}

/* ---------- Breadcrumbs & section intros ---------- */
.nx-breadcrumbs { font-family: var(--nx-sans); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nx-breadcrumbs a { color: var(--wp--preset--color--muted); text-decoration: none; }
.nx-breadcrumbs a:last-child { color: var(--wp--preset--color--red); }
.nx-breadcrumbs span { color: var(--wp--preset--color--line); }
.nx-archive-head .wp-block-term-description { max-width: 760px; font-size: 1.05rem; color: var(--wp--preset--color--ink); }
.nx-archive-head .wp-block-term-description p { margin: 0 0 12px; }
.nx-start-here { background: var(--wp--preset--color--paper); border-left: 4px solid var(--wp--preset--color--red); padding: 14px 18px; margin-top: 14px; border-radius: 0 6px 6px 0; }
.nx-start-here strong { font-family: var(--nx-sans); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--wp--preset--color--navy); }
.nx-start-here ul { margin: 8px 0 0; padding-left: 1.1em; font-size: 15px; }
.nx-start-here li { margin-bottom: 4px; }

/* ---------- HTML site map ---------- */
.nx-sitemap h2 { font-size: 1.3rem; border-top: 3px solid var(--wp--preset--color--navy); padding-top: 10px; margin-top: 2.2em; }
.nx-sitemap h2 a { color: var(--wp--preset--color--ink); text-decoration: none; }
.nx-sitemap ul { list-style: none; padding: 0; margin: 0; }
.nx-sitemap li { padding: 6px 0; border-bottom: 1px solid var(--wp--preset--color--line); font-size: 1rem; line-height: 1.4; }
.nx-sitemap li a { color: var(--wp--preset--color--ink); text-decoration: none; }
.nx-sitemap li a:hover { color: var(--wp--preset--color--blue); }
.nx-sitemap time, .nx-sitemap li span { font-family: var(--nx-sans); font-size: 12px; color: var(--wp--preset--color--muted); margin-left: 6px; white-space: nowrap; }
.nx-sitemap-sections, .nx-sitemap-pages { columns: 2; column-gap: 32px; }
.nx-sitemap-sections li, .nx-sitemap-pages li { break-inside: avoid; }
.nx-sitemap-xml { font-family: var(--nx-sans); font-size: 14px; color: var(--wp--preset--color--muted); margin-top: 2em; }
@media (max-width: 600px) { .nx-sitemap-sections, .nx-sitemap-pages { columns: 1; } }

/* ---------- Accessibility ---------- */
.nx-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px !important; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--wp--preset--color--amber); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .wp-block-post-featured-image img { transition: none; } .wp-block-post-featured-image a:hover img { transform: none; } }

/* ---------- WCAG 2.2 target size & small fixes ---------- */
.nx-section-title a { display: inline-block; padding: 5px 0; margin: -5px 0; }
.nx-more a { display: inline-block; padding: 4px 0; }
.nx-breadcrumbs span { color: var(--wp--preset--color--muted); }
.nx-breadcrumbs a { display: inline-block; padding: 4px 0; }
.nx-sitemap li a { display: inline-block; padding: 3px 0; }
.nx-footer-list a { display: inline-block; padding: 2px 0; }
.nx-topbar-links a { display: inline-block; padding: 4px 0; }
.nx-breadcrumbs .nx-crumb-current { color: var(--wp--preset--color--ink); }
.nx-page .nx-breadcrumbs, .nx-archive-head .nx-breadcrumbs { margin-bottom: 6px; }

/* Footer logo on a white badge (the logo artwork has a white background). */
.nx-footer .nx-footer-logo { display: inline-block; background: #fff; padding: 10px 14px; border-radius: 8px; margin: 0 0 14px; line-height: 0; }
.nx-footer .nx-footer-logo a { opacity: 1; }
.nx-footer .nx-footer-logo img { display: block; height: auto; }
@media (max-width: 781px) { .nx-footer .nx-footer-logo img { width: 170px !important; } }
