/*
Theme Name: WenPai Cravatar
Theme URI: https://feicode.com/WenPai-org/wenpai-cravatar
Author: WenPai-org
Author URI: https://wenpai.org
Description: cravatar.com child of Suede. Thin brand shell cloned from wenpai-admincdn structure; Template: suede. Loads wenpai-theme-kit with appearance/dark gated OFF; brand palette in theme.json (Cravatar blue #1d4fc4 from live generate_settings accent).
Template: suede
Version: 0.1.42
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Update URI: false
Text Domain: wenpai-cravatar
Tags: full-site-editing, blog
*/

@font-face {
	font-family: Dongle;
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/dongle/dongle-latin-400-normal.woff2") format("woff2");
	/* Hangul em-box: Latin cap is 0.395em (6.3px at 16px) vs Outfit 0.694em (11.1px). Scale glyphs only; CJK still 16px. */
	size-adjust: 176%;
	ascent-override: 65%;
	descent-override: 20%;
	line-gap-override: 0%;
}

/* Hero news strip sits on dark cover art — force white over cff inherit !important */
.wp-block-cover:not(.is-light) .cff-news.wpfanyi-news .cff-news__title a,
.wp-block-cover:not(.is-light) .cff-news.wpfanyi-news .cff-news__title a:hover,
.wp-block-cover:not(.is-light) .cff-news.wpfanyi-news .cff-news__title a:focus {
	color: #ffffff !important;
}

/* About hero: native pixel size (no scale). Person is centered in the asset. Overlay stays owner radial. */
.wp-block-cover.about-cover > img.wp-block-cover__image-background {
	object-position: 50% 50%;
	transform: none;
}
.wp-block-cover.about-cover .wp-block-image img {
	object-fit: contain !important;
}

/* Header account cluster: GP 主菜单 logged-in dropdown (头像设置). */
.cravatar-account {
	position: relative;
	font-size: 14px;
	line-height: 1;
}
.cravatar-account__trigger {
	display: flex;
	align-items: center;
	gap: 8px;
	color: inherit !important;
	text-decoration: none !important;
	white-space: nowrap;
}
.cravatar-account__trigger img {
	display: block;
	width: 30px;
	height: 30px;
	border-radius: 50%;
}
.cravatar-account__menu {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: 120;
	margin: 0;
	padding: 8px 0;
	min-width: 10.5rem;
	list-style: none;
	background: #ffffff;
	border: 1px solid #eeeeee;
	box-shadow: 0 8px 24px rgba(15, 15, 15, 0.08);
	opacity: 0;
	visibility: hidden;
}
.cravatar-account__menu::before {
	content: "";
	position: absolute;
	top: -8px;
	left: 0;
	right: 0;
	height: 8px;
}
.cravatar-account:hover .cravatar-account__menu,
.cravatar-account:focus-within .cravatar-account__menu {
	opacity: 1;
	visibility: visible;
}
.cravatar-account__menu a {
	display: block;
	padding: 8px 16px;
	color: #3a3a3a !important;
	text-decoration: none !important;
	white-space: nowrap;
	font-weight: 400;
}
.cravatar-account__menu a:hover,
.cravatar-account__menu a:focus {
	background: #f7f8f9;
}

/* Home hero gradient is the Cover block (153deg). Do not !important-override — editor edits must stick. */

/* Docs landings: text on the RIGHT, photo LEFT. One 30deg 斜边 (motucloud document), not L-stack. */
.wp-block-cover.docs-cover.is-light > .wp-block-cover__background.has-background-gradient {
	background-image: linear-gradient(30deg, rgba(255,255,255,0) 22%, rgb(255,255,255) 37%, rgb(255,255,255) 84%) !important;
}
.wp-block-cover.docs-cover .wp-block-cover__inner-container img.avatar {
	width: 32px !important;
	height: 32px !important;
	max-width: 32px;
	border-radius: 4px;
	vertical-align: middle;
	margin-right: 8px;
}
html body .wp-block-cover.docs-cover.is-light h3.wp-block-heading a {
	color: #1d4fc4 !important;
}
/* listing under docs hero: white cards on #f7f8f9 like admincdn/motucloud */
.wp-block-cover.docs-cover + .wp-block-group.docs-header {
	background: #f7f8f9;
	padding-top: 2.5rem;
	padding-bottom: 2.5rem;
}
.wp-block-cover.docs-cover + .wp-block-group.docs-header .wp-block-column.has-background {
	background-color: #ffffff !important;
	border-radius: 15px;
	box-shadow: 0 12px 28px rgba(15, 15, 15, 0.06);
}

/* English = Dongle globally; CJK falls through to wpfonts / PingFang */
html body,
html body .wp-site-blocks {
	font-family: Dongle, "WF-Syhtsc", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif !important;
}
html body .wp-site-blocks :is(
	p, a, li, button, input, textarea, select, label,
	.wp-element-button, .wp-block-button__link,
	.wp-block-navigation, .wp-block-navigation a, .wp-block-navigation-item__label,
	.wp-block-search__input, .wp-block-search__button
) {
	font-family: Dongle, "WF-Syhtsc", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif !important;
}
html body .wp-site-blocks :is(h1, h2, h3, h4, h5, h6, .wp-block-heading, .wp-block-site-title, .wp-block-post-title),
html body .wp-site-blocks :is(h1, h2, h3, h4, h5, h6, .wp-block-heading, .wp-block-site-title, .wp-block-post-title) a {
	font-family: Dongle, "windfonts-ddjbt", "WF-Syhtsc", "PingFang SC", sans-serif !important;
}
/* header nav: house 400 + ink (font is Dongle, not Helvetica) */
html body .wp-site-blocks .wp-block-template-part .wp-block-navigation,
html body .wp-site-blocks .wp-block-template-part .wp-block-navigation a,
html body .wp-site-blocks .wp-block-template-part .wp-block-navigation .wp-block-navigation-item__label,
html body .wp-site-blocks .wp-block-navigation__container .wp-block-navigation-item__label {
	font-weight: 400 !important; /* house 400 */
	font-style: normal !important;
	color: #3a3a3a !important;
}

/* readability: placeholders + body contrast */
body, .wp-site-blocks { color: #23282d; }
::placeholder, input::placeholder, textarea::placeholder {
	color: #6b7280 !important;
	opacity: 1 !important;
}
.wp-block-navigation a,
.wp-block-navigation .wp-block-navigation-item__label {
	font-weight: 400 !important;
}

/* light hero search: hairline on gray photo + 10px gap (admincdn button-outside) */
.wp-block-cover.is-light .wp-block-search__input,
.wp-block-cover.is-light input[type="search"] {
	color: #0a0a0a !important;
	border: 1px solid rgba(10, 10, 10, 0.22) !important;
	background: transparent !important;
	font-size: 16px !important;
	border-radius: 10px !important;
	padding: 10px 20px !important;
	box-shadow: none !important;
	appearance: none;
	-webkit-appearance: none;
}
.wp-block-cover.is-light .wp-block-search__button,
.wp-block-cover.is-light .wp-block-search__button.has-icon {
	margin-left: 10px !important;
	background: #0a0a0a !important;
	color: #ffffff !important;
	border: 0 !important;
	border-radius: 10px !important;
	padding: 10px 20px !important;
	box-shadow: none !important;
	outline: none !important;
}
/* sidebar search card: kill 2px #f0f0f0 halo on the blue icon button */
.is-style-shadow-light .wp-block-search__input {
	background: #ffffff !important;
	border: 1px solid #e8e8e8 !important;
	border-radius: 10px !important;
	box-shadow: none !important;
}
.is-style-shadow-light .wp-block-search__button,
.is-style-shadow-light .wp-block-search__button.has-icon {
	margin-left: 10px !important;
	background: #1d4fc4 !important;
	color: #ffffff !important;
	border: 0 !important;
	border-radius: 10px !important;
	box-shadow: none !important;
	outline: none !important;
}
/* category widget: match motucloud/mudelms/feimail GS — no UA discs */
.wp-block-categories,
.wp-block-categories-list,
.wp-block-categories li {
	list-style: none;
}
.cff-topic-hero, .cff-topic-hero h1, .cff-topic-hero a {
	color: var(--cff-hero-ink, #23282d) !important;
}

/* forums white hero: news strip must be dark (was white-on-blue) */
.wp-block-cover.is-light .cff-news.wpfanyi-news .cff-news__title a,
.wp-block-cover.is-light .cff-news.wpfanyi-news .cff-news__title a:hover,
.wp-block-cover.is-light .cff-news.wpfanyi-news .cff-news__title a:focus,
.wp-block-cover.is-light .cff-news.wpfanyi-news,
.wp-block-cover.is-light .cff-news.wpfanyi-news li {
	color: #23282d !important;
}
.wp-block-cover.is-light .cff-news.wpfanyi-news .cff-news__title a {
	font-weight: 400 !important;
}
/* date chip: always white on brand blue (beats is-light ink on <time>) */
.wp-block-cover .cff-news.wpfanyi-news time.cff-news__date,
.wp-block-cover .cff-news.wpfanyi-news .cff-news__date,
.wp-block-cover .cff-news time,
.wp-block-cover .cff-news .cff-news__date {
	color: #ffffff !important;
	background-color: #1d4fc4 !important;
}
/* wpautop may wrap <time> in <p> → order:0 jumps date to the LEFT; unwrap for flex */
.cff-news.wpfanyi-news .cff-news__item > p {
	display: contents;
}

/* news CTA outline = 1px like admincdn (cff-page.css only lists roadmap/changelog) */
.wp-block-button.is-style-outline > a.wp-block-button__link[href*="/news/category/"] {
	border-width: 1px !important;
	border-style: solid !important;
	border-color: currentColor !important;
	background: transparent !important;
}
.wp-block-group.is-nowrap:has(> .wp-block-icon),
.wp-block-group.is-nowrap:has(> .icon-container) {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	gap: 8px !important;
}
.wp-block-group.is-nowrap .wp-block-icon {
	width: fit-content;
	max-width: 100%;
	flex: 0 0 auto;
	line-height: 0;
}
.wp-block-group.is-nowrap .wp-block-icon svg,
.wp-block-group.is-nowrap .icon-container svg {
	display: block;
	width: 20px;
	height: 20px;
}
.wp-block-cover.is-light h1,
.wp-block-cover.is-light .wp-block-heading {
	color: #1d4fc4 !important;
}

/* topic hero meta on white gradient */
.cff-topic-hero__meta,
.cff-topic-hero__meta a,
.cff-topic-hero time,
.cff-topic-hero .cff-topic-hero__views {
	color: #575760 !important;
	font-weight: 400 !important;
}
.cff-topic-hero h1,
.cff-topic-hero .cff-topic-hero__title {
	color: #23282d !important;
	font-weight: 400 !important;
}

/* house weight 400 — do NOT !important-force dark ink (kills white-on-blue/dark) */
html body, html body .wp-site-blocks {
	font-weight: 400 !important;
}
html body p, html body li, html body .entry-content,
html body .wp-block-post-content, html body .wp-block-post-excerpt,
html body .wp-block-post-excerpt p,
html body h1, html body h2, html body h3, html body h4,
html body .wp-block-heading, html body .wp-block-post-title,
html body .wp-block-post-title a, html body .wp-block-query-title {
	font-weight: 400 !important;
}
html body .wp-block-cover.is-light h1,
html body .wp-block-cover.is-light .wp-block-heading {
	color: #1d4fc4 !important;
	font-weight: 400 !important;
}

/* Home light hero: ink even if Gutenberg drops is-light (153deg white overlay). */
html body.home .wp-block-cover h1,
html body.home .wp-block-cover .wp-block-heading,
html body.home .wp-block-cover .has-accent-color {
	color: #1d4fc4 !important;
	font-weight: 400 !important;
}
html body.home .wp-block-cover p,
html body.home .wp-block-cover li,
html body.home .wp-block-cover .has-contrast-color {
	color: #23282d !important;
}
html body.home .wp-block-cover .cff-news.wpfanyi-news,
html body.home .wp-block-cover .cff-news.wpfanyi-news .cff-news__title a {
	color: #23282d !important;
}

/* Dongle optical: round Latin reads thin on gray; keep CJK size, only tracking/smoothing. */
html body .wp-site-blocks {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
html body .wp-element-button,
html body .wp-block-button__link {
	letter-spacing: 0.02em;
}

/* brand blue + dark sections: force readable white */
html body [style*="background-color:#1d4fc4"] ,
html body [style*="background-color:#1D4FC4"],
html body .has-primary-background-color,
html body .has-accent-background-color,
html body .has-contrast-background-color,
html body .is-style-section-2 {
	color: #ffffff !important;
}
html body [style*="background-color:#1d4fc4"] :is(h1, h2, h3, h4, h5, h6, p, li, a, span, .wp-block-heading, .wp-block-paragraph),
html body [style*="background-color:#1D4FC4"] :is(h1, h2, h3, h4, h5, h6, p, li, a, span, .wp-block-heading, .wp-block-paragraph),
html body .has-primary-background-color :is(h1, h2, h3, h4, h5, h6, p, li, a, span, .wp-block-heading, .wp-block-paragraph),
html body .has-accent-background-color :is(h1, h2, h3, h4, h5, h6, p, li, a, span, .wp-block-heading, .wp-block-paragraph),
html body .has-contrast-background-color :is(h1, h2, h3, h4, h5, h6, p, li, a, span, .wp-block-heading, .wp-block-paragraph),
html body .is-style-section-2 :is(h1, h2, h3, h4, h5, h6, p, li, a, span, .wp-block-heading, .wp-block-paragraph) {
	color: #ffffff !important;
}

/* news/forums dark brand hero: keep strip readable white */
.wp-block-cover:not(.is-light) .cff-news.wpfanyi-news .cff-news__title a,
.wp-block-cover:not(.is-light) .cff-news.wpfanyi-news .cff-news__title a:hover,
.wp-block-cover:not(.is-light) .cff-news.wpfanyi-news,
.wp-block-cover:not(.is-light) .cff-news.wpfanyi-news li,
.wp-block-cover:not(.is-light) .cff-news.wpfanyi-news time {
	color: #ffffff !important;
}
.wp-block-cover:not(.is-light) h1,
.wp-block-cover:not(.is-light) .wp-block-heading,
.wp-block-cover:not(.is-light) p {
	color: #ffffff !important;
}
.wp-block-cover:not(.is-light) .wp-block-search__input {
	color: #ffffff !important;
	border-color: rgba(255,255,255,0.55) !important;
	background: rgba(0,0,0,0.25) !important;
}
.wp-block-cover:not(.is-light) .wp-block-search__button {
	background: #111111 !important;
	color: #ffffff !important;
}
