/*
Theme Name: 小宅艾比 v2
Theme URI: https://3cpick.com/
Author: 小宅艾比
Description: 為小宅家電決策打造的高效能 Classic WordPress 主題，從坪數、動線、噪音與三年持有成本協助讀者選擇。
Version: 2.1.3
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: 3cpick-v2
Tags: blog, news, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
	--color-brand: #e8622c;
	--color-action: #c94d1e;
	--color-action-hover: #a93a13;
	--color-ink: #2b2b2b;
	--color-muted: #5b6b77;
	--color-bg: #f5f2ee;
	--color-surface: #fffdfc;
	--color-border: #d8d0c7;
	--color-rule: rgba(91, 107, 119, 0.18);
	--shadow-card: 0 12px 32px rgba(43, 43, 43, 0.08);
	--shell: 1180px;
	--content: 760px;
	--space-section: clamp(4.5rem, 8vw, 7.5rem);
	--font-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 6rem;
}

body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-ink);
	font-family: var(--font-sans);
	font-size: 18px;
	font-weight: 400;
	line-height: 1.85;
	text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea {
	font-family: var(--font-sans);
}

img,
svg {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

figure {
	margin: 0;
}

a {
	color: var(--color-action-hover);
	text-decoration-thickness: 0.09em;
	text-underline-offset: 0.17em;
}

a:hover {
	color: var(--color-action-hover);
}

button,
input,
select,
textarea {
	font-size: 1rem;
}

button,
input[type="button"],
input[type="submit"] {
	cursor: pointer;
}

:focus-visible {
	outline: 3px solid var(--color-ink);
	outline-offset: 3px;
}

h1,
h2,
h3,
h4 {
	margin: 0 0 0.65em;
	font-weight: 900;
	letter-spacing: -0.035em;
	line-height: 1.22;
}

h1 {
	font-size: clamp(2.5rem, 6vw, 5.4rem);
}

h2 {
	font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
	font-size: clamp(1.25rem, 2.2vw, 1.55rem);
}

p {
	margin: 0 0 1.25em;
}

ul,
ol {
	padding-inline-start: 1.4em;
}

.site-shell {
	width: min(calc(100% - 3rem), var(--shell));
	margin-inline: auto;
}

.narrow-shell,
.article-shell {
	max-width: 980px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: fixed;
	z-index: 9999;
	top: 0.75rem;
	left: 0.75rem;
	padding: 0.7rem 1rem;
	background: var(--color-ink);
	color: #fff;
	font-weight: 700;
	transform: translateY(-180%);
}

.skip-link:focus {
	color: #fff;
	transform: translateY(0);
}

.button,
button.button,
input[type="submit"] {
	display: inline-flex;
	min-height: 48px;
	align-items: center;
	justify-content: center;
	padding: 0.72rem 1.35rem;
	border: 2px solid var(--color-action);
	border-radius: 2px;
	background: var(--color-action);
	color: #fff;
	font-weight: 800;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button:hover,
button.button:hover,
input[type="submit"]:hover {
	border-color: var(--color-action-hover);
	background: var(--color-action-hover);
	color: #fff;
	transform: translateY(-1px);
}

.button--secondary {
	background: transparent;
	color: var(--color-action-hover);
}

.button--secondary:hover {
	color: #fff;
}

.button-row {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
}

.text-link {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	gap: 0.35rem;
	font-weight: 800;
}

.text-button {
	min-height: 44px;
	padding: 0.5rem;
	border: 0;
	background: transparent;
	color: var(--color-action-hover);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 0.17em;
}

.eyebrow {
	margin: 0 0 0.7rem;
	color: var(--color-action-hover);
	font-size: 0.78rem;
	font-weight: 900;
	letter-spacing: 0.13em;
	line-height: 1.4;
	text-transform: uppercase;
}

/* 頁首與導覽 */
.site-header {
	position: relative;
	z-index: 100;
	border-bottom: 1px solid var(--color-border);
	background: rgba(255, 253, 252, 0.97);
}

.site-header__inner {
	display: flex;
	min-height: 86px;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

.site-branding {
	display: flex;
	min-width: 0;
	align-items: center;
	gap: 0.8rem;
}

.site-logo img,
.custom-logo {
	display: block;
	width: auto;
	height: auto;
	max-width: 40px;
	max-height: 40px;
	object-fit: contain;
	object-position: left center;
}

.site-branding__text {
	display: flex;
	min-width: 0;
	min-height: 48px;
	flex-direction: column;
	justify-content: center;
	color: var(--color-ink);
	line-height: 1.2;
	text-decoration: none;
}

.site-branding__text:hover {
	color: var(--color-ink);
}

.site-title {
	font-size: 1.32rem;
	font-weight: 900;
	letter-spacing: -0.04em;
}

.site-identity {
	margin-top: 0.25rem;
	color: var(--color-muted);
	font-size: 0.74rem;
	font-weight: 600;
}

.site-nav,
.site-nav .menu {
	display: flex;
	align-items: center;
}

.site-nav {
	min-width: 0;
	gap: 0.3rem;
}

.site-nav .menu {
	margin: 0;
	padding: 0;
	gap: 0.1rem;
	list-style: none;
}

.site-nav .menu-item {
	position: relative;
}

.site-nav .menu a,
.site-nav__search {
	display: flex;
	min-height: 46px;
	align-items: center;
	padding: 0.65rem 0.7rem;
	color: var(--color-ink);
	font-size: 0.88rem;
	font-weight: 700;
	text-decoration: none;
}

.site-nav .menu a:hover,
.site-nav .current-menu-item > a,
.site-nav__search:hover {
	color: var(--color-action-hover);
}

.site-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	display: none;
	min-width: 210px;
	margin: 0;
	padding: 0.45rem;
	border: 1px solid var(--color-border);
	background: var(--color-surface);
	box-shadow: var(--shadow-card);
	list-style: none;
}

.site-nav .menu-item:hover > .sub-menu,
.site-nav .menu-item:focus-within > .sub-menu {
	display: block;
}

.site-nav__search {
	gap: 0.35rem;
}

.menu-toggle {
	display: none;
	min-width: 48px;
	min-height: 48px;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.55rem;
	border: 1px solid var(--color-border);
	border-radius: 2px;
	background: transparent;
	color: var(--color-ink);
	font-weight: 800;
}

/* 首屏 */
.hero-section {
	position: relative;
	isolation: isolate;
	padding: clamp(3.5rem, 7vw, 7rem) 0 clamp(4rem, 8vw, 7.5rem);
	background-color: var(--color-surface);
	background-image: linear-gradient(var(--color-rule) 1px, transparent 1px), linear-gradient(90deg, var(--color-rule) 1px, transparent 1px);
	background-size: 32px 32px;
}

.hero-section::before {
	position: absolute;
	z-index: -1;
	inset: 0;
	background: linear-gradient(90deg, rgba(255, 253, 252, 0.96) 0%, rgba(255, 253, 252, 0.82) 58%, rgba(255, 253, 252, 0.55) 100%);
	content: "";
}

.hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr);
	gap: clamp(2.5rem, 7vw, 6rem);
	align-items: center;
}

.hero-copy,
.space-selector {
	min-width: 0;
}

.hero-copy h1 {
	max-width: 8.5em;
}

.hero-lede {
	max-width: 650px;
	margin-bottom: 1.5rem;
	color: var(--color-muted);
	font-size: clamp(1.08rem, 2vw, 1.28rem);
	font-weight: 600;
}

.hero-quick-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem 1.35rem;
}

.hero-quick-links a {
	min-height: 44px;
	font-weight: 800;
}

.hero-trust-line {
	margin: 0.75rem 0 0;
	color: var(--color-muted);
	font-size: 0.78rem;
}

.space-selector {
	padding: clamp(1.4rem, 3vw, 2.25rem);
	border: 2px solid var(--color-ink);
	border-radius: 2px;
	background: var(--color-surface);
	box-shadow: 12px 12px 0 rgba(232, 98, 44, 0.16);
}

.space-selector fieldset {
	margin: 0;
	padding: 0;
	border: 0;
}

.space-selector legend {
	padding: 0;
	font-size: 1.4rem;
	font-weight: 900;
}

.field-hint {
	margin: 0.35rem 0 1rem;
	color: var(--color-muted);
	font-size: 0.88rem;
}

.space-options {
	display: grid;
	gap: 0.65rem;
}

.space-options label {
	position: relative;
	display: block;
	cursor: pointer;
}

.space-options input {
	position: absolute;
	top: 1rem;
	left: 1rem;
	width: 1.15rem;
	height: 1.15rem;
	accent-color: var(--color-action);
}

.space-options label > span {
	display: flex;
	min-height: 62px;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.8rem 0.9rem 0.8rem 3rem;
	border: 1px solid var(--color-border);
	background: #fff;
}

.space-options input:checked + span {
	border: 2px solid var(--color-brand);
	background: rgba(232, 98, 44, 0.07);
}

.space-options input:focus-visible + span {
	outline: 3px solid var(--color-ink);
	outline-offset: 2px;
}

.space-options strong,
.space-options small {
	display: block;
}

.space-options small {
	color: var(--color-muted);
	font-size: 0.78rem;
	text-align: right;
}

.space-selector__cta {
	width: 100%;
	margin-top: 1rem;
}

.space-selector__status {
	margin: 0.75rem 0 0;
	color: var(--color-muted);
	font-size: 0.82rem;
	text-align: center;
}

/* 首頁共用 */
.home-section {
	padding-block: var(--space-section);
}

.section-heading {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
	gap: 2rem;
	align-items: end;
	margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.section-heading h2,
.section-heading p {
	margin-bottom: 0;
}

.section-heading > p {
	color: var(--color-muted);
}

.section-heading--stacked {
	display: block;
	margin: 0;
}

.section-heading--stacked > p:last-child {
	max-width: 450px;
	margin-top: 1rem;
}

.decision-section {
	background: var(--color-bg);
}

.selected-space-line {
	display: inline-block;
	margin: 0 0 1rem;
	padding: 0.45rem 0.75rem;
	border-left: 4px solid var(--color-brand);
	background: var(--color-surface);
	font-weight: 700;
}

.decision-flow {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-bottom: 1.5rem;
	border-top: 2px solid var(--color-ink);
	border-bottom: 1px solid var(--color-border);
}

.decision-flow article {
	position: relative;
	min-width: 0;
	padding: clamp(1.5rem, 3.5vw, 2.6rem);
	border-right: 1px solid var(--color-border);
	background: var(--color-surface);
}

.decision-flow article:last-child {
	border-right: 0;
}

.decision-flow article:not(:last-child)::after {
	position: absolute;
	z-index: 2;
	top: 2.25rem;
	right: -14px;
	display: grid;
	width: 28px;
	height: 28px;
	place-items: center;
	border: 1px solid var(--color-border);
	background: var(--color-surface);
	color: var(--color-action-hover);
	content: "→";
	font-weight: 900;
}

.step-number {
	display: block;
	margin-bottom: 1.4rem;
	color: var(--color-action-hover);
	font-size: 0.85rem;
	font-weight: 900;
	letter-spacing: 0.14em;
}

.decision-flow p,
.decision-flow ul {
	color: var(--color-muted);
}

.decision-flow ul {
	margin-bottom: 0;
	font-size: 0.9rem;
}

.section-link {
	float: right;
}

/* 試算器 */
.calculator-section {
	background: var(--color-ink);
	color: #fff;
}

.calculator-grid {
	display: grid;
	grid-template-columns: minmax(250px, 0.75fr) minmax(0, 1.25fr);
	gap: clamp(2.25rem, 6vw, 6rem);
	align-items: start;
}

.calculator-intro {
	position: sticky;
	top: 2rem;
}

.calculator-intro .eyebrow {
	color: #ff956b;
}

.calculator-intro > p:not(.eyebrow) {
	color: #d7dde1;
}

.formula-note {
	padding-top: 1.1rem;
	border-top: 1px solid #596169;
	font-size: 0.86rem;
}

.calculator-disclaimer {
	padding: 0.85rem 1rem;
	border-left: 3px solid #ff956b;
	background: rgba(255, 255, 255, 0.07);
	font-size: 0.82rem;
}

.cost-calculator {
	min-width: 0;
	padding: clamp(1.25rem, 3vw, 2.25rem);
	border: 1px solid #596169;
	background: #353535;
}

.form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.cost-calculator label {
	display: grid;
	gap: 0.45rem;
	font-size: 0.88rem;
	font-weight: 700;
}

.cost-calculator input,
.search-field,
.comment-form input:not([type="submit"]),
.comment-form textarea {
	width: 100%;
	min-height: 48px;
	padding: 0.7rem 0.8rem;
	border: 1px solid var(--color-border);
	border-radius: 0;
	background: #fff;
	color: var(--color-ink);
}

.cost-calculator input:invalid:not(:placeholder-shown) {
	border-color: #ff956b;
}

.calculator-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	margin-top: 1.25rem;
}

.calculator-actions .text-button {
	color: #fff;
}

.calculator-result {
	min-height: 92px;
	margin-top: 1.5rem;
	padding: 1.2rem;
	border-left: 4px solid var(--color-brand);
	background: #fff;
	color: var(--color-ink);
}

.calculator-result p {
	margin-bottom: 0.4rem;
}

.calculator-result__prompt,
.calculator-error {
	color: var(--color-muted);
}

.calculator-result__total {
	font-size: clamp(1.65rem, 4vw, 2.45rem);
	font-weight: 900;
	line-height: 1.25;
}

.calculator-breakdown {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.7rem;
	margin-top: 1rem;
}

.calculator-breakdown span {
	display: block;
	color: var(--color-muted);
	font-size: 0.75rem;
}

.calculator-breakdown strong {
	display: block;
	font-size: 0.96rem;
}

.calculator-more {
	grid-column: 2;
	justify-self: end;
	color: #fff;
}

.calculator-more:hover {
	color: #ffb293;
}

.size-checker-section {
	background: var(--color-surface);
}

.size-checker-grid {
	display: grid;
	grid-template-columns: minmax(240px, 0.65fr) minmax(0, 1.35fr);
	gap: clamp(2rem, 6vw, 6rem);
	align-items: start;
}

.size-checker {
	min-width: 0;
	padding: clamp(1.25rem, 3vw, 2rem);
	border-top: 2px solid var(--color-ink);
	background: var(--color-bg);
}

.size-checker fieldset {
	margin: 0 0 1.25rem;
	padding: 0;
	border: 0;
}

.size-checker legend {
	margin-bottom: 0.65rem;
	font-weight: 900;
}

.dimension-fields {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
}

.dimension-fields label {
	display: grid;
	gap: 0.35rem;
	font-size: 0.84rem;
	font-weight: 700;
}

.dimension-fields input {
	width: 100%;
	min-height: 48px;
	padding: 0.7rem;
	border: 1px solid var(--color-border);
	background: #fff;
	color: var(--color-ink);
}

.size-result {
	margin-top: 1.25rem;
	padding: 1rem;
	border-left: 4px solid var(--color-brand);
	background: var(--color-surface);
}

.size-result strong,
.size-result span {
	display: block;
}

.size-result span {
	margin-top: 0.25rem;
	color: var(--color-muted);
	font-size: 0.84rem;
}

/* 租屋清單 */
.rental-section {
	background: var(--color-surface);
}

.rental-grid {
	display: grid;
	grid-template-columns: minmax(240px, 0.65fr) minmax(0, 1.35fr);
	gap: clamp(2rem, 6vw, 6rem);
	align-items: start;
}

.rental-checklist {
	margin: 0;
	padding: 0;
	border-top: 2px solid var(--color-ink);
	list-style: none;
}

.rental-checklist li {
	border-bottom: 1px solid var(--color-border);
}

.rental-checklist label {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 1rem;
	align-items: start;
	padding: 1.2rem 0.2rem;
	cursor: pointer;
}

.rental-checklist input {
	position: absolute;
	opacity: 0;
}

.check-box {
	position: relative;
	width: 28px;
	height: 28px;
	margin-top: 0.15rem;
	border: 2px solid var(--color-muted);
	background: #fff;
}

.rental-checklist input:focus-visible + .check-box {
	outline: 3px solid var(--color-ink);
	outline-offset: 3px;
}

.rental-checklist input:checked + .check-box {
	border-color: var(--color-action);
	background: var(--color-action);
}

.rental-checklist input:checked + .check-box::after {
	position: absolute;
	top: 3px;
	left: 8px;
	width: 7px;
	height: 13px;
	border: solid #fff;
	border-width: 0 3px 3px 0;
	content: "";
	transform: rotate(45deg);
}

.rental-checklist strong,
.rental-checklist small {
	display: block;
}

.rental-checklist small {
	margin-top: 0.2rem;
	color: var(--color-muted);
	font-size: 0.86rem;
}

.rental-checklist em {
	display: inline-block;
	margin-top: 0.35rem;
	color: var(--color-action-hover);
	font-size: 0.76rem;
	font-style: normal;
	font-weight: 800;
}

.rental-checklist input:checked ~ span em {
	color: #377344;
	font-size: 0;
}

.rental-checklist input:checked ~ span em::after {
	content: "已確認";
	font-size: 0.76rem;
}

/* 文章卡與信任區 */
.latest-section,
.listing-page,
.search-page {
	background: var(--color-bg);
}

.latest-grid,
.post-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem;
}

.latest-grid .post-card:first-child {
	grid-row: span 3;
}

.post-card {
	display: grid;
	min-width: 0;
	grid-template-columns: minmax(150px, 0.42fr) minmax(0, 0.58fr);
	border-top: 2px solid var(--color-ink);
	background: var(--color-surface);
}

.latest-grid .post-card:first-child {
	grid-template-columns: 1fr;
}

.post-card__media {
	position: relative;
	min-height: 190px;
	overflow: hidden;
	background: #e7e1da;
}

.post-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 250ms ease;
}

.post-card:hover .post-card__media img {
	transform: scale(1.025);
}

.post-card__placeholder {
	display: grid;
	height: 100%;
	min-height: inherit;
	place-items: center;
	background-image: linear-gradient(var(--color-rule) 1px, transparent 1px), linear-gradient(90deg, var(--color-rule) 1px, transparent 1px);
	background-size: 24px 24px;
	color: var(--color-muted);
	font-size: 0.78rem;
	font-weight: 900;
	letter-spacing: 0.12em;
}

.post-card__body {
	min-width: 0;
	padding: 1.3rem;
}

.post-card__title {
	margin: 0.7rem 0;
	font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.post-card__title a {
	color: var(--color-ink);
	text-decoration: none;
}

.post-card__title a:hover {
	color: var(--color-action-hover);
}

.post-card__excerpt {
	color: var(--color-muted);
	font-size: 0.88rem;
}

.post-card__excerpt p {
	margin: 0.75rem 0 0;
}

.category-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.category-chip {
	display: inline-flex;
	min-height: 28px;
	align-items: center;
	padding: 0.18rem 0.55rem;
	border: 1px solid var(--color-border);
	background: var(--color-bg);
	color: var(--color-ink);
	font-size: 0.72rem;
	font-weight: 800;
	line-height: 1.3;
	text-decoration: none;
}

.category-chip:hover {
	border-color: var(--color-action);
	color: var(--color-action-hover);
}

.category-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin: -2rem 0 2rem;
}

.category-filter .category-chip {
	min-height: 40px;
	padding: 0.45rem 0.8rem;
}

.category-filter .category-chip[aria-current="page"] {
	border-color: var(--color-ink);
	background: var(--color-ink);
	color: #fff;
}

.post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.8rem;
	color: var(--color-muted);
	font-size: 0.74rem;
	line-height: 1.55;
}

.post-meta span:not(:last-child)::after {
	margin-left: 0.8rem;
	color: var(--color-border);
	content: "/";
}

.trust-section {
	background: var(--color-surface);
}

.trust-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	border-top: 2px solid var(--color-ink);
	border-bottom: 1px solid var(--color-border);
}

.trust-card {
	position: relative;
	min-width: 0;
	padding: 1.5rem;
	border-right: 1px solid var(--color-border);
	color: var(--color-ink);
	text-decoration: none;
}

.trust-card:last-child {
	border-right: 0;
}

.trust-card:hover {
	background: var(--color-bg);
	color: var(--color-ink);
}

.trust-card h3 {
	font-size: 1.16rem;
}

.trust-card p {
	color: var(--color-muted);
	font-size: 0.86rem;
}

.trust-card > span {
	color: var(--color-action-hover);
	font-weight: 900;
}

.author-card {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 1.5rem;
	align-items: start;
	max-width: 850px;
	margin: 3.5rem auto 0;
	padding: clamp(1.5rem, 4vw, 2.5rem);
	border: 1px solid var(--color-border);
	background: var(--color-bg);
}

.author-card__mark {
	display: grid;
	width: 72px;
	height: 72px;
	place-items: center;
	border: 2px solid var(--color-brand);
	background: var(--color-surface);
	font-size: 2rem;
	font-weight: 900;
}

.author-card h3 {
	margin-bottom: 0.35rem;
}

.author-card p:not(.eyebrow) {
	color: var(--color-muted);
}

/* 內頁與文章 */
.listing-page,
.page-main,
.single-main,
.error-page {
	min-height: 60vh;
	padding-block: clamp(3rem, 7vw, 6.5rem);
}

.page-header {
	max-width: 800px;
	margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.page-header h1 {
	font-size: clamp(2.3rem, 5vw, 4.7rem);
}

.page-header > p,
.page-intro {
	color: var(--color-muted);
	font-size: 1.05rem;
}

.breadcrumbs {
	margin-bottom: 1.5rem;
	color: var(--color-muted);
	font-size: 0.78rem;
}

.breadcrumbs a {
	color: inherit;
}

.navigation.pagination,
.page-numbers {
	margin-top: 3rem;
}

.nav-links,
ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 0;
	list-style: none;
}

.nav-links .page-numbers,
ul.page-numbers a,
ul.page-numbers span {
	display: inline-grid;
	min-width: 44px;
	min-height: 44px;
	place-items: center;
	padding: 0.4rem 0.7rem;
	border: 1px solid var(--color-border);
	background: var(--color-surface);
	color: var(--color-ink);
	text-decoration: none;
}

.nav-links .current,
ul.page-numbers .current {
	border-color: var(--color-action);
	background: var(--color-action);
	color: #fff;
}

.article-header {
	max-width: 860px;
	margin: 0 auto 2rem;
}

.article-title {
	margin: 0.8rem 0 1rem;
	font-size: clamp(2.35rem, 5vw, 4.4rem);
}

.evidence-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-top: 1rem;
	padding: 0.35rem 0.65rem;
	border-left: 3px solid #377344;
	background: #edf5ee;
	color: #295d34;
	font-size: 0.78rem;
	font-weight: 800;
}

.article-hero {
	max-width: 980px;
	margin: 2.5rem auto;
}

.article-hero img {
	width: 100%;
	max-height: 600px;
	object-fit: cover;
}

.quick-conclusion {
	max-width: 760px;
	margin: 2rem auto;
	padding: 1.4rem 1.5rem;
	border-top: 2px solid var(--color-ink);
	border-bottom: 1px solid var(--color-border);
	background: var(--color-surface);
}

.quick-conclusion p:last-child {
	margin-bottom: 0;
}

.quick-conclusion__title {
	margin-bottom: 0.45rem;
	color: var(--color-action-hover);
	font-weight: 900;
}

.article-layout {
	display: grid;
	grid-template-columns: minmax(0, 230px) minmax(0, var(--content));
	gap: clamp(2.5rem, 5vw, 5rem);
	justify-content: center;
	align-items: start;
}

.article-layout > * {
	min-width: 0;
}

.article-layout--no-sidebar {
	grid-template-columns: minmax(0, var(--content));
}

.article-sidebar {
	position: sticky;
	top: 2rem;
}

.toc-widget {
	max-height: calc(100vh - 4rem);
	padding: 1rem;
	overflow-y: auto;
	border-top: 2px solid var(--color-ink);
	background: var(--color-surface);
	font-size: 0.8rem;
}

.toc-widget__title,
.toc-widget .widget-title {
	font-size: 1rem;
}

.toc-widget ul {
	margin: 0;
	padding-left: 1.1rem;
}

.entry-content {
	min-width: 0;
	font-size: 1.05rem;
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content h2 {
	margin-top: 2.2em;
	padding-top: 0.35em;
	border-top: 2px solid var(--color-ink);
	font-size: clamp(1.75rem, 4vw, 2.45rem);
}

.entry-content h3 {
	margin-top: 1.8em;
	font-size: clamp(1.35rem, 3vw, 1.7rem);
}

.entry-content h4 {
	margin-top: 1.5em;
	font-size: 1.17rem;
}

.entry-content p,
.entry-content li {
	margin-bottom: 0.9em;
}

.entry-content blockquote {
	margin: 2rem 0;
	padding: 1.1rem 1.35rem;
	border-left: 4px solid var(--color-brand);
	background: var(--color-surface);
	font-weight: 600;
}

.entry-content blockquote > :last-child {
	margin-bottom: 0;
}

.entry-content a {
	font-weight: 600;
}

.entry-content figcaption {
	margin-top: 0.55rem;
	color: var(--color-muted);
	font-size: 0.78rem;
	text-align: center;
}

.alignwide {
	width: min(980px, calc(100vw - 3rem));
	max-width: none;
	margin-left: 50%;
	transform: translateX(-50%);
}

.alignfull {
	width: 100vw;
	max-width: none;
	margin-left: 50%;
	transform: translateX(-50%);
}

/* 表格：只讓表格容器橫向捲動，不遮蔽 body 溢出 */
.table-scroll,
.wp-block-table {
	position: relative;
	max-width: 100%;
	margin: 2rem 0;
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	-webkit-overflow-scrolling: touch;
}

.table-scroll:focus-visible,
.wp-block-table:focus-visible {
	outline: 3px solid var(--color-ink);
	outline-offset: 3px;
}

.table-scroll-hint {
	margin: 1.5rem 0 -1.5rem;
	color: var(--color-muted);
	font-size: 0.78rem;
	font-weight: 700;
}

.entry-content table,
.comparison-table {
	width: 100%;
	min-width: 680px;
	border-spacing: 0;
	border-collapse: separate;
	font-size: 0.88rem;
}

.entry-content th,
.entry-content td {
	padding: 0.85rem;
	border-right: 1px solid var(--color-border);
	border-bottom: 1px solid var(--color-border);
	background: var(--color-surface);
	text-align: left;
	vertical-align: top;
}

.entry-content thead th {
	position: sticky;
	z-index: 2;
	top: 0;
	border-top: 2px solid var(--color-ink);
	background: #ece7e1;
	font-weight: 900;
}

.entry-content tr > :first-child {
	position: sticky;
	z-index: 1;
	left: 0;
	border-left: 1px solid var(--color-border);
	box-shadow: 5px 0 8px rgba(43, 43, 43, 0.06);
}

.entry-content thead tr > :first-child {
	z-index: 3;
}

.article-footer {
	max-width: 760px;
	margin: clamp(3rem, 7vw, 6rem) auto 0;
	padding-top: 2rem;
	border-top: 2px solid var(--color-ink);
}

.article-verification {
	padding: 1.2rem;
	background: var(--color-surface);
}

.article-verification h2 {
	font-size: 1.25rem;
}

.article-verification p {
	margin-bottom: 0.25rem;
}

.article-disclosure {
	margin: 1.5rem 0;
	color: var(--color-muted);
	font-size: 0.84rem;
}

.related-posts {
	margin: 1.5rem 0;
	padding: 1.1rem 1.2rem;
	border: 1px solid var(--color-border);
	background: var(--color-surface);
}

.related-posts h2 {
	font-size: 1.2rem;
}

.related-posts ul {
	margin-bottom: 0;
}

.post-navigation {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.post-navigation a {
	display: block;
	min-height: 88px;
	padding: 1rem;
	border: 1px solid var(--color-border);
	background: var(--color-surface);
	color: var(--color-ink);
	font-weight: 700;
	text-decoration: none;
}

.post-navigation span {
	display: block;
	margin-bottom: 0.25rem;
	color: var(--color-muted);
	font-size: 0.75rem;
}

/* 搜尋、留言、空狀態 */
.search-form {
	display: flex;
	max-width: 650px;
	gap: 0.6rem;
}

.search-form label {
	flex: 1;
}

.empty-state,
.error-page__inner {
	max-width: 720px;
	padding: clamp(1.5rem, 4vw, 3rem);
	border-top: 2px solid var(--color-ink);
	background: var(--color-surface);
}

.empty-state--compact {
	max-width: none;
}

.error-code {
	margin: 0;
	color: var(--color-action-hover);
	font-size: clamp(4rem, 13vw, 9rem);
	font-weight: 900;
	letter-spacing: -0.08em;
	line-height: 1;
}

.error-page .search-form {
	margin-top: 2rem;
}

.comments-area {
	max-width: 760px;
	margin: 4rem auto 0;
	padding-top: 2rem;
	border-top: 1px solid var(--color-border);
}

.comments-title,
.comment-reply-title {
	font-size: 1.5rem;
}

.comment-list {
	padding: 0;
	list-style: none;
}

.comment-list .children {
	list-style: none;
}

.comment-body {
	margin-bottom: 1rem;
	padding: 1rem;
	border: 1px solid var(--color-border);
	background: var(--color-surface);
}

.comment-form p {
	margin-bottom: 1rem;
}

.comment-form label {
	display: block;
	font-weight: 700;
}

.comment-form textarea {
	min-height: 150px;
	resize: vertical;
}

/* 頁尾與回頂部 */
.site-footer {
	padding: 4rem 0 1.5rem;
	border-top: 2px solid var(--color-ink);
	background: var(--color-ink);
	color: #fff;
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
}

.site-footer__brand {
	margin-bottom: 0.25rem;
	font-size: 1.55rem;
	font-weight: 900;
}

.site-footer__identity,
.site-footer__line {
	color: #cbd1d4;
}

.site-footer__identity {
	margin-bottom: 0.25rem;
	font-size: 0.82rem;
	font-weight: 700;
}

.site-footer__line {
	font-size: 0.88rem;
}

.footer-menu {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.3rem 1.2rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-menu a {
	display: flex;
	min-height: 44px;
	align-items: center;
	color: #fff;
	font-size: 0.86rem;
}

.site-footer__bottom {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid #555;
	color: #abb4b9;
	font-size: 0.78rem;
}

.site-footer__bottom p {
	margin: 0;
}

.back-to-top {
	position: fixed;
	z-index: 90;
	right: 1rem;
	bottom: 1rem;
	display: grid;
	width: 48px;
	height: 48px;
	place-items: center;
	border: 2px solid var(--color-ink);
	border-radius: 0;
	background: var(--color-surface);
	color: var(--color-ink);
	opacity: 0;
	pointer-events: none;
	transform: translateY(12px);
	transition: opacity 160ms ease, transform 160ms ease;
}

.back-to-top.is-visible {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}

@media (max-width: 1080px) {
	.site-nav .menu a,
	.site-nav__search {
		padding-inline: 0.5rem;
		font-size: 0.82rem;
	}

	.latest-grid,
	.post-grid {
		grid-template-columns: 1fr;
	}

	.latest-grid .post-card:first-child {
		grid-row: auto;
		grid-template-columns: minmax(150px, 0.42fr) minmax(0, 0.58fr);
	}

	.trust-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.trust-card:nth-child(2) {
		border-right: 0;
	}

	.trust-card:nth-child(-n + 2) {
		border-bottom: 1px solid var(--color-border);
	}
}

@media (max-width: 820px) {
	.site-shell {
		width: min(calc(100% - 2rem), var(--shell));
	}

	.hero-grid,
	.section-heading,
	.calculator-grid,
	.rental-grid,
	.size-checker-grid {
		grid-template-columns: 1fr;
	}

	.hero-grid {
		gap: 1.5rem;
	}

	.hero-copy h1 {
		font-size: clamp(2rem, 7vw, 2.25rem);
	}

	.section-heading {
		align-items: start;
	}

	.decision-flow {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: minmax(250px, 80vw);
		overflow-x: auto;
		overscroll-behavior-inline: contain;
		scroll-snap-type: inline proximity;
	}

	.decision-flow article {
		border-right: 1px solid var(--color-border);
		border-bottom: 0;
		scroll-snap-align: start;
	}

	.decision-flow article:last-child {
		border-right: 0;
	}

	.decision-flow article:not(:last-child)::after {
		top: 2.25rem;
		right: -14px;
		bottom: auto;
		content: "→";
	}

	.calculator-intro {
		position: static;
	}

	.calculator-more {
		grid-column: auto;
	}

	.article-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.article-sidebar {
		position: static;
		order: 0;
	}

	.toc-widget {
		max-height: none;
	}
}

@media (max-width: 900px) {
	h1 {
		font-size: clamp(2rem, 5vw, 2.25rem);
	}

	.site-header__inner {
		min-height: 72px;
		flex-wrap: wrap;
		gap: 0.5rem;
		padding-block: 0.65rem;
	}

	.site-title {
		font-size: 1.15rem;
	}

	.has-js .menu-toggle {
		display: inline-flex;
	}

	.site-nav {
		width: 100%;
		align-items: stretch;
		padding-top: 0.5rem;
		border-top: 1px solid var(--color-border);
	}

	.has-js .site-nav {
		display: none;
	}

	.has-js .site-nav.nav-open {
		display: block;
	}

	.site-nav,
	.site-nav .menu {
		flex-direction: column;
	}

	.site-nav .menu,
	.site-nav__search {
		width: 100%;
	}

	.site-nav .menu a,
	.site-nav__search {
		min-height: 48px;
		padding: 0.75rem;
	}

	.site-nav .sub-menu {
		position: static;
		display: block;
		padding: 0 0 0 1rem;
		border: 0;
		box-shadow: none;
	}

	.home-section {
		padding-block: clamp(3.8rem, 15vw, 5.5rem);
	}

	.form-grid,
	.calculator-breakdown,
	.dimension-fields,
	.post-navigation {
		grid-template-columns: 1fr;
	}

	.post-card,
	.latest-grid .post-card:first-child {
		grid-template-columns: minmax(120px, 0.38fr) minmax(0, 0.62fr);
	}

	.post-card__media {
		min-height: 170px;
	}

	.post-card__excerpt {
		display: none;
	}

	.site-footer__grid {
		grid-template-columns: 1fr;
	}

	.footer-menu {
		justify-content: flex-start;
	}

	.alignwide {
		width: calc(100vw - 2rem);
	}
}

@media (max-width: 520px) {
	body {
		font-size: 17px;
		line-height: 1.85;
	}

	.site-shell {
		width: min(calc(100% - 1.5rem), var(--shell));
	}

	.site-logo img,
	.custom-logo {
		max-width: 32px;
		max-height: 32px;
	}

	h1 {
		font-size: clamp(2rem, 8vw, 2.25rem);
	}

	.site-identity {
		font-size: 0.66rem;
		line-height: 1.35;
	}

	.space-selector {
		padding: 1rem;
		box-shadow: 7px 7px 0 rgba(232, 98, 44, 0.16);
	}

	.hero-section {
		padding-block: 2rem 2.25rem;
	}

	.hero-grid {
		gap: 1.15rem;
	}

	.hero-lede {
		margin-bottom: 0.8rem;
		font-size: 1rem;
	}

	.hero-trust-line {
		margin-top: 0.3rem;
	}

	.space-selector legend {
		font-size: 1.18rem;
	}

	.space-selector .field-hint {
		margin: 0.2rem 0 0.65rem;
	}

	.space-options {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 0.4rem;
	}

	.space-options input {
		top: 0.75rem;
		left: 0.5rem;
	}

	.space-options label > span {
		align-items: flex-start;
		flex-direction: column;
		justify-content: center;
		min-height: 76px;
		gap: 0;
		padding: 0.55rem 0.35rem 0.55rem 2rem;
		font-size: 0.78rem;
	}

	.space-options small {
		display: none;
	}

	.space-selector__cta {
		margin-top: 0.7rem;
	}

	.space-selector__status {
		margin-top: 0.35rem;
	}

	.decision-section {
		padding-block: 2.8rem;
	}

	.trust-grid {
		grid-template-columns: 1fr;
	}

	.trust-card,
	.trust-card:nth-child(2) {
		border-right: 0;
	}

	.trust-card:nth-child(-n + 3) {
		border-bottom: 1px solid var(--color-border);
	}

	.author-card {
		grid-template-columns: 1fr;
	}

	.author-card__mark {
		width: 58px;
		height: 58px;
	}

	.post-card,
	.latest-grid .post-card:first-child {
		grid-template-columns: 1fr;
	}

	.post-card__media {
		min-height: 210px;
		aspect-ratio: 16 / 10;
	}

	.search-form {
		align-items: stretch;
		flex-direction: column;
	}

	.search-form .button {
		width: 100%;
	}

	.post-meta span:not(:last-child)::after {
		display: none;
	}

	.post-meta {
		gap: 0.2rem 0.65rem;
	}
}

@media (max-width: 390px) {
	.site-shell {
		width: calc(100% - 1.25rem);
	}

	.site-branding {
		max-width: calc(100% - 102px);
	}

	.menu-toggle {
		padding-inline: 0.5rem;
	}

	.hero-section {
		padding-top: 2rem;
	}

	.hero-copy h1 {
		font-size: clamp(2rem, 9vw, 2.25rem);
	}

	.button-row > * {
		width: 100%;
	}

	.cost-calculator,
	.empty-state,
	.error-page__inner {
		padding: 1rem;
	}

	.decision-flow article,
	.trust-card,
	.post-card__body {
		padding: 1.1rem;
	}

	.article-title,
	.page-header h1 {
		font-size: clamp(2rem, 9vw, 2.25rem);
	}
}

.entry-content a,
.page-intro,
.post-card__title,
.site-nav a {
	overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}

@media print {
	.site-header,
	.site-footer,
	.article-sidebar,
	.back-to-top,
	.post-navigation,
	.comments-area {
		display: none !important;
	}

	body,
	.single-main {
		background: #fff;
	}

	.single-main {
		padding: 0;
	}

	.article-layout {
		display: block;
	}

	a {
		color: #000;
	}
}
