/* ==========================================================================
   Techweed — main.css | Modern Tech Publication Theme
   ========================================================================== */

/* ==========================================================================
   0. Design Tokens & Reset
   ========================================================================== */

:root {
	--color-primary:       #10B981;
	--color-primary-dark:  #059669;
	--color-primary-light: #ECFDF5;
	--color-primary-glow:  rgba(16,185,129,.15);

	--color-bg:            #FFFFFF;
	--color-bg-alt:        #F9FAFB;
	--color-bg-dark:       #111827;
	--color-bg-card:       #FFFFFF;

	--color-text:          #111827;
	--color-text-secondary:#6B7280;
	--color-text-tertiary: #9CA3AF;
	--color-text-inverse:  #F9FAFB;

	--color-border:        #E5E7EB;
	--color-border-light:  #F3F4F6;

	--font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--font-mono: 'SF Mono', Consolas, 'Courier New', monospace;

	--text-xs:   0.75rem;
	--text-sm:   0.875rem;
	--text-base: 1rem;
	--text-md:   1rem;
	--text-lg:   1.125rem;
	--text-xl:   1.25rem;
	--text-2xl:  1.5rem;
	--text-3xl:  1.875rem;
	--text-4xl:  2.25rem;

	--radius-sm:  6px;
	--radius-md:  10px;
	--radius-lg:  14px;
	--radius-xl:  20px;
	--radius-2xl: 24px;
	--radius-full: 9999px;

	--shadow-xs:    0 1px 2px rgba(0,0,0,.04);
	--shadow-sm:    0 1px 3px rgba(0,0,0,.06);
	--shadow-md:    0 4px 12px rgba(0,0,0,.06);
	--shadow-lg:    0 8px 24px rgba(0,0,0,.08);
	--shadow-xl:    0 16px 40px rgba(0,0,0,.1);
	--shadow-card:  0 0 0 1px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.04);
	--shadow-card-hover: 0 0 0 1px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.08);

	--ease-out: cubic-bezier(.2,0,0,1);
	--ease-spring: cubic-bezier(.34,1.56,.64,1);

	--content-width: 1280px;
	--sidebar-width: 320px;

	--z-sticky:  100;
	--z-overlay: 200;
	--z-modal:   300;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
	font-family: var(--font-sans);
	font-size: var(--text-base);
	line-height: 1.7;
	color: var(--color-text);
	background: var(--color-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
}

.skip-link {
	position: absolute; top: -9999px; left: -9999px; z-index: 999;
	padding: 8px 16px; background: var(--color-primary); color: #fff;
	font-weight: 600; text-decoration: none; border-radius: var(--radius-md);
}
.skip-link:focus { top: 8px; left: 8px; }

a { color: inherit; text-decoration: none; transition: color .15s; }
a:hover { color: var(--color-primary); }
a:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: 4px; }

img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

hr { border: none; border-top: 1px solid var(--color-border); margin: 2rem 0; }

.screen-reader-text {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   1. Layout
   ========================================================================== */

.tw-container {
	width: 100%;
	max-width: var(--content-width);
	margin: 0 auto;
	padding: 0 1.25rem;
}

.tw-content-sidebar {
	display: grid;
	grid-template-columns: 1fr;
	gap: 3rem;
	align-items: start;
}

.tw-content-full { max-width: 760px; margin: 0 auto; }
.site-main { min-width: 0; }

.tw-below-fold { content-visibility: auto; contain-intrinsic-size: 0 400px; }

/* ==========================================================================
   2. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-sans);
	line-height: 1.2;
	color: var(--color-text);
	font-weight: 700;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.375rem, 3vw, 1.875rem); }
h3 { font-size: var(--text-xl); font-weight: 600; }
h4 { font-size: 1.1875rem; font-weight: 600; }
h5, h6 { font-size: var(--text-md); font-weight: 600; }

p { margin-bottom: 1rem; }

/* Entry content */
.entry-content {
	font-size: var(--text-lg);
	line-height: 1.85;
	color: var(--color-text);
}
.entry-content > * + * { margin-top: 1.5rem; }

.entry-content h2 {
	margin-top: 3rem;
	margin-bottom: 1.25rem;
	font-size: var(--text-2xl);
	color: var(--color-text);
}
.entry-content h3 {
	margin-top: 2.5rem;
	margin-bottom: 1rem;
}
.entry-content h4 { font-size: 1.1875rem; }
.entry-content h5, .entry-content h6 { font-size: var(--text-lg); }

.entry-content ul, .entry-content ol {
	padding-left: 1.5rem;
	margin-bottom: 1.5rem;
}
.entry-content ul { list-style: none; }
.entry-content ul li {
	position: relative;
	padding-left: 1.5rem;
	margin-bottom: .5rem;
}
.entry-content ul li::before {
	content: '';
	position: absolute;
	left: 0;
	top: .65em;
	width: 5px;
	height: 5px;
	background: var(--color-primary);
	border-radius: 50%;
}
.entry-content ol { list-style: decimal; }
.entry-content ol li { margin-bottom: .5rem; }

.entry-content blockquote {
	margin: 2rem 0;
	padding: 1.5rem 2rem;
	border-left: 3px solid var(--color-primary);
	background: var(--color-primary-light);
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
	font-style: italic;
	color: var(--color-text);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-content img { border-radius: var(--radius-lg); margin: 2rem auto; }
.entry-content figure,
.entry-content .wp-caption { margin: 2rem 0; max-width: 100% !important; width: auto !important; }
.entry-content figcaption {
	text-align: center;
	font-size: var(--text-sm);
	color: var(--color-text-secondary);
	margin-top: .75rem;
}

.entry-content table {
	display: block;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	width: 100%;
	border-collapse: collapse;
	margin: 2rem 0;
	font-size: var(--text-sm);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	overflow-y: hidden;
}
.entry-content th, .entry-content td {
	padding: .75rem 1rem;
	text-align: left;
	border-bottom: 1px solid var(--color-border);
}
.entry-content th {
	background: var(--color-bg-dark);
	color: #fff;
	font-weight: 600;
	font-size: var(--text-xs);
	text-transform: uppercase;
	letter-spacing: .05em;
}
.entry-content tr:nth-child(even) { background: var(--color-bg-alt); }

.entry-content code:not(pre > code) {
	background: var(--color-primary-light);
	color: var(--color-primary-dark);
	padding: .15em .4em;
	border-radius: 4px;
	font-family: var(--font-mono);
	font-size: .85em;
	font-weight: 500;
}

.entry-content mark, mark {
	background: #FEF3C7;
	padding: .1em .2em;
	border-radius: 2px;
}

.entry-content a[target="_blank"]::after {
	content: '↗';
	font-size: .65em;
	margin-left: 2px;
	opacity: .4;
	vertical-align: super;
}

/* ==========================================================================
   3. Header
   ========================================================================== */

.site-header {
	background: #fff;
	border-bottom: 1px solid var(--color-border);
	position: relative;
	z-index: var(--z-sticky);
	transition: all .25s var(--ease-out);
}

.site-header.is-sticky {
	position: sticky;
	top: 0;
	box-shadow: var(--shadow-md);
}

.site-header.is-sticky .tw-header-main { padding: .5rem 0; }

.tw-header-main { padding: .875rem 0; transition: padding .25s var(--ease-out); }

.tw-header-inner {
	display: flex;
	align-items: center;
	gap: 2rem;
}

.site-branding { flex-shrink: 0; }

.site-branding .custom-logo {
	height: 36px;
	width: auto;
	max-width: 160px;
	object-fit: contain;
}

/* New logo (direct img) */
.site-logo-link { display: flex; align-items: center; text-decoration: none; }

.site-logo-img {
	height: 44px;
	width: auto;
	max-width: 240px;
	object-fit: contain;
	display: block;
}

@media (max-width: 640px) {
	.site-logo-img { height: 36px; }
	.post-navigation { grid-template-columns: 1fr; }
	.nav-next { text-align: left; border-top: 1px solid var(--color-border); }
}

/* Mobile overlay logo */
.mobile-nav-logo-link { display: flex; align-items: center; text-decoration: none; }
.mobile-nav-logo-img {
	height: 36px;
	width: auto;
	max-width: 180px;
	object-fit: contain;
	display: block;
	filter: brightness(0) invert(1);
}

/* Footer favicon circle */
.footer-favicon-img {
	width: 40px;
	height: 40px;
	object-fit: contain;
	position: relative;
	z-index: 1;
}

.site-title-link {
	display: flex;
	align-items: center;
	gap: .5rem;
	text-decoration: none;
}

.site-logo-icon {
	font-size: 1.4rem;
	line-height: 1;
}

.site-logo-text {
	font-size: var(--text-xl);
	font-weight: 700;
	color: var(--color-text);
	letter-spacing: -0.02em;
}
.site-logo-text::first-letter {
	color: var(--color-primary);
}

.main-navigation { flex: 1; display: flex; justify-content: flex-end; }

.nav-menu { display: flex; align-items: center; gap: .25rem; list-style: none; }
.nav-menu > li { position: relative; }

.nav-menu > li > a {
	display: flex; align-items: center; gap: 4px;
	padding: 8px 14px;
	color: var(--color-text-secondary);
	font-weight: 500; font-size: var(--text-sm);
	border-radius: var(--radius-sm);
	transition: all .2s;
	position: relative;
}
.nav-menu > li > a::after {
	content: '';
	position: absolute;
	bottom: 0; left: 14px; right: 14px;
	height: 2px;
	background: var(--color-primary);
	border-radius: 2px;
	transform: scaleX(0);
	transition: transform .2s var(--ease-out);
}
.nav-menu > li > a:hover { color: var(--color-text); }
.nav-menu > li > a:hover::after { transform: scaleX(1); }
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-menu-ancestor > a {
	color: var(--color-primary-dark);
	font-weight: 600;
}
.nav-menu > li.current-menu-item > a::after,
.nav-menu > li.current-menu-ancestor > a::after {
	transform: scaleX(1);
}

/* Dropdown */
.nav-menu .sub-menu {
	position: absolute; top: calc(100% + 6px); left: 0;
	min-width: 200px; background: #fff;
	border: 1px solid var(--color-border); border-radius: var(--radius-lg);
	box-shadow: var(--shadow-xl); padding: 6px;
	list-style: none; opacity: 0; visibility: hidden;
	transform: translateY(-4px) scale(.98);
	transition: all .2s var(--ease-out); z-index: var(--z-overlay);
}
.nav-menu > li:hover > .sub-menu,
.nav-menu > li:focus-within > .sub-menu {
	opacity: 1; visibility: visible; transform: translateY(0) scale(1);
}
.sub-menu a {
	display: block; padding: 8px 12px;
	color: var(--color-text-secondary); font-size: var(--text-sm);
	border-radius: var(--radius-sm); transition: all .15s;
}
.sub-menu a:hover { background: var(--color-bg-alt); color: var(--color-text); }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 4px; }

.mobile-menu-toggle {
	display: flex; align-items: center; justify-content: center;
	width: 44px; height: 44px;
	border-radius: var(--radius-md);
	color: var(--color-text-secondary);
	transition: all .15s;
}
.mobile-menu-toggle:hover {
	background: var(--color-bg-alt); color: var(--color-text);
}

.mobile-menu-toggle {
	display: none;
	flex-direction: column;
	gap: 4px;
}

.hamburger-bar {
	display: block;
	width: 22px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transition: all .2s;
}

/* Fullscreen Search Overlay */
/* Search overlay removed — search lives only in hero section */

/* ==========================================================================
   4. Mobile Menu
   ========================================================================== */

.mobile-nav-overlay {
	position: fixed; inset: 0;
	background: var(--color-bg-dark);
	z-index: var(--z-modal);
	display: flex; flex-direction: column;
	transform: translateX(-100%);
	transition: transform .35s var(--ease-out);
	overflow-y: auto;
}
.mobile-nav-overlay:not([hidden]) { transform: translateX(0); }
.mobile-nav-overlay.is-open { display: flex; }

.mobile-nav-header {
	display: flex; align-items: center; justify-content: space-between;
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid rgba(255,255,255,.06);
}
.mobile-nav-logo { color: #fff; font-size: var(--text-xl); font-weight: 700; letter-spacing: -.02em; }
.mobile-menu-close {
	color: rgba(255,255,255,.6); display: flex; align-items: center;
	justify-content: center; width: 44px; height: 44px;
	border-radius: var(--radius-md);
}
.mobile-menu-close:hover { color: #fff; }

.mobile-nav { flex: 1; padding: 1.5rem; }
.mobile-menu-list { list-style: none; }
.mobile-menu-list a {
	display: block; padding: 1rem 0;
	color: rgba(255,255,255,.75); font-size: var(--text-md); font-weight: 500;
	border-bottom: 1px solid rgba(255,255,255,.06);
	transition: all .15s;
}
.mobile-menu-list a:hover { color: var(--color-primary); padding-left: .75rem; }

.mobile-nav-footer { padding: 1.5rem; border-top: 1px solid rgba(255,255,255,.06); }

.mobile-nav-backdrop {
	position: fixed; inset: 0;
	background: rgba(0,0,0,.5);
	z-index: calc(var(--z-modal) - 1);
	backdrop-filter: blur(4px);
}

/* ==========================================================================
   5. Hero Section — Premium Search
   ========================================================================== */

.tw-hero {
	background: linear-gradient(135deg, #111827 0%, #064E3B 50%, #111827 100%);
	padding: 5rem 1.25rem;
	text-align: center;
	position: relative;
	overflow: hidden;
}
.tw-hero::before {
	content: '';
	position: absolute;
	width: 800px; height: 800px;
	top: -400px; right: -200px;
	background: radial-gradient(circle, rgba(16,185,129,.15) 0%, transparent 70%);
	pointer-events: none;
}
.tw-hero::after {
	content: '';
	position: absolute;
	width: 600px; height: 600px;
	bottom: -300px; left: -100px;
	background: radial-gradient(circle, rgba(16,185,129,.1) 0%, transparent 70%);
	pointer-events: none;
}
/* ==========================================================================
   Hemp Leaf Decorative Backgrounds — shared component
   Used in: .single-hero (8 leaves), .tw-hero (10), .site-footer (10)
   ========================================================================== */
.hemp-leaves {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	overflow: hidden;
}
.hemp-leaf {
	position: absolute;
	display: block;
	color: #fff;
	pointer-events: none;
	user-select: none;
}
.hemp-leaf svg {
	display: block;
	width: 100%;
	height: 100%;
}


/* --- .tw-hero: 10 leaves spread across full-width hero --- */
.tw-hero .hemp-leaf-1  { width: 170px; top: -25px;  left: 3%;   opacity: .07; transform: rotate(-12deg); filter: blur(.5px); }
.tw-hero .hemp-leaf-2  { width:  95px; top: 15%;    right: 7%;  opacity: .06; transform: rotate(28deg);  filter: blur(1px); }
.tw-hero .hemp-leaf-3  { width: 130px; bottom: -20px; left: 18%; opacity: .07; transform: rotate(18deg);  filter: blur(.5px); }
.tw-hero .hemp-leaf-4  { width:  72px; top: 8%;     left: 33%;  opacity: .05; transform: rotate(-42deg); filter: blur(1px); }
.tw-hero .hemp-leaf-5  { width: 210px; top: -45px;  right: 12%; opacity: .06; transform: rotate(8deg);   filter: blur(.5px); }
.tw-hero .hemp-leaf-6  { width:  82px; bottom: 8%;  right: 28%; opacity: .05; transform: rotate(-22deg); filter: blur(1px); }
.tw-hero .hemp-leaf-7  { width: 115px; bottom: -18px; right: 4%; opacity: .07; transform: rotate(38deg);  filter: blur(.5px); }
.tw-hero .hemp-leaf-8  { width:  68px; top: 38%;    left: 7%;   opacity: .05; transform: rotate(58deg);  filter: blur(1.5px); }
.tw-hero .hemp-leaf-9  { width: 145px; top: 12%;    left: 53%;  opacity: .06; transform: rotate(-27deg); filter: blur(.5px); }
.tw-hero .hemp-leaf-10 { width:  58px; bottom: 22%; left: 43%;  opacity: .04; transform: rotate(72deg);  filter: blur(2px); }

.hero-content {
	position: relative; z-index: 1;
	max-width: 640px; margin: 0 auto;
}
.hero-tagline {
	color: #fff;
	font-size: clamp(1.75rem, 5vw, 2.75rem);
	font-weight: 700;
	letter-spacing: -.02em;
	margin-bottom: 1rem;
	line-height: 1.1;
}
.hero-subtext {
	color: rgba(255,255,255,.5);
	font-size: var(--text-base);
	margin-bottom: 2rem;
	max-width: 480px;
	margin-left: auto; margin-right: auto;
	line-height: 1.6;
}

/* ==========================================================================
   6. Section Headers
   ========================================================================== */

.section-header {
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--color-border);
}

.section-title {
	font-size: var(--text-lg);
	font-weight: 700;
	color: var(--color-text);
	margin: 0;
	letter-spacing: -.02em;
}

.section-leaf-deco { display: none; }

.tw-main-section {
	padding: 2.5rem 0;
}

/* ==========================================================================
   7. Post Cards — Vertical Grid
   ========================================================================== */

.tw-card-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

/* Also keep old class for archives */
.tw-post-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

.post-card {
	display: flex;
	flex-direction: column;
	background: var(--color-bg-card);
	border-radius: var(--radius-lg);
	overflow: hidden;
	border: 1px solid var(--color-border);
	transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}

.post-card:hover {
	border-color: transparent;
	box-shadow: var(--shadow-card-hover);
	transform: translateY(-2px);
}

.post-card-image {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--color-bg-alt);
}

.post-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s var(--ease-out);
}

.post-card:hover .post-card-image img { transform: scale(1.04); }

.post-card-body {
	padding: 1.25rem 1.5rem 1.5rem;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.post-card-title {
	font-size: var(--text-md);
	font-weight: 700;
	line-height: 1.35;
	margin-bottom: .5rem;
	margin-top: .625rem;
	letter-spacing: -.015em;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.post-card-body .category-badge { align-self: flex-start; }

.post-card-title a { color: var(--color-text); }
.post-card-title a:hover { color: var(--color-primary-dark); }

.post-card-excerpt {
	font-size: var(--text-sm);
	color: var(--color-text-secondary);
	line-height: 1.6;
	margin-bottom: 1rem;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	flex: 1;
}

.post-card-meta {
	display: flex;
	align-items: center;
	gap: .375rem;
	font-size: var(--text-xs);
	color: var(--color-text-tertiary);
	flex-wrap: wrap;
	margin-top: auto;
}

.meta-avatar { width: 20px; height: 20px; border-radius: 50%; display: inline-block; vertical-align: middle; }
.meta-dot { opacity: .4; }

.meta-item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

/* Featured cards (old template, keep working) */
.tw-featured-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.featured-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-border); transition: all .3s var(--ease-out); }
.featured-card:hover { border-color: transparent; box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.featured-card-image { aspect-ratio: 16/10; overflow: hidden; background: var(--color-bg-alt); position: relative; }
.featured-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease-out); }
.featured-card:hover .featured-card-image img { transform: scale(1.04); }
.featured-card-image .category-badge { position: absolute; top: .75rem; left: .75rem; z-index: 1; }
.featured-card-body { padding: 1.25rem 1.25rem 1.5rem; }
.featured-card-title { font-size: var(--text-md); font-weight: 700; line-height: 1.35; margin-bottom: .375rem; letter-spacing: -.015em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.featured-card-title a { color: var(--color-text); }
.featured-card-title a:hover { color: var(--color-primary-dark); }
.featured-card-excerpt { font-size: var(--text-sm); color: var(--color-text-secondary); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: .75rem; }
.featured-card-meta { display: flex; align-items: center; gap: .5rem; font-size: var(--text-xs); color: var(--color-text-tertiary); flex-wrap: wrap; }

/* ==========================================================================
   8. Sidebar & Widgets
   ========================================================================== */

.widget-area.sidebar { min-width: 0; }

.widget {
	background: var(--color-bg-card);
	border-radius: var(--radius-lg);
	padding: 1.5rem;
	margin-bottom: 1.25rem;
	border: 1px solid var(--color-border);
	border-left: 3px solid var(--color-primary);
}

.widget-title {
	font-size: var(--text-xs);
	font-weight: 700;
	color: var(--color-primary-dark);
	margin-bottom: 1.25rem;
	text-transform: uppercase;
	letter-spacing: .08em;
	padding-bottom: .75rem;
	border-bottom: 2px solid var(--color-primary-light);
}

/* Popular Posts Widget — Numbered List */
.tw-popular-posts { list-style: none; counter-reset: popular; }

/* popular-post-item styles moved to section 22 */
.popular-post-item:last-child { border-bottom: none; }

/* popular-rank styles moved to section 22 */

.popular-info { flex: 1; min-width: 0; }

.popular-title {
	display: block; font-size: var(--text-sm); font-weight: 600;
	color: var(--color-text); line-height: 1.4; margin-bottom: 4px;
	text-decoration: none;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.popular-title:hover { color: var(--color-primary-dark); }

.popular-meta {
	display: flex; align-items: center; gap: .5rem;
	font-size: var(--text-xs); color: var(--color-text-tertiary);
}

.popular-views {
	display: inline-flex; align-items: center; gap: 3px;
}

.popular-date {
	display: inline-flex; align-items: center;
}

.tw-categories-list { list-style: none; }
.tw-categories-list li { border-bottom: 1px solid var(--color-border-light); }
.tw-categories-list li:last-child { border-bottom: none; }
.tw-categories-list a {
	display: flex; align-items: center; gap: .5rem;
	padding: .5rem 0; color: var(--color-text-secondary); font-size: var(--text-sm);
	transition: all .15s;
}
.tw-categories-list a:hover { color: var(--color-primary-dark); }
.cat-bullet { color: var(--color-primary); font-size: .4em; }
.cat-count {
	margin-left: auto; background: var(--color-bg-alt);
	color: var(--color-text-tertiary); font-size: var(--text-xs);
	font-weight: 600; padding: 2px 8px; border-radius: var(--radius-full);
}

.tw-trending-topics { display: flex; flex-wrap: wrap; gap: .375rem; }
.tw-sidebar-sticky-wrap { position: sticky; top: 80px; }

/* ==========================================================================
   9. Ad Units
   ========================================================================== */

.tw-ad-unit {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	margin: 1.5rem 0; padding: .75rem;
	background: var(--color-bg-alt); border-radius: var(--radius-md); overflow: hidden;
}
.tw-ad-label {
	font-size: .5625rem; color: var(--color-text-tertiary);
	text-align: center; margin-bottom: .25rem;
	text-transform: uppercase; letter-spacing: .1em;
}

.tw-ad-ad-header-banner, .tw-ad-ad-footer-banner { max-width: 728px; margin: 0 auto; }
.footer-ad-wrap { background: #fff; padding: 1rem 0; text-align: center; }
.tw-ad-ad-sidebar-top, .tw-ad-ad-sidebar-sticky { margin: 0 0 1.25rem 0; }
.tw-ad-ad-in-feed { border-top: 1px dashed var(--color-border); border-bottom: 1px dashed var(--color-border); }

/* Ad zone reserved heights (overrides inline style moved to class in ads.php) */
.tw-ad-mh-90  { min-height: 90px; }
.tw-ad-mh-250 { min-height: 250px; }
.tw-ad-mh-600 { min-height: 600px; }
@media (max-width: 767px) {
	.tw-ad-mh-250 { min-height: 100px; }
}

/* ==========================================================================
   10. Single Post
   ========================================================================== */

/* OLD: Single Post — Clean Header (deprecated — replaced by .single-hero) */
/*
.single-post-header { ... }
.single-header-inner { ... }
.single-featured-image { ... }
.single-content-wrap { ... }
— See new styles in section 10B below.
*/

/* ==========================================================================
   10B. Single Post — Dark Hero Header (Ahrefs-style)
   ========================================================================== */

.single-hero {
	background: var(--color-bg-dark);
	background: linear-gradient(135deg, #111827 0%, #0a1f1a 60%, #111827 100%);
	color: var(--color-text-inverse);
	padding: 2.5rem 0 3rem;
	position: relative;
	overflow: hidden;
}

.single-hero::after {
	content: '';
	position: absolute;
	width: 600px; height: 600px;
	top: -250px; right: -100px;
	background: radial-gradient(circle, rgba(16,185,129,.12) 0%, transparent 70%);
	pointer-events: none;
}

/* Reading Progress Bar */
.tw-reading-progress {
	position: fixed;
	top: 0;
	left: 0;
	height: 4px;
	width: 0%;
	background: linear-gradient(to right, var(--color-primary), var(--color-primary-dark));
	z-index: var(--z-modal);
	transition: width 60ms linear;
	pointer-events: none;
	border-radius: 0 2px 2px 0;
}

/* --- .single-hero: 8 leaves, weighted toward right (text is on left) --- */
.single-hero .hemp-leaf-1 { width: 185px; top: -30px;   right: 4%;   opacity: .08; transform: rotate(12deg);  filter: blur(.5px); }
.single-hero .hemp-leaf-2 { width: 115px; bottom: -15px; left: 2%;   opacity: .06; transform: rotate(-22deg); filter: blur(.5px); }
.single-hero .hemp-leaf-3 { width:  78px; top: 38%;     left: 37%;   opacity: .05; transform: rotate(48deg);  filter: blur(1px);  }
.single-hero .hemp-leaf-4 { width: 135px; bottom: -20px; right: 19%; opacity: .07; transform: rotate(-38deg); filter: blur(.5px); }
.single-hero .hemp-leaf-5 { width:  72px; top: 8%;      right: 27%;  opacity: .05; transform: rotate(33deg);  filter: blur(1px);  }
.single-hero .hemp-leaf-6 { width: 155px; top: -22px;   right: 24%;  opacity: .06; transform: rotate(-15deg); filter: blur(.5px); }
.single-hero .hemp-leaf-7 { width:  62px; bottom: 18%;  left: 11%;   opacity: .04; transform: rotate(62deg);  filter: blur(1.5px);}
.single-hero .hemp-leaf-8 { width: 100px; top: 52%;     right: 7%;   opacity: .06; transform: rotate(-30deg); filter: blur(.5px); }

/* Breadcrumbs override for dark bg */
.single-hero .tw-breadcrumbs { padding: .5rem 0; margin-bottom: .75rem; }
.single-hero .breadcrumb-list { color: rgba(255,255,255,.4); }
.single-hero .breadcrumb-item a { color: rgba(255,255,255,.4); }
.single-hero .breadcrumb-item a:hover { color: var(--color-primary); }
.single-hero .breadcrumb-item.active { color: rgba(255,255,255,.6); }
.single-hero .breadcrumb-sep { color: rgba(255,255,255,.2); }

.single-hero-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: center;
}

.single-hero-text { position: relative; z-index: 1; }

.single-hero-text .category-badge {
	margin-bottom: 1.25rem;
	display: inline-block;
}
.single-hero-text .hero-badge {
	margin-bottom: 1.25rem;
	display: inline-block;
}

.single-hero-title {
	font-size: clamp(1.75rem, 4.5vw, 2.75rem);
	font-weight: 700;
	letter-spacing: -.01em;
	line-height: 1.15;
	color: #fff;
	margin-bottom: 1.25rem;
	max-width: 640px;
}

.single-hero-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: .5rem;
	font-size: var(--text-sm);
	color: rgba(255,255,255,.55);
}

.single-hero-meta a { color: rgba(255,255,255,.75); }
.single-hero-meta a:hover { color: var(--color-primary); }

.hero-meta-separator { opacity: .35; }

/* Hero — Posted on override for dark bg */
.single-hero-meta .post-date,
.single-hero-meta .post-date time,
.single-hero-meta .updated-label { color: rgba(255,255,255,.55); }

.single-hero-image {
	position: relative;
	z-index: 1;
}
.hero-featured-img {
	width: 100%;
	max-height: 400px;
	object-fit: cover;
	border-radius: var(--radius-xl);
	box-shadow: 0 8px 30px rgba(0,0,0,.4);
}

/* ==========================================================================
   10C. Single Post — 3-Column Body
   ========================================================================== */

.tw-container--wide { max-width: 1400px; }

.single-body {
	padding: 2.5rem 0;
}

.single-body-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
	align-items: start;
}

.single-main-content { min-width: 0; }

/* Left TOC sidebar */
.single-toc-sidebar {
	order: -1;
}

.single-toc-sidebar .tw-toc-widget {
	background: var(--color-bg-card);
	border-radius: var(--radius-lg);
	padding: 1.5rem;
	border: 1px solid var(--color-border);
	border-left: 3px solid var(--color-primary);
}

/* Right author sidebar */
.single-author-sidebar { min-width: 0; }

/* Author sidebar card */
.author-sidebar-card {
	background: var(--color-bg-card);
	border-radius: var(--radius-lg);
	padding: 1.5rem;
	border: 1px solid var(--color-border);
	text-align: center;
	margin-bottom: 1.25rem;
}

.author-sidebar-avatar { margin-bottom: .75rem; }
.author-sidebar-img {
	width: 72px; height: 72px;
	border-radius: 50%;
	display: inline-block;
	border: 3px solid var(--color-primary-light);
}

.author-sidebar-name {
	font-size: var(--text-md);
	font-weight: 700;
	margin-bottom: .375rem;
}
.author-sidebar-name a { color: var(--color-text); }
.author-sidebar-name a:hover { color: var(--color-primary-dark); }

.author-sidebar-bio {
	font-size: var(--text-sm);
	color: var(--color-text-secondary);
	line-height: 1.6;
	margin-bottom: .75rem;
}

.author-sidebar-label {
	font-size: var(--text-xs);
	color: var(--color-text-tertiary);
	text-transform: uppercase;
	letter-spacing: .06em;
	font-weight: 600;
	margin-bottom: .25rem;
}

.author-sidebar-social {
	display: flex;
	justify-content: center;
	gap: .5rem;
	margin-bottom: .875rem;
}

.author-social-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: var(--radius-md);
	background: var(--color-bg-alt);
	color: var(--color-text-secondary);
	transition: all .15s;
	border: 1px solid var(--color-border);
}
.author-social-btn:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.author-social-btn--twitter:hover  { background: #0F1419; border-color: #0F1419; }
.author-social-btn--facebook:hover { background: #1877F2; border-color: #1877F2; }
.author-social-btn--linkedin:hover { background: #0A66C2; border-color: #0A66C2; }

.author-sidebar-link {
	display: inline-block;
	font-size: var(--text-sm);
	font-weight: 600;
	color: var(--color-primary-dark);
	transition: color .15s;
}
.author-sidebar-link:hover { color: var(--color-primary); }

/* ==========================================================================
   10D. Single Post — Dark Related Posts (Claude blog style)
   ========================================================================== */

.single-related-section {
	background: #1e293b;
	color: var(--color-text-inverse);
	padding: 4rem 0;
	margin-top: 3rem;
	border-top: 3px solid var(--color-primary);
}

.related-section-header {
	display: flex;
	flex-direction: column;
	gap: .75rem;
	margin-bottom: 2.5rem;
}

.related-section-title {
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	font-weight: 700;
	color: #fff;
	letter-spacing: 0;
	margin: 0;
}

.related-section-subtitle {
	color: rgba(255,255,255,.45);
	font-size: var(--text-sm);
	margin: 0;
	max-width: 480px;
}

.related-cards-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}

.related-dark-card {
	background: var(--color-bg-card);
	background: #1F2937;
	border-radius: var(--radius-lg);
	overflow: hidden;
	transition: all .3s var(--ease-out);
	border: 1px solid rgba(255,255,255,.06);
}
.related-dark-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 32px rgba(0,0,0,.3);
	border-color: rgba(255,255,255,.1);
}

.related-dark-card-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.related-dark-card-image {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	position: relative;
}
.related-dark-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s var(--ease-out);
	mix-blend-mode: multiply;
	opacity: .85;
}
.related-dark-card:hover .related-dark-card-image img {
	transform: scale(1.04);
	opacity: 1;
}

.related-dark-card-body {
	padding: 1.25rem;
}

.related-dark-card-date {
	display: block;
	font-size: var(--text-xs);
	color: rgba(255,255,255,.4);
	margin-bottom: .5rem;
}

.related-dark-card-title {
	font-size: var(--text-md);
	font-weight: 700;
	color: #fff;
	line-height: 1.35;
	margin: 0 0 .75rem;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.related-dark-card-cat {
	display: inline-block;
	font-size: var(--text-xs);
	color: rgba(255,255,255,.4);
	font-weight: 500;
}

.post-meta .meta-item { color: inherit; }
.post-meta .meta-item a { color: inherit; }
.post-meta .meta-item a:hover { color: var(--color-primary); }

.post-tags {
	display: flex; flex-wrap: wrap; gap: .5rem;
	margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border);
}

.post-navigation {
	display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
	margin: 2.5rem 0; padding: 1.5rem 0;
	border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border);
}
.nav-previous, .nav-next {
	background: var(--color-bg-alt); border-radius: var(--radius-md); padding: 1.25rem;
	transition: all .2s; border: 1px solid transparent;
}
.nav-previous:hover, .nav-next:hover {
	border-color: var(--color-border); box-shadow: var(--shadow-sm);
}
.nav-next { text-align: right; }
.nav-label {
	font-size: var(--text-xs); color: var(--color-text-tertiary);
	text-transform: uppercase; letter-spacing: .06em;
	display: block; margin-bottom: .5rem; font-weight: 600;
}
.nav-title {
	font-weight: 600; font-size: var(--text-sm); color: var(--color-text);
	display: -webkit-box; -webkit-line-clamp: 2;
	-webkit-box-orient: vertical; overflow: hidden; line-height: 1.4;
}
.nav-previous a, .nav-next a { text-decoration: none; }
.nav-previous a:hover .nav-title, .nav-next a:hover .nav-title { color: var(--color-primary-dark); }

/* ==========================================================================
   11. Author Box
   ========================================================================== */

.tw-author-box {
	display: flex; gap: 1.25rem; padding: 1.5rem;
	background: var(--color-bg-alt); border-radius: var(--radius-lg);
	margin: 2.5rem 0; border: 1px solid var(--color-border);
}
.author-box-avatar img {
	width: 56px; height: 56px; border-radius: 50%;
	border: 2px solid var(--color-primary-light);
}
.author-box-info { flex: 1; }
.author-box-name { font-size: var(--text-md); font-weight: 700; margin-bottom: .375rem; }
.author-box-name a { color: inherit; }
.author-box-name a:hover { color: var(--color-primary-dark); }
.author-box-bio { font-size: var(--text-sm); color: var(--color-text-secondary); line-height: 1.6; margin-bottom: .5rem; }
.author-box-link { font-size: var(--text-sm); font-weight: 600; color: var(--color-primary-dark); }

/* ==========================================================================
   12. Share Buttons
   ========================================================================== */

.tw-share-bar {
	display: flex; align-items: center; gap: .5rem;
	padding: 1rem 0; margin: 1.5rem 0;
	border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border);
	flex-wrap: wrap;
}
.share-label {
	font-size: var(--text-xs); font-weight: 600; color: var(--color-text-tertiary);
	margin-right: .5rem; text-transform: uppercase; letter-spacing: .04em;
}
.share-btn {
	display: flex; align-items: center; gap: .375rem;
	padding: .375rem .75rem; border-radius: var(--radius-sm);
	font-size: var(--text-xs); font-weight: 600;
	transition: all .15s; color: #fff;
}
.share-btn:hover { opacity: .9; transform: translateY(-1px); color: #fff; }

.share-btn--twitter  { background: #0F1419; }
.share-btn--facebook { background: #1877F2; }
.share-btn--linkedin { background: #0A66C2; }
.share-btn--whatsapp { background: #25D366; }
.share-btn--copy     { background: var(--color-text-secondary); }

.tw-share-sticky {
	position: fixed; left: 1rem; top: 50%;
	transform: translateY(-50%); display: flex; flex-direction: column;
	gap: .5rem; z-index: var(--z-above);
}
.tw-share-sticky .share-btn { width: 44px; height: 44px; border-radius: var(--radius-sm); justify-content: center; padding: 0; }
.tw-share-sticky .share-btn span { display: none; }

/* ==========================================================================
   13. Related Posts
   ========================================================================== */

.tw-related-posts { margin: 3rem 0; }
.tw-related-posts .section-title { margin-bottom: 1.5rem; }

.related-posts-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }

.related-post-card {
	background: #fff; border-radius: var(--radius-lg); overflow: hidden;
	border: 1px solid var(--color-border); transition: all .3s var(--ease-out);
}
.related-post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); border-color: transparent; }

.related-post-image { aspect-ratio: 16/9; overflow: hidden; background: var(--color-bg-alt); }
.related-post-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease-out); }
.related-post-card:hover .related-post-image img { transform: scale(1.03); }

.related-post-body { padding: 1rem 1.25rem; }
.related-post-title { font-size: var(--text-sm); font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-post-title a { color: var(--color-text); }
.related-post-title a:hover { color: var(--color-primary-dark); }
.related-post-meta { font-size: var(--text-xs); color: var(--color-text-tertiary); margin-top: .375rem; }

/* ==========================================================================
   14. Comments
   ========================================================================== */

.comments-area { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--color-border); }
.comments-title { font-size: var(--text-xl); margin-bottom: 1.5rem; }
.comment-list { list-style: none; }

.comment-item { padding: 1.25rem 0; border-bottom: 1px solid var(--color-border-light); }
.comment-body { display: flex; flex-direction: column; }
.comment-meta { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: .75rem; }
.comment-avatar { border-radius: 50%; flex-shrink: 0; }
.comment-author-info { flex: 1; }
.comment-author-name { font-weight: 700; font-size: var(--text-sm); display: block; }
.comment-date { font-size: var(--text-xs); color: var(--color-text-tertiary); }
.comment-content { font-size: var(--text-base); line-height: 1.7; padding-left: calc(40px + 1rem); }
.comment-content p:last-child { margin-bottom: 0; }
.comment-footer { padding-left: calc(40px + 1rem); margin-top: .5rem; }
.comment-awaiting-moderation { font-size: var(--text-sm); color: var(--color-accent-orange); font-style: italic; }
.reply a { font-size: var(--text-xs); font-weight: 600; color: var(--color-primary-dark); }

.children { list-style: none; padding-left: 2rem; border-left: 2px solid var(--color-primary-light); margin-left: 1.25rem; }

.comment-reply-title { font-size: var(--text-lg); margin: 2rem 0 1.25rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; font-weight: 600; margin-bottom: .25rem; font-size: var(--text-sm); }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%; padding: .625rem 1rem;
	border: 1px solid var(--color-border); border-radius: var(--radius-md);
	font-family: var(--font-sans); font-size: var(--text-base);
	transition: all .15s; background: #fff;
}
.comment-form input:focus, .comment-form textarea:focus {
	outline: none; border-color: var(--color-primary);
	box-shadow: 0 0 0 3px var(--color-primary-glow);
}

/* ==========================================================================
   15. Archive Pages
   ========================================================================== */

.archive-header { padding: 2.5rem 0 2rem; margin-bottom: 2rem; border-bottom: 1px solid var(--color-border); }
.archive-title { font-size: var(--text-2xl); margin-bottom: .5rem; }
.archive-title::after { content: ''; display: block; width: 32px; height: 2px; background: var(--color-primary); margin-top: .75rem; border-radius: 2px; }
.archive-description { color: var(--color-text-secondary); max-width: 540px; margin-top: .75rem; font-size: var(--text-sm); }

.archive-filter-bar {
	display: flex; align-items: center; gap: .375rem;
	margin-bottom: 1.5rem; padding: .375rem; background: var(--color-bg-alt);
	border-radius: var(--radius-full); border: 1px solid var(--color-border);
	font-size: var(--text-sm); flex-wrap: wrap;
}
.filter-label { font-weight: 600; color: var(--color-text-tertiary); padding: 0 .5rem; }
.filter-link {
	padding: .375rem .75rem; border-radius: var(--radius-full);
	color: var(--color-text-secondary); font-weight: 500; font-size: var(--text-sm); transition: all .15s;
}
.filter-link:hover, .filter-link.active { background: var(--color-primary); color: #fff; }

/* ==========================================================================
   16. Search Results
   ========================================================================== */

.search-header { padding: 2.5rem 0 1.5rem; border-bottom: 1px solid var(--color-border); margin-bottom: 1.5rem; }
.search-title { font-size: var(--text-2xl); }
.search-query { color: var(--color-primary); font-weight: 700; }
.search-count { color: var(--color-text-secondary); font-size: var(--text-sm); margin-top: .5rem; }
.search-excerpt mark { background: #FEF3C7; padding: .1em .2em; border-radius: 2px; }

.no-results-content { text-align: center; padding: 5rem 1rem; }
.no-results-icon { font-size: 3rem; margin-bottom: 1rem; opacity: .4; }

/* ==========================================================================
   17. 404 Page
   ========================================================================== */

.error-404-page {
	min-height: 60vh; display: flex; flex-direction: column;
	align-items: center; justify-content: center; text-align: center; padding: 5rem 1rem;
}
.error-404-art { margin-bottom: 2rem; color: var(--color-primary); opacity: .5; }
.error-404-code {
	font-size: clamp(5rem, 15vw, 8rem); font-weight: 700;
	background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
	-webkit-background-clip: text; -webkit-text-fill-color: transparent;
	background-clip: text; line-height: 1; letter-spacing: -.05em; margin-bottom: 1rem;
}
.error-404-title { font-size: clamp(1.25rem, 4vw, 1.75rem); margin-bottom: 1rem; }
.error-404-message { color: var(--color-text-secondary); max-width: 480px; margin: 0 auto 2rem; font-size: var(--text-sm); }

/* ==========================================================================
   18. Static Pages
   ========================================================================== */

.page-content-wrap { max-width: 768px; margin: 3rem auto; padding: 0 1.25rem; }
.page-header { margin-bottom: 2rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--color-border); }
.page-title { font-size: var(--text-3xl); margin-bottom: .5rem; letter-spacing: -.03em; }

/* ==========================================================================
   19. Footer
   ========================================================================== */

.site-footer {
	background: var(--color-bg-dark);
	color: rgba(255,255,255,.55);
	padding: 0 0 0;
	margin-top: 4rem;
	position: relative;
	overflow: hidden;
}

/* --- .site-footer: 10 leaves scattered throughout footer (kept subtle) --- */
.site-footer .hemp-leaf-1  { width: 155px; top: 5%;    left: 1%;   opacity: .025; transform: rotate(-15deg); filter: blur(1px); }
.site-footer .hemp-leaf-2  { width:  82px; top: 3%;    right: 4%;  opacity: .03;  transform: rotate(22deg);  filter: blur(1.5px); }
.site-footer .hemp-leaf-3  { width: 115px; top: 38%;   left: 18%;  opacity: .02;  transform: rotate(40deg);  filter: blur(1.5px); }
.site-footer .hemp-leaf-4  { width:  68px; top: 55%;   right: 22%; opacity: .025; transform: rotate(-32deg); filter: blur(2px); }
.site-footer .hemp-leaf-5  { width: 185px; top: -25px; left: 38%;  opacity: .02;  transform: rotate(10deg);  filter: blur(1px); }
.site-footer .hemp-leaf-6  { width:  92px; bottom: 12%; right: 8%; opacity: .025; transform: rotate(-47deg); filter: blur(1.5px); }
.site-footer .hemp-leaf-7  { width: 125px; bottom: 4%;  left: 7%;  opacity: .03;  transform: rotate(27deg);  filter: blur(1px); }
.site-footer .hemp-leaf-8  { width:  72px; top: 22%;   right: 38%; opacity: .02;  transform: rotate(63deg);  filter: blur(2px); }
.site-footer .hemp-leaf-9  { width: 105px; bottom: 28%; left: 53%; opacity: .025; transform: rotate(-22deg); filter: blur(1.5px); }
.site-footer .hemp-leaf-10 { width:  58px; top: 68%;   left: 30%;  opacity: .02;  transform: rotate(52deg);  filter: blur(2px); }

/* Mobile: cap hemp leaf size and disable blur to prevent iOS Safari overflow bleed */
@media (max-width: 640px) {
	.hemp-leaf { max-width: 80px; filter: none; }
	.hemp-leaves { contain: paint; }
}

/* Footer: Centered Logo + Watermark */
.footer-logo-section {
	position: relative;
	display: flex; align-items: center; justify-content: center;
	padding: 3.5rem 0 2rem;
	overflow: hidden;
}
.footer-watermark {
	position: absolute;
	font-size: clamp(4rem, 12vw, 8rem);
	font-weight: 700;
	color: rgba(255,255,255,.03);
	text-transform: lowercase;
	letter-spacing: -.04em;
	white-space: nowrap;
	user-select: none;
}
.footer-logo-circle {
	width: 64px; height: 64px;
	background: rgba(255,255,255,.06);
	border: 2px solid rgba(255,255,255,.08);
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	position: relative; z-index: 1;
}
.footer-logo-circle .custom-logo {
	width: 40px; height: 40px; object-fit: contain;
}
.footer-circle-icon { font-size: 1.75rem; }

.footer-grid {
	display: grid; grid-template-columns: 1fr;
	gap: 2.5rem; padding-bottom: 3rem;
	border-bottom: 1px solid rgba(255,255,255,.06);
}

.footer-col-title {
	color: var(--color-primary);
	font-size: var(--text-xs); font-weight: 700;
	margin-bottom: 1.25rem;
	text-transform: uppercase; letter-spacing: .1em;
}

.footer-about-text { font-size: var(--text-sm); line-height: 1.7; color: rgba(255,255,255,.4); margin-bottom: 1.25rem; }

.footer-social-nav { display: flex; gap: .625rem; flex-wrap: wrap; }
.footer-social-link {
	display: flex; align-items: center; justify-content: center;
	width: 44px; height: 44px;
	border-radius: var(--radius-md);
	background: rgba(255,255,255,.06);
	color: rgba(255,255,255,.5);
	transition: all .15s;
}
.footer-social-link:hover { background: var(--color-primary); color: #fff; }

.footer-nav-list { list-style: none; }
.footer-nav-list a { display: block; padding: .375rem 0; color: rgba(255,255,255,.45); font-size: var(--text-sm); transition: all .15s; }
.footer-nav-list a:hover { color: var(--color-primary); padding-left: .5rem; }

/* Footer Tags — green pills */
.footer-tags-cloud { display: flex; flex-wrap: wrap; gap: .5rem; }
.footer-tag-pill {
	display: inline-block;
	padding: .3rem .75rem;
	background: rgba(16,185,129,.12);
	color: var(--color-primary);
	font-size: var(--text-xs); font-weight: 600;
	border-radius: var(--radius-full);
	border: 1px solid rgba(16,185,129,.2);
	transition: all .15s;
}
.footer-tag-pill:hover {
	background: var(--color-primary); color: #fff;
	border-color: var(--color-primary);
}

.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 0; flex-wrap: wrap; gap: .75rem; }
.footer-copyright { font-size: var(--text-xs); color: rgba(255,255,255,.25); margin: 0; }
.footer-legal { font-size: var(--text-xs); color: rgba(255,255,255,.2); margin: 0; }
.footer-legal a { color: rgba(255,255,255,.3); }
.footer-legal a:hover { color: var(--color-primary); }

/* ==========================================================================
   20. Back-to-top
   ========================================================================== */

.back-to-top {
	position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 10;
	width: 44px; height: 44px;
	background: var(--color-bg-dark); color: #fff;
	border-radius: var(--radius-md);
	display: flex; align-items: center; justify-content: center;
	box-shadow: var(--shadow-lg); transition: all .2s; opacity: 0;
}
.back-to-top:not([hidden]) { opacity: 1; }
.back-to-top:hover { background: var(--color-primary); transform: translateY(-2px); }

/* ==========================================================================
   21. Pagination
   ========================================================================== */

.tw-pagination { margin: 3rem 0; }
.tw-pagination .page-numbers { display: flex; align-items: center; flex-wrap: wrap; gap: .375rem; list-style: none; }

.tw-pagination .page-numbers li a,
.tw-pagination .page-numbers li span {
	display: flex; align-items: center; justify-content: center;
	min-width: 36px; height: 36px; padding: 0 .75rem;
	border-radius: var(--radius-sm); font-weight: 600; font-size: var(--text-sm);
	transition: all .15s; color: var(--color-text-secondary);
	background: var(--color-bg-alt); border: 1px solid var(--color-border);
}
.tw-pagination .page-numbers li a:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.tw-pagination .page-numbers li .current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.tw-pagination .page-numbers li .dots { border: none; background: none; color: var(--color-text-tertiary); }

/* ==========================================================================
   22. Forms
   ========================================================================== */

.tw-search-form .search-form-inner {
	display: flex; align-items: center;
	background: #fff; border: 1px solid var(--color-border);
	border-radius: var(--radius-full); overflow: hidden; transition: all .15s;
}
.tw-search-form:focus-within .search-form-inner {
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px var(--color-primary-glow);
}
.tw-search-form .search-field {
	flex: 1; border: none; outline: none;
	padding: .625rem 1.25rem; font-size: var(--text-sm);
	font-family: var(--font-sans); background: transparent; color: var(--color-text); min-width: 0;
}
.tw-search-form .search-field::placeholder { color: var(--color-text-tertiary); }
.tw-search-form .search-submit {
	display: flex; align-items: center; justify-content: center;
	width: 40px; height: 40px;
	background: var(--color-primary); color: #fff; flex-shrink: 0; transition: background .15s;
	border-radius: 0 var(--radius-full) var(--radius-full) 0;
}
.tw-search-form .search-submit:hover { background: var(--color-primary-dark); }

/* Hero search */
.hero-search-wrap .tw-search-form .search-form-inner {
	border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.08);
	backdrop-filter: blur(8px);
}
.hero-search-wrap .tw-search-form:focus-within .search-form-inner {
	border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.12);
	box-shadow: 0 0 0 3px rgba(255,255,255,.08);
}
.hero-search-wrap .tw-search-form .search-field { padding: .75rem 1.5rem; font-size: var(--text-base); color: #fff; }
.hero-search-wrap .tw-search-form .search-field::placeholder { color: rgba(255,255,255,.4); }
.hero-search-wrap .tw-search-form .search-submit { width: 48px; height: 48px; }

/* ==========================================================================
   23. Buttons
   ========================================================================== */

.tw-btn {
	display: inline-flex; align-items: center; gap: .5rem;
	padding: .625rem 1.25rem; border-radius: var(--radius-md);
	font-size: var(--text-sm); font-weight: 600;
	cursor: pointer; border: 1px solid transparent;
	transition: all .2s var(--ease-out); font-family: var(--font-sans);
}
.tw-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.tw-btn--primary { background: var(--color-primary); color: #fff; }
.tw-btn--primary:hover { background: var(--color-primary-dark); color: #fff; }
.tw-btn--outline { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.tw-btn--outline:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ==========================================================================
   24. Badges & Pills
   ========================================================================== */

.category-badge {
	display: inline-block; padding: 3px 8px;
	background: var(--color-primary); color: #fff;
	font-size: .5625rem; font-weight: 700;
	border-radius: 4px; text-transform: uppercase;
	letter-spacing: .06em; text-decoration: none; transition: background .15s;
}
.category-badge:hover { background: var(--color-primary-dark); color: #fff; }

.tag-chip {
	display: inline-block; padding: .25rem .625rem;
	border: 1px solid var(--color-border); color: var(--color-text-secondary);
	font-size: var(--text-xs); font-weight: 500;
	border-radius: var(--radius-sm); transition: all .15s;
}
.tag-chip:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ==========================================================================
   25. Breadcrumbs
   ========================================================================== */

.tw-breadcrumbs { padding: 1rem 0; margin-bottom: 1rem; }
.breadcrumb-list { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; list-style: none; font-size: var(--text-xs); color: var(--color-text-tertiary); }
.breadcrumb-item a { color: var(--color-text-tertiary); }
.breadcrumb-item a:hover { color: var(--color-primary-dark); }
.breadcrumb-item.active { color: var(--color-text-secondary); font-weight: 500; }
.breadcrumb-sep { color: var(--color-border); display: flex; align-items: center; }

/* ==========================================================================
   26. Table of Contents
   ========================================================================== */

.tw-toc-widget { border-left: 3px solid var(--color-primary); }
.tw-toc-header { display: flex; align-items: center; justify-content: space-between; }
.tw-toc-header .widget-title { margin-bottom: 0; }
.tw-toc-toggle { display: flex; align-items: center; color: var(--color-text-tertiary); transition: transform .15s; }
.tw-toc-toggle[aria-expanded="false"] { transform: rotate(-90deg); }
.tw-toc-nav { margin-top: 1rem; }
.tw-toc-nav ol { list-style: none; counter-reset: toc-counter; }
.tw-toc-nav > ol { margin: 0; }
.tw-toc-nav li { counter-increment: toc-counter; margin-bottom: .25rem; }
.tw-toc-nav li a {
	font-size: var(--text-sm); color: var(--color-text-secondary);
	display: block; padding: .25rem .5rem;
	border-radius: var(--radius-sm); transition: all .15s; line-height: 1.4;
}
.tw-toc-nav li a:hover { background: var(--color-primary-light); color: var(--color-primary-dark); }
.tw-toc-nav li a.active { background: var(--color-primary-light); color: var(--color-primary-dark); font-weight: 600; }
.tw-toc-nav .toc-h3-list { padding-left: 1rem; margin-top: .25rem; }
.tw-toc-loading { font-size: var(--text-sm); color: var(--color-text-tertiary); font-style: italic; }

/* ==========================================================================
   27. Code Blocks
   ========================================================================== */

pre {
	background: #0F172A; border-radius: var(--radius-lg);
	overflow-x: auto; margin: 2rem 0; position: relative;
	border: 1px solid rgba(255,255,255,.06);
}
pre code {
	display: block; padding: 1.5rem;
	font-family: var(--font-mono); font-size: .8125rem;
	line-height: 1.75; color: #A7F3D0;
}
.tw-copy-btn {
	position: absolute; top: .75rem; right: .75rem;
	display: flex; align-items: center; gap: .25rem;
	padding: .25rem .625rem;
	background: rgba(255,255,255,.06); color: rgba(255,255,255,.4);
	border-radius: 4px; font-size: var(--text-xs);
	font-family: var(--font-mono); cursor: pointer;
	transition: all .15s; border: 1px solid rgba(255,255,255,.08);
}
.tw-copy-btn:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.tw-copy-btn.copied { background: var(--color-primary-dark); color: #fff; }

/* ==========================================================================
   28. Newsletter CTA
   ========================================================================== */

.tw-newsletter-section {
	background: var(--color-bg-dark);
	padding: 4rem 1.25rem; text-align: center;
	position: relative; overflow: hidden;
}
.tw-newsletter-section::before {
	content: ''; position: absolute;
	width: 600px; height: 600px; top: -250px; right: -150px;
	background: radial-gradient(circle, rgba(16,185,129,.12) 0%, transparent 70%);
	pointer-events: none;
}
.newsletter-heading { color: #fff; font-size: clamp(1.25rem, 3vw, 1.625rem); font-weight: 700; margin-bottom: .5rem; letter-spacing: -.02em; position: relative; }
.newsletter-subtext { color: rgba(255,255,255,.45); margin-bottom: 2rem; font-size: var(--text-sm); max-width: 420px; margin-left: auto; margin-right: auto; position: relative; }

.newsletter-form {
	display: flex; align-items: center; gap: .5rem;
	max-width: 420px; margin: 0 auto; flex-wrap: wrap; justify-content: center; position: relative;
}
.newsletter-input {
	flex: 1; min-width: 200px;
	padding: .625rem 1.25rem; border-radius: var(--radius-full);
	border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06);
	color: #fff; font-size: var(--text-sm); font-family: var(--font-sans);
	transition: all .15s;
}
.newsletter-input::placeholder { color: rgba(255,255,255,.3); }
.newsletter-input:focus { outline: none; border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.1); }

.newsletter-btn {
	padding: .625rem 1.5rem;
	background: var(--color-primary); color: #fff;
	font-weight: 700; border-radius: var(--radius-full);
	font-size: var(--text-sm); cursor: pointer; border: none;
	transition: all .2s; font-family: var(--font-sans);
}
.newsletter-btn:hover {
	background: var(--color-primary-dark);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(16,185,129,.3);
}

/* ==========================================================================
   29. Responsive
   ========================================================================== */

@media (min-width: 480px) {
	.tw-container { padding: 0 1.5rem; }
}

@media (min-width: 640px) {
	.tw-card-grid, .tw-post-list { grid-template-columns: repeat(2, 1fr); }
	.tw-featured-grid { grid-template-columns: repeat(2, 1fr); }

	.related-posts-grid { grid-template-columns: repeat(2, 1fr); }

	/* Single: related cards 2-col */
	.related-cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
	.footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }

	/* Single: hero 2-column */
	.single-hero-grid {
		grid-template-columns: 1fr 1fr;
		gap: 3rem;
	}

	/* Single: body 2-col (content + author sidebar) */
	.single-body-grid {
		grid-template-columns: 1fr 280px;
	}

	/* Single: TOC spans full width as accordion above content */
	.single-toc-sidebar {
		grid-column: 1 / -1;
		order: -1;
	}

	/* Single: author sidebar sticky */
	.single-author-sidebar {
		position: sticky;
		top: 80px;
		max-height: calc(100vh - 100px);
		overflow-y: auto;
	}

	/* Single: related section header side-by-side */
	.related-section-header {
		flex-direction: row;
		align-items: flex-end;
		justify-content: space-between;
	}
	.related-section-subtitle { text-align: right; }
}

@media (min-width: 1024px) {
	.mobile-menu-toggle { display: none; }

	.tw-content-sidebar {
		grid-template-columns: 1fr 320px;
		grid-template-columns: 1fr var(--sidebar-width);
	}

	.widget-area.sidebar {
		position: sticky; top: 80px;
	}

	.tw-card-grid, .tw-post-list { grid-template-columns: repeat(2, 1fr); }
	.tw-featured-grid { grid-template-columns: repeat(3, 1fr); }
	.related-posts-grid { grid-template-columns: repeat(3, 1fr); }

	.tw-share-sticky { display: flex; }
	.tw-share-bar { display: none; }

	/* Single: related cards 3-col */
	.related-cards-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
	.tw-container { padding: 0 2rem; }
	.tw-card-grid { grid-template-columns: repeat(2, 1fr); }

	/* Single: full 3-column layout */
	.single-body-grid {
		grid-template-columns: 240px 1fr 280px;
	}

	/* Fallback: if sidebars absent, main content spans all columns */
	.single-body-grid > .single-main-content:only-child {
		grid-column: 1 / -1;
	}

	/* Single: TOC sidebar visible as left column */
	.single-toc-sidebar {
		grid-column: auto;
		order: 0;
		position: sticky;
		top: 80px;
		max-height: calc(100vh - 100px);
		overflow-y: auto;
	}

	/* Single: hide sticky share bar (overlaps TOC sidebar) */
	body.single-post .tw-share-sticky { display: none; }

	/* Single: related cards 4-col */
	.related-cards-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1023px) {
	.mobile-menu-toggle { display: flex; }
	.main-navigation { display: none; }
	.header-actions { margin-left: auto; }

	.tw-ad-ad-sidebar-top,
	.tw-ad-ad-sidebar-sticky,
	#secondary { display: none; }

	.tw-share-sticky { display: none; }
	.tw-share-bar { display: flex; }

	.children { padding-left: 1rem; margin-left: .5rem; }
	.comment-content, .comment-footer { padding-left: 0; }
}

@media (max-width: 480px) {
	/* Cap comment thread indentation so 3-level nesting stays readable */
	.comment-list .children { padding-left: .75rem; margin-left: 0; }
	.comment-list .children .children { padding-left: .5rem; }
	.comment-list .children .children .children { padding-left: 0; margin-left: 0; }
}

@media (max-width: 767px) {
	/* Single: stack hero vertically */
	.single-hero { padding: 2rem 0; }
	.single-hero-title { font-size: var(--text-2xl); }

	/* Single: hide author sidebar on mobile */
	.single-author-sidebar { display: none; }

	/* Single: single column body */
	.single-body-grid { gap: 1.5rem; }

	/* Single: related cards single column */
	.related-cards-grid { grid-template-columns: 1fr; }
	.related-section-header { gap: .5rem; }
}

/* Single post: related section flows into footer — remove gap, add footer top border */
body.single-post .site-footer { margin-top: 0; border-top: 1px solid rgba(255,255,255,.06); }
body.single-post .single-related-section { margin-bottom: 0; }

@media print {
	.site-header, .sidebar, .tw-ad-unit, .tw-share-bar,
	.tw-share-sticky, .back-to-top, .site-footer,
	.comments-area { display: none !important; }
	body { font-size: 12pt; color: #000; background: #fff; }
	a { color: #000; text-decoration: underline; }
}

/* ==========================================================================
   21. Category Showcase Sections (Homepage)
   ========================================================================== */

.tw-category-section {
	padding: 3rem 0;
}

.tw-category-section--alt {
	background: var(--color-bg-alt);
}

.tw-category-section .section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.5rem;
	padding-bottom: 0;
	border-bottom: none;
}

.section-view-all {
	font-size: var(--text-sm);
	font-weight: 600;
	color: var(--color-primary);
	transition: color .15s;
}
.section-view-all:hover {
	color: var(--color-primary-dark);
}

.tw-category-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
	align-items: start;
}

/* ==========================================================================
   22. Popular Posts — Thumbnail Enhancement
   ========================================================================== */

.popular-rank {
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: var(--text-xs);
	font-weight: 700;
	color: var(--color-primary);
	background: var(--color-primary-light);
	border-radius: 50%;
	line-height: 1;
	min-width: 28px;
	letter-spacing: -.02em;
}

.popular-thumb-link {
	flex-shrink: 0;
	width: 52px;
	height: 52px;
	border-radius: var(--radius-sm);
	overflow: hidden;
	display: block;
}

.popular-thumb {
	width: 52px;
	height: 52px;
	object-fit: cover;
	border-radius: var(--radius-sm);
}

.popular-thumb-placeholder {
	display: block;
	width: 52px;
	height: 52px;
	background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
	border-radius: var(--radius-sm);
	opacity: .3;
}

.popular-post-item {
	display: flex;
	align-items: center;
	gap: .625rem;
	padding: .625rem 0;
	border-bottom: 1px solid var(--color-border-light);
	transition: background .15s;
}

/* ==========================================================================
   23. Footer — Scalegun Credit
   ========================================================================== */

.footer-credit {
	font-size: var(--text-xs);
	color: rgba(255,255,255,.3);
	margin: 0;
	display: flex;
	align-items: center;
	gap: .35rem;
}

.heart-icon {
	color: #EF4444;
	font-size: .875rem;
	line-height: 1;
}

.scalegun-link {
	display: inline-flex;
	align-items: center;
}

.scalegun-logo {
	height: 22px;
	width: auto;
	opacity: .7;
	transition: opacity .15s;
	vertical-align: middle;
}

.scalegun-link:hover .scalegun-logo {
	opacity: 1;
}

/* --- Category grid responsive --- */
@media (min-width: 640px) {
	.tw-category-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
	.tw-category-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
	.tw-category-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================================================
   24. Footer — Social Media Band
   ========================================================================== */

.footer-social-band {
	padding: 2rem 0 1.5rem;
	border-top: 1px solid rgba(255,255,255,.06);
	text-align: center;
}

.social-band-label {
	font-size: var(--text-xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: rgba(255,255,255,.25);
	margin-bottom: 1rem;
}

.social-band-links {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: .625rem;
}

.social-band-chip {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .5rem 1.125rem;
	border-radius: var(--radius-full);
	background: rgba(255,255,255,.06);
	border: 1px solid rgba(255,255,255,.08);
	color: rgba(255,255,255,.6);
	font-size: var(--text-sm);
	font-weight: 500;
	transition: all .2s;
	text-decoration: none;
}
.social-band-chip svg { flex-shrink: 0; }
.social-band-chip:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.3); }

.social-chip--fb:hover  { background: #1877F2; border-color: #1877F2; }
.social-chip--tw:hover  { background: #000; border-color: #000; }
.social-chip--ig:hover  { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); border-color: transparent; }
.social-chip--li:hover  { background: #0A66C2; border-color: #0A66C2; }
