/*
Theme Name: yiexian Core Theme
Author: yiexian
Description: A lightweight companion for yiexian Custom Core. Supports the plugin header/footer, floating buttons and editable HTML layouts, with normal WordPress content and standalone fallbacks.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yiexian-core-theme
Tags: custom-logo, custom-menu, featured-images, full-width-template, blog
*/
:root { --yx-accent: #263778; --yx-deep: #111b43; --yx-ink: #18223a; --yx-muted: #626b7c; --yx-line: #dce1ea; --yx-paper: #fff; --yx-warm: #f7f4ed; --yx-container: 1120px; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body { margin: 0; background: var(--yx-paper); color: var(--yx-ink); font: 400 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
img, video { max-width: 100%; height: auto; }
iframe { max-width: 100%; }
a { color: var(--yx-accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea, select { font: inherit; }
button, input[type="submit"] { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #d29b3a; outline-offset: 4px; }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; width: 1px; overflow: hidden; padding: 0; position: absolute !important; white-space: nowrap; }
.screen-reader-text:focus { clip: auto !important; clip-path: none; height: auto; width: auto; top: 12px; left: 12px; padding: 12px 20px; background: #fff; color: #18223a; z-index: 10001; }
.yx-container { width: min(calc(100% - 48px), var(--yx-container)); margin-inline: auto; }
.yx-main { min-height: 55vh; padding-block: clamp(40px, 7vw, 88px); }
.yx-page-header { margin-bottom: 36px; max-width: 850px; }
.yx-eyebrow { margin: 0 0 14px; color: var(--yx-muted); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 650; }
.yx-page-title { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(36px, 6vw, 64px); line-height: 1.12; letter-spacing: -.035em; overflow-wrap: anywhere; }
.yx-description { margin-top: 20px; color: var(--yx-muted); max-width: 680px; }
.yx-entry { max-width: 800px; overflow-wrap: anywhere; }
.yx-entry > :first-child { margin-top: 0; }
.yx-entry h2, .yx-entry h3, .yx-entry h4 { line-height: 1.3; margin-top: 1.7em; }
.yx-entry h2 { font-size: clamp(26px, 3vw, 34px); }
.yx-entry p, .yx-entry ul, .yx-entry ol { margin-bottom: 1.4em; }
.yx-entry blockquote { margin-inline: 0; padding: 12px 24px; border-left: 3px solid var(--yx-accent); background: var(--yx-warm); }
.yx-entry pre { max-width: 100%; overflow: auto; padding: 20px; background: #f2f4f8; font-size: 14px; }
.yx-entry table { width: 100%; border-collapse: collapse; }
.yx-entry th, .yx-entry td { text-align: start; border: 1px solid var(--yx-line); padding: 12px; }
.yx-entry .alignwide { max-width: var(--yx-container); }
.yx-entry .alignfull { max-width: none; }
.yx-full-width { min-height: 55vh; width: 100%; }
.yx-full-width > .yx-full-width-title { width: min(calc(100% - 48px), var(--yx-container)); margin: 48px auto 28px; }
.yx-featured-image { display: block; width: 100%; max-height: 560px; object-fit: cover; margin: 24px 0 36px; border-radius: 4px; }
.yx-post-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
.yx-post-card { min-width: 0; padding-bottom: 28px; border-bottom: 1px solid var(--yx-line); }
.yx-post-card .yx-featured-image { aspect-ratio: 16 / 10; margin: 0 0 20px; max-height: 380px; }
.yx-post-card h2 { margin: 10px 0; font: 400 clamp(24px, 3vw, 34px)/1.25 Georgia, serif; }
.yx-post-card h2 a { color: inherit; text-decoration: none; }
.yx-post-meta { color: var(--yx-muted); font-size: 13px; }
.yx-post-excerpt { color: var(--yx-muted); }
.yx-read-more { font-weight: 650; font-size: 14px; }
.yx-pagination, .navigation.pagination { margin-top: 48px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 12px; }
.page-numbers { padding: 6px 12px; border: 1px solid var(--yx-line); }
.page-numbers.current { background: var(--yx-accent); color: white; }
.yx-button, .yx-search-form .search-submit, .post-password-form input[type="submit"] { display: inline-flex; justify-content: center; align-items: center; gap: 16px; padding: 13px 22px; color: #fff; background: var(--yx-accent); border: 1px solid var(--yx-accent); text-decoration: none; font-size: 14px; font-weight: 650; border-radius: 3px; }
.yx-button:hover { color: white; background: var(--yx-deep); }
.yx-search-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; max-width: 600px; margin-block: 24px; }
.yx-search-form label { flex: 1 1 220px; }
.yx-search-form .search-field, .post-password-form input[type="password"] { width: 100%; padding: 12px 14px; background: white; color: var(--yx-ink); border: 1px solid var(--yx-line); border-radius: 3px; }
.yx-search-form .search-label { display: block; font-size: 13px; margin-bottom: 6px; }
.yx-fallback-header { border-bottom: 1px solid var(--yx-line); background: white; }
.yx-fallback-header .yx-container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-block: 22px; }
.yx-site-identity { display: flex; align-items: center; gap: 14px; }
.yx-site-identity .custom-logo-link { display: inline-flex; }
.yx-site-identity .custom-logo { max-width: 68px; max-height: 68px; object-fit: contain; }
.yx-site-title { color: var(--yx-deep); font: 400 28px/1.2 Georgia, serif; text-decoration: none; }
.yx-fallback-nav ul { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; gap: 12px 24px; }
.yx-fallback-nav ul ul { display: block; padding-left: 16px; }
.yx-fallback-nav a { color: var(--yx-ink); font-size: 14px; }
.yx-fallback-footer { border-top: 1px solid var(--yx-line); background: var(--yx-warm); padding-block: 32px; color: var(--yx-muted); font-size: 14px; }
.yx-fallback-footer p { margin: 0; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { font-size: 13px; color: var(--yx-muted); }
.alignleft { float: left; margin: 8px 24px 16px 0; }
.alignright { float: right; margin: 8px 0 16px 24px; }
.aligncenter { display: block; margin-inline: auto; }
.bypostauthor { font-weight: inherit; }
.sticky .yx-post-card-title::before { content: "★ "; color: var(--yx-accent); }
@media (max-width: 640px) { .yx-container { width: calc(100% - 32px); } .yx-post-list { grid-template-columns: 1fr; gap: 28px; } .yx-fallback-header .yx-container { align-items: flex-start; } .yx-entry .alignleft, .yx-entry .alignright { float: none; margin-inline: 0; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media print { .yiexian-header-wrapper, .yx-fallback-header, .yiexian-floating-actions, .yx-fallback-footer { display: none; } .yx-main { padding: 0; } }
