/*
Theme Name: StreamGrid
Theme URI: https://example.com/streamgrid
Author: OpenAI
Author URI: https://openai.com
Description: 面向通用博客的高性能响应式主题，采用视频卡片式内容布局，原生支持深色模式、自定义主色与高分辨率屏幕展示。
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: streamgrid
*/

:root {
	--streamgrid-primary: #ff0033;
	--streamgrid-primary-rgb: 255, 0, 51;
	--streamgrid-site-max-width: 2200px;
	--streamgrid-card-min-width: 308px;
	--streamgrid-card-gap: 24px;
	--streamgrid-card-radius: 20px;
	--streamgrid-shell-padding: clamp(16px, 1.5vw, 30px);
	--streamgrid-header-height: 76px;
	--streamgrid-bg: #ffffff;
	--streamgrid-bg-soft: #f7f7f8;
	--streamgrid-surface: #ffffff;
	--streamgrid-surface-rgb: 255, 255, 255;
	--streamgrid-surface-strong: #ffffff;
	--streamgrid-text: #0f0f10;
	--streamgrid-text-soft: #5f6368;
	--streamgrid-border: rgba(15, 15, 16, 0.08);
	--streamgrid-shadow: 0 22px 48px rgba(15, 15, 16, 0.08);
	--streamgrid-shadow-soft: 0 12px 28px rgba(15, 15, 16, 0.06);
	--streamgrid-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.92));
	--streamgrid-focus: 0 0 0 3px rgba(var(--streamgrid-primary-rgb), 0.2);
	--streamgrid-content-width: 860px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--streamgrid-bg: #0f0f10;
		--streamgrid-bg-soft: #17181b;
		--streamgrid-surface: #17181b;
		--streamgrid-surface-rgb: 23, 24, 27;
		--streamgrid-surface-strong: #1d1f23;
		--streamgrid-text: #f5f7fa;
		--streamgrid-text-soft: #a1a8b3;
		--streamgrid-border: rgba(255, 255, 255, 0.09);
		--streamgrid-shadow: 0 26px 60px rgba(0, 0, 0, 0.42);
		--streamgrid-shadow-soft: 0 16px 36px rgba(0, 0, 0, 0.28);
		--streamgrid-gradient: linear-gradient(180deg, rgba(23, 24, 27, 0.84), rgba(23, 24, 27, 0.92));
	}
}

html[data-theme="light"] {
	--streamgrid-bg: #ffffff;
	--streamgrid-bg-soft: #f7f7f8;
	--streamgrid-surface: #ffffff;
	--streamgrid-surface-rgb: 255, 255, 255;
	--streamgrid-surface-strong: #ffffff;
	--streamgrid-text: #0f0f10;
	--streamgrid-text-soft: #5f6368;
	--streamgrid-border: rgba(15, 15, 16, 0.08);
	--streamgrid-shadow: 0 22px 48px rgba(15, 15, 16, 0.08);
	--streamgrid-shadow-soft: 0 12px 28px rgba(15, 15, 16, 0.06);
	--streamgrid-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.92));
}

html[data-theme="dark"] {
	--streamgrid-bg: #0f0f10;
	--streamgrid-bg-soft: #17181b;
	--streamgrid-surface: #17181b;
	--streamgrid-surface-rgb: 23, 24, 27;
	--streamgrid-surface-strong: #1d1f23;
	--streamgrid-text: #f5f7fa;
	--streamgrid-text-soft: #a1a8b3;
	--streamgrid-border: rgba(255, 255, 255, 0.09);
	--streamgrid-shadow: 0 26px 60px rgba(0, 0, 0, 0.42);
	--streamgrid-shadow-soft: 0 16px 36px rgba(0, 0, 0, 0.28);
	--streamgrid-gradient: linear-gradient(180deg, rgba(23, 24, 27, 0.84), rgba(23, 24, 27, 0.92));
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--streamgrid-bg);
	color: var(--streamgrid-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
	line-height: 1.7;
	text-rendering: optimizeLegibility;
	transition: background-color 0.25s ease, color 0.25s ease;
}

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

a {
	color: inherit;
	text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: none;
	box-shadow: var(--streamgrid-focus);
	border-radius: 10px;
}

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

.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;
}

.streamgrid-shell {
	width: min(calc(100% - (var(--streamgrid-shell-padding) * 2)), var(--streamgrid-site-max-width));
	margin: 0 auto;
}

.streamgrid-site {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.site-main {
	flex: 1;
	padding: 0 0 56px;
}

.streamgrid-site-header {
	position: sticky;
	top: 0;
	z-index: 80;
	backdrop-filter: saturate(180%) blur(18px);
	background: color-mix(in srgb, var(--streamgrid-bg) 82%, transparent);
	border-bottom: 1px solid var(--streamgrid-border);
}

.streamgrid-no-sticky-header .streamgrid-site-header {
	position: relative;
}

.streamgrid-site-header__inner {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 16px;
	min-height: var(--streamgrid-header-height);
}

.streamgrid-branding {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

.streamgrid-branding__mark {
	width: 44px;
	height: 32px;
	border-radius: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, rgba(var(--streamgrid-primary-rgb), 1), rgba(var(--streamgrid-primary-rgb), 0.7));
	color: #fff;
	font-size: 1.15rem;
	font-weight: 800;
	box-shadow: 0 14px 28px rgba(var(--streamgrid-primary-rgb), 0.22);
	flex-shrink: 0;
}

.streamgrid-branding__text {
	min-width: 0;
}

.streamgrid-branding__title {
	margin: 0;
	font-size: clamp(1rem, 0.8rem + 0.5vw, 1.35rem);
	line-height: 1.1;
}

.streamgrid-branding__title a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.streamgrid-branding__description {
	margin: 4px 0 0;
	color: var(--streamgrid-text-soft);
	font-size: 0.84rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.streamgrid-primary-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
}

.streamgrid-primary-nav ul {
	list-style: none;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0;
	margin: 0;
}

.streamgrid-primary-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 42px;
	padding: 0 14px;
	border-radius: 999px;
	color: var(--streamgrid-text-soft);
	font-weight: 600;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.streamgrid-primary-nav a:hover,
.streamgrid-primary-nav .current-menu-item > a,
.streamgrid-primary-nav .current_page_item > a,
.streamgrid-primary-nav .current-menu-ancestor > a,
.streamgrid-primary-nav .current_page_ancestor > a {
	background: rgba(var(--streamgrid-primary-rgb), 0.11);
	color: var(--streamgrid-text);
}

.streamgrid-primary-nav li {
	position: relative;
}

.streamgrid-primary-nav > ul > li {
	display: inline-flex;
	align-items: center;
}

.streamgrid-primary-nav .menu-item-has-children > a,
.streamgrid-primary-nav .page_item_has_children > a {
	padding-right: 8px;
}

.streamgrid-submenu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	padding: 0;
	width: 28px;
	height: 28px;
	margin-left: -2px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--streamgrid-text-soft);
	cursor: pointer;
	box-shadow: none;
	transform: none;
	transition: color 0.2s ease;
}

.streamgrid-submenu-toggle__icon {
	display: block;
	flex: 0 0 14px;
	min-width: 14px;
	width: 14px;
	height: 14px;
	transition: transform 0.2s ease;
}

.streamgrid-submenu-toggle:hover {
	color: var(--streamgrid-text);
	box-shadow: none;
	transform: none;
}

.streamgrid-primary-nav li.is-open > .streamgrid-submenu-toggle,
.streamgrid-primary-nav li:hover > .streamgrid-submenu-toggle,
.streamgrid-primary-nav li:focus-within > .streamgrid-submenu-toggle {
	color: var(--streamgrid-text);
}

.streamgrid-primary-nav li.is-open > .streamgrid-submenu-toggle .streamgrid-submenu-toggle__icon,
.streamgrid-primary-nav li:hover > .streamgrid-submenu-toggle .streamgrid-submenu-toggle__icon,
.streamgrid-primary-nav li:focus-within > .streamgrid-submenu-toggle .streamgrid-submenu-toggle__icon {
	transform: rotate(-90deg);
}

.streamgrid-primary-nav ul ul {
	position: absolute;
	top: calc(100% + 12px);
	left: 0;
	z-index: 25;
	display: grid;
	gap: 8px;
	min-width: 220px;
	width: max-content;
	max-width: min(calc(100vw - 32px), 90vw);
	padding: 12px;
	background: var(--streamgrid-surface);
	border: 1px solid var(--streamgrid-border);
	border-radius: 24px;
	box-shadow: var(--streamgrid-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.streamgrid-primary-nav ul ul::before {
	content: "";
	position: absolute;
	top: -7px;
	left: 24px;
	width: 14px;
	height: 14px;
	background: var(--streamgrid-surface);
	border-top: 1px solid var(--streamgrid-border);
	border-left: 1px solid var(--streamgrid-border);
	transform: rotate(45deg);
}

.streamgrid-primary-nav ul ul::after {
	content: "";
	position: absolute;
	top: -12px;
	left: 0;
	width: 100%;
	height: 12px;
	background: transparent;
}

.streamgrid-primary-nav ul ul li {
	display: block;
	width: 100%;
}

.streamgrid-primary-nav ul ul a {
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 44px;
	padding: 10px 14px;
	border-radius: 14px;
	color: var(--streamgrid-text);
	line-height: 1.4;
	white-space: nowrap;
}

.streamgrid-primary-nav ul ul a:hover,
.streamgrid-primary-nav ul ul .current-menu-item > a,
.streamgrid-primary-nav ul ul .current_page_item > a,
.streamgrid-primary-nav ul ul .current-menu-ancestor > a,
.streamgrid-primary-nav ul ul .current_page_ancestor > a {
	background: rgba(var(--streamgrid-primary-rgb), 0.12);
	color: var(--streamgrid-text);
}

.streamgrid-primary-nav ul ul ul {
	top: -12px;
	left: calc(100% + 12px);
}

.streamgrid-primary-nav ul ul ul::before {
	top: 18px;
	left: -7px;
	border-top: 0;
	border-right: 0;
	border-bottom: 1px solid var(--streamgrid-border);
	border-left: 1px solid var(--streamgrid-border);
}

.streamgrid-primary-nav ul ul ul::after {
	top: 0;
	left: -12px;
	width: 12px;
	height: 100%;
}

@media (min-width: 821px) {
	.streamgrid-primary-nav li:hover > ul,
	.streamgrid-primary-nav li:focus-within > ul,
	.streamgrid-primary-nav li.is-open > ul {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
		pointer-events: auto;
	}
}

.streamgrid-header-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
}

.streamgrid-search {
	position: relative;
	width: min(100%, 320px);
}

.streamgrid-search .search-form {
	display: flex;
	align-items: center;
	min-width: 0;
	margin: 0;
	background: var(--streamgrid-surface);
	border: 1px solid var(--streamgrid-border);
	border-radius: 999px;
	box-shadow: var(--streamgrid-shadow-soft);
}

.streamgrid-search .search-field {
	width: 100%;
	min-width: 0;
	border: 0;
	background: transparent;
	padding: 12px 16px;
	color: var(--streamgrid-text);
}

.streamgrid-search .search-submit {
	border: 0;
	background: transparent;
	color: var(--streamgrid-text-soft);
	padding: 0 16px;
	min-height: 46px;
	cursor: pointer;
}

.streamgrid-icon-button,
.menu-toggle {
	border: 1px solid var(--streamgrid-border);
	background: var(--streamgrid-surface);
	color: var(--streamgrid-text);
	width: 46px;
	height: 46px;
	border-radius: 50%;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--streamgrid-shadow-soft);
	transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.streamgrid-icon-button:hover,
.menu-toggle:hover {
	transform: translateY(-1px);
	background: color-mix(in srgb, var(--streamgrid-surface) 88%, var(--streamgrid-primary) 12%);
}

.menu-toggle {
	display: none;
}

.streamgrid-archive-hero {
	padding: 28px 0 10px;
}

.streamgrid-archive-hero__inner {
	background: var(--streamgrid-gradient);
	border: 1px solid var(--streamgrid-border);
	border-radius: calc(var(--streamgrid-card-radius) + 8px);
	padding: clamp(18px, 3vw, 40px);
	box-shadow: var(--streamgrid-shadow-soft);
}

.streamgrid-archive-hero__title {
	margin: 0;
	font-size: clamp(1.75rem, 1.1rem + 2vw, 3rem);
	line-height: 1.08;
}

.streamgrid-archive-hero__description {
	margin-top: 12px;
	max-width: 72ch;
	color: var(--streamgrid-text-soft);
}

.streamgrid-feed-wrap {
	padding-top: 22px;
}

.streamgrid-feed {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--streamgrid-card-min-width)), 1fr));
	gap: var(--streamgrid-card-gap);
	align-items: start;
}

.streamgrid-card {
	--streamgrid-card-accent-rgb: var(--streamgrid-primary-rgb);
	position: relative;
	background: var(--streamgrid-surface);
	border: 1px solid color-mix(in srgb, var(--streamgrid-border) 85%, rgba(var(--streamgrid-card-accent-rgb), 0.14) 15%);
	border-radius: calc(var(--streamgrid-card-radius) + 4px);
	overflow: clip;
	box-shadow: var(--streamgrid-shadow-soft);
	transform: translateZ(0);
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
	content-visibility: auto;
	contain-intrinsic-size: 460px;
}

.streamgrid-card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(var(--streamgrid-card-accent-rgb), 0.04), rgba(var(--streamgrid-card-accent-rgb), 0));
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.streamgrid-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 28px 46px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(var(--streamgrid-card-accent-rgb), 0.1), 0 0 0 10px rgba(var(--streamgrid-card-accent-rgb), 0.06);
	border-color: rgba(var(--streamgrid-card-accent-rgb), 0.22);
}

.streamgrid-card:hover::before {
	opacity: 1;
}

.streamgrid-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, rgba(var(--streamgrid-primary-rgb), 0.18), rgba(var(--streamgrid-primary-rgb), 0.05));
}

.streamgrid-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease, filter 0.25s ease;
}

.streamgrid-card:hover .streamgrid-card__image {
	transform: scale(1.035);
	filter: saturate(1.04);
}

.streamgrid-card__placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	font-size: clamp(2rem, 2vw, 3.5rem);
	font-weight: 800;
	color: var(--streamgrid-primary);
}

.streamgrid-card__body {
	position: relative;
	padding: 18px 18px 20px;
}

.streamgrid-card__eyebrow {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 0 10px;
	border-radius: 999px;
	background: rgba(var(--streamgrid-card-accent-rgb), 0.11);
	color: rgb(var(--streamgrid-card-accent-rgb));
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.streamgrid-card__title {
	margin: 12px 0 0;
	font-size: clamp(1rem, 0.92rem + 0.35vw, 1.28rem);
	line-height: 1.35;
	letter-spacing: -0.01em;
}

.streamgrid-card__title a {
	display: inline;
	background-image: linear-gradient(currentColor, currentColor);
	background-size: 0 1px;
	background-repeat: no-repeat;
	background-position: 0 100%;
	transition: background-size 0.2s ease;
}

.streamgrid-card:hover .streamgrid-card__title a {
	background-size: 100% 1px;
}

.streamgrid-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 14px;
	margin-top: 10px;
	color: var(--streamgrid-text-soft);
	font-size: 0.86rem;
}

.streamgrid-card__excerpt {
	margin-top: 12px;
	color: var(--streamgrid-text-soft);
	font-size: 0.94rem;
	line-height: 1.65;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.streamgrid-pagination {
	display: flex;
	justify-content: center;
	padding: 34px 0 0;
}

.streamgrid-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.streamgrid-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 16px;
	border-radius: 999px;
	background: var(--streamgrid-surface);
	border: 1px solid var(--streamgrid-border);
	box-shadow: var(--streamgrid-shadow-soft);
}

.streamgrid-pagination .page-numbers.current,
.streamgrid-pagination .page-numbers:hover {
	background: rgba(var(--streamgrid-primary-rgb), 0.12);
	border-color: rgba(var(--streamgrid-primary-rgb), 0.28);
}

.streamgrid-empty {
	padding: 42px 0 16px;
}

.streamgrid-empty__inner {
	padding: 28px;
	background: var(--streamgrid-surface);
	border: 1px solid var(--streamgrid-border);
	border-radius: calc(var(--streamgrid-card-radius) + 8px);
	box-shadow: var(--streamgrid-shadow-soft);
}

.streamgrid-single {
	padding-top: 26px;
}

.streamgrid-single__article,
.streamgrid-page__article,
.streamgrid-comments,
.streamgrid-related {
	width: min(calc(100% - (var(--streamgrid-shell-padding) * 2)), var(--streamgrid-content-width));
	margin: 0 auto;
}

.streamgrid-single__article,
.streamgrid-page__article {
	background: var(--streamgrid-surface);
	border: 1px solid var(--streamgrid-border);
	border-radius: calc(var(--streamgrid-card-radius) + 10px);
	box-shadow: var(--streamgrid-shadow-soft);
	padding: clamp(18px, 4vw, 42px);
}

.streamgrid-entry__hero {
	margin-bottom: 24px;
}

.streamgrid-entry__media {
	margin: 0 0 22px;
	overflow: clip;
	border-radius: calc(var(--streamgrid-card-radius) + 4px);
	background: var(--streamgrid-bg-soft);
}

.streamgrid-entry__media img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.streamgrid-entry__title {
	margin: 0;
	font-size: clamp(2rem, 1.2rem + 2vw, 3.4rem);
	line-height: 1.08;
	letter-spacing: -0.03em;
}

.streamgrid-entry__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 16px;
	margin-top: 16px;
	color: var(--streamgrid-text-soft);
	font-size: 0.95rem;
}

.streamgrid-entry__meta a {
	color: inherit;
}

.streamgrid-entry__content,
.entry-content {
	color: var(--streamgrid-text);
}

.streamgrid-entry__content > *:first-child,
.entry-content > *:first-child {
	margin-top: 0;
}

.streamgrid-entry__content > *:last-child,
.entry-content > *:last-child {
	margin-bottom: 0;
}

.streamgrid-entry__content p,
.entry-content p {
	margin: 0 0 1.35em;
}

.streamgrid-entry__content h1,
.streamgrid-entry__content h2,
.streamgrid-entry__content h3,
.streamgrid-entry__content h4,
.streamgrid-entry__content h5,
.streamgrid-entry__content h6,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
	margin: 1.55em 0 0.7em;
	line-height: 1.18;
	letter-spacing: -0.02em;
}

.streamgrid-entry__content ul,
.streamgrid-entry__content ol,
.entry-content ul,
.entry-content ol {
	padding-left: 1.25rem;
	margin: 0 0 1.4em;
}

.streamgrid-entry__content blockquote,
.entry-content blockquote {
	margin: 1.4em 0;
	padding: 1rem 1.25rem;
	border-left: 4px solid var(--streamgrid-primary);
	background: rgba(var(--streamgrid-primary-rgb), 0.08);
	border-radius: 0 18px 18px 0;
}

.streamgrid-entry__content code,
.entry-content code {
	background: rgba(var(--streamgrid-primary-rgb), 0.08);
	padding: 0.16em 0.42em;
	border-radius: 8px;
}

.streamgrid-entry__content pre,
.entry-content pre {
	overflow: auto;
	padding: 18px;
	border-radius: 18px;
	background: #111317;
	color: #f5f7fa;
}

.streamgrid-entry__content table,
.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.4em;
}

.streamgrid-entry__content th,
.streamgrid-entry__content td,
.entry-content th,
.entry-content td {
	padding: 12px 14px;
	border: 1px solid var(--streamgrid-border);
}

.streamgrid-entry__footer {
	margin-top: 28px;
	padding-top: 18px;
	border-top: 1px solid var(--streamgrid-border);
	color: var(--streamgrid-text-soft);
}

.streamgrid-entry__footer a {
	color: var(--streamgrid-primary);
}

.streamgrid-related {
	padding-top: 32px;
}

.streamgrid-related__title {
	margin: 0 0 18px;
	font-size: clamp(1.3rem, 1rem + 0.9vw, 2rem);
}

.streamgrid-comments {
	padding-top: 32px;
}

.streamgrid-comments__inner {
	background: var(--streamgrid-surface);
	border: 1px solid var(--streamgrid-border);
	border-radius: calc(var(--streamgrid-card-radius) + 10px);
	box-shadow: var(--streamgrid-shadow-soft);
	padding: clamp(18px, 4vw, 34px);
}

.comment-list,
.comment-list ol {
	list-style: none;
	padding: 0;
	margin: 0;
}

.comment-list li {
	padding: 18px 0;
	border-top: 1px solid var(--streamgrid-border);
}

.comment-list > li:first-child {
	border-top: 0;
	padding-top: 0;
}

.comment-author {
	font-weight: 700;
}

.comment-metadata,
.comment-metadata a {
	color: var(--streamgrid-text-soft);
	font-size: 0.86rem;
}

.comment-content p:last-child {
	margin-bottom: 0;
}

.comment-respond {
	margin-top: 28px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 14px 16px;
	border-radius: 16px;
	border: 1px solid var(--streamgrid-border);
	background: var(--streamgrid-bg-soft);
	color: var(--streamgrid-text);
}

.comment-form .submit,
.wp-block-search__button,
.streamgrid-button,
button,
input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 18px;
	border-radius: 999px;
	border: 1px solid transparent;
	background: linear-gradient(135deg, rgba(var(--streamgrid-primary-rgb), 1), rgba(var(--streamgrid-primary-rgb), 0.82));
	color: #fff;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 16px 28px rgba(var(--streamgrid-primary-rgb), 0.22);
	transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.comment-form .submit:hover,
.wp-block-search__button:hover,
.streamgrid-button:hover,
button:hover,
input[type="submit"]:hover {
	transform: translateY(-1px);
	box-shadow: 0 18px 32px rgba(var(--streamgrid-primary-rgb), 0.28);
}

.post-navigation {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-top: 28px;
}

.post-navigation .nav-previous a,
.post-navigation .nav-next a {
	display: block;
	padding: 18px;
	background: var(--streamgrid-surface);
	border: 1px solid var(--streamgrid-border);
	border-radius: 22px;
	box-shadow: var(--streamgrid-shadow-soft);
}

.streamgrid-site-footer {
	padding: 38px 0 50px;
	background: var(--streamgrid-bg-soft);
	border-top: 1px solid var(--streamgrid-border);
}

.streamgrid-site-footer__widgets {
	margin-bottom: 26px;
}

.streamgrid-site-footer__widgets .widget {
	padding: 22px;
	background: var(--streamgrid-surface);
	border: 1px solid var(--streamgrid-border);
	border-radius: calc(var(--streamgrid-card-radius) + 2px);
	box-shadow: var(--streamgrid-shadow-soft);
}

.streamgrid-site-footer__widgets .widget-title {
	margin: 0 0 14px;
	font-size: 1.1rem;
}

.streamgrid-site-footer__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	color: var(--streamgrid-text-soft);
}

.streamgrid-site-footer__nav ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	padding: 0;
	margin: 0;
}

.streamgrid-site-footer__nav a {
	color: inherit;
}

.streamgrid-not-found .streamgrid-search,
.streamgrid-empty .streamgrid-search {
	width: min(100%, 420px);
	margin: 20px auto 0;
}

.alignwide {
	margin-left: min(calc(var(--streamgrid-shell-padding) * -1), -4vw);
	margin-right: min(calc(var(--streamgrid-shell-padding) * -1), -4vw);
	max-width: none;
}

.alignfull {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	max-width: 100vw;
	width: 100vw;
}

.wp-block-image img,
.wp-block-cover,
.wp-block-gallery {
	border-radius: calc(var(--streamgrid-card-radius) - 2px);
}

.wp-block-button__link {
	border-radius: 999px;
}

.wp-block-search {
	margin-bottom: 1.2em;
}

.streamgrid-not-found {
	padding-top: 34px;
}

.streamgrid-not-found__inner {
	width: min(calc(100% - (var(--streamgrid-shell-padding) * 2)), 860px);
	margin: 0 auto;
	padding: clamp(24px, 4vw, 44px);
	background: var(--streamgrid-surface);
	border: 1px solid var(--streamgrid-border);
	border-radius: calc(var(--streamgrid-card-radius) + 10px);
	box-shadow: var(--streamgrid-shadow-soft);
	text-align: center;
}

.streamgrid-not-found__title {
	margin: 0 0 10px;
	font-size: clamp(2rem, 1.25rem + 2vw, 3.4rem);
}

@media (max-width: 1160px) {
	.streamgrid-site-header__inner {
		grid-template-columns: auto auto;
		grid-template-areas:
			"brand actions"
			"nav nav";
		row-gap: 12px;
		padding: 14px 0;
	}

	.streamgrid-branding {
		grid-area: brand;
	}

	.streamgrid-header-actions {
		grid-area: actions;
	}

	.streamgrid-primary-nav {
		grid-area: nav;
		justify-content: flex-start;
		overflow-x: auto;
		padding-bottom: 6px;
	}

	.streamgrid-header-actions .streamgrid-search {
		width: 260px;
	}
}

@media (max-width: 820px) {
	.streamgrid-site-header__inner {
		grid-template-columns: auto auto;
		grid-template-areas:
			"brand actions"
			"nav nav";
	}

	.menu-toggle {
		display: inline-flex;
	}

	.streamgrid-primary-nav {
		display: none;
		padding-bottom: 0;
	}

	.streamgrid-primary-nav.is-open {
		display: flex;
	}

	.streamgrid-primary-nav ul {
		width: 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
		padding: 14px;
		background: var(--streamgrid-surface);
		border: 1px solid var(--streamgrid-border);
		border-radius: 24px;
		box-shadow: var(--streamgrid-shadow-soft);
	}

	.streamgrid-primary-nav a {
		border-radius: 16px;
	}

	.streamgrid-primary-nav li,
	.streamgrid-primary-nav > ul > li {
		display: block;
	}

	.streamgrid-primary-nav li > a {
		display: flex;
		align-items: center;
		padding-right: 48px;
	}

	.streamgrid-submenu-toggle {
		position: absolute;
		top: 7px;
		right: 6px;
		width: 30px;
		height: 30px;
		background: transparent;
	}

	.streamgrid-primary-nav ul ul,
	.streamgrid-primary-nav ul ul ul {
		position: static;
		display: none;
		min-width: 0;
		margin: 8px 0 0 12px;
		padding: 8px;
		border-radius: 18px;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
		pointer-events: auto;
		background: rgba(var(--streamgrid-primary-rgb), 0.05);
	}

	.streamgrid-primary-nav ul ul::before,
	.streamgrid-primary-nav ul ul ul::before {
		display: none;
	}

	.streamgrid-primary-nav li.is-open > ul {
		display: grid;
	}

	.streamgrid-header-actions .streamgrid-search {
		display: none;
	}

	.post-navigation {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	:root {
		--streamgrid-card-gap: 18px;
	}

	.streamgrid-card__body {
		padding: 16px;
	}

	.streamgrid-entry__title {
		font-size: clamp(1.7rem, 1.2rem + 4vw, 2.5rem);
	}
}
