/*
Theme Name: WP AI Writer Theme 3
Theme URI: https://github.com/
Author: WP AI Writer Team
Author URI: https://github.com/
Description: Bento Magazine & Modern Tech Editorial theme for WP AI Writer. Features an asymmetrical Bento grid hero, trending stories ranking, horizontal deep dives, glassmorphic header, and lightning-fast PageSpeed.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wp-theme3
Tags: blog, news, entertainment, grid-layout, two-columns, custom-colors, custom-logo, featured-images, translation-ready
*/

/* ==========================================================================
   1. Tailwind-Inspired Design Tokens & Reset
   ========================================================================== */
:root {
	--brand: #2563eb;
	--brand-hover: color-mix(in srgb, var(--brand) 85%, #000000);
	--brand-active: color-mix(in srgb, var(--brand) 70%, #000000);
	--brand-light: color-mix(in srgb, var(--brand) 12%, #ffffff);
	--brand-soft: color-mix(in srgb, var(--brand) 6%, #ffffff);
	--brand-border: color-mix(in srgb, var(--brand) 28%, #ffffff);
	--brand-text: color-mix(in srgb, var(--brand) 85%, #000000);
	--brand-glow: color-mix(in srgb, var(--brand) 25%, transparent);
	--brand-gradient: linear-gradient(135deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 65%, #6366f1) 100%);

	--canvas: #f8fafc;
	--card-bg: #ffffff;
	--card-subtle: #f1f5f9;
	--text-main: #0f172a;
	--text-muted: #64748b;
	--text-faint: #94a3b8;
	--border-ui: #e2e8f0;
	--border-light: #f1f5f9;

	--font-stack: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Hiragino Sans", "Microsoft YaHei", sans-serif;
	--container-width: 1240px;
	--content-width: 760px;
	--radius-card: 16px;
	--radius-pill: 9999px;

	--shadow-subtle: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
	--shadow-card: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
	--shadow-hover: 0 16px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
	--shadow-modal: 0 24px 48px -12px rgba(15, 23, 42, 0.18);
}

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

html {
	font-family: var(--font-stack);
	font-size: 16px;
	line-height: 1.75;
	color: var(--text-main);
	background-color: var(--canvas);
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	overflow-x: hidden;
	overflow-wrap: anywhere;
}

body.drawer-active {
	overflow: hidden;
}

:lang(ja), :lang(zh) {
	word-break: break-all;
	font-style: normal;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link:focus {
	clip: auto !important;
	clip-path: none !important;
	display: block;
	height: auto;
	left: 20px;
	top: 20px;
	padding: 12px 24px;
	background: var(--brand);
	color: #ffffff;
	z-index: 999999;
	text-decoration: none;
	font-weight: 700;
	border-radius: var(--radius-pill);
	box-shadow: var(--shadow-modal);
}

a {
	color: inherit;
	text-decoration: none;
	transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

button, input, select, textarea {
	font: inherit;
	color: inherit;
}

.bento-container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 24px;
	width: 100%;
}

/* ==========================================================================
   2. Top Micro-Bar & Glassmorphic Sticky Header
   ========================================================================== */
.top-micro-bar {
	background: #ffffff;
	border-bottom: 1px solid var(--border-ui);
	font-size: 0.775rem;
	color: var(--text-muted);
	padding: 6px 0;
}

.top-micro-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.micro-left, .micro-right {
	display: flex;
	align-items: center;
	gap: 8px;
}

.micro-dot {
	color: var(--brand);
	font-weight: 700;
}

.micro-tag {
	font-weight: 600;
	color: var(--text-main);
}

.bento-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: rgba(255, 255, 255, 0.88);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	border-bottom: 1px solid rgba(226, 232, 240, 0.85);
	box-shadow: var(--shadow-subtle);
}

.bento-header-inner {
	height: 70px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.bento-branding {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

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

.bento-title-wrap {
	display: flex;
	align-items: center;
}

.bento-site-title {
	font-size: 1.4rem;
	font-weight: 850;
	letter-spacing: -0.03em;
	color: var(--text-main);
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.brand-accent-dot {
	width: 8px;
	height: 8px;
	background: var(--brand);
	border-radius: 50%;
	display: inline-block;
	box-shadow: 0 0 10px var(--brand-glow);
}

/* Desktop Nav */
.bento-desktop-nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.bento-nav-list {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.bento-nav-list > li > a {
	display: inline-block;
	padding: 8px 16px;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--text-muted);
	border-radius: var(--radius-pill);
	transition: all 0.15s ease;
}

.bento-nav-list > li > a:hover {
	color: var(--brand);
	background: var(--brand-soft);
}

.bento-nav-list > li.current-menu-item > a {
	color: #ffffff;
	background: var(--brand);
}

/* Dropdown */
.bento-nav-list li {
	position: relative;
}

.bento-nav-list ul {
	list-style: none;
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	min-width: 220px;
	background: #ffffff;
	border: 1px solid var(--border-ui);
	border-radius: 12px;
	box-shadow: var(--shadow-modal);
	padding: 8px;
	display: none;
	z-index: 1002;
}

.bento-nav-list li:hover > ul,
.bento-nav-list li:focus-within > ul {
	display: block;
}

.bento-nav-list ul a {
	display: block;
	padding: 8px 14px;
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--text-main);
	border-radius: 6px;
}

.bento-nav-list ul a:hover {
	background: var(--brand-soft);
	color: var(--brand);
}

/* Header Action Pill */
.bento-header-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.bento-search-trigger {
	background: var(--card-subtle);
	border: 1px solid var(--border-ui);
	border-radius: var(--radius-pill);
	padding: 7px 16px;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	color: var(--text-muted);
	font-size: 0.875rem;
	font-weight: 500;
	transition: all 0.15s ease;
}

.bento-search-trigger:hover {
	background: #ffffff;
	border-color: var(--brand);
	color: var(--brand);
	box-shadow: 0 0 0 3px var(--brand-soft);
}

.cmd-kbd {
	font-family: inherit;
	font-size: 0.75rem;
	font-weight: 700;
	padding: 2px 6px;
	background: #ffffff;
	border: 1px solid var(--border-ui);
	border-radius: 4px;
	color: var(--text-muted);
}

.bento-mobile-btn {
	display: none;
	width: 42px;
	height: 42px;
	border: 1px solid var(--border-ui);
	background: var(--card-subtle);
	border-radius: 10px;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--text-main);
	padding: 0;
}

.bento-burger {
	width: 20px;
	height: 14px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.burger-line {
	width: 100%;
	height: 2px;
	background-color: currentColor;
	border-radius: 2px;
}

/* ==========================================================================
   3. Search Modal & Mobile Drawer
   ========================================================================== */
.bento-search-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	align-items: flex-start;
	justify-content: center;
	padding: 90px 20px 20px;
}

.bento-search-modal.is-active {
	display: flex;
}

.search-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(5px);
}

.search-modal-box {
	position: relative;
	background: #ffffff;
	width: 100%;
	max-width: 620px;
	border-radius: 18px;
	box-shadow: var(--shadow-modal);
	padding: 24px;
	z-index: 1;
}

.search-modal-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.modal-label {
	font-size: 1.1rem;
	font-weight: 800;
	color: var(--text-main);
}

.modal-close,
.drawer-close {
	background: transparent;
	border: none;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	color: var(--text-muted);
	padding: 4px 8px;
}

.modal-close:hover,
.drawer-close:hover {
	color: var(--text-main);
}

/* Bento Search Form */
.bento-search-form .bento-input-group {
	display: flex;
	align-items: center;
	border: 1.5px solid var(--border-ui);
	border-radius: 12px;
	background: #ffffff;
	padding: 4px 6px 4px 16px;
	gap: 12px;
	transition: all 0.15s ease;
}

.bento-search-form .bento-input-group:focus-within {
	border-color: var(--brand);
	box-shadow: 0 0 0 4px var(--brand-soft);
}

.bento-search-svg {
	color: var(--text-muted);
	flex-shrink: 0;
}

.bento-search-control {
	flex: 1;
	border: none;
	outline: none;
	background: transparent;
	padding: 10px 0;
	font-size: 1rem;
	color: var(--text-main);
}

.bento-search-btn {
	background: var(--brand);
	color: #ffffff;
	border: none;
	padding: 10px 22px;
	border-radius: 8px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.bento-search-btn:hover {
	background: var(--brand-hover);
}

/* Off-Canvas Mobile Drawer */
.bento-drawer-wrap {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 999999;
}

.bento-drawer-wrap.is-active {
	display: block;
}

.drawer-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(4px);
}

.drawer-content {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 320px;
	max-width: 88vw;
	background: #ffffff;
	box-shadow: var(--shadow-modal);
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	padding: 24px;
	z-index: 1;
	animation: bentoDrawerSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bentoDrawerSlide {
	from { transform: translateX(100%); }
	to { transform: translateX(0); }
}

.drawer-top-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}

.drawer-site-name {
	font-size: 1.25rem;
	font-weight: 850;
	letter-spacing: -0.02em;
}

.drawer-search-box {
	margin-bottom: 24px;
}

.drawer-group-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-muted);
	margin-bottom: 12px;
}

.drawer-nav-group {
	margin-bottom: 28px;
}

.drawer-menu-list {
	list-style: none;
}

.drawer-menu-list > li > a {
	display: block;
	padding: 10px 14px;
	font-size: 1rem;
	font-weight: 600;
	color: var(--text-main);
	border-radius: 8px;
	margin-bottom: 4px;
}

.drawer-menu-list > li > a:hover {
	background: var(--brand-soft);
	color: var(--brand);
}

.drawer-menu-list > li.current-menu-item > a {
	background: var(--brand-light);
	color: var(--brand);
}

.drawer-menu-list ul {
	list-style: none;
	padding-left: 16px;
	margin-top: 4px;
}

.drawer-categories-group {
	margin-bottom: 24px;
}

.drawer-cats-list {
	list-style: none;
}

.drawer-cats-list li a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 12px;
	font-size: 0.9rem;
	color: var(--text-muted);
	border-radius: 8px;
}

.drawer-cats-list li a:hover {
	background: var(--card-subtle);
	color: var(--brand);
}

.mcat-count {
	font-size: 0.75rem;
	font-weight: 700;
	padding: 2px 8px;
	background: var(--card-subtle);
	color: var(--text-muted);
	border-radius: var(--radius-pill);
}

.drawer-footer-links {
	margin-top: auto;
	padding-top: 20px;
	border-top: 1px solid var(--border-ui);
}

.drawer-footer-list {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.drawer-footer-list a {
	font-size: 0.8rem;
	color: var(--text-muted);
}

.drawer-footer-list a:hover {
	color: var(--brand);
}

/* ==========================================================================
   4. Bento Magazine Hero Grid (Asymmetrical Standout)
   ========================================================================== */
.site-content {
	flex: 1;
	padding: 40px 0 64px;
}

.bento-hero-section {
	margin-bottom: 56px;
}

.bento-hero-grid {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 32px;
	align-items: stretch;
}

/* Lead Feature Card */
.bento-hero-lead .bento-card-hero {
	height: 100%;
	display: flex;
	flex-direction: column;
}

.bento-card-hero .bento-media-wrap {
	aspect-ratio: 16 / 9;
}

.bento-card-hero .bento-card-body {
	padding: 32px;
}

.bento-card-hero .bento-card-title {
	font-size: 1.85rem;
	line-height: 1.3;
	margin-bottom: 14px;
	-webkit-line-clamp: 3;
}

.bento-card-hero .bento-card-excerpt {
	font-size: 1.05rem;
	line-height: 1.65;
	margin-bottom: 20px;
	-webkit-line-clamp: 3;
}

/* Bento Column 2: Trending Numbered Stories */
.bento-hero-trending {
	background: #ffffff;
	border: 1px solid var(--border-ui);
	border-radius: var(--radius-card);
	padding: 28px;
	box-shadow: var(--shadow-card);
	display: flex;
	flex-direction: column;
}

.trending-box-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--border-ui);
}

.trending-fire-icon {
	color: #f59e0b;
	font-size: 1.25rem;
}

.trending-box-title {
	font-size: 1.25rem;
	font-weight: 850;
	letter-spacing: -0.02em;
	color: var(--text-main);
}

.trending-stories-list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 16px;
	flex: 1;
	justify-content: space-between;
}

.trending-story-item {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

.trending-rank-num {
	font-size: 1.5rem;
	font-weight: 900;
	color: var(--brand);
	line-height: 1;
	opacity: 0.85;
	flex-shrink: 0;
	padding-top: 2px;
}

.trending-content {
	flex: 1;
	min-width: 0;
}

.trending-cat-dot {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-muted);
	display: block;
	margin-bottom: 4px;
}

.trending-headline {
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.4;
	margin-bottom: 4px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.trending-headline a:hover {
	color: var(--brand);
}

.trending-read {
	font-size: 0.75rem;
	color: var(--text-faint);
}

/* ==========================================================================
   5. Horizontal Cards (Deep Dives Section)
   ========================================================================== */
.deep-dives-section {
	margin-bottom: 60px;
}

.bento-horizontal-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px;
}

.bento-card-horizontal {
	background: #ffffff;
	border: 1px solid var(--border-ui);
	border-radius: var(--radius-card);
	overflow: hidden;
	display: grid;
	grid-template-columns: 200px 1fr;
	box-shadow: var(--shadow-card);
	transition: all 0.2s ease;
}

.bento-card-horizontal:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-hover);
	border-color: var(--brand-border);
}

.h-media-col {
	background: var(--card-subtle);
}

.h-aspect-ratio {
	aspect-ratio: 16 / 9;
	height: 100%;
	width: 100%;
	overflow: hidden;
}

.h-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.bento-card-horizontal:hover .h-img {
	transform: scale(1.05);
}

.h-content-col {
	padding: 20px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.h-cat-badge {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--brand);
	margin-bottom: 6px;
	display: inline-block;
}

.h-title {
	font-size: 1.1rem;
	font-weight: 750;
	line-height: 1.35;
	margin-bottom: 8px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.h-title a:hover {
	color: var(--brand);
}

.h-excerpt {
	font-size: 0.875rem;
	color: var(--text-muted);
	line-height: 1.5;
	margin-bottom: 12px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.h-meta-row {
	font-size: 0.775rem;
	color: var(--text-faint);
	display: flex;
	gap: 6px;
}

/* ==========================================================================
   6. Standard Cards & Grid
   ========================================================================== */
.bento-cards-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
}

.bento-grid-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
}

.bento-card {
	background: var(--card-bg);
	border: 1px solid var(--border-ui);
	border-radius: var(--radius-card);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: var(--shadow-card);
	transition: all 0.2s ease;
}

.bento-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-hover);
	border-color: var(--brand-border);
}

.bento-media-wrap {
	position: relative;
	background: var(--card-subtle);
}

.bento-aspect-ratio {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	position: relative;
	width: 100%;
}

.bento-card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

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

.bento-thumb-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--brand-light), var(--brand-soft));
	color: var(--brand);
	position: relative;
}

.placeholder-letter {
	font-size: 2.8rem;
	font-weight: 900;
	opacity: 0.75;
}

.bento-cat-tag {
	position: absolute;
	top: 14px;
	left: 14px;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(4px);
	color: var(--brand);
	font-size: 0.75rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 4px 12px;
	border-radius: var(--radius-pill);
	box-shadow: var(--shadow-subtle);
	transition: all 0.15s ease;
}

.bento-cat-tag:hover {
	background: var(--brand);
	color: #ffffff;
}

.bento-card-body {
	padding: 22px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.bento-card-title {
	font-size: 1.15rem;
	font-weight: 750;
	line-height: 1.4;
	margin-bottom: 10px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.bento-card-title a {
	color: var(--text-main);
}

.bento-card-title a:hover {
	color: var(--brand);
}

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

.bento-card-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.8rem;
	color: var(--text-faint);
	padding-top: 14px;
	border-top: 1px solid var(--border-light);
	margin-top: auto;
}

.meta-part {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

/* Category Sections */
.bento-section {
	margin-bottom: 60px;
}

.bento-section-head {
	display: flex;
	flex-direction: column;
	position: relative;
	margin-bottom: 28px;
	padding-left: 20px;
}

.head-accent {
	position: absolute;
	left: 0;
	top: 4px;
	bottom: 4px;
	width: 5px;
	background: var(--brand-gradient);
	border-radius: 4px;
}

.head-title {
	font-size: 1.6rem;
	font-weight: 850;
	letter-spacing: -0.02em;
	color: var(--text-main);
}

.head-sub {
	font-size: 0.95rem;
	color: var(--text-muted);
	margin-top: 2px;
}

.category-stream-head {
	flex-direction: row;
	align-items: flex-end;
	justify-content: space-between;
}

.bento-explore-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.875rem;
	font-weight: 750;
	color: var(--brand);
	padding: 6px 14px;
	background: var(--brand-soft);
	border-radius: var(--radius-pill);
	white-space: nowrap;
}

.bento-explore-link:hover {
	background: var(--brand);
	color: #ffffff;
}

/* ==========================================================================
   7. Single Post Editorial Design
   ========================================================================== */
.bento-layout-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 48px;
	align-items: start;
}

.bento-breadcrumbs {
	font-size: 0.875rem;
	color: var(--text-faint);
	margin-bottom: 20px;
}

.bento-breadcrumbs-list {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.bento-crumb-sep {
	color: var(--border-ui);
}

.bento-crumb-item.current {
	color: var(--text-main);
	font-weight: 600;
	max-width: 420px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.single-cat-wrap {
	margin-bottom: 16px;
}

.single-cat-pill {
	display: inline-block;
	background: var(--brand-soft);
	color: var(--brand);
	font-size: 0.8rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 5px 14px;
	border-radius: var(--radius-pill);
}

.entry-title {
	font-size: 2.5rem;
	font-weight: 900;
	line-height: 1.25;
	letter-spacing: -0.03em;
	color: var(--text-main);
	margin-bottom: 18px;
}

.entry-meta-strip {
	padding-bottom: 20px;
	margin-bottom: 28px;
	border-bottom: 1px solid var(--border-ui);
	font-size: 0.9rem;
	color: var(--text-muted);
}

.meta-left-info {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

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

.single-hero-media {
	margin: 0 0 36px;
	border-radius: var(--radius-card);
	overflow: hidden;
	aspect-ratio: 16 / 9;
	box-shadow: var(--shadow-card);
}

.single-media-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Styled Content (Specification Section 7) */
.entry-content {
	max-width: var(--content-width);
	font-size: 1.125rem;
	line-height: 1.85;
	color: #1e293b;
}

/* Styled Lead Paragraph */
.entry-content > p:first-of-type {
	font-size: 1.25rem;
	line-height: 1.8;
	color: #334155;
	font-weight: 450;
	margin-bottom: 1.8em;
}

.entry-content p {
	margin-bottom: 1.7em;
}

.entry-content h2.wp-block-heading,
.entry-content h2 {
	font-size: 1.8rem;
	font-weight: 850;
	line-height: 1.35;
	margin-top: 2.4em;
	margin-bottom: 0.8em;
	border-left: 5px solid var(--brand);
	padding-left: 16px;
	color: var(--text-main);
}

.entry-content h3.wp-block-heading,
.entry-content h3 {
	font-size: 1.4rem;
	font-weight: 750;
	line-height: 1.4;
	margin-top: 1.9em;
	margin-bottom: 0.6em;
	color: var(--text-main);
}

.entry-content h4.wp-block-heading,
.entry-content h4 {
	font-size: 1.2rem;
	font-weight: 700;
	margin-top: 1.5em;
	margin-bottom: 0.5em;
}

.entry-content ul,
.entry-content ol {
	margin-bottom: 1.7em;
	padding-left: 24px;
}

.entry-content li {
	margin-bottom: 0.55em;
}

.entry-content ol {
	counter-reset: bento-ol-counter;
	list-style: none;
	padding-left: 0;
}

.entry-content ol > li {
	position: relative;
	padding-left: 36px;
	counter-increment: bento-ol-counter;
}

.entry-content ol > li::before {
	content: counter(bento-ol-counter);
	position: absolute;
	left: 0;
	top: 3px;
	width: 24px;
	height: 24px;
	background: var(--brand-light);
	color: var(--brand-text);
	font-weight: 800;
	font-size: 0.8rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
}

/* Tables (Horizontal scroll on mobile) */
.entry-content figure.wp-block-table {
	margin: 2.4em 0;
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--border-ui);
	border-radius: 12px;
	box-shadow: var(--shadow-subtle);
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
	line-height: 1.6;
	min-width: 520px;
}

.entry-content table thead th {
	background: var(--brand-light);
	color: var(--brand-text);
	font-weight: 800;
	text-align: left;
	padding: 14px 18px;
	border-bottom: 2px solid var(--brand-border);
}

.entry-content table tbody td {
	padding: 14px 18px;
	border-bottom: 1px solid var(--border-ui);
}

.entry-content table tbody tr:nth-child(even) {
	background: #f8fafc;
}

.entry-content table tbody tr:hover {
	background: var(--brand-soft);
}

/* Images & Captions */
.entry-content figure.wp-block-image {
	margin: 2.2em 0;
}

.entry-content figure.wp-block-image img {
	border-radius: 12px;
	width: 100%;
	height: auto;
}

.entry-content figcaption.wp-element-caption {
	font-size: 0.875rem;
	color: var(--text-muted);
	text-align: center;
	margin-top: 10px;
}

/* Links */
.entry-content a {
	color: var(--brand);
	text-decoration: underline;
	text-underline-offset: 4px;
	font-weight: 600;
}

.entry-content a:hover {
	color: var(--brand-hover);
}

/* Related Reading Callout Box */
.entry-content .wp-block-group.wpaiw-related {
	background: var(--brand-soft);
	border-left: 5px solid var(--brand);
	border-radius: 12px;
	padding: 24px 28px;
	margin: 2.4em 0;
	border: 1px solid var(--brand-border);
}

.entry-content .wp-block-group.wpaiw-related h2 {
	margin-top: 0;
	border-left: none;
	padding-left: 0;
	font-size: 1.35rem;
}

/* Reference Sources */
.entry-content ul:has(a[rel*="nofollow"]) {
	font-size: 0.875rem;
	color: var(--text-muted);
}

/* Blockquotes, Code */
.entry-content blockquote.wp-block-quote {
	border-left: 4px solid var(--brand);
	padding: 18px 26px;
	margin: 2.2em 0;
	font-style: italic;
	background: var(--card-subtle);
	border-radius: 0 12px 12px 0;
}

.entry-content pre.wp-block-code {
	background: #0f172a;
	color: #f8fafc;
	padding: 22px;
	border-radius: 12px;
	overflow-x: auto;
	font-size: 0.925rem;
	margin: 2.2em 0;
}

/* Bento Table of Contents Card */
.bento-toc-card {
	background: #ffffff;
	border: 1.5px solid var(--border-ui);
	border-radius: var(--radius-card);
	padding: 24px 28px;
	margin: 2.5em 0;
	box-shadow: var(--shadow-card);
}

.bento-toc-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.bento-toc-badge {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--brand);
}

.bento-toc-title {
	font-size: 1.15rem;
	font-weight: 850;
	color: var(--text-main);
}

.bento-toc-toggle-btn {
	background: var(--card-subtle);
	border: 1px solid var(--border-ui);
	border-radius: var(--radius-pill);
	padding: 4px 14px;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--text-muted);
	cursor: pointer;
}

.bento-toc-toggle-btn:hover {
	background: var(--brand);
	color: #ffffff;
	border-color: var(--brand);
}

.bento-toc-items {
	list-style: none;
	padding-left: 0;
	margin-top: 18px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.bento-toc-items.is-hidden {
	display: none;
}

.bento-toc-items li a {
	display: flex;
	align-items: baseline;
	gap: 12px;
	text-decoration: none;
	font-size: 0.95rem;
	color: var(--text-main);
	transition: color 0.15s ease;
}

.bento-toc-items li a:hover {
	color: var(--brand);
}

.toc-num {
	font-size: 0.8rem;
	font-weight: 800;
	color: var(--brand);
	opacity: 0.8;
}

/* Tags & Page Links */
.bento-tags-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin: 36px 0;
	padding-top: 24px;
	border-top: 1px solid var(--border-ui);
}

.tags-lead {
	font-weight: 750;
	font-size: 0.9rem;
	color: var(--text-muted);
}

.bento-tags-cloud a {
	font-size: 0.85rem;
	padding: 5px 14px;
	background: #ffffff;
	border: 1px solid var(--border-ui);
	border-radius: var(--radius-pill);
	color: var(--text-main);
	font-weight: 600;
}

.bento-tags-cloud a:hover {
	background: var(--brand);
	color: #ffffff;
	border-color: var(--brand);
}

.page-links {
	margin: 24px 0;
	font-weight: 600;
	display: flex;
	gap: 6px;
	align-items: center;
}

.page-links .page-number {
	padding: 5px 12px;
	border: 1px solid var(--border-ui);
	border-radius: 6px;
}

.bento-related-section {
	margin-top: 56px;
	padding-top: 40px;
	border-top: 2px solid var(--border-ui);
}

/* ==========================================================================
   8. Sidebar & Bento Widgets
   ========================================================================== */
.bento-sidebar-area {
	position: sticky;
	top: 100px;
}

.bento-widget {
	background: #ffffff;
	border: 1px solid var(--border-ui);
	border-radius: var(--radius-card);
	padding: 26px;
	margin-bottom: 28px;
	box-shadow: var(--shadow-card);
}

.widget-header-row {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 18px;
}

.widget-heading {
	font-size: 1.25rem;
	font-weight: 850;
	letter-spacing: -0.02em;
	color: var(--text-main);
}

.widget-header-line {
	flex: 1;
	height: 2px;
	background: var(--border-ui);
}

.bento-cat-list {
	list-style: none;
}

.bento-cat-list li {
	margin-bottom: 8px;
}

.bento-cat-list a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 6px 0;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--text-main);
}

.bento-cat-list a:hover {
	color: var(--brand);
}

.cat-pill-count {
	font-size: 0.75rem;
	font-weight: 700;
	padding: 2px 8px;
	background: var(--card-subtle);
	color: var(--text-muted);
	border-radius: var(--radius-pill);
}

.bento-recent-stories {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.bento-recent-item {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.recent-rank {
	font-size: 1.2rem;
	font-weight: 900;
	color: var(--brand);
	line-height: 1;
	padding-top: 2px;
}

.recent-details {
	flex: 1;
	min-width: 0;
}

.recent-title {
	font-size: 0.925rem;
	font-weight: 700;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.recent-title:hover {
	color: var(--brand);
}

.recent-meta-strip {
	font-size: 0.75rem;
	color: var(--text-faint);
	display: flex;
	gap: 6px;
	margin-top: 3px;
}

/* ==========================================================================
   9. Archive, Search & 404
   ========================================================================== */
.bento-archive-hero {
	background: #ffffff;
	border: 1px solid var(--border-ui);
	border-radius: var(--radius-card);
	padding: 36px;
	margin-bottom: 40px;
	box-shadow: var(--shadow-card);
}

.archive-kicker {
	font-size: 0.75rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--brand);
	display: block;
	margin-bottom: 6px;
}

.archive-main-title {
	font-size: 2.2rem;
	font-weight: 900;
	letter-spacing: -0.025em;
	color: var(--text-main);
	margin-bottom: 10px;
}

.archive-subtext {
	font-size: 1.05rem;
	color: var(--text-muted);
	line-height: 1.6;
}

.query-glow {
	color: var(--brand);
}

.bento-empty-card,
.bento-404-card {
	background: #ffffff;
	border: 1px solid var(--border-ui);
	border-radius: var(--radius-card);
	padding: 48px 24px;
	text-align: center;
	margin-bottom: 40px;
	box-shadow: var(--shadow-card);
}

.empty-icon-wrap {
	color: var(--text-faint);
	margin-bottom: 16px;
}

.empty-title,
.error-main-title {
	font-size: 1.6rem;
	font-weight: 850;
	margin-bottom: 10px;
}

.empty-desc,
.error-lead-text {
	color: var(--text-muted);
	max-width: 520px;
	margin: 0 auto 28px;
}

.empty-search-box,
.error-form-wrapper {
	max-width: 460px;
	margin: 0 auto;
}

.form-lead {
	font-weight: 700;
	margin-bottom: 10px;
}

.empty-recommendations,
.error-recommend-section {
	text-align: left;
	border-top: 1px solid var(--border-ui);
	padding-top: 36px;
}

.rec-title {
	font-size: 1.3rem;
	font-weight: 800;
	margin-bottom: 24px;
}

.huge-404-badge {
	font-size: 5.5rem;
	font-weight: 900;
	color: var(--brand);
	line-height: 1;
	letter-spacing: -0.04em;
	display: block;
	margin-bottom: 14px;
}

/* ==========================================================================
   10. Footer & Back-to-Top
   ========================================================================== */
.bento-footer {
	background: #ffffff;
	border-top: 1px solid var(--border-ui);
	padding: 64px 0 28px;
	margin-top: auto;
}

.footer-grid-layout {
	display: grid;
	grid-template-columns: 2fr 1.25fr 1.25fr 1.5fr;
	gap: 48px;
	margin-bottom: 56px;
}

.footer-title {
	font-size: 1.45rem;
	font-weight: 900;
	letter-spacing: -0.02em;
	color: var(--text-main);
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.footer-brand-dot {
	width: 7px;
	height: 7px;
	background: var(--brand);
	border-radius: 50%;
}

.footer-slogan {
	margin-top: 12px;
	font-size: 0.95rem;
	color: var(--text-muted);
	line-height: 1.65;
	max-width: 320px;
}

.footer-features-pill {
	margin-top: 16px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--card-subtle);
	padding: 4px 12px;
	border-radius: var(--radius-pill);
	font-size: 0.75rem;
	font-weight: 750;
	color: var(--text-main);
}

.feat-dot {
	width: 6px;
	height: 6px;
	background: #10b981;
	border-radius: 50%;
}

.footer-col-title {
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--text-main);
	margin-bottom: 20px;
}

.footer-simple-links {
	list-style: none;
}

.footer-simple-links li {
	margin-bottom: 10px;
}

.footer-simple-links a {
	font-size: 0.925rem;
	color: var(--text-muted);
}

.footer-simple-links a:hover {
	color: var(--brand);
}

.footer-mission-text {
	font-size: 0.925rem;
	color: var(--text-muted);
	line-height: 1.65;
}

.footer-bottom-row {
	border-top: 1px solid var(--border-ui);
	padding-top: 28px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 0.875rem;
	color: var(--text-muted);
}

.copyright-line a {
	color: var(--text-main);
	font-weight: 600;
}

.bento-top-button {
	background: var(--card-subtle);
	border: 1px solid var(--border-ui);
	border-radius: var(--radius-pill);
	padding: 6px 14px;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--text-main);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	transition: all 0.15s ease;
}

.bento-top-button:hover {
	background: var(--brand);
	color: #ffffff;
	border-color: var(--brand);
}

/* ==========================================================================
   11. Responsive Media Queries
   ========================================================================== */
@media (max-width: 1024px) {
	.top-micro-bar {
		display: none;
	}

	.bento-desktop-nav {
		display: none;
	}

	.bento-mobile-btn {
		display: inline-flex;
	}

	.bento-search-trigger .search-label,
	.bento-search-trigger .cmd-kbd {
		display: none;
	}

	.bento-search-trigger {
		padding: 10px;
		border-radius: 10px;
	}

	.bento-hero-grid {
		grid-template-columns: 1fr;
	}

	.bento-layout-grid {
		grid-template-columns: 1fr;
	}

	.bento-sidebar-area {
		display: none;
	}

	.bento-cards-grid,
	.bento-grid-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.bento-horizontal-grid {
		grid-template-columns: 1fr;
	}

	.footer-grid-layout {
		grid-template-columns: 1fr 1fr;
		gap: 36px;
	}
}

@media (max-width: 768px) {
	.bento-container {
		padding: 0 16px;
	}

	.bento-card-horizontal {
		grid-template-columns: 1fr;
	}

	.bento-cards-grid,
	.bento-grid-4 {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.entry-title {
		font-size: 1.85rem;
	}

	.entry-content {
		font-size: 1.05rem;
	}

	.footer-grid-layout {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.footer-bottom-row {
		flex-direction: column;
		gap: 16px;
		text-align: center;
	}
}
