/*
Theme Name: Viflos
Theme URI: https://viflos.store
Author: Viflos Store
Author URI: https://viflos.store
Description: An editorial DIY & home-decor blog theme for Viflos.store — built for AdSense-friendly reading, fast pages, and an editable header/footer from the WordPress Customizer. Ships with 10 built-in niches: Home Organization, Home Decor, Budget & Small-Space Living, Seasonal DIY, Garden & Outdoor, Wedding & Event, Kids & Family, Gift-Making & Handmade Crafts, Cleaning & Hacks, and Furniture Building & Woodworking.
Version: 1.5.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.7
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: viflos
Tags: blog, e-commerce, custom-logo, custom-menu, editor-style, featured-images, threaded-comments, translation-ready

Viflos is a from-scratch WordPress theme. Component styles below are organized
by section; search the ALL-CAPS section names to jump around.
*/

/* =========================================================
   1. RESET & BASE
========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .25s ease, color .25s ease;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; margin: 0; list-style: none; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.01em; color: var(--ink); }
p { margin: 0 0 1.3em; }
button, input, textarea, select { font-family: inherit; font-size: 1rem; color: inherit; }
figure { margin: 0; }
table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

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

/* =========================================================
   2. DESIGN TOKENS (LIGHT + DARK MODE)
========================================================= */
:root {
  /* Brand — sampled from the Viflos "V" mark */
  --ink: #141414;
  --ink-soft: #3A3733;
  --red: #F3323A;
  --red-deep: #C81E28;
  --paper: #FAF6EF;
  --paper-alt: #F1EAD9;
  --card: #FFFFFF;
  --card-border: rgba(20, 18, 15, 0.11);
  --line: rgba(20, 18, 15, 0.12);
  --muted: #6E685F;

  /* Persistent dark editorial bands (topbar, footer, newsletter, search bar, consent) */
  --band-bg: #141414;
  --band-fg: #F3EFE6;
  --band-muted: #C9C3B6;
  --band-line: rgba(255, 255, 255, 0.12);

  /* 10 niche colors — used only as small accents (badges, rail, dividers) */
  --cat-1: #5B7C99; /* Home Organization */
  --cat-2: #C1694F; /* Home Decor */
  --cat-3: #8A8B4E; /* Budget & Small-Space Living */
  --cat-4: #D9A441; /* Seasonal DIY */
  --cat-5: #6E8C5A; /* Garden & Outdoor */
  --cat-6: #C68A9E; /* Wedding & Event */
  --cat-7: #4E9BC7; /* Kids & Family */
  --cat-8: #8B5E83; /* Gift-Making & Handmade Crafts */
  --cat-9: #4F8C82; /* Cleaning & Hacks */
  --cat-10:#8A5A34; /* Furniture Building & Woodworking */

  --font-display: 'Space Grotesk', 'Arial Narrow', Helvetica, sans-serif;
  --font-body: 'Lora', Georgia, 'Times New Roman', serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --radius: 4px;
  --wrap: 1220px;
  --shadow: 0 1px 2px rgba(20,18,15,.05), 0 10px 24px -14px rgba(20,18,15,.22);
  --card-shadow: 0 1px 3px rgba(20,18,15,.05), 0 10px 26px -14px rgba(20,18,15,.16);
  --card-shadow-hover: 0 6px 16px rgba(20,18,15,.08), 0 22px 38px -16px rgba(20,18,15,.24);
}

/* Dark mode — toggled via the header sun/moon button, remembered in localStorage. */
:root[data-theme="dark"] {
  --ink: #F3EFE6;
  --ink-soft: #CFC9BC;
  --red: #F3323A;
  --red-deep: #FF6B72;
  --paper: #151310;
  --paper-alt: #211E19;
  --card: #1E1B17;
  --card-border: rgba(243, 239, 230, 0.13);
  --line: rgba(243, 239, 230, 0.12);
  --muted: #9E9688;

  /* Keep dark editorial bands rich obsidian in dark mode instead of flipping cream */
  --band-bg: #0E0D0B;
  --band-fg: #F3EFE6;
  --band-muted: #B9B2A4;
  --band-line: rgba(243, 239, 230, 0.12);

  /* Slightly brighter niche accents for AA contrast on dark surfaces */
  --cat-1: #7DA4C4;
  --cat-2: #DE856B;
  --cat-3: #AEB06B;
  --cat-4: #E8B85B;
  --cat-5: #8CB076;
  --cat-6: #DFA3B7;
  --cat-7: #6EB7E0;
  --cat-8: #B483AC;
  --cat-9: #6EB3A8;
  --cat-10:#B88256;

  --shadow: 0 2px 6px rgba(0,0,0,.38), 0 14px 28px -14px rgba(0,0,0,.68);
  --card-shadow: 0 2px 8px rgba(0,0,0,.36), 0 14px 30px -14px rgba(0,0,0,.65);
  --card-shadow-hover: 0 8px 20px rgba(0,0,0,.48), 0 24px 44px -16px rgba(0,0,0,.78);
}

/* Brand mark adaptation: logo.png has transparent bg, black left wing, red right wing.
   invert(1) + hue-rotate(180deg) turns black -> crisp white while preserving Viflos red. */
:root[data-theme="dark"] .site-branding img,
:root[data-theme="dark"] .footer-brand img.custom-logo {
  filter: invert(1) hue-rotate(180deg) saturate(1.15);
}

:root[data-theme="dark"] .comment-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
:root[data-theme="dark"] .comment-form textarea,
:root[data-theme="dark"] .widget_search input[type="search"] {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
}

/* =========================================================
   3. LAYOUT HELPERS
========================================================= */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px,1px,1px,1px); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.screen-reader-text:focus {
  position: fixed; left: 8px; top: 8px; width: auto; height: auto; z-index: 100000;
  background: var(--band-bg); color: #fff; padding: 12px 18px; clip: auto; border-radius: var(--radius);
}
.skip-link { z-index: 100000; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--red-deep); font-weight: 500; margin-bottom: 14px;
}
.eyebrow::before {
  content: ""; width: 10px; height: 14px; background: var(--red);
  clip-path: polygon(0 0, 60% 0, 100% 100%, 40% 100%);
  display: inline-block;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: .95rem;
  padding: 13px 26px; border-radius: var(--radius); border: 2px solid var(--ink);
  background: var(--ink); color: var(--paper); cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease, filter .2s ease;
}
.btn:hover { background: var(--red); border-color: var(--red); color: #fff; transform: translateY(-1px); }
.btn.btn-outline { background: transparent; color: var(--ink); }
.btn.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.btn-red:hover { background: #d6252d; border-color: #d6252d; color: #fff; }

.section { padding: 64px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.7rem, 2.6vw, 2.35rem); margin: 0; }
.section-head .see-all { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; border-bottom: 2px solid var(--red); padding-bottom: 3px; white-space: nowrap; }

.diagonal-divider { position: relative; height: 56px; background: var(--band-bg); }
.diagonal-divider::after {
  content: ""; position: absolute; inset: 0; background: var(--paper);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

/* =========================================================
   4. TOPBAR + HEADER + MOBILE DRAWER
========================================================= */
.topbar { background: var(--band-bg); color: var(--band-fg); border-bottom: 1px solid var(--band-line); font-family: var(--font-mono); font-size: .78rem; letter-spacing: .02em; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 9px; padding-bottom: 9px; gap: 16px; }
.topbar-message a { color: var(--red); font-weight: 500; }
.topbar-social { display: flex; gap: 14px; }
.topbar-social a { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.08); transition: background .2s ease; }
.topbar-social a:hover { background: var(--red); }
.topbar-social svg { width: 13px; height: 13px; fill: var(--band-fg); }

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1002; transition: box-shadow .2s ease, background-color .25s ease; }
.site-header.is-scrolled { box-shadow: 0 2px 18px rgba(20,18,15,.08); }
:root[data-theme="dark"] .site-header.is-scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.45); }
.site-header .header-row { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; gap: 20px; transition: padding .2s ease; }
.site-header.is-scrolled .header-row { padding-top: 9px; padding-bottom: 9px; }
.site-header.is-scrolled .site-branding img.custom-logo,
.site-header.is-scrolled .site-title img { max-height: 34px; height: 34px !important; }

/* Elevate header stacking context above backdrop & any third-party floating widgets when mobile menu is open */
body.no-scroll .site-header,
.site-header.menu-is-open,
.site-header:has(.primary-nav-wrap.nav-open) {
  z-index: 2147483645;
}

.site-branding { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 0 0 auto; }
.site-branding img.custom-logo,
.site-branding .site-title img { max-height: 42px; width: auto; transition: max-height .2s ease, height .2s ease, filter .2s ease; }
.site-title { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; margin: 0; color: var(--ink); }
.site-title a { display: flex; align-items: center; gap: 10px; color: inherit; }

.nav-scroll-shell { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }
.primary-nav-wrap {
  display: flex; align-items: center; flex: 1 1 auto; min-width: 0; justify-content: flex-start;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -ms-overflow-style: none;
}
.primary-nav-wrap::-webkit-scrollbar { display: none; height: 0; width: 0; }
.nav-scroll-shell.can-scroll-prev .primary-nav-wrap {
  -webkit-mask-image: linear-gradient(to right, transparent, black 40px);
          mask-image: linear-gradient(to right, transparent, black 40px);
}
.nav-scroll-shell.can-scroll-next .primary-nav-wrap {
  -webkit-mask-image: linear-gradient(to left, transparent, black 40px);
          mask-image: linear-gradient(to left, transparent, black 40px);
}
.nav-scroll-shell.can-scroll-prev.can-scroll-next .primary-nav-wrap {
  -webkit-mask-image: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
          mask-image: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
}
.nav-scroll-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(241, 234, 217, .9); backdrop-filter: blur(4px);
  color: var(--ink); display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2; opacity: 0; pointer-events: none;
  transition: opacity .15s ease, background .15s ease, color .15s ease;
  box-shadow: var(--shadow); padding: 0;
}
:root[data-theme="dark"] .nav-scroll-btn { background: rgba(30, 27, 23, .92); }
.nav-scroll-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-scroll-btn:hover { background: var(--ink); color: var(--paper); opacity: 1 !important; }
.nav-scroll-prev { left: 2px; }
.nav-scroll-next { right: 2px; }
.nav-scroll-shell.can-scroll-prev .nav-scroll-prev,
.nav-scroll-shell.can-scroll-next .nav-scroll-next { opacity: .78; pointer-events: auto; }

.primary-menu { display: flex; align-items: center; flex-wrap: nowrap; gap: calc(4px * var(--nav-scale, 1)); }
.primary-menu li { position: relative; }
.primary-menu > li.mobile-drawer-head { display: none; }
.primary-menu > li > a {
  display: flex; align-items: center; gap: 5px; padding: calc(10px * var(--nav-scale, 1)) calc(14px * var(--nav-scale, 1));
  font-family: var(--font-display); font-weight: 500; font-size: calc(.96rem * var(--nav-scale, 1));
  border-radius: var(--radius); transition: color .15s ease, background .15s ease; white-space: nowrap;
}
.primary-menu > li > a:hover, .primary-menu > li.current-menu-item > a { color: var(--red-deep); background: var(--paper-alt); }
.primary-menu > li > a .dot {
  width: 7px; height: 7px; border-radius: 2px; background: var(--c, var(--ink));
  transform: rotate(45deg); flex: none; margin-right: 2px;
}
.primary-menu li.menu-item-has-children > a::after,
.primary-menu li.has-mega > a::after {
  content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); margin-left: 2px; margin-top: -3px; opacity: .6;
}

/* Standard dropdown (fewer than 6 children) */
.primary-menu .sub-menu {
  display: none; position: absolute; top: 100%; left: 0; background: var(--card); min-width: 240px;
  border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 8px; z-index: 20;
}
.primary-menu li:hover > .sub-menu, .primary-menu li.focus-within > .sub-menu { display: block; }
.primary-menu .sub-menu li { width: 100%; }
.primary-menu .sub-menu a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--radius); font-size: .92rem; font-weight: 400; }
.primary-menu .sub-menu a:hover { background: var(--paper-alt); color: var(--red-deep); }
.primary-menu .sub-menu .dot { width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--ink)); flex: none; transform: rotate(45deg); }

/* Mega-menu (6+ children) */
.primary-menu li.has-mega { position: static; }
.primary-menu .sub-menu.mega-menu {
  display: none; position: absolute; top: 100%; left: 0; right: 0; width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 4px;
  background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow); max-width: var(--wrap); margin: 0 auto; padding: 30px 24px; z-index: 20;
}
.primary-menu li.has-mega:hover > .sub-menu.mega-menu,
.primary-menu li.has-mega.focus-within > .sub-menu.mega-menu { display: grid; }
.primary-menu .sub-menu.mega-menu a {
  flex-direction: column; align-items: flex-start; gap: 5px; padding: 14px 16px; border-radius: 6px; height: 100%;
}
.primary-menu .sub-menu.mega-menu a:hover { background: var(--paper-alt); }
.sub-menu.mega-menu .label { font-weight: 700; }
.sub-menu.mega-menu .dot { width: 12px; height: 14px; border-radius: 0; clip-path: polygon(0 0, 60% 0, 100% 100%, 40% 100%); transform: none; }
.sub-menu.mega-menu .desc { font-family: var(--font-body); font-size: .84rem; color: var(--muted); font-weight: 400; line-height: 1.4; }

.header-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.header-icon-btn {
  width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease; flex: none;
}
.header-icon-btn:hover { background: var(--ink); border-color: var(--ink); }
.header-icon-btn:hover svg { fill: var(--paper); }
.header-icon-btn svg { width: 17px; height: 17px; fill: var(--ink); stroke: none; }

#theme-toggle .icon-moon { display: none; }
#theme-toggle svg { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#theme-toggle:hover svg { fill: none; stroke: var(--paper); }
:root[data-theme="dark"] #theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] #theme-toggle .icon-moon { display: block; }

/* Search overlay */
.header-search {
  visibility: hidden; opacity: 0; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--band-bg); border-bottom: 1px solid var(--band-line);
  padding: 0; max-height: 0; overflow: hidden; transition: max-height .25s ease, opacity .2s ease, padding .25s ease; z-index: 30;
}
.header-search.is-open { visibility: visible; opacity: 1; max-height: 150px; padding: 22px 0; }
.header-search .wrap { display: flex; align-items: center; gap: 12px; }
.header-search form { display: flex; gap: 10px; flex: 1 1 auto; min-width: 0; }
.header-search input[type="search"] {
  flex: 1; min-width: 0; padding: 13px 18px; border: 1px solid var(--band-line);
  background: var(--card); color: var(--ink); border-radius: var(--radius);
  font-family: var(--font-display); font-size: 1.05rem;
}
.header-search input[type="search"]::placeholder { color: var(--muted); }
.header-search button[type="submit"] { border: none; flex: none; }
.header-search-close {
  flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: transparent;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s ease, border-color .2s ease;
}
.header-search-close svg { width: 16px; height: 16px; fill: var(--band-fg); }
.header-search-close:hover { background: var(--red); border-color: var(--red); }

.header-search-backdrop, .nav-backdrop {
  position: fixed; inset: 0; background: rgba(10,9,7,.58); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility .22s ease; z-index: 998;
}
.header-search-backdrop.is-visible, .nav-backdrop.is-visible { opacity: 1; visibility: visible; }
.nav-backdrop.is-visible { z-index: 2147483640; background: transparent; backdrop-filter: none; }

.site-header.menu-is-open::after,
.site-header:has(.primary-nav-wrap.nav-open)::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(10, 9, 7, 0.58);
  backdrop-filter: blur(2px);
  z-index: 2147483644;
  pointer-events: none;
}

.menu-toggle {
  display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; flex: none; align-items: center; justify-content: center; flex-direction: column; gap: 4px; padding: 0;
}
.menu-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); margin: 0 auto; transition: transform .2s ease, opacity .2s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile Navigation Drawer + Dedicated Unobstructed Close (×) Header */
.primary-nav-wrap.nav-open { -webkit-mask-image: none !important; mask-image: none !important; overflow: visible; }
.primary-nav-wrap.nav-open ~ .nav-scroll-btn { display: none; }
.site-header.menu-is-open .header-actions,
.site-header:has(.primary-nav-wrap.nav-open) .header-actions {
  visibility: hidden;
  pointer-events: none;
}

.primary-nav-wrap.nav-open .primary-menu {
  display: flex; flex-direction: column; align-items: stretch;
  position: fixed; inset: 0 0 0 auto;
  width: min(86vw, 350px); max-width: 350px; height: 100dvh;
  background: var(--card); color: var(--ink);
  border-left: 1px solid var(--line);
  padding: 0 20px 32px;
  z-index: 2147483646;
  box-shadow: -12px 0 36px rgba(0,0,0,.28);
  gap: 0; overflow-y: auto; overscroll-behavior: contain;
}

.primary-nav-wrap.nav-open .primary-menu > li.mobile-drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  position: sticky; top: 0; z-index: 5;
  background: var(--card);
  margin: 0 -20px 8px;
  padding: max(14px, env(safe-area-inset-top)) 20px 14px;
  border-bottom: 1px solid var(--line);
}
.mobile-drawer-title {
  font-family: var(--font-mono); font-size: .75rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.mobile-drawer-close {
  width: 42px; height: 42px; min-width: 42px; min-height: 42px;
  border-radius: 50%; border: 1px solid var(--line);
  background: var(--paper-alt); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; flex: 0 0 auto;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .15s ease;
}
.mobile-drawer-close svg { width: 18px; height: 18px; fill: currentColor; pointer-events: none; }
.mobile-drawer-close:hover,
.mobile-drawer-close:focus-visible {
  background: var(--red); border-color: var(--red); color: #fff;
}
.mobile-drawer-close:active { transform: scale(0.95); }

.primary-nav-wrap.nav-open .primary-menu > li:not(.mobile-drawer-head) { border-bottom: 1px solid var(--line); }
.primary-nav-wrap.nav-open .primary-menu > li > a {
  padding: 14px 6px; justify-content: flex-start; gap: 10px;
  font-size: 1rem; white-space: normal; line-height: 1.35;
}
.primary-nav-wrap.nav-open .primary-menu > li.menu-item-has-children > a::after,
.primary-nav-wrap.nav-open .primary-menu > li.has-mega > a::after { margin-left: auto; }
.primary-nav-wrap.nav-open .sub-menu,
.primary-nav-wrap.nav-open .sub-menu.mega-menu {
  position: static !important; box-shadow: none; display: none; border: none; background: transparent;
  grid-template-columns: 1fr; padding: 0 0 12px 16px; max-width: none;
}
.primary-nav-wrap.nav-open li.is-open > .sub-menu,
.primary-nav-wrap.nav-open li.is-open > .sub-menu.mega-menu { display: grid; }
.primary-nav-wrap.nav-open .sub-menu a,
.primary-nav-wrap.nav-open .sub-menu.mega-menu a { padding: 10px 4px; }

/* Suppress floating action buttons / chat launchers while the mobile drawer is open */
body.no-scroll .back-to-top,
body.no-scroll #tidio-chat,
body.no-scroll .crisp-client,
body.no-scroll [id^="tawk"],
body.no-scroll [class*="chat-widget" i],
body.no-scroll [id*="chat-widget" i] {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Reading progress bar (single posts) */
.reading-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--red); z-index: 1100; transition: width .1s linear; }

/* Back to top — placed bottom-left so it never collides with bottom-right chat launchers */
.back-to-top {
  position: fixed; left: 22px; right: auto; bottom: 22px; width: 46px; height: 46px;
  border-radius: 50%; background: var(--band-bg); color: var(--band-fg);
  border: 1px solid var(--band-line); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 400;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease, background .2s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top svg { width: 18px; height: 18px; fill: var(--band-fg); }
.back-to-top:hover { background: var(--red); border-color: var(--red); }

/* Cookie consent banner */
.consent-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200;
  background: var(--band-bg); color: var(--band-fg); border-top: 1px solid var(--band-line);
  box-shadow: 0 -6px 24px rgba(0,0,0,.28);
}
.consent-banner[hidden] { display: none; }
.consent-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 16px 24px; }
.consent-inner p { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--band-muted); max-width: 640px; }
.consent-inner a { color: var(--band-fg); text-decoration: underline; }
.consent-actions { display: flex; gap: 10px; flex-shrink: 0; }
.consent-actions .btn { padding: 10px 18px; font-size: .82rem; }
.consent-actions .btn-outline { border-color: rgba(255,255,255,.38); color: var(--band-fg); }
.consent-actions .btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }

/* Breadcrumbs */
.breadcrumbs { padding: 16px 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.breadcrumbs a:hover { color: var(--red-deep); }
.breadcrumbs li.sep { opacity: .5; }
.breadcrumbs [aria-current="page"] { color: var(--ink); }

/* =========================================================
   5. HERO + CATEGORY RAIL
========================================================= */
.hero { padding: 68px 0 44px; }
.hero-inner { max-width: 760px; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
.hero h1 .accent { color: var(--red); }
.hero p.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 58ch; }
.hero-cta { display: flex; gap: 14px; margin-top: 22px; flex-wrap: wrap; }

.cat-rail { display: flex; gap: 14px; overflow-x: auto; padding: 6px 0 20px; scrollbar-width: thin; }
.cat-rail::-webkit-scrollbar { height: 6px; }
.cat-rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
.cat-pill {
  --c: var(--ink);
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px; background: var(--card);
  border: 1px solid var(--card-border); padding: 12px 18px 12px 14px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(20,18,15,.04);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.cat-pill:hover { border-color: var(--c); transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-pill .dot { width: 10px; height: 10px; border-radius: 2px; background: var(--c); transform: rotate(45deg); flex: none; }
.cat-pill .name { font-family: var(--font-display); font-weight: 500; font-size: .92rem; }
.cat-pill .count { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }

/* Homepage split hero */
.hero-split { padding: 56px 0 20px; }
.hero-split .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; }
.hero-collage { position: relative; height: 380px; }
.hero-collage .slab { position: absolute; border-radius: 10px; box-shadow: var(--shadow); background-size: cover; background-position: center; border: 1px solid var(--card-border); }
.hero-collage .slab-1 { width: 62%; height: 68%; left: 0; top: 0; background-color: var(--band-bg); clip-path: polygon(0 0, 88% 0, 100% 100%, 0% 100%); }
.hero-collage .slab-2 { width: 46%; height: 52%; right: 0; bottom: 0; background: var(--red); clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%); border: none; }
.hero-collage .slab-3 { width: 40%; height: 34%; right: 6%; top: 6%; background-color: var(--paper-alt); border: 1px solid var(--line); }
.hero-collage .collage-tag {
  position: absolute; left: 8%; bottom: 8%; background: var(--card); color: var(--muted);
  border: 1px solid var(--card-border); border-radius: 8px; padding: 12px 16px;
  box-shadow: var(--card-shadow); font-family: var(--font-mono); font-size: .74rem;
}
.hero-collage .collage-tag b { display: block; font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); }

.stat-strip { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 14px 0 0; }
.stat-strip .stat { flex: 1 1 200px; padding: 22px 24px; border-right: 1px solid var(--line); }
.stat-strip .stat:last-child { border-right: none; }
.stat-strip .stat b { display: block; font-family: var(--font-display); font-size: 1.8rem; color: var(--red); }
.stat-strip .stat span { font-family: var(--font-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* "Browse by Room" visual tile grid */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cat-tile {
  --c: var(--ink);
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; background: var(--card);
  border: 1px solid var(--card-border); border-radius: 10px; padding: 20px 18px;
  box-shadow: var(--card-shadow);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.cat-tile:hover { transform: translateY(-4px); border-color: var(--c); box-shadow: var(--card-shadow-hover); }
.cat-tile-mark { position: relative; width: 54px; height: 44px; }
.cat-tile-slash { position: absolute; inset: 0; background: var(--c); clip-path: polygon(22% 0, 78% 0, 56% 100%, 0 100%); border-radius: 3px; }
.cat-tile-letter { position: relative; z-index: 1; font-family: var(--font-display); font-weight: 700; color: #fff; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: .92rem; letter-spacing: -.03em; }
.cat-tile-name { font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.25; color: var(--ink); }
.cat-tile-count { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }

/* Tabbed "Explore by Category" */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.cat-tabs [role="tab"] {
  --c: var(--ink);
  font-family: var(--font-display); font-weight: 500; font-size: .88rem; padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--card-border); background: var(--card); cursor: pointer; color: var(--ink); transition: all .2s ease;
}
.cat-tabs [role="tab"]::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--c); transform: rotate(45deg) translateY(-1px); margin-right: 8px; }
.cat-tabs [role="tab"]:hover { border-color: var(--c); }
.cat-tabs [role="tab"].is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cat-tab-panel { display: none; }
.cat-tab-panel.is-active { display: block; }

/* =========================================================
   6. POST CARDS + SPOTLIGHT + GRIDS
========================================================= */
.badge {
  --c: var(--ink);
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono);
  font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600;
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, var(--card));
  border: 1px solid color-mix(in srgb, var(--c) 26%, transparent);
  padding: 5px 10px 5px 8px; border-radius: 5px;
}
:root[data-theme="dark"] .badge {
  background: color-mix(in srgb, var(--c) 18%, #1A1714);
  border-color: color-mix(in srgb, var(--c) 35%, transparent);
}
.badge .dot { width: 6px; height: 6px; background: var(--c); border-radius: 1px; flex: none; }

.spotlight {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 38px; align-items: center;
  background: var(--card); border: 1px solid var(--card-border); border-radius: 14px;
  box-shadow: var(--card-shadow); overflow: hidden; padding: 14px;
  transition: box-shadow .25s ease, border-color .25s ease;
}
.spotlight:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: color-mix(in srgb, var(--red) 32%, var(--card-border));
}
.spotlight .spotlight-media {
  height: 100%; min-height: 340px; overflow: hidden; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper-alt);
}
.spotlight .spotlight-media a { display: block; width: 100%; height: 100%; }
.spotlight .spotlight-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.spotlight:hover .spotlight-media img { transform: scale(1.03); }
.spotlight .spotlight-body { padding: 18px 28px 18px 0; }
.spotlight h2 { font-size: clamp(1.55rem, 2.5vw, 2.05rem); line-height: 1.2; margin: 12px 0 12px; }
.spotlight h2 a:hover { color: var(--red-deep); }
.spotlight .excerpt { color: var(--ink-soft); margin-bottom: 18px; }
.spotlight .post-meta { padding-top: 14px; border-top: 1px solid var(--line); }

/* Post Grids: 3 cols in full-width sections, 2 cols inside sidebar content-layout */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; align-items: stretch; }
.content-layout .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

/* Elevated Editorial Post Card */
.post-card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 12px 18px;
  box-shadow: var(--card-shadow);
  transition: transform .24s cubic-bezier(.22,.61,.36,1), box-shadow .24s ease, border-color .24s ease;
}
@media (hover: hover) {
  .post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
    border-color: color-mix(in srgb, var(--red) 38%, var(--card-border));
  }
}
.post-card .thumb {
  position: relative; aspect-ratio: 16/9; overflow: hidden;
  border-radius: 8px; margin-bottom: 16px;
  background: var(--paper-alt); border: 1px solid var(--line);
}
.post-card .thumb > a:not(.badge) { display: block; width: 100%; height: 100%; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.post-card:hover .thumb img { transform: scale(1.04); }
.post-card .thumb .badge {
  position: absolute; top: 10px; left: 10px; width: auto; height: auto; z-index: 2;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(0,0,0,.14);
}
.post-card h3 {
  font-size: 1.15rem; line-height: 1.32; letter-spacing: -0.012em;
  margin: 0 0 10px; padding: 0 8px;
}
.post-card h3 a { transition: color .18s ease; }
.post-card h3 a:hover { color: var(--red-deep); }
.post-card .excerpt {
  color: var(--ink-soft); font-size: .95rem; line-height: 1.62;
  margin: 0 0 16px; padding: 0 8px; flex-grow: 1;
}
.post-card .post-meta {
  margin-top: auto; margin-left: 8px; margin-right: 8px;
  padding-top: 13px; border-top: 1px solid var(--line);
}

.post-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-family: var(--font-mono); font-size: .71rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.post-meta .sep { width: 3px; height: 3px; background: var(--muted); border-radius: 50%; flex: none; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 48px; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px;
  background: var(--card); border: 1px solid var(--card-border); border-radius: 8px;
  font-family: var(--font-display); font-weight: 500; padding: 0 10px; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.pagination .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pagination a:hover { border-color: var(--red); color: var(--red-deep); }

/* =========================================================
   7. NEWSLETTER BAND
========================================================= */
.newsletter-band {
  background: var(--band-bg); color: var(--band-fg);
  border-top: 1px solid var(--band-line); border-bottom: 1px solid var(--band-line);
  position: relative; overflow: hidden;
}
.newsletter-band .wrap { padding: 52px 24px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; position: relative; z-index: 1; }
.newsletter-band h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 6px; color: var(--band-fg); }
.newsletter-band p { margin: 0; color: var(--band-muted); }
.newsletter-band form { display: flex; gap: 10px; flex: 0 0 auto; }
.newsletter-band input[type="email"] {
  padding: 14px 16px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.18);
  background: #FFFFFF; color: #141414; min-width: 260px; font-family: var(--font-display);
}
:root[data-theme="dark"] .newsletter-band input[type="email"] {
  background: #1E1B17; color: var(--band-fg); border-color: rgba(243,239,230,.2);
}
.newsletter-band input[type="email"]::placeholder { color: #756F66; }
:root[data-theme="dark"] .newsletter-band input[type="email"]::placeholder { color: #9E9688; }
.newsletter-form-wrap { display: flex; flex-direction: column; gap: 8px; }
.newsletter-band .newsletter-form-wrap { align-items: flex-end; }
.newsletter-notice { font-size: .82rem; font-weight: 600; margin: 0; }
.newsletter-notice.is-success { color: #7CC28A; }
.newsletter-notice.is-error { color: #FF6B72; }
.footer-newsletter .newsletter-notice { color: var(--band-fg); }
.footer-newsletter .newsletter-notice.is-success { color: #7CC28A; }
.footer-newsletter .newsletter-notice.is-error { color: #F09A9E; }
.newsletter-band::before {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; background: var(--red);
  clip-path: polygon(30% 0, 70% 0, 100% 100%, 40% 100%); opacity: .9; pointer-events: none;
}

/* =========================================================
   8. SIDEBAR (BIDIRECTIONAL SMART STICKY)
========================================================= */
.content-layout { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(280px, .9fr); gap: 48px; align-items: start; }
.content-layout.no-sidebar { grid-template-columns: 1fr; max-width: 820px; margin: 0 auto; }

.sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
  will-change: top;
}

.sidebar .widget {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 26px;
  box-shadow: var(--card-shadow);
}
.sidebar .widget:last-child { margin-bottom: 0; }

/* Sidebar widget internals — keep thumbnails and titles off the card edge.
   The base theme zeroes the <li> side padding and gives .post-meta a negative
   margin, which made the "Popular Right Now" list read as unpadded. */
.sidebar .widget-title { margin-top: 0; }
.sidebar .widget ul,
.sidebar .widget .popular-posts { margin: 0; padding: 0; list-style: none; }
.sidebar .widget ul li { padding: 13px 0; border-bottom: 1px solid var(--line); }
.sidebar .widget ul li:first-child { padding-top: 2px; }
.sidebar .widget ul li:last-child { padding-bottom: 0; border-bottom: 0; }
.widget .mini-post { gap: 14px; padding: 13px 0; margin: 0; }
.widget .mini-post:first-child { padding-top: 2px; }
.widget .mini-post:last-child { padding-bottom: 0; border-bottom: 0; }
.widget .mini-post > div:last-child { min-width: 0; }
.widget .mini-post h4 { margin: 0 0 6px; }
.widget .mini-post .post-meta { margin: 0; padding: 0; border: 0; font-size: .78rem; }
.widget .mini-post h4 a,
.widget ul li a { display: block; }
.widget_search { padding-bottom: 2px; }
@media (max-width: 620px) {
  .sidebar .widget { padding: 16px; }
}

/* Comment form — hide the Website (author URL) field on the front end.
   Presentational only; comments still post normally. The plugin also removes
   the field from the markup at render time. */
.comment-form p.comment-form-url,
.comment-form .comment-form-url,
#commentform p.comment-form-url,
p.comment-form-url {
  display: none !important;
}
.widget { margin-bottom: 32px; }
.widget-title {
  font-family: var(--font-display); font-size: .98rem; text-transform: uppercase;
  letter-spacing: .05em; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 14px;
}
.widget ul li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.widget ul li:last-child { border-bottom: none; padding-bottom: 0; }
.widget ul li a { display: flex; align-items: center; justify-content: space-between; gap: 8px; transition: color .15s ease; }
.widget ul li a:hover { color: var(--red-deep); }

.widget_search .search-form { display: flex; }
.widget_search input[type="search"] {
  flex: 1; min-width: 0; padding: 11px 13px; background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-right: none; border-radius: var(--radius) 0 0 var(--radius);
}
.widget_search button {
  background: var(--red); color: #fff; border: 1px solid var(--red);
  padding: 0 16px; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer;
}
.widget_search button:hover { background: #d6252d; border-color: #d6252d; }

.mini-post { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.mini-post:first-child { padding-top: 2px; }
.mini-post:last-child { border-bottom: none; padding-bottom: 0; }
.mini-post .thumb {
  width: 72px; height: 72px; flex: none; border-radius: 6px; overflow: hidden;
  background: var(--paper-alt); border: 1px solid var(--line);
}
.mini-post .thumb a { display: block; width: 100%; height: 100%; }
.mini-post .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.mini-post:hover .thumb img { transform: scale(1.05); }
.mini-post h4 { font-size: .92rem; margin: 0 0 5px; line-height: 1.35; }
.mini-post h4 a { display: inline; }
.mini-post h4 a:hover { color: var(--red-deep); }
.mini-post .post-meta { font-size: .67rem; }

.ad-slot { border: 1px dashed var(--line); border-radius: 8px; padding: 12px; text-align: center; overflow: hidden; background: var(--paper-alt); }
.ad-slot span { display: block; font-family: var(--font-mono); font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.in-feed-ad-cell { grid-column: 1 / -1; }
.in-feed-ad-cell .ad-slot { padding: 18px; }

/* =========================================================
   9. SINGLE POST
========================================================= */
.post-header-single { padding: 44px 0 10px; text-align: center; }
.post-header-single .badge { margin-bottom: 16px; }
.post-header-single h1 { max-width: 900px; margin: 0 auto 18px; font-size: clamp(2rem, 4vw, 2.85rem); }
.post-header-single .post-meta { justify-content: center; }
.post-header-single .author { display: flex; align-items: center; gap: 8px; }
.post-header-single .author img { width: 26px; height: 26px; border-radius: 50%; }

.featured-media { max-width: var(--wrap); margin: 30px auto; padding: 0 24px; }
.featured-media img {
  width: 100%; border-radius: 10px; aspect-ratio: 16/9; object-fit: cover; max-height: 480px;
  border: 1px solid var(--card-border); box-shadow: var(--card-shadow);
}
.featured-media figcaption { text-align: center; font-family: var(--font-mono); font-size: .78rem; color: var(--muted); margin-top: 10px; }

.project-info-bar { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center; margin: 22px 0 0; }
.pi-item { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: .82rem; color: var(--ink-soft); }
.pi-item svg { width: 16px; height: 16px; fill: var(--red); flex: none; }

.toc-box { background: var(--paper-alt); border: 1px solid var(--line); border-radius: 8px; padding: 22px 26px; margin: 0 0 2em; }
.toc-box .toc-title { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--red-deep); font-weight: 600; margin: 0 0 10px; }
.toc-box ol { counter-reset: toc; margin: 0; }
.toc-box ol > li { counter-increment: toc; padding: 5px 0; font-size: .95rem; }
.toc-box ol > li::before { content: counter(toc) ". "; font-family: var(--font-mono); color: var(--muted); margin-right: 4px; }
.toc-box ol > li.toc-sub { padding-left: 20px; }
.toc-box ol > li.toc-sub::before { content: "– "; }
.toc-box a:hover { color: var(--red-deep); text-decoration: underline; }

.entry-content { font-size: 1.08rem; }
.entry-content h2 { font-size: 1.55rem; margin-top: 1.6em; }
.entry-content h3 { font-size: 1.25rem; margin-top: 1.4em; }
.entry-content > h2:first-child, .entry-content > h3:first-child { margin-top: 0; }
.entry-content > p:first-of-type { font-size: 1.18rem; color: var(--ink-soft); }
.entry-content a { color: var(--red-deep); text-decoration: underline; text-underline-offset: 3px; }
.entry-content img, .entry-content figure { border-radius: 6px; margin: 1.6em 0; }
.entry-content blockquote { margin: 1.8em 0; padding: 6px 0 6px 22px; border-left: 3px solid var(--red); font-style: italic; color: var(--ink-soft); }
.entry-content ul, .entry-content ol { margin: 0 0 1.4em; padding-left: 1.3em; list-style: revert; }
.entry-content ul:not(.vf-check) { list-style: none; padding-left: 0; }
.entry-content ul:not(.vf-check) > li { position: relative; padding-left: 22px; margin-bottom: .5em; }
.entry-content ul:not(.vf-check) > li::before { content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 11px; background: var(--red); clip-path: polygon(0 0, 60% 0, 100% 100%, 40% 100%); }
.entry-content table { margin: 1.6em 0; font-size: .95rem; }
.entry-content table th, .entry-content table td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.entry-content table th { background: var(--paper-alt); font-family: var(--font-display); }
.entry-content hr { border: none; border-top: 1px solid var(--line); margin: 2.2em 0; }
.entry-content .wp-caption-text { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); text-align: center; margin-top: 8px; }

/* Theme-level dark-mode fallback for custom #vf-* article containers */
:root[data-theme="dark"] .entry-content [id^="vf-"] {
  --vf-ink: #F3EFE6;
  --vf-ink-soft: #CFC9BC;
  --vf-paper: #151310;
  --vf-paper-alt: #23201B;
  --vf-card: #1E1B17;
  --vf-line: rgba(243, 239, 230, 0.13);
  --vf-muted: #9E9688;
  --vf-accent: #82A9CA;
  background: transparent;
  color: var(--vf-ink);
}

.in-content-ad { margin: 2.4em 0; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 0; }
.tag-list a { font-family: var(--font-mono); font-size: .78rem; padding: 7px 14px; background: var(--card); border: 1px solid var(--card-border); border-radius: 999px; }
.tag-list a:hover { border-color: var(--red); color: var(--red-deep); }

.share-row { display: flex; align-items: center; gap: 12px; margin: 28px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share-row span.label { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.share-row a { width: 38px; height: 38px; border-radius: 50%; background: var(--card); border: 1px solid var(--card-border); display: inline-flex; align-items: center; justify-content: center; transition: background .2s ease, border-color .2s ease; }
.share-row a:hover { background: var(--ink); border-color: var(--ink); }
.share-row a:hover svg { fill: var(--paper); }
.share-row svg { width: 15px; height: 15px; fill: var(--ink); }

.author-box { display: flex; gap: 20px; background: var(--card); border: 1px solid var(--card-border); border-radius: 12px; padding: 26px; margin: 40px 0; align-items: flex-start; box-shadow: var(--card-shadow); }
.author-box img { width: 64px; height: 64px; border-radius: 50%; flex: none; }
.author-box h4 { margin: 0 0 4px; font-size: 1.05rem; }
.author-box p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

.related-posts { margin-top: 56px; }

.comments-area { margin-top: 56px; }
.comment-list { margin: 0; }
.comment-list .comment { border-top: 1px solid var(--line); padding: 22px 0; }
.comment-author { font-family: var(--font-display); font-weight: 700; }
.comment-meta { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); margin-bottom: 8px; }
.comment-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.comment-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 6px; margin-bottom: 14px; background: var(--card); color: var(--ink);
}
.comment-form input[type="checkbox"],
.comment-form input[type="radio"] {
  width: auto; margin: 0 8px 0 0; padding: 0; accent-color: var(--red); vertical-align: middle;
}
.comment-form textarea { min-height: 130px; }
.comment-respond h3 { margin-bottom: 18px; }

/* =========================================================
   10. ARCHIVE / CATEGORY / SEARCH / 404
========================================================= */
.archive-header { padding: 48px 0 12px; text-align: center; }
.archive-header .cat-icon { width: 54px; height: 54px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.archive-header h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.archive-header p { max-width: 640px; margin: 0 auto; color: var(--ink-soft); }

.error-404 { text-align: center; padding: 90px 0; }
.error-404 h1 { font-size: 5rem; color: var(--red); margin-bottom: 0; }
.error-404 .search-form { max-width: 460px; margin: 26px auto; display: flex; }

/* =========================================================
   11. FOOTER
========================================================= */
.site-footer { background: var(--band-bg); color: var(--band-muted); border-top: 1px solid var(--band-line); margin-top: 64px; }
.footer-top { padding: 60px 0 40px; display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.1fr; gap: 40px; }
.footer-brand .site-title, .footer-brand .site-title a { color: var(--band-fg); }
.footer-logo a { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--band-fg); }
.footer-logo svg { flex: none; }
.footer-brand img.custom-logo { max-height: 40px; margin-bottom: 14px; filter: invert(1) hue-rotate(180deg) saturate(1.15); }
.footer-brand p { color: #A69F92; font-size: .95rem; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); display: inline-flex; align-items: center; justify-content: center; transition: background .2s ease, border-color .2s ease; }
.footer-social a:hover { background: var(--red); border-color: var(--red); }
.footer-social svg { width: 14px; height: 14px; fill: var(--band-fg); }
.footer-col h3.widget-title { color: var(--band-fg); border-bottom-color: rgba(255,255,255,.18); font-size: .92rem; }
.footer-col ul li { border-bottom: 1px solid rgba(255,255,255,.08); padding: 8px 0; }
.footer-col ul li a { color: var(--band-muted); }
.footer-col ul li a:hover { color: var(--red); }
.footer-newsletter form { display: flex; margin-top: 12px; }
.footer-newsletter input[type="email"] {
  flex: 1; min-width: 0; padding: 11px 13px;
  border: 1px solid rgba(255,255,255,.22); border-right: none;
  background: rgba(255,255,255,.05); color: var(--band-fg);
  border-radius: var(--radius) 0 0 var(--radius);
}
.footer-newsletter input[type="email"]::placeholder { color: rgba(243,239,230,.5); }
.footer-newsletter button { border-radius: 0 var(--radius) var(--radius) 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; }
.footer-bottom-menu { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-bottom-menu a:hover { color: var(--red); }

/* =========================================================
   12. RESPONSIVE
========================================================= */
@media (max-width: 1080px) {
  .post-grid,
  .content-layout .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .content-layout { grid-template-columns: 1fr; gap: 40px; }
  .sidebar { position: static !important; top: auto !important; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .spotlight { grid-template-columns: 1fr; gap: 22px; padding: 14px; }
  .spotlight .spotlight-media { min-height: 240px; aspect-ratio: 16/9; }
  .spotlight .spotlight-body { padding: 4px 12px 14px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-split .wrap { grid-template-columns: 1fr; }
  .hero-collage { height: 260px; order: -1; }
}
@media (max-width: 900px) {
  .topbar .wrap { font-size: .7rem; }
  .primary-nav-wrap .primary-menu { display: none; }
  .primary-nav-wrap.nav-open .primary-menu { display: flex; }
  .nav-scroll-btn { display: none !important; }
  .menu-toggle { display: inline-flex; }
  .featured-media img { max-height: 320px; }
  .header-search .wrap { flex-wrap: nowrap; }
  .header-search input[type="search"] { font-size: .95rem; padding: 12px 14px; }
  .footer-top { grid-template-columns: 1fr; padding: 44px 0 20px; }
  .newsletter-band form { width: 100%; }
  .newsletter-band .newsletter-form-wrap { width: 100%; align-items: stretch; }
  .newsletter-band input[type="email"] { min-width: 0; flex: 1; }
  .author-box { flex-direction: column; }
  .back-to-top { left: 14px; right: auto; bottom: 14px; width: 42px; height: 42px; }
}
@media (max-width: 640px) {
  .post-grid,
  .content-layout .post-grid { grid-template-columns: 1fr; gap: 20px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-strip .stat { flex: 1 1 50%; border-bottom: 1px solid var(--line); }
}
@media (max-width: 420px) {
  .cat-grid { grid-template-columns: 1fr; }
}

/* Print */
@media print {
  .site-header, .site-footer, .sidebar, .share-row, .newsletter-band, .topbar, .ad-slot, .in-content-ad, .consent-banner, .back-to-top { display: none !important; }
}
