/*
Theme Name: WP Eternal — WWW Front Door
Theme URI: https://github.com/One-World-By-Night/wp-eternal-www
Template: wp-eternal-theme
Description: The OWBN sites' child theme (www.owbn.net, sso, archivist, council, support, chronicles). Layers a balanced modern-gothic design-token system over WP Eternal Theme. Atmospheric on landing/genre pages, clean on utility pages. WCAG-AA. Dark Pack compliant (mood, not marks).
Author: One World By Night
Author URI: https://owbn.net
Version: 0.2.13
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: wp-eternal-www
*/

/* =====================================================================
   www.owbn.net front-door design tokens  (balanced modern gothic)
   All text colors below are checked for WCAG-AA on --www-bg.
   The second block re-maps the PARENT theme's existing --owbn-* and
   --e-global-color-* variables onto these tokens, so the whole theme
   and its WP-Dark-Mode CSS adopt the new system instead of fighting it.
   ===================================================================== */
:root {
	/* Surfaces — LIGHT is the base palette; WP Dark Mode toggles dark below */
	--www-bg:            #efece6;          /* parchment page */
	--www-bg-elev:       #ffffff;          /* cards / elevated surfaces */
	--www-bg-elev-2:     #f4f1ea;
	--www-overlay:       rgba(255, 255, 255, 0.55);
	--www-panel-bg:      rgba(255, 253, 249, 0.78); /* frosted content panels */

	/* Text (AA on --www-bg) */
	--www-text:          #211f1c;
	--www-text-dim:      #524d46;
	--www-text-faint:    #7d766b;

	/* Brand + accents */
	--www-red:           #C11F26;          /* OWBN red — fills (white text) */
	--www-red-bright:    #A81A20;          /* link/accent, AA on parchment */
	--www-burgundy:      #6b3a52;
	--www-gold:          #8a6d22;

	/* Lines */
	--www-border:        rgba(0, 0, 0, 0.14);
	--www-border-strong: #d9d3c8;

	/* Typography */
	--www-font-display: "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;
	--www-font-body:    system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--www-fs--1:  clamp(0.83rem, 0.80rem + 0.15vw, 0.90rem);
	--www-fs-0:   clamp(1.00rem, 0.95rem + 0.25vw, 1.125rem);
	--www-fs-1:   clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
	--www-fs-2:   clamp(1.6rem, 1.4rem + 1vw, 2.25rem);
	--www-fs-3:   clamp(2.1rem, 1.7rem + 2vw, 3.25rem);
	--www-fs-hero: clamp(2.6rem, 2.0rem + 3.2vw, 4.5rem);
	--www-leading-body: 1.65;
	--www-leading-tight: 1.12;

	/* Spacing scale */
	--www-space-1: 0.25rem;
	--www-space-2: 0.5rem;
	--www-space-3: 0.75rem;
	--www-space-4: 1rem;
	--www-space-5: 1.5rem;
	--www-space-6: 2rem;
	--www-space-7: 3rem;
	--www-space-8: 5rem;

	/* Shape */
	--www-radius: 10px;
	--www-radius-sm: 6px;
	--www-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
	--www-maxw: 72rem;
}

/* ---- Re-map parent tokens onto the front-door system ---- */
:root {
	--owbn-background:         var(--www-bg);
	--owbn-background-dark:    var(--www-bg);
	--owbn-background-darker:  var(--www-bg);
	--owbn-dark-background:    var(--www-bg);
	--owbn-text-light:         var(--www-text);
	--owbn-dark-text-primary:  var(--www-text);
	--owbn-dark-text-secondary:var(--www-text-dim);
	--owbn-border-dark:        var(--www-border-strong);
	--owbn-dark-border:        var(--www-border-strong);
	--owbn-link:               var(--www-red-bright);
	--owbn-link-hover:         var(--www-gold);
	--owbn-accent-coral:       var(--www-red-bright);
	--owbn-accent-burgundy:    var(--www-burgundy);
	--owbn-button-primary:     var(--www-red);
	--owbn-button-hover:       var(--www-red-bright);

	/* Elementor global-color fallbacks the parent's dark-mode CSS references */
	--e-global-color-bcd8248:  var(--www-text);
	--e-global-color-42f8237:  var(--www-text);
	--e-global-color-e21451c:  var(--www-red);

	/* Parent card/header atmosphere */
	--wp-eternal-link-accent:  var(--www-red-bright);
	--wp-eternal-header-bg:    var(--www-overlay);
	--wp-eternal-border-subtle: var(--www-border);
}

/* =====================================================================
   Base
   ===================================================================== */
html { background-color: var(--www-bg); }
body {
	margin: 0;
	background: transparent;
	color: var(--www-text);
	font-family: var(--www-font-body);
	font-size: var(--www-fs-0);
	line-height: var(--www-leading-body);
	-webkit-font-smoothing: antialiased;
}

/* (background lives on <html>, above) */

h1, h2, h3, h4,
.elementor-heading-title {
	font-family: var(--www-font-display);
	line-height: var(--www-leading-tight);
	letter-spacing: 0.01em;
	color: var(--www-text);
}

a { color: var(--www-red-bright); text-decoration: none; }
a:hover, a:focus { color: var(--www-gold); }

/* Accessibility: visible focus + skip link */
:focus-visible { outline: 2px solid var(--www-gold); outline-offset: 2px; }
.www-skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 10000;
	background: var(--www-red); color: #fff; padding: var(--www-space-3) var(--www-space-5);
	border-radius: 0 0 var(--www-radius-sm) 0;
}
.www-skip-link:focus { left: 0; color: #fff; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   Buttons — red fill, white text (AA), gold on hover
   ===================================================================== */
.elementor-widget-button .elementor-button,
.elementor-widget-button .elementor-button:visited {
	background-color: var(--www-red);
	color: #fff;
	border: 2px solid var(--www-red);
	border-radius: var(--www-radius-sm);
	font-family: var(--www-font-body);
	font-weight: 600;
	letter-spacing: 0.02em;
}
.elementor-widget-button .elementor-button:hover,
.elementor-widget-button .elementor-button:focus { background-color: #E23A32 !important; border-color: #E23A32; color: #fff; } /* !important: the parent theme sets a transparent hover background with !important */
.wp-block-button__link,
.www-btn {
	background: transparent;
	color: var(--www-red-bright);
	border: 2px solid var(--www-red-bright);
	border-radius: var(--www-radius-sm);
	font-family: var(--www-font-body);
	font-weight: 600;
	letter-spacing: 0.02em;
}
.wp-block-button__link:hover,
.www-btn:hover { background: var(--www-red); color: #fff; border-color: var(--www-red); }

/* =====================================================================
   Utilities for the "atmospheric" landing/genre pages
   (utility pages stay clean by simply not using these)
   ===================================================================== */
.www-hero {
	position: relative;
	color: var(--www-text);
	background: var(--www-bg-elev);
	background-size: cover;
	background-position: center;
}
.www-hero::before {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, var(--www-overlay) 0%, rgba(13,11,18,0.88) 100%);
}
.www-hero > * { position: relative; z-index: 1; }
.www-hero h1 { font-size: var(--www-fs-hero); }

.www-card {
	background: var(--www-bg-elev);
	border: 1px solid var(--www-border);
	border-radius: var(--www-radius);
	box-shadow: var(--www-shadow);
	padding: var(--www-space-6);
}
/* A button row at the end of a card sits on the card's bottom edge, so buttons line up across a row of cards. */
.www-card.e-flex > .e-con:last-child:has(.elementor-widget-button),
.www-card.e-flex > .elementor-widget-button:last-child { margin-top: auto; }

/* Constrain long-form reading measure for legibility */
.www-prose { max-width: 42rem; }
.www-prose p { margin-block: 0 var(--www-space-5); color: var(--www-text); }

/* =====================================================================
   Dark Pack compliance block (rendered sitewide via wp_footer)
   ===================================================================== */
.www-darkpack {
	background: var(--www-bg);
	border-top: 1px solid var(--www-border);
	padding: var(--www-space-6) var(--www-space-5);
}
.www-darkpack__inner {
	max-width: var(--www-maxw);
	margin: 0 auto;
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: var(--www-space-5);
}
.www-darkpack__inner > div { flex: 1 1 auto; }
@media (max-width: 600px) { .www-darkpack__inner { flex-wrap: wrap; } }
.www-darkpack__logo {
	display: block;
	width: 96px;
	height: auto;
	flex: 0 0 auto;
	opacity: 0.92;
	background: rgba(13, 11, 18, 0.92);
	padding: 10px 12px;
	border-radius: var(--www-radius-sm);
}
.www-darkpack__logo-link { flex: 0 0 auto; display: inline-block; }
.www-darkpack__text {
	margin: 0 0 var(--www-space-2);
	color: var(--www-text-dim);
	font-size: var(--www-fs--1);
	line-height: 1.5;
	flex: 1 1 20rem;
}
.www-darkpack__text a { color: var(--www-red-bright); }
.www-darkpack__disclaimer { color: var(--www-text-faint); margin-bottom: 0; }
.www-darkpack__credit { margin: var(--www-space-3) 0 0; color: var(--www-text-faint); font-size: var(--www-fs--1); opacity: 0.85; }

/* =====================================================================
   Palette enforcement — no blue. Override WordPress core + plugin blues.
   ===================================================================== */
:root {
	/* Neutralize WP core preset blues wherever referenced */
	--wp--preset--color--vivid-cyan-blue: var(--www-red-bright);
	--wp--preset--color--pale-cyan-blue: var(--www-gold);
	--wp--preset--color--cyan-bluish-gray: var(--www-text-dim);
	/* WP Dark Mode accent */
	--wp-dark-mode-accent: var(--www-red);
	--wpdm-primary-color: var(--www-red);
}
.entry-content a,
.wp-block-post-content a { color: var(--www-red-bright); }
.entry-content a:hover,
.wp-block-post-content a:hover { color: var(--www-gold); }

.wp-block-button__link,
.wp-element-button {
	background-color: transparent !important;
	color: var(--www-red-bright) !important;
	border: 2px solid var(--www-red-bright) !important;
	padding: 0.7em 1.5em;
	font-weight: 600;
}
.wp-block-button__link:hover,
.wp-element-button:hover {
	background-color: var(--www-red) !important;
	border-color: var(--www-red) !important;
	color: #fff !important;
}
.wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent !important;
	color: var(--www-red-bright) !important;
	border: 2px solid var(--www-red-bright) !important;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background-color: var(--www-red) !important;
	color: #fff !important;
	border-color: var(--www-red) !important;
}
/* WP Dark Mode floating switch — recolor away from its default blue */
[class*="wp-dark-mode-switch"],
.wp-dark-mode-switcher .mode-switch { background-color: var(--www-red) !important; }

/* =====================================================================
   Layout & spacing — the theme ships none for block content.
   Wrapper chain: main#content > article > .entry-content > blocks
   ===================================================================== */
main#content {
	padding: var(--www-space-7) clamp(1rem, 5vw, 4rem);
}
.entry-content {
	max-width: 64rem;
	margin-inline: auto;
}
.entry-content > * { margin-block: var(--www-space-6) 0; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { margin-block: var(--www-space-7) var(--www-space-3); }
.entry-content h3 { margin-block: var(--www-space-5) var(--www-space-2); }
.entry-content p { margin: 0 0 var(--www-space-4); }
.entry-content .wp-block-buttons { gap: var(--www-space-4); margin-block: var(--www-space-5); }
.entry-content .wp-block-separator { margin-block: var(--www-space-7); border-color: var(--www-border); opacity: 1; }
.entry-content .wp-block-columns { gap: var(--www-space-6); margin-block: var(--www-space-6); }
.entry-content .wp-block-column > *:first-child { margin-top: 0; }

/* Hero (cover block) */
.owbn-hero {
	padding: var(--www-space-8) var(--www-space-5);
	background-image: linear-gradient(160deg, var(--www-burgundy) 0%, var(--www-bg) 72%);
	border-radius: var(--www-radius);
	text-align: center;
}
.owbn-hero .wp-block-cover__inner-container { max-width: 52rem; margin-inline: auto; width: 100%; }
.owbn-hero h2 { margin-top: 0; font-size: var(--www-fs-hero); }
.owbn-hero .wp-block-buttons { justify-content: center; }

/* Closing CTA band */
.owbn-cta-band {
	padding: var(--www-space-8) var(--www-space-5);
	margin-top: var(--www-space-7);
	background: linear-gradient(180deg, var(--www-bg-elev) 0%, var(--www-bg) 100%);
	border-block: 1px solid var(--www-border);
	border-radius: var(--www-radius);
}
.owbn-cta-band .wp-block-buttons { justify-content: center; }

/* ALL button groups: centered vertical stack, equal width — the clean
   "divider" look between sections, everywhere (hero, CTAs, and in content). */
.entry-content .wp-block-buttons {
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--www-space-3);
}
.entry-content .wp-block-buttons .wp-block-button {
	width: 100%;
	max-width: 22rem;
}
.entry-content .wp-block-buttons .wp-block-button__link {
	display: block;
	width: 100%;
	text-align: center;
}

/* =====================================================================
   Content floats in semi-transparent frosted panels OVER the map bg.
   The map (body::before/::after) is the back-back layer; these panels
   sit in front of it and let it show through faintly.
   ===================================================================== */
.entry-content > .wp-block-group,
.entry-content > section {
	background: var(--www-panel-bg);
	border: 1px solid var(--www-border);
	border-radius: var(--www-radius);
	padding: clamp(1.25rem, 4vw, 3rem);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
	margin-block: var(--www-space-6);
}
/* Hero + closing CTA keep their mood but stay semi-transparent */
.entry-content > .owbn-hero {
	background: linear-gradient(160deg, rgba(107, 58, 82, 0.14) 0%, rgba(255, 253, 249, 0.55) 72%);
	padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 4vw, 3rem);
	text-align: center;
}
.entry-content > .owbn-closing-cta {
	background: linear-gradient(180deg, rgba(244, 241, 234, 0.82) 0%, rgba(239, 236, 230, 0.70) 100%);
	text-align: center;
}


/* =====================================================================
   News & Events feed ([www_news] shortcode, home page)
   ===================================================================== */
.owbn-news {
	background: var(--www-panel-bg);
	border: 1px solid var(--www-border);
	border-radius: var(--www-radius);
	padding: clamp(1.25rem, 4vw, 3rem);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
	margin-block: var(--www-space-6);
}
.owbn-news__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: var(--www-space-5);
	margin-top: var(--www-space-5);
}
.owbn-news__link {
	display: block;
	height: 100%;
	padding: var(--www-space-5);
	background: var(--www-bg-elev);
	border: 1px solid var(--www-border);
	border-radius: var(--www-radius-sm);
	color: var(--www-text);
	transition: border-color 0.15s ease;
}
.owbn-news__link:hover { border-color: var(--www-red-bright); color: var(--www-text); }
.owbn-news__date { display: block; color: var(--www-text-faint); font-size: var(--www-fs--1); text-transform: uppercase; letter-spacing: 0.06em; }
.owbn-news__title { font-size: var(--www-fs-1); margin: var(--www-space-2) 0; }
.owbn-news__excerpt { color: var(--www-text-dim); margin: 0; }
.owbn-news__more { margin-top: var(--www-space-5); }
.owbn-news__more a { color: var(--www-red-bright); font-weight: 600; }
.owbn-news__empty { color: var(--www-text-dim); }


/* =====================================================================
   DARK MODE — our gothic palette, applied when WP Dark Mode is active
   (it adds .wp-dark-mode-active to <html>). Light is the base, above.
   ===================================================================== */
html.wp-dark-mode-active {
	--www-bg:            #0d0b12;
	--www-bg-elev:       #16121b;
	--www-bg-elev-2:     #1e1922;
	--www-overlay:       rgba(4, 4, 11, 0.55);
	--www-panel-bg:      rgba(22, 18, 27, 0.60);
	--www-text:          #ECEAE6;
	--www-text-dim:      #B7B2AC;
	--www-text-faint:    #8A857F;
	--www-red:           #D2242C;
	--www-red-bright:    #F0533B;
	--www-burgundy:      #412234;
	--www-gold:          #C9A84C;
	--www-border:        rgba(255, 255, 255, 0.14);
	--www-border-strong: #2b2530;
	background-color: var(--www-bg);
}
html.wp-dark-mode-active .entry-content > .owbn-hero {
	background: linear-gradient(160deg, rgba(65, 34, 52, 0.72) 0%, rgba(13, 11, 18, 0.50) 72%);
}
html.wp-dark-mode-active .entry-content > .owbn-closing-cta {
	background: linear-gradient(180deg, rgba(30, 25, 34, 0.72) 0%, rgba(13, 11, 18, 0.60) 100%);
}


/* =====================================================================
   WP Dark Mode Ultimate — drive ITS dark palette from OUR colors so the
   plugin's built-in dark styling (buttons/links/text/inputs) uses our
   design instead of its blue preset. (High specificity + !important to
   win over the active preset.)
   ===================================================================== */
html[data-wp-dark-mode-preset] {
	--wpdm-background-color: #0d0b12 !important;
	--wpdm-text-color: #ECEAE6 !important;
	--wpdm-link-color: #F0533B !important;
	--wpdm-link-hover-color: #C9A84C !important;
	/* Buttons: default = transparent bg + red text + red border; hover = red fill + white text. */
	--wpdm-button-background-color: transparent !important;
	--wpdm-button-hover-background-color: #C11F26 !important;
	--wpdm-button-text-color: #E23A32 !important;
	--wpdm-button-hover-text-color: #ffffff !important;
	--wpdm-border-color: #2b2530 !important;
	--wpdm-button-border-color: #E23A32 !important;
	--wpdm-button-hover-border-color: #C11F26 !important;
	--wpdm-button-color: #E23A32 !important;
	--wpdm-accent-color: #C11F26 !important;
	--wpdm-input-background-color: #16121b !important;
	--wpdm-input-placeholder-color: #8A857F !important;
}

/* Belt-and-suspenders: force the exact button look in dark mode regardless of
   which --wpdm-* var the active preset actually consumes (esp. hover text). */
html.wp-dark-mode-active .wp-block-button__link,
html.wp-dark-mode-active .wp-element-button,
html.wp-dark-mode-active .elementor-button,
html.wp-dark-mode-active .www-btn {
	background: transparent !important;
	color: #E23A32 !important;
	border: 2px solid #E23A32 !important;
}
html.wp-dark-mode-active .wp-block-button__link:hover,
html.wp-dark-mode-active .wp-element-button:hover,
html.wp-dark-mode-active .elementor-button:hover,
html.wp-dark-mode-active .www-btn:hover {
	background: #C11F26 !important;
	color: #ffffff !important;
	border-color: #C11F26 !important;
}


/* =====================================================================
   Keep the city map visible in DARK mode. WP Dark Mode paints <body>
   with its background color, covering the map (which lives on <html>).
   Force body transparent in dark, out-specifying the plugin's body rule
   (adds [lang] + :not(preset0) so it beats html.wp-dark-mode-active body).
   ===================================================================== */
html[lang].wp-dark-mode-active:not([data-wp-dark-mode-preset="0"]) body {
	background-color: transparent !important;
	background-image: none !important;
}


/* =====================================================================
   Map background layer. A fixed element INSIDE <body> (so it paints over
   whatever background WP Dark Mode gives html/body), marked
   wp-dark-mode-ignore so the plugin never restyles it. City map + depth
   glow; swaps light<->dark by the .wp-dark-mode-active class.
   ===================================================================== */
.www-map-bg {
	position: fixed;
	inset: 0;
	z-index: -10;
	pointer-events: none;
	background-color: var(--www-bg);
	background-image:
		radial-gradient(130% 100% at 50% -12%, rgba(107, 58, 82, 0.14) 0%, rgba(239, 236, 230, 0) 55%),
		linear-gradient(rgba(239, 236, 230, 0.06), rgba(239, 236, 230, 0.18)),
		var(--www-citymap-light, none);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}
html.wp-dark-mode-active .www-map-bg {
	background-color: #0d0b12;
	background-image:
		radial-gradient(130% 100% at 50% -12%, rgba(65, 34, 52, 0.34) 0%, rgba(13, 11, 18, 0) 55%),
		radial-gradient(90% 80% at 50% 120%, rgba(65, 34, 52, 0.14) 0%, rgba(13, 11, 18, 0) 60%),
		linear-gradient(rgba(13, 11, 18, 0.08), rgba(13, 11, 18, 0.20)),
		var(--www-citymap-dark, none);
}

/* Logged-in member bar (home) */
.www-member-bar { max-width: var(--www-maxw); margin: var(--www-space-4) auto 0; padding: var(--www-space-3) var(--www-space-5); background: var(--www-panel-bg); border: 1px solid var(--www-border); border-radius: var(--www-radius-sm); text-align: center; }
.www-member-bar p { margin: 0; }
.www-member-bar__cta { font-weight: 700; }
.www-member-bar__sub { color: var(--www-text-faint); font-size: var(--www-fs--1); margin-left: var(--www-space-2); }


/* =====================================================================
   Hamburger (mobile/tablet) menu, top-level labels in LIGHT mode.
   The dropdown panel is dark in every mode, so resting labels keep the parent
   theme's white. Only the hovered, focused, current and open items sit on the
   parchment color, so only those get dark text. Scoped
   html:not(.wp-dark-mode-active); dark mode is untouched.
   ===================================================================== */
html:not(.wp-dark-mode-active) .elementor-nav-menu--dropdown a.elementor-item:focus,
html:not(.wp-dark-mode-active) .elementor-nav-menu--dropdown a.elementor-item.elementor-item-active,
html:not(.wp-dark-mode-active) .elementor-nav-menu--dropdown a.elementor-item.highlighted {
	color: var(--www-text) !important;
}
html:not(.wp-dark-mode-active) .elementor-nav-menu--dropdown a.elementor-item:hover {
	color: var(--www-red-bright) !important;
}
/* Light mode: hovered, focused, current and open top-level items sit on the parchment color. */
html:not(.wp-dark-mode-active) .elementor-nav-menu--dropdown a.elementor-item:hover,
html:not(.wp-dark-mode-active) .elementor-nav-menu--dropdown a.elementor-item:focus,
html:not(.wp-dark-mode-active) .elementor-nav-menu--dropdown a.elementor-item.elementor-item-active,
html:not(.wp-dark-mode-active) .elementor-nav-menu--dropdown a.elementor-item.highlighted {
	background-color: var(--www-bg) !important;
}


/* =====================================================================
   Sect / faction cards — prominent deep-link grid used on genre pages
   (e.g. Vampire → Camarilla/Sabbat/Anarch/Independent). Whole card is a
   link. Themed via tokens so light/dark both work.
   ===================================================================== */
.www-sect-cards {
	display: grid;
	grid-template-columns: repeat(2, 1fr);   /* 4 sects → 2×2 */
	gap: var(--www-space-4);
	margin: var(--www-space-4) 0 var(--www-space-5);
}
@media (max-width: 560px) { .www-sect-cards { grid-template-columns: 1fr; } }
/* wpautop inserts <br> between block-level links inside these grids; a <br> is
   a grid item and eats a cell, collapsing the grid to one column. Drop them. */
.www-sect-cards br,
.www-clan-chips br { display: none; }
.www-sect-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: var(--www-space-4);
	background: var(--www-panel-bg);
	border: 1px solid var(--www-border);
	border-radius: var(--www-radius-sm);
	text-decoration: none;
	color: var(--www-text);
	transition: border-color .15s ease, transform .15s ease;
}
.www-sect-card:hover,
.www-sect-card:focus-visible {
	border-color: var(--www-red-bright);
	transform: translateY(-2px);
}
.www-sect-card__name { font-family: var(--www-font-display); font-size: var(--www-fs-1); color: var(--www-text); line-height: var(--www-leading-tight); }
.www-sect-card__tag { font-size: var(--www-fs--1); color: var(--www-red-bright); text-transform: uppercase; letter-spacing: .04em; }
.www-sect-card__desc { color: var(--www-text-dim); font-size: var(--www-fs-0); line-height: var(--www-leading-body); }
.www-sect-card__cta { margin-top: auto; padding-top: var(--www-space-2); color: var(--www-red-bright); font-weight: 700; }
.www-sect-card:hover .www-sect-card__cta { color: var(--www-gold); }

/* Clan chips — name-only blocks that share the sect cards' EXACT semitransparent
   surface (same panel background, border, radius), just smaller. */
.www-clan-chips {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: var(--www-space-3);
	margin: var(--www-space-3) 0 var(--www-space-5);
}
.www-clan-chip {
	display: block;
	padding: var(--www-space-3) var(--www-space-4);
	background: var(--www-panel-bg);          /* same token as .www-sect-card */
	border: 1px solid var(--www-border);
	border-radius: var(--www-radius-sm);
	text-decoration: none;
	color: var(--www-text);
	font-family: var(--www-font-display);
	font-size: var(--www-fs-0);
	text-align: center;
	transition: border-color .15s ease, color .15s ease, transform .15s ease;
}
.www-clan-chip:hover,
.www-clan-chip:focus-visible {
	border-color: var(--www-red-bright);
	color: var(--www-red-bright);
	transform: translateY(-2px);
}

/* "Content Pending Coordinator Approval" — yellow warning label on genre pages. */
.www-pending-approval {
	display: block;
	margin: 0 0 var(--www-space-4);
	padding: var(--www-space-2) var(--www-space-4);
	background: #fdf3cf;
	border: 1px solid #f0d675;
	border-left: 4px solid #d9a400;
	border-radius: var(--www-radius-sm);
	color: #6b5200;
	font-size: var(--www-fs--1);
	font-weight: 700;
	letter-spacing: .02em;
	text-transform: uppercase;
}
.www-pending-approval p {
	margin: 0;
}
html.wp-dark-mode-active .www-pending-approval {
	background: #332b0e;
	border-color: #5c4d1a;
	border-left-color: #d9a400;
	color: #ffdf80;
}

/* Chronicle/coordinator detail pages render inside owbn-entities' full-width
   template wrapper (#content.owc-template-wrapper) with the detail set to
   max-width:none — with nothing centering it, it rams to the left edge. So
   constrain + center the wrapper itself. */
#content.owc-template-wrapper,
.owc-template-wrapper {
	max-width: var(--www-maxw) !important;
	margin-inline: auto !important;
	padding-inline: var(--www-space-5);
	box-sizing: border-box;
}

/* Header on tablets and phones: logo column first, on the left; the menu dropdown opens full width at the header's bottom edge. */
@media (max-width: 1024px) {
	.main--header > .elementor-container > div.site--logo--section.elementor-column {
		order: 0;
	}
	.main--header.elementor-section > .elementor-container,
	.main--header .heade--navbar--sec.elementor-column,
	.main--header .heade--navbar--sec .elementor-widget-wrap,
	.main--header .heade--navbar--sec .elementor-widget-nav-menu,
	.main--header .heade--navbar--sec .elementor-widget-nav-menu > .elementor-widget-container {
		position: static;
	}
	.main--header.elementor-section nav.elementor-nav-menu--dropdown.elementor-nav-menu__container {
		top: 100% !important;
		left: 0 !important;
		width: 100% !important;
		margin-top: 0 !important;
	}
	/* Open menu: fills the screen below the header and scrolls inside itself. */
	.main--header .elementor-menu-toggle.elementor-active + nav.elementor-nav-menu__container {
		max-height: calc(100dvh - 135px) !important;
		overflow-y: auto !important;
		overscroll-behavior: contain;
	}
	.main--header.active .elementor-menu-toggle.elementor-active + nav.elementor-nav-menu__container {
		max-height: calc(100dvh - 91px) !important;
	}
	.admin-bar .main--header .elementor-menu-toggle.elementor-active + nav.elementor-nav-menu__container {
		max-height: calc(100dvh - 181px) !important;
	}
	.admin-bar .main--header.active .elementor-menu-toggle.elementor-active + nav.elementor-nav-menu__container {
		max-height: calc(100dvh - 137px) !important;
	}
}

/* Header on phones: logo and menu button in one row, and the same space above the content as on tablets. */
@media (max-width: 767px) {
	.main--header.elementor-section > .elementor-container {
		flex-wrap: nowrap;
		align-items: center;
	}
	.main--header > .elementor-container > div.site--logo--section.elementor-column {
		flex: 0 0 auto;
		width: auto;
	}
	.main--header > .elementor-container > div.heade--navbar--sec.elementor-column {
		flex: 1 1 0;
		min-width: 0;
		width: auto;
	}
	html header.elementor-location-header.elementor {
		padding-top: 30px;
	}
}

/* Phones: language switcher sits left of the dark-mode switch, and the page ends above the floating buttons. */
@media (max-width: 767px) {
	nav.trp-language-switcher.trp-floating-switcher {
		right: 80px !important;
	}
	.www-darkpack {
		padding-bottom: calc(var(--www-space-6) + 72px);
	}
}

/* Footer line links: underlined, in the line's own color, never split across lines. */
.elementor-location-footer .elementor-heading-title a {
	text-decoration: underline;
	text-underline-offset: .2em;
	white-space: nowrap;
}

/* Links inside body text: underlined, so they read as links in light and dark mode. */
.elementor-widget-text-editor :is(p, li) a {
	text-decoration: underline;
	text-underline-offset: .2em;
}

/* Detail page descriptions: long addresses wrap inside the column. */
.owc-content {
	overflow-wrap: anywhere;
}

/* Coordinator detail: space between the description and the Coordinator heading. */
.owc-coordinator-description {
	margin-bottom: var(--www-space-5);
}

/* Coordinator detail on phones: subcoordinator rows stack name, role and contact, without the column header. */
@media (max-width: 767px) {
	.owc-coordinator-detail .owc-inline-row.owc-inline-header {
		display: none;
	}
	.owc-coordinator-detail .owc-inline-row {
		flex-direction: column;
		gap: 0;
	}
}

/* Admin bar on phones: fixed at the top with no gap above the page. */
@media screen and (max-width: 782px) {
	html.admin-bar { margin-top: 0 !important; }
	html.admin-bar body { margin-top: 0 !important; padding-top: 0 !important; }
	#wpadminbar { position: fixed !important; top: 0 !important; }
}

/* BetterDocs help pages: article links and page numbers in the OWBN palette. */
.betterdocs-articles-list li a { color: var(--www-red-bright); }
.betterdocs-articles-list li a:hover { color: var(--www-gold); }
.betterdocs-pagination ul li.active a,
.betterdocs-pagination ul li a:hover { border-color: var(--www-red) !important; color: var(--www-red-bright) !important; }
html.wp-dark-mode-active .betterdocs-articles-list li a,
html[data-wp-dark-mode-active] .betterdocs-articles-list li a { color: #F0533B; }

/* Gravity Forms (Orbital): buttons, checks and focus rings in OWBN red instead of its default blue; !important
   because each form prints its colours inline under its own id. */
.gform-theme--orbital {
	--gf-color-primary: #C11F26 !important;
	--gf-color-primary-rgb: 193, 31, 38 !important;
	--gf-color-primary-darker: #A81A20 !important;
	--gf-color-primary-lighter: #E23A32 !important;
	--gf-color-in-ctrl-primary: #C11F26 !important;
	--gf-ctrl-btn-bg-color-primary: #C11F26 !important;
}

/* Short pages: the footer and the Dark Pack notice sit at the bottom of the window, with no empty space below. */
body:not(.elementor-editor-active) {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
}
@media screen and (min-width: 783px) {
	html.admin-bar body:not(.elementor-editor-active) { min-height: calc(100vh - 32px); }
}
body:not(.elementor-editor-active) > .elementor-location-footer { margin-top: auto; }
body:not(.elementor-editor-active):not(:has(> .elementor-location-footer)) > .www-darkpack { margin-top: auto; }

/* Phones: a long unbroken run of text in the page (names joined by slashes, long addresses) wraps instead of pushing the page wider than the screen. */
@media (max-width: 767px) {
	main { overflow-wrap: break-word; }
}

/* owbn-entities lists on phones: rows stack as cards, so the column-header row is hidden. */
@media (max-width: 768px) {
	.owc-list-header,
	.elementor-widget-container .owc-list-header,
	.elementor-widget .owc-list-header { display: none !important; }
}

/* Vote history: the "Who" filter fits its column instead of growing to its longest name, which pushed the table past the screen. */
.wpvp-filter-row .wpvp-filter-select { width: 100%; max-width: 100%; }
@media screen and (max-width: 768px) {
	.wpvp-filter-row .wpvp-filter-select { flex: 1 1 auto; min-width: 0; }
}

/* Territory list on phones: the role-path column (chronicle/…, coordinator/…) breaks anywhere instead of widening the table past the screen. */
@media (max-width: 767px) {
	.owc-col-slugs { overflow-wrap: anywhere; word-break: break-word; }
}
