/*
Theme Name: WheresSpot
Theme URI: https://wheresspot.com
Author: WheresSpot
Author URI: https://wheresspot.com
Description: A members-only community block theme for film and TV professionals. Editorial layout, cinematic cream backdrop with subtle lens-flare, Alice + Archivo typography.
Version: 1.9.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wheresspot
Tags: block-theme, full-site-editing, editorial, community
*/

:root{
  --paper:#FCEBC9; --paper-2:#F2DEB6; --surface:#FFF6DD;
  --ink:#1A1A1A; --ink-2:#2B2A28; --muted:#6B6356;
  --rule:#1A1A1A; --red:#E63029; --red-deep:#B82119;
  --lens-1:rgba(120,180,200,0.10); --lens-2:rgba(140,200,210,0.06);
  --shadow:0 1px 0 rgba(26,26,26,0.04),0 8px 24px -16px rgba(26,26,26,0.12);
  --shadow-hover:0 1px 0 rgba(26,26,26,0.06),0 14px 32px -18px rgba(26,26,26,0.18);
  --radius:4px; --radius-card:6px; --radius-pill:999px;
  --t:0.2s ease;
  --container:1180px; --pad-x:48px;
  --bg-image: url('assets/background.svg');
  --logo-blend: multiply;
  --logo-filter: none;
}

/* Dark mode — auto-switches with system preference. */
@media (prefers-color-scheme: dark){
  :root{
    --paper:#15140F; --paper-2:#1F1D16; --surface:#1F1D16;
    --ink:#F1E7D2; --ink-2:#E7DCC4; --muted:#9A8F7A;
    --rule:#F1E7D2;
    --shadow:0 1px 0 rgba(0,0,0,0.4),0 8px 24px -16px rgba(0,0,0,0.6);
    --shadow-hover:0 1px 0 rgba(0,0,0,0.5),0 14px 32px -18px rgba(0,0,0,0.7);
    --bg-image: url('assets/background-dark.svg');
    --logo-blend: normal;
    --logo-filter: invert(1) hue-rotate(180deg);
    color-scheme: dark;
  }
}
/* Root scaled to 112.5% so 1rem = 18px. All font-sizes are in rem,
   which respects the browser/OS user font-size preference. See
   WS_THEME.md for the architectural decision rationale. */
html{ font-size: 112.5%; }

*,*::before,*::after{box-sizing:border-box}
html,body{margin:0}
body{
  font-family:var(--wp--preset--font-family--archivo, system-ui, -apple-system, sans-serif);
  background:var(--paper); color:var(--ink);
  font-size:1.125rem; line-height:1.7;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  position:relative; overflow-x:hidden;
}
body::before{
  content:""; position:fixed; inset:0; z-index:-1;
  background:var(--bg-image) center/cover no-repeat;
  pointer-events:none;
}
body::after{
  content:""; position:fixed; width:55vmax; height:55vmax;
  border-radius:50%; pointer-events:none; z-index:0; filter:blur(100px);
  bottom:-28vmax; right:-22vmax;
  background:radial-gradient(circle at center,rgba(140,200,210,0.01),transparent 60%);
}

/* Links inherit ink color in both states; prevents browser-default visited purple
   from going invisible on dark backgrounds. */
a, a:link, a:visited{color:var(--ink);}
a:hover, a:active, a:focus{color:var(--ink);}

.wp-site-blocks, .container{position:relative; z-index:1;}
.container{max-width:var(--container); margin:0 auto; padding:32px var(--pad-x) 0;}

/* Constrain default WordPress content width to our container */
.wp-site-blocks > .is-layout-flow,
.wp-site-blocks > .wp-block-group{
  max-width:var(--container); margin-left:auto; margin-right:auto;
  padding-left:var(--pad-x); padding-right:var(--pad-x);
}

/* TOP NAV */
.topnav, .topnav *, .topnav a, .topnav-links, .topnav-links a,
.topnav .wp-block-navigation, .topnav .wp-block-navigation *,
.topnav .wp-block-navigation a, .topnav .wp-block-navigation-item__label{
  font-family:var(--wp--preset--font-family--archivo, system-ui, -apple-system, sans-serif) !important;
}
.topnav{
  display:flex; justify-content:space-between; align-items:center;
  gap:18px; padding:14px 0; flex-wrap:wrap;
  border-bottom:1px solid var(--rule);
}
.topnav-logo{display:inline-flex; line-height:0; flex-shrink:0;}
.topnav-logo img{width:clamp(140px, 22vw, 200px); height:auto; display:block;
  mix-blend-mode:var(--logo-blend, multiply); filter:var(--logo-filter, none);}
.topnav .wp-block-site-logo img{width:clamp(140px, 22vw, 200px); height:auto; mix-blend-mode:var(--logo-blend, multiply); filter:var(--logo-filter, none);}
.topnav-links{display:flex; gap:22px; align-items:center; flex-wrap:wrap;
  font-size:0.8438rem; letter-spacing:0.16em; text-transform:uppercase; list-style:none; padding:0; margin:0;}
.topnav-links a{color:var(--ink); text-decoration:none; position:relative;
  padding:10px 2px; min-height:44px; display:inline-flex; align-items:center;
  transition:color var(--t);}
.topnav-links a::after{content:""; position:absolute; left:2px; right:100%;
  bottom:6px; height:1px; background:var(--ink); transition:right .25s ease;}
.topnav-links a:hover::after{right:2px;}
.topnav-links a[aria-current="page"]{font-weight:600;}
.topnav-links a[aria-current="page"]::after{right:2px;}
.topnav-links a.join{color:var(--ink); font-weight:600;}
.topnav-links a.join::before{content:""; display:inline-block; width:6px; height:6px;
  border-radius:50%; background:var(--red); margin-right:8px; vertical-align:middle;}
.topnav-links a.logout{color:var(--ink); font-weight:600;}
.topnav-links a.logout::before{content:""; display:inline-block; width:6px; height:6px;
  border-radius:50%; background:var(--red); margin-right:8px; vertical-align:middle;}

/* Disable flex-shrink on nav items so they wrap honestly when over-budget,
   instead of silently squishing into one cramped row. Priority+ relies on
   actual wrap detection. */
.topnav-links > a, .footer-nav > a,
.topnav-links .wp-block-navigation__container > li,
.footer-nav .wp-block-navigation__container > li{
  flex-shrink:0;
}

/* Priority+ overflow trigger (placed inside .topnav-links / .footer-nav) */
.nav-more{
  appearance:none; background:transparent; cursor:pointer;
  font:inherit; font-size:0.8438rem; letter-spacing:0.16em; text-transform:uppercase;
  font-weight:600; color:var(--ink); border:none;
  padding:10px 2px; min-height:44px;
  display:none; align-items:center; gap:8px;
  font-family:var(--wp--preset--font-family--archivo, system-ui, sans-serif);
}
.nav-more::before{
  content:""; display:inline-block; width:6px; height:6px;
  border-radius:50%; background:var(--red);
}
.nav-more:hover{color:var(--red);}

/* Editorial overflow overlay */
.nav-overlay{
  position:fixed; inset:0; z-index:100;
  background:var(--paper);
  display:none; opacity:0;
  transition:opacity .22s ease;
  padding:24px 28px;
  overflow-y:auto;
}
.nav-overlay::before{
  content:""; position:fixed; inset:0; z-index:-1;
  background:var(--bg-image) center/cover no-repeat;
  pointer-events:none;
}
.nav-overlay.is-open{display:block; opacity:1;}
.nav-overlay-close{
  position:absolute; top:18px; right:24px;
  background:transparent; border:none; cursor:pointer;
  font:inherit; font-size:0.8438rem; letter-spacing:0.16em;
  text-transform:uppercase; font-weight:600; color:var(--ink);
  min-height:44px; padding:10px 2px;
  font-family:var(--wp--preset--font-family--archivo, system-ui, sans-serif);
  display:inline-flex; align-items:center; gap:8px;
}
.nav-overlay-close::before{
  content:""; display:inline-block; width:6px; height:6px;
  border-radius:50%; background:var(--red);
}
.nav-overlay-list{
  list-style:none; padding:0; margin:78px 0 0;
  border-top:1px solid var(--rule);
}
.nav-overlay-list li{ border-bottom:1px solid var(--rule); }
.nav-overlay-list a{
  display:block; padding:22px 0;
  font-family:var(--wp--preset--font-family--archivo, system-ui, sans-serif);
  font-size:1.125rem; letter-spacing:0.18em; text-transform:uppercase;
  color:var(--ink); text-decoration:none; font-weight:500;
  transition:color var(--t);
}
.nav-overlay-list a:hover{color:var(--red);}

/* On templates that already show the big centered logo (.brand block),
   suppress the small topnav logo so we don't repeat the brand mark. */
.home .topnav .topnav-logo,
.home .topnav .wp-block-site-logo,
.page-template-page-with-logo .topnav .topnav-logo,
.page-template-page-with-logo .topnav .wp-block-site-logo{
  display:none !important;
}
.home .topnav,
.page-template-page-with-logo .topnav{
  justify-content:flex-end;
}

/* BRAND */
.brand{
  display:flex; flex-direction:column; align-items:center;
  padding:36px 0 32px;
  text-align:center;
}
.brand-logo-wrap{display:block; line-height:0; width:100%; text-align:center;}
.brand-logo{width:clamp(260px, 60vw, 480px); height:auto; display:block;
  margin:0 auto; mix-blend-mode:var(--logo-blend, multiply); filter:var(--logo-filter, none);}
/* When .brand uses the core Site Logo block, normalize to the brand-logo size */
.brand .wp-block-site-logo{display:block; line-height:0; width:100%; text-align:center; margin:0;}
.brand .wp-block-site-logo a, .brand .wp-block-site-logo .custom-logo-link{
  display:inline-block; line-height:0;}
.brand .wp-block-site-logo img,
.brand .wp-block-site-logo .custom-logo{
  width:clamp(260px, 60vw, 480px) !important; max-width:100%;
  height:auto !important; display:block; margin:0 auto;
  mix-blend-mode:var(--logo-blend, multiply); filter:var(--logo-filter, none);}
.nav{display:flex; gap:22px; align-items:center;
  font-size:0.8438rem; letter-spacing:0.16em; text-transform:uppercase;}
.nav a{color:var(--ink); text-decoration:none; position:relative;
  padding:10px 2px; min-height:44px; display:inline-flex; align-items:center;
  transition:color var(--t);}
.nav a::after{content:""; position:absolute; left:2px; right:100%;
  bottom:6px; height:1px; background:var(--ink); transition:right .25s ease;}
.nav a:hover::after{right:2px;}
.nav .join{
  border:1px solid var(--ink); padding:10px 16px;
  font-weight:600; min-height:44px;
}
.nav .join::after{display:none;}
.nav .join:hover{background:var(--red); border-color:var(--red); color:#fff;}
.menu-btn{display:none; background:transparent; border:1px solid var(--ink);
  padding:10px 14px; font:inherit; font-size:0.775rem; letter-spacing:0.2em;
  text-transform:uppercase; color:var(--ink); cursor:pointer; min-height:44px;}

/* HERO */
.hero{ padding: clamp(4rem, 10vw, 7rem) 0 clamp(3rem, 7vw, 5rem); }
.hero .label{
  display:inline-flex; align-items:center; gap:10px;
  font-size:0.775rem; letter-spacing:0.24em; text-transform:uppercase;
  color:var(--muted); font-weight:600;
}
.hero .label::before{content:""; width:6px; height:6px; background:var(--red);
  border-radius:50%; display:inline-block;}
.display{
  font-family:var(--wp--preset--font-family--alice, Georgia, serif); font-weight:400;
  font-size:clamp(3.0938rem,7vw,5.9062rem); line-height:1.0;
  letter-spacing:-0.02em; margin:18px 0 22px;
  text-wrap:balance; max-width:14ch;
  font-variation-settings:"SOFT" 30,"WONK" 1;
}
.display em{font-style:italic; font-weight:300; color:var(--ink-2);}
.display .red-dot{color:var(--red);}
.deck{
  font-family:var(--wp--preset--font-family--alice, Georgia, serif); font-weight:350;
  font-size:clamp(1.2625rem,2vw,1.55rem); line-height:1.45;
  color:var(--ink-2); max-width:54ch; margin:0 0 36px;
  text-wrap:pretty;
}
.btn-row{display:flex; flex-wrap:wrap; gap:12px; align-items:center;}
.btn, a.btn{
  appearance:none; cursor:pointer; font:inherit;
  font-size:0.9125rem; letter-spacing:0.14em; text-transform:uppercase;
  font-weight:600; padding:14px 22px; min-height:44px;
  border-radius:0; background:transparent; color:var(--ink);
  border:1px solid var(--ink);
  transition:var(--t) background, var(--t) color, var(--t) border-color;
  display:inline-flex; align-items:center; gap:10px; text-decoration:none;
}
.btn:hover, a.btn:hover{background:var(--red); border-color:var(--red); color:#fff;}
.btn:focus-visible{outline:2px solid var(--red); outline-offset:2px;}
.btn .dot{width:6px; height:6px; border-radius:50%; background:var(--red);
  display:inline-block; transition:background var(--t);}
.btn:hover .dot{background:#fff;}
.btn--primary{background:var(--ink); color:var(--paper); border-color:var(--ink);}
.btn--ghost{border-color:color-mix(in srgb, var(--ink) 35%, transparent);}

/* Core block buttons inherit the editorial outlined style by default. */
.wp-block-button .wp-block-button__link,
.wp-block-button .wp-element-button{
  appearance:none; cursor:pointer; font:inherit;
  font-family:var(--wp--preset--font-family--archivo, system-ui, sans-serif);
  font-size:0.9125rem; letter-spacing:0.14em; text-transform:uppercase;
  font-weight:600; padding:14px 22px; min-height:44px;
  border-radius:0; background:transparent; color:var(--ink);
  border:1px solid var(--ink); box-shadow:none;
  transition:var(--t) background, var(--t) color, var(--t) border-color;
  display:inline-flex; align-items:center; gap:10px; text-decoration:none;
}
.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-element-button:hover{
  background:var(--red); border-color:var(--red); color:#fff;
}
.wp-block-button .wp-block-button__link:focus-visible,
.wp-block-button .wp-element-button:focus-visible{
  outline:2px solid var(--red); outline-offset:2px;
}

/* Primary block style — solid ink, red-dot suffix */
.wp-block-button.is-style-primary .wp-block-button__link,
.wp-block-button.is-style-primary .wp-element-button{
  background:var(--ink); color:var(--paper); border-color:var(--ink);
}
.wp-block-button.is-style-primary .wp-block-button__link::after,
.wp-block-button.is-style-primary .wp-element-button::after{
  content:""; width:6px; height:6px; border-radius:50%;
  background:var(--red); display:inline-block;
  transition:background var(--t);
}
.wp-block-button.is-style-primary .wp-block-button__link:hover,
.wp-block-button.is-style-primary .wp-element-button:hover{
  background:var(--red); color:#fff; border-color:var(--red);
}
.wp-block-button.is-style-primary .wp-block-button__link:hover::after,
.wp-block-button.is-style-primary .wp-element-button:hover::after{
  background:#fff;
}

/* Ghost block style — softer border */
.wp-block-button.is-style-ghost .wp-block-button__link,
.wp-block-button.is-style-ghost .wp-element-button{
  border-color:color-mix(in srgb, var(--ink) 35%, transparent);
}
.hero-rule{ margin-top: clamp(3rem, 6vw, 5rem); border:0;
  border-top:1px solid var(--rule);}

/* SECTION */
section{position:relative; z-index:1;}
.label{
  display:inline-flex; align-items:center; gap:10px;
  font-size:0.775rem; letter-spacing:0.24em; text-transform:uppercase;
  color:var(--muted); font-weight:600;
}
.label::before{content:""; width:6px; height:6px; background:var(--red);
  border-radius:50%; display:inline-block;}
.section{padding:clamp(3.5rem,7vw,6rem) 0;}
.section-head{
  display:flex; align-items:baseline; justify-content:space-between;
  gap:24px; padding-bottom:14px; margin-bottom:36px;
  border-bottom:1px solid var(--rule);
}
.section-head h2{
  font-family:var(--wp--preset--font-family--alice, Georgia, serif); font-weight:400;
  font-size:clamp(1.825rem,3vw,2.3875rem); line-height:1.1;
  letter-spacing:-0.01em; margin:0; max-width:18ch; text-wrap:balance;
}
.section-head .pattern-note{
  font-size:0.775rem; letter-spacing:0.24em; text-transform:uppercase;
  color:var(--muted); font-weight:600;
  max-width:48%; text-align:right;
}

/* THREE COLUMN */
.three{display:grid; gap:36px; grid-template-columns:repeat(3,1fr);}
.three .col h3{
  font-family:var(--wp--preset--font-family--alice, Georgia, serif); font-weight:500;
  font-size:1.6875rem; line-height:1.2; margin:14px 0 8px;
  letter-spacing:-0.01em;
}
.three .col p{margin:0; font-size:1.0875rem; line-height:1.65; color:var(--ink-2);}
.three .col .ex{
  margin-top:16px; padding-top:14px;
  border-top:1px dashed color-mix(in srgb, var(--ink) 30%, transparent);
  font-size:0.9125rem; color:var(--muted); line-height:1.6;
}

/* HOSTS */
.hosts{display:grid; gap:32px; grid-template-columns:repeat(3,1fr);}
.host{display:flex; flex-direction:column; gap:14px;}
.host .photo{
  aspect-ratio:4/5; width:100%;
  background:
    radial-gradient(60% 75% at 50% 30%, rgba(241,231,210,0.18), transparent 70%),
    linear-gradient(160deg,#2B2A28 0%, #1A1A1A 100%);
  filter:grayscale(1) contrast(1.05);
  position:relative; overflow:hidden;
  border:1px solid var(--rule);
}
.host .photo svg{position:absolute; inset:0; width:100%; height:100%;}
.host .photo::after{
  content:""; position:absolute; inset:0;
  background:radial-gradient(circle at 70% 25%, rgba(245,237,220,0.10), transparent 55%);
  mix-blend-mode:screen;
}
.host .name{
  font-family:var(--wp--preset--font-family--alice, Georgia, serif); font-weight:500;
  font-size:1.55rem; line-height:1.2; margin:0; letter-spacing:-0.01em;
}
.host .role{
  font-size:0.775rem; letter-spacing:0.22em; text-transform:uppercase;
  color:var(--muted); font-weight:600; margin:2px 0 0;
}
.host .bio{font-size:0.9875rem; color:var(--ink-2); margin:6px 0 0; line-height:1.6;}

/* CALLOUT */
.callout{
  border:1px solid var(--rule); background:var(--surface);
  padding:clamp(2.5rem,5vw,4rem); border-radius:var(--radius-card);
  box-shadow:var(--shadow);
  display:grid; gap:28px;
  grid-template-columns: 1fr; align-items:start;
}
.callout .red-tab{width:48px; height:2px; background:var(--red);
  display:block; margin-bottom:18px;}
.callout blockquote{
  margin:0; font-family:var(--wp--preset--font-family--alice, Georgia, serif); font-weight:350;
  font-size:clamp(1.55rem,3vw,2.25rem); line-height:1.3;
  letter-spacing:-0.01em; color:var(--ink); max-width:32ch;
  text-wrap:balance;
}
.callout cite{
  display:block; margin-top:20px; font-style:normal;
  font-size:0.775rem; letter-spacing:0.22em; text-transform:uppercase;
  color:var(--muted); font-weight:600;
}
.callout .cta{margin-top:8px;}

/* FOOTER */
.footer, .footer *, .footer a, .footer-nav, .footer-nav a,
.footer .wp-block-navigation, .footer .wp-block-navigation *,
.footer .wp-block-navigation a, .footer .wp-block-navigation-item__label{
  font-family:var(--wp--preset--font-family--archivo, system-ui, -apple-system, sans-serif) !important;
}
.footer{
  margin-top:64px; padding:28px 0;
  border-top:1px solid var(--rule);
  display:flex; justify-content:space-between; align-items:center;
  gap:20px; flex-wrap:wrap;
  font-size:0.775rem; letter-spacing:0.22em; text-transform:uppercase;
  color:var(--muted);
}
.footer .red-dot{color:var(--red);}
.footer-nav{display:flex; gap:22px; list-style:none; padding:0; margin:0;}
.footer-nav a{color:var(--muted); text-decoration:none;}
.footer-nav a:hover{color:var(--ink);}

/* PAGE HEAD */
.page-head{
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.25rem);
  border-bottom:1px solid var(--rule);
  display:grid; gap:14px;
}
.page-head .label{
  display:inline-flex; align-items:center; gap:10px;
  font-size:0.775rem; letter-spacing:0.24em; text-transform:uppercase;
  color:var(--muted); font-weight:600;
}
.page-head .label::before{content:""; width:6px; height:6px; background:var(--red);
  border-radius:50%; display:inline-block;}

/* CHIPS */
.chips{
  display:flex; flex-wrap:wrap; gap:8px;
  padding:18px 0 0;
}
.chip{
  appearance:none; cursor:pointer; font:inherit;
  font-size:0.8063rem; letter-spacing:0.18em; text-transform:uppercase;
  font-weight:600; padding:10px 16px; min-height:44px;
  background:transparent; color:var(--ink);
  border:1px solid color-mix(in srgb, var(--ink) 35%, transparent);
  border-radius:var(--radius-pill); text-decoration:none;
  display:inline-flex; align-items:center;
  transition:background var(--t), color var(--t), border-color var(--t);
}
.chip:hover{border-color:var(--ink);}
.chip[aria-pressed="true"]{
  background:var(--ink); color:var(--paper); border-color:var(--ink);
}
.chip:focus-visible{outline:2px solid var(--red); outline-offset:2px;}

/* LAYOUT */
.layout{
  display:grid; gap:48px;
  grid-template-columns: minmax(0, 1fr) 280px;
  padding: clamp(2rem, 4vw, 3rem) 0 0;
}
.threads{display:flex; flex-direction:column;}
.thread{
  display:grid; gap:8px;
  padding:24px 0;
  border-bottom:1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}
.thread:first-child{padding-top:8px;}
.thread-kicker{
  font-size:0.7375rem; letter-spacing:0.26em; text-transform:uppercase;
  color:var(--muted); font-weight:600;
  display:inline-flex; align-items:center; gap:8px;
}
.thread-kicker::before{
  content:""; width:6px; height:6px; background:var(--red); border-radius:50%;
}
.thread-title{
  font-family:var(--wp--preset--font-family--alice, Georgia, serif); font-weight:500;
  font-size:clamp(1.4062rem,2.4vw,1.825rem); line-height:1.2;
  letter-spacing:-0.01em; margin:0; text-wrap:balance;
}
.thread-title a{
  color:var(--ink); text-decoration:none;
  border-bottom:1px solid transparent;
  transition:border-color var(--t), color var(--t);
}
.thread-title a:hover{border-bottom-color:var(--red);}
.thread-excerpt{
  font-size:1.0562rem; line-height:1.6; color:var(--ink-2);
  margin:0; max-width:64ch;
}
.thread-meta{
  display:flex; align-items:center; gap:14px; flex-wrap:wrap;
  font-size:0.8812rem; color:var(--muted); margin-top:4px;
}
.thread-meta .author{
  display:inline-flex; align-items:center; gap:10px;
  color:var(--ink-2);
}
.avatar{
  width:28px; height:28px; border-radius:50%;
  background:linear-gradient(135deg,var(--ink-2),var(--ink));
  color:var(--paper);
  display:inline-flex; align-items:center; justify-content:center;
  font-family:var(--wp--preset--font-family--alice, Georgia, serif); font-size:0.8438rem; font-weight:500;
  flex:0 0 auto;
}
.thread-meta .author-name{font-weight:600; color:var(--ink);}
.thread-meta .sep{color:color-mix(in srgb, var(--ink) 25%, transparent);}
.thread-meta .replies{font-variant-numeric:tabular-nums;}

.loadmore-row{
  display:flex; justify-content:center;
  padding: clamp(2rem, 4vw, 3rem) 0 0;
}

/* ASIDE */
.aside{
  display:flex; flex-direction:column; gap:32px;
  align-self:start;
  position:sticky; top:24px;
}
.panel{
  border:1px solid var(--rule);
  background:var(--surface);
  border-radius:var(--radius-card);
  padding:22px 22px 18px;
  box-shadow:var(--shadow);
}
.panel-head{
  display:flex; align-items:baseline; justify-content:space-between;
  gap:12px; margin-bottom:14px;
  padding-bottom:10px;
  border-bottom:1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}
.panel-head h3{
  font-family:var(--wp--preset--font-family--alice, Georgia, serif); font-weight:500;
  font-size:1.2625rem; line-height:1.2; margin:0;
  letter-spacing:-0.01em;
}
.panel-head .meta{
  font-size:0.7375rem; letter-spacing:0.22em; text-transform:uppercase;
  color:var(--muted); font-weight:600;
}
.trending{list-style:none; padding:0; margin:0; display:grid; gap:10px;}
.trending li{
  font-size:0.9875rem; line-height:1.45;
  padding-left:16px; position:relative;
}
.trending li::before{
  content:""; position:absolute; left:0; top:0.55em;
  width:6px; height:6px; background:var(--red); border-radius:50%;
}
.trending a{
  color:var(--ink); text-decoration:none;
  border-bottom:1px solid transparent;
  transition:border-color var(--t);
}
.trending a:hover{border-bottom-color:var(--red);}
.trending .replies{
  display:block; font-size:0.775rem; letter-spacing:0.14em;
  text-transform:uppercase; color:var(--muted);
  font-weight:600; margin-top:2px;
}

.stat{
  display:flex; align-items:baseline; gap:10px;
  margin-bottom:16px;
}
.stat .num{
  font-family:var(--wp--preset--font-family--alice, Georgia, serif); font-weight:500;
  font-size:2.1125rem; line-height:1; letter-spacing:-0.02em;
}
.stat .lbl{
  font-size:0.775rem; letter-spacing:0.22em; text-transform:uppercase;
  color:var(--muted); font-weight:600;
}
.joiners{list-style:none; padding:0; margin:0; display:grid; gap:12px;}
.joiner{
  display:flex; align-items:center; gap:12px;
}
.joiner .name{
  font-size:0.9875rem; color:var(--ink); font-weight:600; line-height:1.2;
}
.joiner .role{
  display:block; font-size:0.775rem; letter-spacing:0.18em;
  text-transform:uppercase; color:var(--muted); font-weight:600;
  margin-top:2px;
}

/* RESPONSIVE */
@media (max-width: 960px){
  .layout{grid-template-columns:1fr; gap:40px;}
  .aside{position:static;}
}
@media (max-width:768px){
  :root{--pad-x:28px;}
  .three, .hosts{grid-template-columns:1fr 1fr;}
  .hosts{gap:24px;}
  .nav{gap:14px;}
  .topnav{gap:14px;}
  .topnav-links{gap:14px;}
}
@media (max-width:480px){
  :root{--pad-x:20px;}
  .container{padding:20px var(--pad-x) 0;}
  .brand{gap:14px; padding:24px 0 28px;}
  .topnav{gap:10px;}
  .topnav-logo img{width:clamp(120px, 36vw, 160px);}
  .topnav-links{gap:10px; font-size:0.775rem; width:100%; justify-content:flex-end;}
  .topnav-links .wp-block-navigation__container{justify-content:flex-end; margin-left:auto;}
  .topnav-links a{padding:10px 0;}
  .three, .hosts{grid-template-columns:1fr;}
  .display{font-size:clamp(2.8125rem,11vw,3.6562rem);}
  .section-head{flex-direction:column; align-items:flex-start; gap:8px;}
  .section-head .pattern-note{text-align:left; max-width:100%;}
  .footer{flex-direction:column; align-items:flex-start;}
  .thread-meta{gap:10px;}
}

/* THIRD-PARTY PLUGIN ADJUSTMENTS — dark mode readability
   Some plugins ship CSS that hardcodes light-mode grays (#555, #666, #999)
   on labels and form text. Those become unreadable on a dark backdrop.
   Override the most common patterns with our ink/muted tokens, scoped to
   dark mode only so plugin defaults still apply in light mode. */
@media (prefers-color-scheme: dark){
  /* UltimateMember — labels, body text, links */
  .um, .um *, .um label, .um-form, .um-form *,
  .um-field, .um-field-label, .um-field-area,
  .um-display-value, .um-meta{
    color:var(--ink-2) !important;
  }
  .um a{ color:var(--ink) !important; }

  /* UM tip/help triggers — quieter than body text but readable */
  .um-tip, .um-tip-w, .um-field-area-tooltip,
  .um-field .um-field-tooltip{
    color:var(--muted) !important;
  }
  .um-tip:hover, .um-tip-w:hover{ color:var(--ink) !important; }

  /* All native UM form controls */
  .um input[type="text"], .um input[type="email"], .um input[type="password"],
  .um input[type="url"], .um input[type="tel"], .um input[type="number"],
  .um input[type="search"], .um input[type="date"], .um input[type="time"],
  .um textarea, .um select{
    background-color:var(--surface) !important;
    color:var(--ink) !important;
    border-color:rgba(241,231,210,0.25) !important;
  }
  .um input::placeholder, .um textarea::placeholder{
    color:var(--muted) !important;
  }

  /* Select2 widget — UltimateMember uses it for the country picker and
     multi-selects. UM's CSS uses deeply-nested 5+ class selectors, so we
     match or exceed their specificity to win the cascade.
     Dropdown is rendered inside .um-field (UM sets dropdownParent). */

  /* Trigger / closed state */
  body .um-field .select2.select2-container .select2-selection,
  body .um-field .select2.select2-container .select2-selection--single,
  body .um-field .select2.select2-container .select2-selection--multiple,
  body .um-search-filter .select2.select2-container .select2-selection,
  .select2-container--default .select2-selection,
  .select2-container--default .select2-selection--single,
  .select2-container--default .select2-selection--multiple{
    background-color:var(--surface) !important;
    border-color:rgba(241,231,210,0.25) !important;
    color:var(--ink) !important;
  }
  body .um-field .select2.select2-container .select2-selection__rendered,
  body .um-field .select2.select2-container .select2-selection__placeholder,
  .select2-container--default .select2-selection__rendered,
  .select2-container--default .select2-selection__placeholder,
  .select2-container--default .select2-selection__arrow b{
    color:var(--ink) !important;
  }
  body .um-field .select2.select2-container .select2-selection__choice,
  .select2-container--default .select2-selection__choice{
    background-color:var(--paper-2) !important;
    border-color:rgba(241,231,210,0.30) !important;
    color:var(--ink) !important;
  }
  body .um-field .select2.select2-container .select2-selection__choice *,
  .select2-container--default .select2-selection__choice *,
  .select2-container--default .select2-selection__choice__remove,
  .select2-container--default .select2-selection__choice__remove:hover{
    color:var(--ink) !important;
  }

  /* Dropdown popup container */
  body .um-field .select2-container.select2-container--open .select2-dropdown,
  body .um-field .select2.select2-container .select2-dropdown,
  body .um-search-filter .select2-container.select2-container--open .select2-dropdown,
  .select2-container--default .select2-dropdown,
  .select2-dropdown{
    background-color:var(--surface) !important;
    border-color:rgba(241,231,210,0.25) !important;
    color:var(--ink) !important;
  }

  /* Search field at top of dropdown popup */
  body .um-field .select2-container.select2-container--open .select2-dropdown .select2-search,
  body .um-field .select2.select2-container .select2-search--dropdown,
  .select2-container--default .select2-search--dropdown,
  .select2-search--dropdown{
    background-color:var(--surface) !important;
  }
  body .um-field .select2-container.select2-container--open .select2-dropdown .select2-search input,
  body .um-field .select2-container.select2-container--open .select2-dropdown .select2-search__field,
  body .um-field .select2.select2-container .select2-search--dropdown .select2-search__field,
  .select2-container--default .select2-search--dropdown .select2-search__field,
  .select2-container--default .select2-search--inline .select2-search__field,
  .select2-search--dropdown .select2-search__field,
  .select2-search--inline .select2-search__field,
  .select2-dropdown input,
  input.select2-search__field{
    background-color:var(--paper-2) !important;
    color:var(--ink) !important;
    border:1px solid rgba(241,231,210,0.25) !important;
  }
  .select2-search--dropdown .select2-search__field::placeholder{
    color:var(--muted) !important;
  }

  /* Options list — beat UM's 5-class !important rule */
  body .um-search-filter .select2-container.select2-container--open .select2-dropdown .select2-results li.select2-results__option,
  body .um-field .select2-container.select2-container--open .select2-dropdown .select2-results li.select2-results__option,
  body .um-field .select2.select2-container .select2-dropdown .select2-results li,
  .select2-container--default .select2-results__option,
  .select2-results__option{
    color:var(--ink) !important;
    background-color:transparent !important;
  }
  body .um-field .select2.select2-container .select2-dropdown .select2-results,
  .select2-container--default .select2-results,
  .select2-container--default .select2-results__options,
  .select2-results, .select2-results__options{
    background-color:var(--surface) !important;
    color:var(--ink) !important;
  }

  /* Highlighted (hover/keyboard) — match UM's specificity */
  body .um-search-filter .select2-container.select2-container--open .select2-dropdown .select2-results li.select2-results__option--highlighted,
  body .um-field .select2-container.select2-container--open .select2-dropdown .select2-results li.select2-results__option--highlighted,
  body .um-field .select2.select2-container .select2-dropdown .select2-results li.select2-results__option--highlighted,
  .select2-container--default .select2-results__option--highlighted,
  .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable,
  .select2-container--default .select2-results__option--highlighted[aria-selected]{
    background-color:var(--red) !important;
    color:#fff !important;
  }

  /* Already-selected item in the dropdown */
  body .um-field .select2.select2-container .select2-dropdown .select2-results li.select2-results__option--selected,
  .select2-container--default .select2-results__option--selected,
  .select2-container--default .select2-results__option[aria-selected="true"]{
    background-color:var(--paper-2) !important;
    color:var(--ink) !important;
  }

  /* UM submit buttons — match the editorial primary CTA */
  .um .um-button, .um a.um-button,
  .um button.um-button, .um input[type="submit"].um-button{
    background-color:var(--ink) !important;
    color:var(--paper) !important;
    border-color:var(--ink) !important;
    box-shadow:none !important;
  }
  .um .um-button:hover, .um a.um-button:hover{
    background-color:var(--red) !important;
    border-color:var(--red) !important;
    color:#fff !important;
  }
  .um .um-button.um-alt, .um a.um-button.um-alt{
    background-color:transparent !important;
    color:var(--ink) !important;
    border:1px solid var(--ink) !important;
  }
  .um .um-button.um-disabled, .um .um-button[disabled]{
    opacity:0.5 !important;
  }

  /* UM radio + checkbox states */
  .um .um-field-radio-state, .um .um-field-checkbox-state,
  .um label.active .um-field-radio-state,
  .um label.active .um-field-checkbox-state{
    color:var(--ink) !important;
    border-color:rgba(241,231,210,0.30) !important;
  }
  .um .um-field-radio.active .um-field-radio-state i,
  .um .um-field-checkbox.active .um-field-checkbox-state i{
    color:var(--red) !important;
  }
  .um .um-field-radio-option, .um .um-field-checkbox-option{
    color:var(--ink-2) !important;
  }

  /* Required asterisk — keep it red, just ensure it's visible */
  .um .um-req{ color:var(--red) !important; }

  /* Validation / notices */
  .um .um-field-error, .um .um-field-error span{
    color:var(--red) !important;
    background-color:transparent !important;
  }
  .um .um-notice{
    background-color:var(--paper-2) !important;
    color:var(--ink) !important;
    border-color:rgba(241,231,210,0.25) !important;
  }
  .um .um-notice.err{ border-left:3px solid var(--red) !important; }
  .um .um-notice.ok, .um .um-notice.success{ border-left:3px solid #4FA9A2 !important; }

  /* Password strength meter */
  .um .um-password-strength,
  .um .um-password-strength-meter,
  .um .um-password-strength-text{
    color:var(--ink-2) !important;
    background-color:var(--paper-2) !important;
  }

  /* File upload buttons (avatar, cover photo) */
  .um .um-img-upload, .um .um-uploader,
  .um .upload-button, .um .um-finish-upload{
    background-color:var(--paper-2) !important;
    color:var(--ink) !important;
    border-color:rgba(241,231,210,0.25) !important;
  }

  /* Profile & Account display surfaces */
  .um-profile, .um-account, .um-misc, .um-members,
  .um-profile-meta, .um-profile-headericon,
  .um-account-tab, .um-account-name, .um-account-side,
  .um-display-value, .um-row{
    color:var(--ink-2) !important;
  }
  .um-profile-photo, .um-profile-headericon,
  .um-account-side ul li a{
    color:var(--ink) !important;
  }
  .um-account-tab.current, .um-account-tab:hover{
    background-color:var(--paper-2) !important;
    color:var(--ink) !important;
  }

  /* jQuery UI datepicker (UM uses for date fields) — popup renders at body root */
  .ui-datepicker{
    background-color:var(--surface) !important;
    color:var(--ink) !important;
    border-color:rgba(241,231,210,0.25) !important;
  }
  .ui-datepicker .ui-datepicker-header{
    background-color:var(--paper-2) !important;
    color:var(--ink) !important;
    border-color:rgba(241,231,210,0.25) !important;
  }
  .ui-datepicker .ui-datepicker-calendar td a,
  .ui-datepicker .ui-state-default,
  .ui-datepicker .ui-widget-content .ui-state-default{
    background:transparent !important;
    color:var(--ink) !important;
    border-color:transparent !important;
  }
  .ui-datepicker .ui-state-hover,
  .ui-datepicker .ui-state-active,
  .ui-datepicker .ui-widget-content .ui-state-hover,
  .ui-datepicker .ui-widget-content .ui-state-active{
    background-color:var(--red) !important;
    color:#fff !important;
    border-color:var(--red) !important;
  }
  .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next{
    color:var(--ink) !important;
  }

  /* Generic safety net for unstyled form fields inside post content. */
  .wp-block-post-content input[type="text"]:not([style*="color"]),
  .wp-block-post-content input[type="email"]:not([style*="color"]),
  .wp-block-post-content input[type="password"]:not([style*="color"]),
  .wp-block-post-content textarea:not([style*="color"]),
  .wp-block-post-content select:not([style*="color"]){
    background-color:var(--surface);
    color:var(--ink);
  }
}

/* MOTION */
.reveal{opacity:0; transform:translateY(8px);
  transition:opacity .6s ease, transform .6s ease;}
.reveal.in{opacity:1; transform:none;}
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation:none !important; transition:none !important;}
  .reveal{opacity:1 !important; transform:none !important;}
}
