/**
 * RUBBISH Journal — frontend + plugin shortcode chrome
 */

body {
	font-family: "IBM Plex Sans", "Noto Sans SC", system-ui, sans-serif;
	color: var(--wp--preset--color--foreground);
	background-color: var(--wp--preset--color--background);
}

.rubbish-masthead {
	background: #0d1b2a;
	color: #f7f7f5;
	padding: 0.35rem 0 0;
}

.rubbish-masthead a {
	color: #e8eef5;
	text-decoration: none;
}

.rubbish-masthead a:hover,
.rubbish-masthead a:focus {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.rubbish-masthead__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0.75rem 1.25rem 1rem;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem 1.5rem;
}

.rubbish-masthead__brand {
	font-family: "Source Serif 4", "Noto Serif SC", Georgia, serif;
	font-weight: 700;
	font-size: clamp(1.75rem, 4vw, 2.25rem);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.2;
}

/* Title + 中文 + 英文：收紧块间距，避免“空一行” */
.rubbish-masthead__brandstack {
	gap: 0 !important;
	row-gap: 0 !important;
}

.rubbish-masthead__brandstack .wp-block-site-title,
.rubbish-masthead__brandstack .wp-block-site-title .wp-block-site-title__link {
	margin: 0;
	line-height: 1.2;
}

.rubbish-masthead__brandstack > .wp-block-paragraph {
	margin-top: 0;
	margin-bottom: 0;
}

.rubbish-masthead__tagline-zh {
	display: block;
	font-family: "Noto Serif SC", "Source Serif 4", Georgia, serif;
	font-size: 0.8125rem;
	line-height: 1.35;
	font-weight: 400;
	letter-spacing: 0.04em;
	color: rgba(247, 247, 245, 0.88);
	margin: 0.2rem 0 0;
	padding: 0;
}

.rubbish-masthead__tagline {
	display: block;
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 0.7rem;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	opacity: 0.85;
	line-height: 1.35;
	margin: 0.12rem 0 0;
	padding: 0;
}

.rubbish-masthead__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1.25rem;
	font-size: 0.875rem;
	font-weight: 500;
}

.rubbish-hero {
	background: linear-gradient(180deg, #f0f1ef 0%, #fafaf8 100%);
	border-bottom: 1px solid #d9d9d6;
	padding-top: 2.5rem !important;
	padding-bottom: 2.5rem !important;
}

.rubbish-hero h1 {
	font-family: "Source Serif 4", "Noto Serif SC", Georgia, serif;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.rubbish-article-meta {
	font-size: 0.9375rem;
	line-height: 1.65;
	margin-bottom: 2rem;
}

.rubbish-article-meta__sections {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 600;
	color: #6b2c3a;
	margin: 0 0 0.35rem;
}

.rubbish-article-meta__sections a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid rgba(107, 44, 58, 0.35);
}

.rubbish-article-meta__sections a:hover {
	border-bottom-color: currentColor;
}

.rubbish-article-meta__subtitle {
	font-style: italic;
	color: #444;
	margin: 0.25rem 0 1rem;
}

.rubbish-article-meta__authors {
	font-weight: 600;
	margin: 0 0 0.35rem;
}

.rubbish-article-meta__affiliation {
	color: #555;
	font-size: 0.9rem;
	margin: 0 0 1.25rem;
}

.rubbish-article-meta__timeline {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 0.5rem 1.25rem;
	margin: 0 0 1.25rem;
	padding: 0.75rem 0;
	border-top: 1px solid #d9d9d6;
	border-bottom: 1px solid #d9d9d6;
	font-size: 0.8125rem;
}

.rubbish-article-meta__timeline dt {
	font-weight: 600;
	margin: 0;
	color: #333;
}

.rubbish-article-meta__timeline dd {
	margin: 0.15rem 0 0;
	color: #555;
}

.rubbish-article-meta__doi {
	font-size: 0.875rem;
	margin: 0 0 1.5rem;
}

.rubbish-article-meta__label {
	font-weight: 600;
	margin-right: 0.35rem;
}

.rubbish-article-meta__abstract,
.rubbish-article-meta__keywords,
.rubbish-article-meta__extra {
	margin: 1.5rem 0;
}

.rubbish-article-meta__abstract h2,
.rubbish-article-meta__keywords h2,
.rubbish-article-meta__extra h2 {
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-weight: 700;
	margin: 0 0 0.5rem;
	color: #003366;
}

.rubbish-article-meta__abstract-body {
	background: #f3f4f2;
	border-left: 3px solid #003366;
	padding: 1rem 1.1rem;
	font-size: 0.95rem;
}

.rubbish-article-meta__topics {
	font-size: 0.875rem;
	color: #444;
}

.rubbish-article-sidebar {
	font-size: 0.875rem;
	line-height: 1.55;
	border: 1px solid #d9d9d6;
	background: #fff;
	padding: 1rem 1.1rem;
	position: sticky;
	top: 1rem;
}

.rubbish-article-sidebar h2 {
	font-family: "IBM Plex Sans", "Noto Sans SC", sans-serif;
	font-size: clamp(0.65rem, 1.4vw, 0.72rem);
	line-height: 1.45;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin: 0 0 0.65rem;
	color: #003366;
}

.rubbish-article-sidebar__pdf {
	margin: 0 0 1rem;
}

.rubbish-article-sidebar__textarea {
	width: 100%;
	font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
	font-size: 0.72rem;
	line-height: 1.4;
	padding: 0.5rem;
	border: 1px solid #ccc;
	border-radius: 2px;
	resize: vertical;
	background: #fafafa;
}

.rubbish-btn {
	display: inline-block;
	font-family: "IBM Plex Sans", "Noto Sans SC", sans-serif;
	font-weight: 600;
	font-size: clamp(0.75rem, 1.6vw, 0.8125rem);
	line-height: 1.35;
	padding: 0.5rem 0.75rem;
	border-radius: 2px;
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
	max-width: 100%;
}

.rubbish-btn--primary {
	background: #6b2c3a;
	color: #fff;
	border-color: #5a2430;
}

.rubbish-btn--primary:hover,
.rubbish-btn--primary:focus {
	background: #5a2430;
	color: #fff;
}

.rubbish-btn--ghost {
	background: #fff;
	color: #003366;
	border-color: #b8c5d6;
}

.rubbish-btn--ghost:hover,
.rubbish-btn--ghost:focus {
	background: #f0f4f8;
}

.rubbish-card-list .wp-block-post-title {
	font-family: "Source Serif 4", "Noto Serif SC", Georgia, serif;
	font-size: clamp(1.15rem, 2.5vw, 1.35rem);
	font-weight: 600;
	line-height: 1.3;
	margin-top: 0.25rem;
}

.rubbish-card-list .wp-block-post-title a {
	text-decoration: none;
	color: #0d1b2a;
}

.rubbish-card-list .wp-block-post-title a:hover {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.rubbish-card-list .wp-block-post-excerpt__excerpt {
	color: #444;
	font-size: 0.9rem;
}

.rubbish-card-list .wp-block-post-date {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #666;
}

.rubbish-site-footer {
	background: #0d1b2a;
	color: #c9d4e0;
	font-size: 0.8125rem;
	margin-top: 2rem;
}

.rubbish-site-footer a {
	color: #e8eef5;
}

.entry-content,
.rubbish-article-body {
	font-family: "Source Serif 4", "Noto Serif SC", Georgia, serif;
	font-size: clamp(1rem, 0.35vw + 0.95rem, 1.08rem);
	line-height: 1.75;
}

.entry-content h2,
.entry-content h3,
.rubbish-article-body h2,
.rubbish-article-body h3 {
	font-family: "IBM Plex Sans", "Noto Sans SC", sans-serif;
}

@media (max-width: 781px) {
	.rubbish-article-sidebar {
		position: static;
		margin-top: 1.5rem;
	}

	.rubbish-home-feed .wp-block-post-template.is-layout-grid,
	.rubbish-home-grid .wp-block-post-template.is-layout-grid {
		grid-template-columns: 1fr !important;
	}

	.rubbish-home-lead .wp-block-columns {
		flex-direction: column;
	}

	.rubbish-home-lead .wp-block-column {
		flex-basis: 100% !important;
	}
}

.rubbish-metrics {
	background: #f3f4f2;
	border-top: 1px solid #e2e3e0;
	border-bottom: 1px solid #e2e3e0;
}

.rubbish-front-intro .wp-block-heading {
	color: #0d1b2a;
}

.rubbish-front-intro .entry-content,
.rubbish-front-intro .wp-block-post-content {
	max-width: 52rem;
	margin-left: auto;
	margin-right: auto;
}

.rubbish-home-lead {
	padding-left: 1.25rem;
	padding-right: 1.25rem;
}

.rubbish-home-lead .wp-block-columns {
	margin-bottom: 0;
}

.rubbish-card-tile {
	background: #fff;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.rubbish-card-tile:hover {
	box-shadow: 0 6px 24px rgba(13, 27, 42, 0.08);
	border-color: #c5c9c2 !important;
}

.rubbish-card-tile .wp-block-post-title {
	font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.rubbish-home-feed .wp-block-query-pagination,
.rubbish-home-grid .wp-block-query-pagination {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid #d9d9d6;
}

/* —— Nature-style front page lead —— */

.rubbish-hero--compact {
	padding-top: 1.75rem !important;
	padding-bottom: 1.5rem !important;
}

.rubbish-nature-lead {
	margin: 0;
	padding: 0;
	max-width: none;
}

.rubbish-nature-lead .wp-block-post-template {
	margin: 0;
}

.rubbish-nature-lead__row {
	gap: 0 !important;
}

.rubbish-nature-lead__text {
	background: #141925;
	color: #eef1f6;
	padding: clamp(1.5rem, 3.5vw, 2.75rem);
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: unset;
	box-sizing: border-box;
}

.rubbish-nature-lead__text .wp-block-post-title a {
	color: #fff;
	text-decoration: none;
}

.rubbish-nature-lead__text .wp-block-post-title a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.rubbish-nature-lead__text .wp-block-post-excerpt__excerpt {
	color: rgba(238, 241, 246, 0.9);
}

.rubbish-nature-lead__text .wp-block-post-excerpt__more-link {
	color: #d4c59a;
	font-weight: 600;
}

.rubbish-nature-lead__text .wp-block-post-terms a {
	color: rgba(238, 241, 246, 0.85);
}

.rubbish-nature-lead__text .wp-block-post-date {
	color: rgba(238, 241, 246, 0.55);
}

.rubbish-nature-lead__media {
	padding: 0 !important;
	align-self: stretch;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #0e1520;
}

.rubbish-nature-lead__media .wp-block-post-featured-image {
	margin: 0;
	flex: 0 1 auto;
	display: block;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 16 / 9;
	max-height: min(22rem, 44vw);
	overflow: hidden;
	background: #0e1520;
}

.rubbish-nature-lead__media .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.rubbish-nature-lead__text .wp-block-post-title {
	font-size: clamp(1.35rem, 2.2vw, 1.85rem);
	line-height: 1.2;
}

@media (min-width: 782px) {
	.rubbish-nature-lead__row .wp-block-column.rubbish-nature-lead__text {
		flex-basis: 52% !important;
	}

	.rubbish-nature-lead__row .wp-block-column.rubbish-nature-lead__media {
		flex-basis: 48% !important;
	}
}

@media (max-width: 781px) {
	.rubbish-nature-lead__row {
		flex-direction: column !important;
	}

	.rubbish-nature-lead__media {
		order: -1;
	}

	.rubbish-nature-lead__media .wp-block-post-featured-image {
		aspect-ratio: 16 / 9;
		min-height: unset;
	}

	.rubbish-nature-lead__text {
		min-height: unset;
	}
}

.rubbish-nature-shorts .wp-block-post-template.is-layout-grid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
	.rubbish-nature-shorts .wp-block-post-template.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 600px) {
	.rubbish-nature-shorts .wp-block-post-template.is-layout-grid {
		grid-template-columns: 1fr !important;
	}
}

.rubbish-nature-card .wp-block-post-title a {
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	color: #0d1b2a;
}

/* Featured images: fixed frame + cover (avoid stretched/distorted thumbnails) */

.rubbish-nature-card .wp-block-post-featured-image,
.rubbish-card-tile .wp-block-post-featured-image,
.rubbish-home-feed .wp-block-post-featured-image {
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: #e8e9e7;
}

.rubbish-nature-card .wp-block-post-featured-image img,
.rubbish-card-tile .wp-block-post-featured-image img,
.rubbish-home-feed .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}
