/*
 * Pages dark-theme pass (round 8). Loaded sitewide after base.css.
 *
 *   A. Page titles and text-page headings (Elementor single-page templates, not the homepage)
 *   B. Blog index (template 73, archive-posts widget "tv-post-archive") and Woostify blog fallback
 *   C. Single post (template 77; base.css section 11 sets the colours)
 *   D. Search results
 *   E. 404 (template 40)
 *   F. Consistency sweep: visible keyboard focus everywhere
 */

/* =================================================================
 * A. Page titles and text pages
 * =============================================================== */

/* Heading widgets with class "tv-page-title" (My Account, 404, Blog). */
html body .tv-page-title .elementor-heading-title {
	margin: 0;
	color: var(--bone);
	font-family: var(--font-display);
	font-size: clamp(44px, 6vw, 92px);
	font-weight: var(--fw-regular);
	letter-spacing: var(--ls-display);
	line-height: var(--lh-display);
	text-transform: uppercase;
}

/* Text pages (About, Contact, FAQ, Terms, Privacy, Shipping, Refund, Disclaimer, Age Policy, FDA Disclaimer…):
   every Elementor heading on a page that is not the homepage gets the display face; wording untouched. */
html body:not(.home) .elementor-location-single .elementor-widget-heading h1.elementor-heading-title,
html body.page:not(.home) .elementor-widget-heading h1.elementor-heading-title {
	color: var(--bone);
	font-family: var(--font-display);
	font-size: clamp(40px, 5.6vw, 84px);
	font-weight: var(--fw-regular);
	letter-spacing: var(--ls-display);
	line-height: 0.95;
	text-transform: uppercase;
}

html body:not(.home) .elementor-location-single .elementor-widget-heading h2.elementor-heading-title,
html body.page:not(.home) .elementor-widget-heading h2.elementor-heading-title {
	color: var(--bone);
	font-family: var(--font-display);
	font-size: clamp(30px, 3.6vw, 52px);
	font-weight: var(--fw-regular);
	letter-spacing: var(--ls-display);
	line-height: 1;
	text-transform: uppercase;
}

html body:not(.home) .elementor-location-single .elementor-widget-heading :is(h3, h4, h5, h6).elementor-heading-title,
html body.page:not(.home) .elementor-widget-heading :is(h3, h4, h5, h6).elementor-heading-title {
	color: var(--bone);
	font-family: var(--font-display);
	font-weight: var(--fw-regular);
	letter-spacing: var(--ls-display);
	line-height: 1.05;
	text-transform: uppercase;
}

/* Heading widgets set to p / div / span take the Kit's default heading colour (red, 3.91:1 at body size). */
html body:not(.home) .elementor-location-single .elementor-widget-heading :is(p, div, span).elementor-heading-title {
	color: var(--bone);
}

/* Running text inside text-editor widgets and classic page content: readable measure and line height. */
html body:not(.home) .elementor-location-single .elementor-widget-text-editor,
html body.page:not(.home):not(.woocommerce-page) .elementor-widget-text-editor,
html body.page:not(.home):not(.woocommerce-page) .entry-content {
	color: var(--lede);
	font-size: var(--fs-body);
	line-height: 1.75;
}

html body:not(.home) .elementor-location-single .elementor-widget-text-editor :is(h1, h2, h3, h4, h5, h6),
html body.page:not(.home):not(.woocommerce-page) .elementor-widget-text-editor :is(h1, h2, h3, h4, h5, h6),
html body.page:not(.home):not(.woocommerce-page) .entry-content :is(h1, h2, h3, h4, h5, h6) {
	margin: 1.6em 0 0.5em;
	color: var(--bone);
	font-family: var(--font-display);
	font-weight: var(--fw-regular);
	letter-spacing: var(--ls-display);
	line-height: 1.05;
	text-transform: uppercase;
}

html body:not(.home) .elementor-location-single .elementor-widget-text-editor h2,
html body.page:not(.home):not(.woocommerce-page) .entry-content h2 {
	font-size: clamp(26px, 3vw, 40px);
}

html body:not(.home) .elementor-location-single .elementor-widget-text-editor h3,
html body.page:not(.home):not(.woocommerce-page) .entry-content h3 {
	font-size: clamp(22px, 2.2vw, 30px);
}

html body:not(.home) .elementor-location-single .elementor-widget-text-editor h4,
html body.page:not(.home):not(.woocommerce-page) .entry-content h4 {
	font-size: 22px;
}

html body:not(.home) .elementor-location-single .elementor-widget-text-editor :is(strong, b),
html body.page:not(.home):not(.woocommerce-page) .entry-content :is(strong, b) {
	color: var(--bone);
}

html body:not(.home) .elementor-location-single .elementor-widget-text-editor a,
html body.page:not(.home):not(.woocommerce-page) .entry-content a {
	color: var(--gold);
	text-decoration: underline;
	text-underline-offset: 3px;
}

html body:not(.home) .elementor-location-single .elementor-widget-text-editor a:hover,
html body.page:not(.home):not(.woocommerce-page) .entry-content a:hover {
	color: var(--gold-soft);
}

/* Bordered dark panels for accordions / toggles (FAQ). */
html body .elementor-accordion .elementor-accordion-item,
html body .elementor-toggle .elementor-toggle-item,
html body .e-n-accordion-item {
	border: 1px solid var(--line);
	background: var(--panel);
}

html body .elementor-accordion .elementor-tab-title,
html body .elementor-toggle .elementor-tab-title,
html body .e-n-accordion-item-title {
	border-color: var(--line);
	background: transparent;
	color: var(--bone);
}

html body .elementor-accordion .elementor-tab-title a,
html body .elementor-toggle .elementor-tab-title a,
html body .e-n-accordion-item-title-text {
	color: var(--bone);
	font-weight: var(--fw-bold);
}

html body .elementor-accordion .elementor-tab-title.elementor-active a,
html body .elementor-toggle .elementor-tab-title.elementor-active a,
html body .elementor-accordion .elementor-accordion-icon,
html body .elementor-toggle .elementor-toggle-icon {
	color: var(--gold);
}

html body .elementor-accordion .elementor-tab-content,
html body .elementor-toggle .elementor-tab-content {
	border-color: var(--line);
	background: transparent;
	color: var(--lede);
}

/* Elementor icon lists and dividers on text pages. */
html body:not(.home) .elementor-location-single .elementor-icon-list-text {
	color: var(--lede);
}

html body:not(.home) .elementor-location-single .elementor-icon-list-icon i,
html body:not(.home) .elementor-location-single .elementor-icon-list-icon svg {
	color: var(--gold);
	fill: var(--gold);
}

html body:not(.home) .elementor-location-single .elementor-divider-separator {
	border-color: var(--line);
}

/* Elementor forms on text pages (Contact). */
html body:not(.home) .elementor-location-single .elementor-field-group .elementor-field-label {
	color: var(--bone);
}

html body:not(.home) .elementor-location-single .elementor-field-group .elementor-field:not(.elementor-select-wrapper),
html body:not(.home) .elementor-location-single .elementor-field-group .elementor-select-wrapper select {
	border: var(--border-w, 1px) solid var(--line);
	border-radius: 0;
	background-color: var(--canvas);
	color: var(--bone);
}

/* =================================================================
 * B. Blog index
 * =============================================================== */

/* Elementor archive-posts (cards skin) on template 73. */
html body .tv-post-archive .elementor-post__card {
	border: 1px solid var(--line);
	border-radius: 0;
	background: var(--panel);
	box-shadow: none;
}

html body .tv-post-archive .elementor-post__badge {
	border-radius: 0;
	background: var(--red);
	color: var(--on-red);
	font-family: var(--mono);
	font-size: var(--fs-micro);
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

html body .tv-post-archive .elementor-post__title,
html body .tv-post-archive .elementor-post__title a {
	color: var(--bone);
	font-family: var(--font-display);
	font-size: 24px;
	font-weight: var(--fw-regular);
	letter-spacing: var(--ls-display);
	line-height: 1.05;
	text-transform: uppercase;
}

html body .tv-post-archive .elementor-post__excerpt p {
	color: var(--lede);
}

html body .tv-post-archive .elementor-post__meta-data,
html body .tv-post-archive .elementor-post__card .elementor-post__meta-data {
	border-color: var(--line);
	color: var(--mute);
}

html body .tv-post-archive .elementor-post__read-more {
	color: var(--gold);
	font-weight: var(--fw-black);
	letter-spacing: var(--ls-button);
	text-transform: uppercase;
}

html body .tv-post-archive .elementor-post__avatar img {
	border-color: var(--panel);
}

/* Pagination (Elementor posts and WordPress archives). */
html body .elementor-pagination .page-numbers,
html body .pagination .page-numbers,
html body .nav-links .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 44px;
	min-height: 44px;
	margin: 0 3px;
	padding: 0 12px;
	border: 1px solid var(--line);
	background: var(--panel);
	color: var(--bone);
	text-decoration: none;
}

html body .elementor-pagination .page-numbers.current,
html body .pagination .page-numbers.current,
html body .nav-links .page-numbers.current {
	border-color: var(--bone);
	background: var(--bone);
	color: var(--ink);
}

html body .elementor-pagination a.page-numbers:hover,
html body .pagination a.page-numbers:hover,
html body .nav-links a.page-numbers:hover {
	border-color: var(--gold);
	color: var(--gold);
}

/* Woostify blog / search / post-category loop (used: template 73 has no display condition).
   Woostify's inline CSS paints ".blog .post-loop .post-meta-item" #2b2b2b (1.37:1 on canvas). */
html body:is(.blog, .archive, .search) .post-loop .loop-post-inner {
	margin-bottom: 28px;
	padding: 0 0 24px;
	border: 1px solid var(--line);
	background: var(--panel);
}

html body:is(.blog, .archive, .search) .post-loop .loop-post-inner > :not(.blog-post-image):not(.entry-header-image) {
	padding-right: 24px;
	padding-left: 24px;
}

html body:is(.blog, .archive, .search) .post-loop .post-meta-item,
html body:is(.blog, .archive, .search) .post-loop .post-meta-item a,
html body:is(.blog, .archive, .search) .post-loop .entry-meta {
	color: var(--mute);
}

html body:is(.blog, .archive, .search) .post-loop .entry-title,
html body:is(.blog, .archive, .search) .post-loop .entry-title a {
	color: var(--bone);
	font-family: var(--font-display);
	font-size: clamp(26px, 2.8vw, 40px);
	font-weight: var(--fw-regular);
	letter-spacing: var(--ls-display);
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
}

html body:is(.blog, .archive, .search) .post-loop .entry-title a:hover {
	color: var(--gold-soft);
}

html body:is(.blog, .archive, .search) .post-loop .entry-summary,
html body:is(.blog, .archive, .search) .post-loop .entry-content,
html body:is(.blog, .archive, .search) .post-loop .summary-text {
	color: var(--lede);
}

html body:is(.blog, .archive, .search) .post-loop .post-read-more a,
html body:is(.blog, .archive, .search) .post-loop .more-link {
	color: var(--gold);
	font-weight: var(--fw-black);
	letter-spacing: var(--ls-button);
	text-transform: uppercase;
}

/* Woostify blog / search loop (used when no Elementor archive template applies). */
html body .blog-layout-grid .site-main article,
html body.search .site-main article,
html body.archive:not(.woocommerce) .site-main article {
	border: 1px solid var(--line);
	background: var(--panel);
}

html body .site-main .entry-header .entry-title,
html body .site-main .entry-header .entry-title a,
html body .site-main .post-loop .entry-title a {
	color: var(--bone);
	font-family: var(--font-display);
	font-weight: var(--fw-regular);
	letter-spacing: var(--ls-display);
	text-transform: uppercase;
	text-decoration: none;
}

html body .site-main .entry-meta,
html body .site-main .entry-meta a,
html body .site-main .post-meta {
	color: var(--mute);
}

html body .site-main .entry-summary,
html body .site-main .entry-summary p {
	color: var(--lede);
}

/* =================================================================
 * C. Single post (template 77)
 * =============================================================== */

html body.single-post .elementor-widget-theme-post-title .elementor-heading-title {
	font-family: var(--font-display);
	font-size: clamp(36px, 4.6vw, 72px);
	font-weight: var(--fw-regular);
	letter-spacing: var(--ls-display);
	line-height: 0.98;
	text-transform: uppercase;
}

html body.single-post .elementor-widget-theme-post-content {
	font-size: var(--fs-body);
	line-height: 1.8;
}

html body.single-post .elementor-widget-theme-post-content :is(h2, h3, h4) {
	color: var(--bone);
	font-family: var(--font-display);
	font-weight: var(--fw-regular);
	letter-spacing: var(--ls-display);
	line-height: 1.05;
	text-transform: uppercase;
}

html body.single-post .elementor-widget-theme-post-content h2 {
	font-size: clamp(28px, 3vw, 42px);
}

html body.single-post .elementor-widget-theme-post-content h3 {
	font-size: clamp(22px, 2.2vw, 30px);
}

html body.single-post .elementor-widget-theme-post-content :is(table, th, td) {
	border-color: var(--line);
}

html body.single-post .elementor-widget-theme-post-content th {
	background: var(--panel);
	color: var(--bone);
}

html body.single-post .elementor-widget-theme-post-content blockquote {
	border-left: 4px solid var(--gold);
	background: var(--panel);
	color: var(--bone);
}

html body.single-post .elementor-author-box {
	padding: 20px;
	border: 1px solid var(--line);
	background: var(--panel);
}

html body.single-post .elementor-widget-heading .elementor-heading-title {
	font-family: var(--font-display);
	font-weight: var(--fw-regular);
	letter-spacing: var(--ls-display);
	text-transform: uppercase;
}

html body.single-post .elementor-widget-posts .elementor-post {
	border: 1px solid var(--line);
	background: var(--panel);
}

html body.single-post .elementor-widget-posts .elementor-post__text {
	padding: 16px;
}

html body.single-post .elementor-widget-posts .elementor-post__title a {
	font-family: var(--font-display);
	font-weight: var(--fw-regular);
	letter-spacing: var(--ls-display);
	text-transform: uppercase;
}

html body.single-post .elementor-widget-posts .elementor-post__read-more {
	color: var(--gold);
}

html body.single-post .elementor-widget-divider .elementor-divider-separator {
	border-color: var(--line);
}

/* Comments. */
html body .comments-area,
html body .elementor-widget-post-comments {
	color: var(--lede);
}

html body .comments-area .comment-body,
html body .elementor-widget-post-comments .comment-body {
	border-color: var(--line);
	background: var(--panel);
}

html body .comment-reply-title,
html body .comments-title {
	color: var(--bone);
	font-family: var(--font-display);
	font-weight: var(--fw-regular);
	text-transform: uppercase;
}

html body .comment-metadata a,
html body .comment-meta a {
	color: var(--mute);
}

/* Share buttons (flat skin): keep brand fills, white label; Twitter blue is too light for white text. */
html body .elementor-share-buttons--skin-flat .elementor-share-btn.elementor-share-btn_twitter,
html body .elementor-share-buttons--skin-flat .elementor-share-btn.elementor-share-btn_x-twitter,
html body .elementor-share-btn_twitter,
html body .elementor-share-btn_x-twitter {
	--e-share-buttons-primary-color: #0f5a8a;
	background-color: #0f5a8a;
}

/* =================================================================
 * D. Search results
 * =============================================================== */

html body.search .page-header .page-title,
html body.search .woostify-page-header h1 {
	color: var(--bone);
	font-family: var(--font-display);
	font-weight: var(--fw-regular);
	text-transform: uppercase;
}

html body.search .search-form .search-field,
html body .search-form input[type="search"] {
	border: var(--border-w, 1px) solid var(--line);
	border-radius: 0;
	background: var(--canvas);
	color: var(--bone);
}

/* =================================================================
 * E. 404 (template 40)
 * =============================================================== */

html body.error404 .tv-404-text,
html body.error404 .tv-404-text p {
	color: var(--lede);
	font-size: var(--fs-lede);
}

html body.error404 .elementor-widget-icon-list .elementor-icon-list-text {
	color: var(--lede);
}

html body.error404 .elementor-divider-separator {
	border-color: var(--line);
}

/* =================================================================
 * F. Visible keyboard focus on every interactive element
 *    (base.css sets the ring for links and buttons; this adds the controls it missed)
 * =============================================================== */

html body :is(a, button, input, select, textarea, summary, [role="button"], [tabindex]:not([tabindex="-1"])):focus-visible {
	outline: 3px solid var(--gold);
	outline-offset: 2px;
	box-shadow: none;
}

html body :is(input[type="text"], input[type="email"], input[type="search"], input[type="password"], input[type="tel"], input[type="number"], select, textarea):focus-visible {
	outline-offset: 0;
}

/* Elements that clip their outline (overflow hidden) get an inset ring instead. */
html body :is(.tv-prod, ul.products li.product, .tv-fighter, .elementor-post) :is(a, button):focus-visible {
	outline-offset: -3px;
}

/* =================================================================
 * G. Elementor button widgets without their own colours.
 *    The Elementor Kit paints ".elementor-kit-32 .elementor-button" white on gold (2.17:1), which beat
 *    base.css's "body .elementor-button". Default = red primary. Widgets with any "tv-" class keep their own styles (base.css, home.css).
 * =============================================================== */
html body .elementor-widget-button:not([class*="tv-"]) a.elementor-button,
html body .elementor-widget-button:not([class*="tv-"]) .elementor-button {
	background-color: var(--red);
	color: var(--on-red);
}

html body .elementor-widget-button:not([class*="tv-"]) a.elementor-button:hover,
html body .elementor-widget-button:not([class*="tv-"]) .elementor-button:hover {
	background-color: var(--red-hover);
	color: var(--on-red);
}

/* =================================================================
 * H. Older blog posts pasted from Google Docs (70 posts): inline spans carry
 *    "color: #000000; background-color: #ffffff; font-family: 'Times New Roman'; font-size: 15pt"
 *    and links "#1155cc". Inline styles need !important; scope is post content only, wording untouched.
 * =============================================================== */
html body.single-post .elementor-widget-theme-post-content :is(span, p, li, strong, b, em, h2, h3, h4, td)[style*="color"],
html body.single-post .elementor-widget-theme-post-content :is(span, p, li, strong, b, em, h2, h3, h4, td)[style*="background"],
html body.single-post .elementor-widget-theme-post-content :is(span, p, li, strong, b, em)[style*="font-family"] {
	background-color: transparent !important;
	color: inherit !important;
	font-family: inherit !important;
	font-size: inherit !important;
}

html body.single-post .elementor-widget-theme-post-content a [style*="color"],
html body.single-post .elementor-widget-theme-post-content a[style*="color"] {
	color: var(--gold) !important;
}

html body.single-post .elementor-widget-theme-post-content :is(h2, h3, h4) :is(span, strong, b)[style] {
	font-family: inherit !important;
	text-transform: inherit;
}

/* WPC AJAX Search panel: the plugin's ".wpcas-area .wpcas-area-top .wpcas-close" (#222, 1.27:1 on the panel)
   beat header.css; same chain plus "html body" wins. */
html body .wpcas-area .wpcas-area-top .wpcas-close {
	color: var(--bone);
	opacity: 1;
}

html body .wpcas-area .wpcas-area-top .wpcas-close:hover,
html body .wpcas-area .wpcas-area-top .wpcas-close:focus-visible {
	color: var(--gold);
}
