/*
Theme Name: 排水网
Theme URI: https://paishui.com/
Author: 排水网
Description: 面向家庭排水决策的轻量、移动优先 WordPress 主题。
Version: 0.3.1
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: paishui
*/

/* refresh-01: system typography, quiet surfaces and compact editorial lists. */
:root {
	--ps-primary: #176b80;
	--ps-primary-dark: #123b50;
	--ps-primary-soft: #eff6f8;
	--ps-text: #20343e;
	--ps-muted: #526570;
	--ps-border: #dce4e8;
	--ps-surface: #f5f8f9;
	--ps-warning: #b7791f;
	--ps-danger: #b23b3b;
	--ps-radius: 6px;
	--ps-content: 1180px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ps-text); background: #fff; font: 16px/1.8 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif; overflow-wrap: anywhere; }
a { color: var(--ps-primary-dark); text-underline-offset: .2em; }
a:hover { color: var(--ps-primary); }
img, svg, video, iframe { max-width: 100%; }
img, svg { height: auto; }
button, input, textarea, select { font: inherit; max-width: 100%; }
:focus-visible { outline: 3px solid var(--ps-primary); outline-offset: 4px; }
.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; }
.screen-reader-text:focus { top: 8px; left: 8px; z-index: 100000; width: auto; height: auto; padding: .75rem 1rem; clip: auto; background: #fff; }
.ps-container { width: min(calc(100% - 3rem), var(--ps-content)); margin-inline: auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--ps-border); }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; min-height: 80px; gap: .5rem 2rem; padding-block: .55rem; }
.site-branding { max-width: 100%; }
.site-branding a { display: inline-flex; align-items: center; gap: .75rem; color: var(--ps-text); font-size: 1.5rem; font-weight: 750; letter-spacing: .05em; text-decoration: none; }
.brand-mark { flex: 0 0 40px; width: 40px; height: 40px; }
.brand-wordmark { display: block; width: 156px; height: 60px; }
.custom-logo { display: block; width: auto; max-width: min(260px, 100%); max-height: 60px; object-fit: contain; }
.site-nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem 1.75rem; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ps-text); font-size: 1rem; text-decoration: none; }
.site-nav .current-menu-item > a { color: var(--ps-primary-dark); text-decoration: underline; }
.site-nav .menu-item-cta a { border: 1px solid var(--ps-border); padding: .25rem .9rem; border-radius: var(--ps-radius); }
.site-main { min-height: 65vh; }
.hero { padding: 2.7rem 0 1.5rem; }
.hero-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 365px); gap: 2rem; align-items: center; }
.hero h1 { margin: 0 0 .7rem; font-size: clamp(1.75rem, 3.2vw, 2.4rem); line-height: 1.4; letter-spacing: -.035em; }
.hero__lead { color: var(--ps-muted); margin: 0; }
.section-eyebrow { font-size: .75rem; color: var(--ps-primary-dark); font-weight: 700; letter-spacing: .08em; margin: 0 0 .4rem; }
.guide-search { width: 100%; max-width: 540px; }
.guide-search label { display: block; color: var(--ps-muted); font-size: .85rem; margin-bottom: .5rem; }
.search-row { display: flex; border: 1px solid #a9bec3; border-radius: var(--ps-radius); background: #fff; }
.search-row input { min-width: 0; width: 100%; border: 0; border-radius: var(--ps-radius); padding: .7rem .9rem; color: var(--ps-text); background: transparent; }
.search-row button { flex: 0 0 auto; min-width: 68px; min-height: 44px; padding: .5rem; border: 0; border-radius: 0 5px 5px 0; background: var(--ps-primary-dark); color: #fff; cursor: pointer; }
.search-row :focus-visible { outline-offset: -3px; outline-color: #20343b; }
.search-row button:focus-visible { outline-color: #fff; }
.home-section { padding-block: 1.6rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.section-heading h2 { margin: 0; font-size: 1.45rem; line-height: 1.5; }
.section-heading p { margin: 0; font-size: .85rem; color: var(--ps-muted); }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; font-weight: 650; }
.problem-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--ps-border); border-radius: 8px; background: var(--ps-border); }
.problem-card { padding: 1.3rem 1.15rem; background: var(--ps-surface); color: var(--ps-text); text-decoration: none; }
.problem-card:first-child { border-radius: 7px 0 0 7px; }
.problem-card:last-child { border-radius: 0 7px 7px 0; }
.problem-card:hover { background: #e8f3f3; color: var(--ps-text); }
.problem-card__number { display: flex; justify-content: space-between; font-size: .75rem; color: var(--ps-primary-dark); font-weight: 650; }
.problem-card h3 { margin: .5rem 0; font-size: 1.05rem; line-height: 1.5; }
.problem-card p { margin: 0; color: var(--ps-muted); font-size: .85rem; }
.home-guides-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; align-items: start; gap: 2.5rem; }
.guide-list { border-top: 2px solid var(--ps-text); }
.guide-card { display: flex; gap: 1.25rem; padding: 1.4rem 0; border-bottom: 1px solid var(--ps-border); }
.guide-card__body { min-width: 0; flex: 1; }
.guide-card h2 { font-size: 1.2rem; line-height: 1.6; margin: 0 0 .45rem; }
.guide-card h2 a { color: var(--ps-text); text-decoration: none; }
.guide-card h2 a:hover { color: var(--ps-primary-dark); text-decoration: underline; }
.guide-card p { color: var(--ps-muted); font-size: 1rem; margin: 0; }
.guide-card .guide-card__meta { font-size: .75rem; margin-top: .6rem; }
.guide-card__image { flex: 0 0 154px; max-width: 30%; }
.guide-card__image img { display: block; width: 100%; height: auto; border-radius: var(--ps-radius); }
.side-panel { margin-top: .25rem; border-top: 3px solid var(--ps-primary); background: var(--ps-surface); padding: 1.3rem; }
.side-panel h2 { font-size: 1.15rem; margin: .25rem 0 1rem; }
.side-panel ol { padding-left: 1.2rem; margin: 0; font-size: .9rem; }
.side-panel li { padding-left: .25rem; }
.side-panel p { color: var(--ps-muted); margin: .25rem 0 1rem; }
.content-wrap { width: min(calc(100% - 3rem), 760px); margin-inline: auto; padding-block: 2.5rem 4rem; }
.archive-wrap { max-width: 900px; }
.entry-header { margin-bottom: 2rem; }
.entry-header h1 { font-size: clamp(1.7rem, 4vw, 2.15rem); line-height: 1.5; margin: 0 0 1rem; letter-spacing: -.02em; }
.entry-meta { font-size: .8rem; color: var(--ps-muted); }
.entry-content { font-size: 18px; line-height: 1.85; }
.entry-content > * { max-width: 100%; }
.entry-content p { margin: 0 0 1.3rem; }
.entry-content h2 { font-size: 1.5rem; line-height: 1.5; border-top: 1px solid var(--ps-border); margin: 2.5rem 0 1.1rem; padding-top: 1.1rem; }
.entry-content h3 { font-size: 1.15rem; line-height: 1.5; margin: 1.7rem 0 .7rem; }
.entry-content li { margin-bottom: .5rem; }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; }
.entry-content figure { margin: 1.7rem 0; }
.entry-content figure img { display: block; margin-inline: auto; }
.entry-content figcaption, .wp-caption-text { color: var(--ps-muted); font-size: .8rem; }
.entry-content .guide-diagram { border: 1px solid var(--ps-border); padding: 1rem; background: var(--ps-surface); }
.guide-diagram figcaption { margin-top: .75rem; font-size: .9rem; line-height: 1.7; }
.article-toc { border-block: 1px solid var(--ps-border); margin: 1.8rem 0; padding: .5rem 0; font-size: 1rem; }
.article-toc summary { cursor: pointer; min-height: 44px; padding-block: .45rem; font-weight: 650; }
.article-toc ol { margin-block: .5rem 1rem; }
.article-toc a { display: inline-block; padding-block: .3rem; }
.entry-content [id] { scroll-margin-top: 1.5rem; }
.entry-content .table-scroll { max-width: 100%; overflow-x: auto; margin-block: 1.5rem; }
.entry-content .table-scroll table { display: table; min-width: 520px; margin: 0; }
.table-hint { color: var(--ps-muted); font-size: .9rem; }
.entry-content .guide-sources { font-size: 1rem; line-height: 1.85; }
.guide-sources ol { margin-bottom: 0; }
.guide-next { border-left: 3px solid var(--ps-primary); padding-left: 1.1rem; }
.guide-next h2 { border-top: 0; padding-top: 0; }
.entry-content blockquote { margin: 1.5rem 0; padding: 1rem 1.4rem; border-left: 4px solid var(--ps-primary); background: var(--ps-primary-soft); }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; margin-block: 1.5rem; }
.entry-content th, .entry-content td { min-width: 7rem; padding: .7rem 1rem; border: 1px solid var(--ps-border); text-align: left; vertical-align: top; }
.entry-content th { background: var(--ps-surface); }
.entry-content pre { max-width: 100%; overflow-x: auto; }
.alignleft { float: left; margin: .4rem 1.3rem 1rem 0; }
.alignright { float: right; margin: .4rem 0 1rem 1.3rem; }
.aligncenter { display: block; margin-inline: auto; }
.entry-content::after { content: ""; display: block; clear: both; }
.article-section { border-top: 1px solid var(--ps-border); margin-top: 2.5rem; padding-top: 1.3rem; }
.article-section h2 { font-size: 1.4rem; }
.article-section li { margin-bottom: .7rem; }
.empty-state { padding-block: 2rem; }
.empty-state h2 { font-size: 1.3rem; }
.pagination { margin-top: 2rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: .4rem .7rem; border: 1px solid var(--ps-border); border-radius: 4px; }
.page-numbers.current { color: #fff; background: var(--ps-primary-dark); }
.site-footer { padding-block: 2rem; background: var(--ps-surface); border-top: 1px solid var(--ps-border); }
.site-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.site-footer p { margin: 0; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: .2rem 1.4rem; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; font-size: .8rem; }
/* Diagnosis markup, form controls and risk classes remain owned by paishui-core. */
@media (max-width: 900px) {
	.hero-top { grid-template-columns: 1fr; gap: 1.5rem; }
	.home-guides-layout { grid-template-columns: minmax(0, 1fr) 230px; gap: 1.5rem; }
	.problem-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.problem-card:first-child, .problem-card:last-child { border-radius: 0; }
}
@media (max-width: 680px) {
	.ps-container, .content-wrap { width: calc(100% - 2rem); }
	.site-header__inner { gap: .2rem .8rem; padding-top: .7rem; }
	.site-branding a { font-size: 1.3rem; }
	.brand-mark { flex-basis: 32px; width: 32px; height: 32px; }
	.site-nav { width: 100%; border-top: 1px solid var(--ps-border); }
	.site-nav ul { justify-content: space-between; gap: 0 .7rem; }
	.site-nav a { font-size: .95rem; }
	.hero { padding-top: 1.8rem; }
	.hero__lead { font-size: .9rem; }
	.section-heading { flex-wrap: wrap; gap: .2rem; }
	.home-guides-layout { grid-template-columns: 1fr; }
	.problem-card { padding: 1rem .85rem; }
	.problem-card h3 { font-size: 1rem; }
	.guide-card h2 { font-size: 1.1rem; }
	.content-wrap { padding-top: 1.8rem; }
	.entry-content { font-size: 17px; }
	.entry-content h2 { font-size: 1.35rem; }
	.guide-card__image { flex-basis: 90px; }
	.guide-card { gap: .85rem; }
	.entry-content .guide-diagram { padding: .6rem; }
	.alignleft, .alignright { float: none; margin-inline: 0; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print {
	.site-header, .site-footer, .guide-search { display: none; }
	.content-wrap { width: 100%; padding: 0; }
	.entry-content h2, .entry-content h3 { break-after: avoid; }
}
