/*
Theme Name: 邻叙 Linxu
Theme URI: https://yanlitch.cn/
Description: 同城休闲与相聚交流的独立经典主题：场景入口＋话题列表双轨导航、编辑精选主辅卡、五栏话题索引、文章目录与示例/清单样式。无父主题、无第三方字体与统计。
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Author: 爱上海同城论坛
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yanlitch-linxu
*/

:root {
	--lx-bg: #f4f2ed;
	--lx-card: #ffffff;
	--lx-ink: #233d3b;
	--lx-main: #356c63;
	--lx-main-dark: #24514a;
	--lx-clay: #a85d42;
	--lx-muted: #4d5f5c;
	--lx-line: #dad6cc;
	--lx-soft: #e9eeea;
	--lx-focus: #a85d42;
	--lx-max: 1160px;
	--lx-r: 10px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--lx-bg); color: var(--lx-ink); font: 16px/1.8 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lx-main); text-underline-offset: 3px; }
a:hover { color: var(--lx-clay); }
:focus-visible { outline: 3px solid var(--lx-focus); outline-offset: 2px; }
.screen-reader-text, .lx-skip:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.lx-skip:focus { position: fixed; top: 8px; left: 8px; z-index: 99; background: #fff; padding: 8px 12px; }
.lx-shell { max-width: var(--lx-max); margin: 0 auto; padding: 0 16px; }
.lx-muted { color: var(--lx-muted); font-size: 14px; margin: 0; }

/* 页头：浅底＋主色顶线 */
.lx-header { background: var(--lx-card); border-top: 4px solid var(--lx-main); border-bottom: 1px solid var(--lx-line); }
.lx-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; }
.lx-brand { color: var(--lx-ink); text-decoration: none; font-weight: 700; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.lx-brand__mark { width: 32px; height: 32px; border-radius: 8px; background: var(--lx-main); color: #fff; display: inline-grid; place-items: center; font-size: 16px; }
.lx-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 6px; }
.lx-nav a { color: var(--lx-ink); text-decoration: none; font-size: 15px; padding: 6px 10px; border-radius: 999px; display: inline-block; }
.lx-nav a:hover, .lx-nav .current-cat > a, .lx-nav .current-menu-item > a { background: var(--lx-soft); color: var(--lx-main-dark); }
.lx-menu-toggle { display: none; }
.lx-search { background: var(--lx-soft); }
.lx-search form { display: flex; gap: 8px; padding: 10px 0; }
.lx-search label { font-size: 14px; color: var(--lx-muted); align-self: center; white-space: nowrap; }
.lx-search input[type="search"] { flex: 1; min-width: 0; border: 1px solid #b9c7c2; border-radius: 999px; padding: 6px 14px; font-size: 15px; background: #fff; color: var(--lx-ink); }
.lx-search button { border: 0; border-radius: 999px; background: var(--lx-main); color: #fff; padding: 6px 18px; font-size: 15px; cursor: pointer; }

/* 首页 */
.lx-hero { padding: 34px 0 18px; }
.lx-hero h1 { margin: 0 0 8px; font-size: 29px; line-height: 1.35; color: var(--lx-main-dark); }
.lx-hero p { margin: 0; max-width: 760px; color: var(--lx-muted); }
.lx-scenes { margin: 6px 0 30px; }
.lx-scenes h2 { font-size: 17px; margin: 0 0 10px; }
.lx-scenes ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.lx-scenes a { display: flex; flex-direction: column; gap: 4px; height: 100%; background: var(--lx-card); border: 1px solid var(--lx-line); border-left: 5px solid var(--lx-clay); border-radius: var(--lx-r); padding: 12px 14px; text-decoration: none; color: var(--lx-ink); }
.lx-scenes a:hover { border-color: var(--lx-main); }
.lx-scenes strong { font-size: 17px; color: var(--lx-main-dark); }
.lx-scenes span { font-size: 14px; color: var(--lx-muted); line-height: 1.6; }
.lx-scenes em { font-style: normal; font-size: 13px; color: var(--lx-clay); margin-top: auto; }

.lx-section { margin: 0 0 32px; }
.lx-section__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.lx-section__head h2 { margin: 0; font-size: 21px; padding-left: 12px; border-left: 4px solid var(--lx-main); line-height: 1.3; }

.lx-feature { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; }
.lx-feature__side { display: grid; gap: 18px; }
.lx-card { background: var(--lx-card); border: 1px solid var(--lx-line); border-radius: var(--lx-r); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.lx-card__thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--lx-soft); }
.lx-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.lx-card--side { flex-direction: row; }
.lx-card--side .lx-card__thumb { flex: 0 0 46%; }
.lx-card__body { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lx-card h3 { margin: 0; font-size: 18px; line-height: 1.5; }
.lx-card--main h3 { font-size: 21px; }
.lx-card h3 a { color: var(--lx-ink); text-decoration: none; }
.lx-card h3 a:hover { color: var(--lx-clay); }
.lx-card p { margin: 0; font-size: 15px; color: var(--lx-muted); }
.lx-card time { font-size: 13px; color: var(--lx-muted); }
.lx-tag { align-self: flex-start; font-size: 13px; color: var(--lx-clay); text-decoration: none; border: 1px solid #e3c7bb; border-radius: 999px; padding: 0 10px; }

.lx-index { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.lx-index__col { background: var(--lx-card); border: 1px solid var(--lx-line); border-radius: var(--lx-r); padding: 12px 14px; }
.lx-index__col h3 { margin: 0 0 6px; font-size: 17px; }
.lx-index__col h3 a { text-decoration: none; color: var(--lx-main-dark); }
.lx-index__col small { color: var(--lx-muted); font-weight: 400; font-size: 13px; }
.lx-index__col ul { margin: 0; padding-left: 18px; }
.lx-index__col li { font-size: 15px; padding: 3px 0; line-height: 1.6; }
.lx-index__col li a { color: var(--lx-ink); text-decoration: none; }
.lx-index__col li a:hover { color: var(--lx-clay); }

.lx-principles__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.lx-principles__grid > div { background: var(--lx-card); border: 1px dashed var(--lx-main); border-radius: var(--lx-r); padding: 14px 18px; }
.lx-principles h3 { margin: 0 0 6px; font-size: 17px; color: var(--lx-main-dark); }
.lx-principles ol { margin: 0; padding-left: 22px; }
.lx-principles p { margin: 0 0 8px; color: var(--lx-muted); font-size: 15px; }
.lx-more { font-size: 15px; margin-right: 12px; }

.lx-empty { background: var(--lx-card); border: 1px dashed var(--lx-clay); border-radius: var(--lx-r); padding: 16px; color: var(--lx-muted); }

/* 列表行 */
.lx-rows { display: grid; gap: 16px; }
.lx-row { display: grid; grid-template-columns: 368px minmax(0, 1fr); gap: 20px; background: var(--lx-card); border: 1px solid var(--lx-line); border-radius: var(--lx-r); padding: 14px; }
.lx-row > * { min-width: 0; }
.lx-row__thumb { display: block; width: 368px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: var(--lx-soft); }
.lx-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.lx-row h2, .lx-row h3 { margin: 2px 0 6px; font-size: 19px; line-height: 1.5; }
.lx-row h2 a, .lx-row h3 a { color: var(--lx-ink); text-decoration: none; }
.lx-row h2 a:hover, .lx-row h3 a:hover { color: var(--lx-clay); }
.lx-meta { font-size: 13px; color: var(--lx-muted); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.lx-meta a { color: var(--lx-clay); text-decoration: none; }
.lx-row p { margin: 8px 0 0; font-size: 15px; color: #34494a; }

/* 归档、侧栏 */
.lx-crumbs { font-size: 13px; color: var(--lx-muted); padding-top: 16px; }
.lx-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.lx-crumbs li + li::before { content: "/"; margin-right: 4px; color: #9aa7a4; }
.lx-crumbs a { color: var(--lx-muted); }
.lx-archive-head { padding: 22px 0 12px; }
.lx-archive-head h1 { margin: 0 0 6px; font-size: 26px; color: var(--lx-main-dark); }
.lx-archive-head .lx-desc { margin: 0; max-width: 780px; color: var(--lx-muted); }
.lx-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 26px; padding-bottom: 40px; }
.lx-layout > * { min-width: 0; }
.lx-side .lx-box { background: var(--lx-card); border: 1px solid var(--lx-line); border-radius: var(--lx-r); padding: 14px 16px; margin-bottom: 18px; }
.lx-side h2 { font-size: 16px; margin: 0 0 8px; }
.lx-side ul { list-style: none; margin: 0; padding: 0; }
.lx-side li { padding: 6px 0; border-top: 1px solid var(--lx-soft); font-size: 15px; }
.lx-side li:first-child { border-top: 0; }
.lx-side a { text-decoration: none; }
.lx-pagination { margin: 24px 0; }
.lx-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.lx-pagination .page-numbers { display: inline-block; min-width: 38px; text-align: center; padding: 4px 12px; border: 1px solid var(--lx-line); border-radius: 999px; background: var(--lx-card); text-decoration: none; }
.lx-pagination .current { background: var(--lx-main); border-color: var(--lx-main); color: #fff; }

/* 文章 */
.lx-article { background: var(--lx-card); border: 1px solid var(--lx-line); border-radius: var(--lx-r); padding: 24px 28px; }
.lx-article h1 { margin: 0 0 8px; font-size: 27px; line-height: 1.45; color: var(--lx-main-dark); }
.lx-summary { background: var(--lx-soft); border-radius: 8px; padding: 10px 14px; margin: 16px 0; font-size: 15px; }
.lx-toc { border: 1px solid var(--lx-line); border-radius: 8px; padding: 10px 16px; margin: 0 0 18px; font-size: 15px; }
.lx-toc summary { cursor: pointer; font-weight: 700; color: var(--lx-main-dark); }
.lx-toc ol { margin: 8px 0 0; padding-left: 22px; }
.lx-content { font-size: 17px; line-height: 1.9; overflow-wrap: anywhere; }
.lx-content h2 { font-size: 21px; margin: 30px 0 10px; padding-left: 10px; border-left: 4px solid var(--lx-clay); line-height: 1.4; scroll-margin-top: 16px; }
.lx-content h3 { font-size: 18px; margin: 22px 0 8px; }
.lx-content p { margin: 0 0 14px; }
.lx-content ul, .lx-content ol { padding-left: 24px; margin: 0 0 14px; }
.lx-content blockquote { margin: 0 0 16px; padding: 10px 16px; background: #faf5f1; border-left: 4px solid var(--lx-clay); border-radius: 0 8px 8px 0; font-size: 16px; }
.lx-content blockquote p:last-child { margin: 0; }
.lx-content figure { margin: 18px 0; }
.lx-content figure img { margin: 0 auto; max-height: 720px; width: auto; border-radius: 8px; }
.lx-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 16px; border: 1px solid var(--lx-line); border-radius: 8px; }
.lx-content table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; background: #fff; }
.lx-content th, .lx-content td { border: 1px solid var(--lx-line); padding: 8px 10px; text-align: left; vertical-align: top; }
.lx-content th { background: var(--lx-soft); }
.lx-source { margin-top: 24px; font-size: 14px; color: var(--lx-muted); border-top: 1px solid var(--lx-line); padding-top: 12px; }
.lx-related { margin-top: 24px; }
.lx-related h2 { font-size: 19px; margin: 0 0 8px; border: 0; padding: 0; }
.lx-related ul { margin: 0; padding-left: 20px; }
.lx-postnav { display: flex; justify-content: space-between; gap: 16px; margin-top: 20px; font-size: 15px; flex-wrap: wrap; }

/* 页脚 */
.lx-footer { background: var(--lx-main-dark); color: #dfe8e5; padding: 28px 0 22px; font-size: 14px; }
.lx-footer a { color: #fff; }
.lx-footer__cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px; }
.lx-footer h2 { font-size: 15px; color: #fff; margin: 0 0 8px; }
.lx-footer ul { list-style: none; margin: 0; padding: 0; }
.lx-footer li { padding: 3px 0; }
.lx-footer__copy { border-top: 1px solid #3d6d64; margin-top: 18px; padding-top: 12px; }
.lx-404 { padding: 40px 16px; }

@media (max-width: 980px) {
	.lx-layout { grid-template-columns: minmax(0, 1fr); }
	.lx-scenes ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.lx-feature { grid-template-columns: minmax(0, 1fr); }
	.lx-footer__cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
	.lx-header__bar { flex-wrap: wrap; padding: 8px 0; }
	.lx-nav--desktop { display: none; }
	.lx-menu-toggle { display: block; }
	.lx-menu-toggle summary { list-style: none; cursor: pointer; border: 1px solid var(--lx-line); border-radius: 999px; padding: 2px 14px; font-size: 15px; }
	.lx-menu-toggle summary::-webkit-details-marker { display: none; }
	.lx-menu-toggle[open] { flex-basis: 100%; }
	.lx-menu-toggle[open] .lx-nav ul { flex-direction: column; padding: 6px 0; }
	.lx-row { grid-template-columns: minmax(0, 1fr); }
	.lx-row__thumb { width: 100%; }
	.lx-card--side { flex-direction: column; }
	.lx-principles__grid { grid-template-columns: 1fr; }
	.lx-hero h1 { font-size: 24px; }
	.lx-article { padding: 18px 16px; }
	.lx-article h1 { font-size: 23px; }
}
@media (max-width: 480px) {
	.lx-scenes ul { grid-template-columns: minmax(0, 1fr); }
	.lx-footer__cols { grid-template-columns: 1fr; }
	.lx-search label { display: none; }
	.lx-content { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
