/*
Theme Name: 林恩選課室 v2
Theme URI: https://skillgoing.com/
Author: skillgoing.com
Author URI: https://skillgoing.com/
Description: 為上班族線上課程評測與學習投資決策打造的 classic WordPress 主題。
Version: 2.0.5
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: skillgoing-v2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
	--sg-primary: #4b3f9e;
	--sg-primary-dark: #392f7a;
	--sg-cream: #faf7f0;
	--sg-surface: #fffdf9;
	--sg-accent: #e8a33d;
	--sg-text: #26232e;
	--sg-muted: #5f5967;
	--sg-border: #d9d3e7;
	--sg-border-strong: #b9afd1;
	--sg-success: #34715f;
	--sg-error: #a32f29;
	--sg-radius: 12px;
	--sg-shadow: 0 14px 40px rgba( 52, 43, 88, 0.08 );
	--sg-container: 1180px;
	--sg-reading: 720px;
	--sg-header-offset: 132px;
	--sg-serif: "Noto Serif TC", "PingFang TC", "Microsoft JhengHei", serif;
	--sg-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

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

html {
	scroll-behavior: smooth;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--sg-cream);
	color: var(--sg-text);
	font-family: var(--sg-sans);
	font-size: 17px;
	font-weight: 400;
	line-height: 1.8;
	overflow-wrap: anywhere;
}

body.nav-is-open {
	overflow: hidden;
}

img,
svg,
video,
iframe {
	max-width: 100%;
}

img {
	height: auto;
}

figure {
	max-width: 100%;
	margin-inline: 0;
}

a {
	color: var(--sg-primary-dark);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--sg-primary);
}

button,
input,
select,
textarea {
	color: inherit;
	font: inherit;
}

button,
summary,
select {
	cursor: pointer;
}

:focus-visible {
	outline: 3px solid var(--sg-accent);
	outline-offset: 3px;
}

[hidden] {
	display: none !important;
}

[id] {
	scroll-margin-top: var(--sg-header-offset);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin-block: 0 0.65em;
	color: var(--sg-text);
	font-family: var(--sg-serif);
	font-weight: 900;
	line-height: 1.35;
	text-wrap: balance;
}

h1 {
	font-size: clamp( 2rem, 5vw, 3.25rem );
}

h2 {
	font-size: clamp( 1.65rem, 3.2vw, 2.35rem );
}

h3 {
	font-size: clamp( 1.3rem, 2vw, 1.6rem );
}

p,
ul,
ol,
dl {
	margin-block: 0 1.4em;
}

.container {
	width: min( calc( 100% - 40px ), var(--sg-container) );
	margin-inline: auto;
}

.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;
}

.screen-reader-text:focus {
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 12px 16px;
	clip: auto;
	background: var(--sg-surface);
	color: var(--sg-text);
	white-space: normal;
}

.skip-link {
	position: fixed;
	top: 10px;
	left: 10px;
	z-index: 10000;
	padding: 10px 16px;
	transform: translateY( -160% );
	border-radius: 8px;
	background: var(--sg-text);
	color: #fff;
	font-weight: 700;
}

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

.eyebrow {
	margin-bottom: 12px;
	color: var(--sg-primary-dark);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.section {
	padding-block: clamp( 64px, 9vw, 112px );
}

.section-heading {
	margin-bottom: 38px;
}

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

.section-heading--compact {
	margin-bottom: 24px;
}

.section-heading--split {
	display: grid;
	grid-template-columns: minmax( 0, 1.15fr ) minmax( 260px, 0.85fr );
	gap: 40px;
	align-items: end;
}

.section-heading--split > * {
	min-width: 0;
}

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

.button-group {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

.button {
	display: inline-flex;
	min-height: 46px;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 20px;
	border: 1px solid transparent;
	border-radius: 10px;
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
	text-decoration: none;
	transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.button:hover {
	transform: translateY( -2px );
}

.button--large {
	min-height: 50px;
	padding: 13px 24px;
}

.button--primary {
	border-color: var(--sg-primary);
	background: var(--sg-primary);
	color: #fff;
}

.button--primary:hover {
	border-color: var(--sg-primary-dark);
	background: var(--sg-primary-dark);
	color: #fff;
}

.button--secondary {
	border-color: var(--sg-primary);
	background: transparent;
	color: var(--sg-primary-dark);
}

.button--secondary:hover {
	background: rgba( 75, 63, 158, 0.07 );
}

.text-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	text-decoration: none;
}

/* 頁首與導覽 */
.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	border-bottom: 1px solid rgba( 75, 63, 158, 0.15 );
	background: rgba( 250, 247, 240, 0.96 );
	backdrop-filter: blur( 12px );
}

.admin-bar .site-header {
	top: 32px;
}

.site-header__inner {
	display: grid;
	grid-template-columns: minmax( 300px, 1fr ) auto;
	gap: 24px;
	align-items: center;
	min-height: 86px;
}

.site-brand {
	display: flex;
	min-width: 0;
	align-items: center;
	gap: 12px;
}

.site-brand__logo,
.site-brand__logo .custom-logo-link {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
}

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

.site-brand__copy {
	display: flex;
	min-width: 0;
	flex-direction: column;
	color: var(--sg-text);
	line-height: 1.35;
	text-decoration: none;
}

.site-brand__name {
	font-family: var(--sg-serif);
	font-size: 1.22rem;
	font-weight: 900;
}

.site-brand__identity {
	margin-top: 2px;
	color: var(--sg-muted);
	font-size: 0.78rem;
	font-weight: 500;
}

.nav-toggle {
	display: none;
	width: 48px;
	height: 48px;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid var(--sg-border-strong);
	border-radius: 10px;
	background: var(--sg-surface);
}

.nav-toggle__close {
	display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__open {
	display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__close {
	display: block;
}

.primary-navigation {
	min-width: 0;
}

.primary-navigation .menu,
.primary-navigation .sub-menu {
	padding: 0;
	margin: 0;
	list-style: none;
}

.primary-navigation > .menu,
.primary-navigation .menu--fallback {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	align-items: center;
	justify-content: flex-end;
}

.primary-navigation a,
.primary-navigation summary {
	display: flex;
	min-height: 44px;
	align-items: center;
	padding: 8px 10px;
	border-radius: 8px;
	color: var(--sg-text);
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
}

.primary-navigation a:hover,
.primary-navigation summary:hover,
.primary-navigation .current-menu-item > a {
	background: rgba( 75, 63, 158, 0.08 );
	color: var(--sg-primary-dark);
}

.primary-navigation details {
	position: relative;
}

.primary-navigation summary {
	list-style: none;
}

.primary-navigation summary::-webkit-details-marker {
	display: none;
}

.primary-navigation summary::after {
	content: "⌄";
	margin-left: 5px;
}

.primary-navigation .sub-menu {
	position: absolute;
	top: calc( 100% + 6px );
	right: 0;
	z-index: 10;
	width: max-content;
	min-width: 170px;
	max-width: min( 280px, calc( 100vw - 40px ) );
	padding: 8px;
	border: 1px solid var(--sg-border);
	border-radius: var(--sg-radius);
	background: var(--sg-surface);
	box-shadow: var(--sg-shadow);
}

.primary-navigation .menu-item-has-children {
	position: relative;
}

.primary-navigation .menu-item-has-children:not( :hover ):not( :focus-within ) > .sub-menu {
	display: none;
}

/* Hero */
.hero {
	position: relative;
	overflow: hidden;
	padding-block: clamp( 56px, 8vw, 104px );
	background:
		radial-gradient( circle at 86% 20%, rgba( 232, 163, 61, 0.17 ), transparent 24rem ),
		linear-gradient( 180deg, #fffdf9 0%, var(--sg-cream) 100% );
}

.hero::before {
	position: absolute;
	inset: 0;
	background-image: linear-gradient( rgba( 75, 63, 158, 0.035 ) 1px, transparent 1px ), linear-gradient( 90deg, rgba( 75, 63, 158, 0.035 ) 1px, transparent 1px );
	background-size: 32px 32px;
	content: "";
	pointer-events: none;
	mask-image: linear-gradient( to right, transparent, #000 60% );
}

.hero__grid {
	position: relative;
	display: grid;
	grid-template-columns: minmax( 0, 7fr ) minmax( 340px, 5fr );
	gap: clamp( 40px, 7vw, 84px );
	align-items: center;
}

.hero__content,
.hero-checklist {
	min-width: 0;
}

.hero h1 {
	max-width: 780px;
	margin-bottom: 24px;
}

.hero__support {
	max-width: 680px;
	margin-bottom: 28px;
	color: var(--sg-muted);
	font-size: clamp( 1.05rem, 1.6vw, 1.2rem );
}

.hero__actions {
	margin-bottom: 22px;
}

.hero__trust {
	display: flex;
	max-width: 680px;
	align-items: flex-start;
	gap: 8px;
	margin-bottom: 0;
	color: var(--sg-muted);
	font-size: 0.9rem;
}

.hero__trust svg {
	flex: 0 0 auto;
	margin-top: 5px;
	color: var(--sg-success);
}

.hero-checklist {
	position: relative;
	padding: clamp( 24px, 3vw, 36px );
	border: 1px solid var(--sg-border-strong);
	border-radius: var(--sg-radius);
	background: var(--sg-surface);
	box-shadow: var(--sg-shadow);
}

.hero-checklist::before {
	position: absolute;
	top: -8px;
	left: 50%;
	width: 96px;
	height: 18px;
	transform: translateX( -50% );
	border-radius: 4px;
	background: rgba( 232, 163, 61, 0.78 );
	content: "";
}

.hero-checklist__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
	color: var(--sg-muted);
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.05em;
}

.status-chip {
	padding: 3px 9px;
	border-radius: 999px;
	background: rgba( 52, 113, 95, 0.11 );
	color: #285e4e;
	letter-spacing: 0;
}

.hero-checklist h2 {
	font-size: 1.55rem;
}

.hero-checklist ul {
	padding: 0;
	margin: 24px 0;
	list-style: none;
}

.hero-checklist li {
	display: grid;
	grid-template-columns: 30px minmax( 0, 1fr );
	gap: 12px;
	align-items: start;
	padding-block: 14px;
	border-top: 1px solid var(--sg-border);
}

.hero-checklist li:last-child {
	border-bottom: 1px solid var(--sg-border);
}

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

.hero-checklist li small {
	margin-top: 3px;
	color: var(--sg-muted);
	font-size: 0.82rem;
	line-height: 1.65;
}

.checkmark {
	display: inline-grid;
	width: 28px;
	height: 28px;
	place-items: center;
	border: 1px solid rgba( 52, 113, 95, 0.35 );
	border-radius: 50%;
	background: rgba( 52, 113, 95, 0.08 );
	color: var(--sg-success);
	font-weight: 700;
}

/* 本週進度與快速入口 */
.learning-investment {
	padding-block: clamp( 52px, 7vw, 84px );
	background: var(--sg-primary-dark);
	color: #fff;
}

.learning-investment .eyebrow,
.learning-investment h2,
.learning-investment h3 {
	color: #fff;
}

.learning-investment__grid {
	display: grid;
	grid-template-columns: minmax( 0, 1.2fr ) minmax( 320px, 0.8fr );
	gap: 28px;
	align-items: stretch;
}

.investment-card,
.quick-entries {
	min-width: 0;
}

.investment-card {
	padding: clamp( 24px, 4vw, 40px );
	border: 1px solid rgba( 255, 255, 255, 0.22 );
	border-radius: var(--sg-radius);
	background: rgba( 255, 255, 255, 0.08 );
}

.investment-card__course {
	margin-bottom: 20px;
	font-size: 1.05rem;
	font-weight: 700;
}

.week-grid {
	display: grid;
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	gap: 10px;
	margin-bottom: 24px;
}

.week-grid > div {
	min-width: 0;
	padding: 14px;
	border: 1px solid rgba( 255, 255, 255, 0.16 );
	border-radius: 9px;
	background: rgba( 255, 255, 255, 0.07 );
	text-align: center;
}

.week-grid span,
.week-grid strong {
	display: block;
}

.week-grid span {
	margin-bottom: 4px;
	color: #ddd9f2;
	font-size: 0.73rem;
	font-weight: 700;
	letter-spacing: 0.08em;
}

.week-grid strong {
	font-size: 0.96rem;
}

.investment-summary {
	display: grid;
	grid-template-columns: minmax( 130px, 0.45fr ) minmax( 0, 1fr );
	gap: 24px;
	align-items: end;
}

.investment-summary span,
.investment-summary strong {
	display: block;
}

.investment-summary > div > span {
	color: #ddd9f2;
	font-size: 0.82rem;
}

.investment-summary > div > strong {
	margin-top: 4px;
	font-size: 1.18rem;
}

.progress-block__label {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.progress-bar {
	height: 10px;
	margin-top: 10px;
	overflow: hidden;
	border-radius: 999px;
	background: rgba( 255, 255, 255, 0.17 );
}

.progress-bar span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--sg-accent);
}

.investment-empty {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 20px;
	border: 1px dashed rgba( 255, 255, 255, 0.35 );
	border-radius: 10px;
}

.investment-empty__icon {
	display: grid;
	width: 40px;
	height: 40px;
	flex: 0 0 auto;
	place-items: center;
	border-radius: 50%;
	background: var(--sg-accent);
	color: var(--sg-text);
	font-weight: 900;
}

.investment-empty h3,
.investment-empty p {
	margin-bottom: 0;
}

.investment-empty p {
	margin-top: 4px;
	color: #e8e5f3;
	font-size: 0.9rem;
}

.quick-entries {
	display: grid;
	gap: 14px;
}

.quick-entry {
	display: grid;
	grid-template-columns: auto minmax( 0, 1fr ) auto;
	gap: 14px;
	align-items: center;
	padding: 22px;
	border: 1px solid rgba( 255, 255, 255, 0.2 );
	border-radius: var(--sg-radius);
	background: rgba( 255, 255, 255, 0.08 );
	color: #fff;
	text-decoration: none;
	transition: transform 180ms ease, background-color 180ms ease;
}

.quick-entry:hover {
	transform: translateY( -2px );
	background: rgba( 255, 255, 255, 0.13 );
	color: #fff;
}

.quick-entry--accent {
	border-color: rgba( 232, 163, 61, 0.58 );
}

.quick-entry__number {
	color: var(--sg-accent);
	font-family: var(--sg-serif);
	font-size: 1.2rem;
	font-weight: 900;
}

.quick-entry strong,
.quick-entry small {
	display: block;
}

.quick-entry small {
	margin-top: 3px;
	color: #dedaf0;
	font-size: 0.82rem;
	line-height: 1.6;
}

.quick-entry__arrow {
	font-size: 1.35rem;
}

/* 目標卡 */
.goals-section {
	background: var(--sg-surface);
}

.goal-grid {
	display: grid;
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	gap: 16px;
}

.goal-card {
	position: relative;
	display: flex;
	min-width: 0;
	min-height: 190px;
	flex-direction: column;
	padding: 24px;
	border: 1px solid var(--sg-border);
	border-radius: var(--sg-radius);
	background: var(--sg-cream);
	color: var(--sg-text);
	text-decoration: none;
	transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.goal-card:hover {
	transform: translateY( -3px );
	border-color: var(--sg-primary);
	box-shadow: var(--sg-shadow);
	color: var(--sg-text);
}

.goal-card__index {
	margin-bottom: auto;
	color: var(--sg-primary);
	font-family: var(--sg-serif);
	font-size: 0.82rem;
	font-weight: 900;
}

.goal-card strong {
	font-family: var(--sg-serif);
	font-size: 1.26rem;
	font-weight: 900;
}

.goal-card small {
	margin-top: 6px;
	padding-right: 22px;
	color: var(--sg-muted);
	font-size: 0.85rem;
	line-height: 1.65;
}

.goal-card__arrow {
	position: absolute;
	right: 22px;
	bottom: 22px;
	color: var(--sg-primary);
	font-size: 1.2rem;
}

/* 試算器 */
.calculator-section {
	background: linear-gradient( 135deg, rgba( 75, 63, 158, 0.08 ), rgba( 232, 163, 61, 0.11 ) );
}

.calculator-shell {
	display: grid;
	grid-template-columns: minmax( 260px, 0.75fr ) minmax( 0, 1.25fr );
	gap: clamp( 32px, 7vw, 88px );
	align-items: start;
}

.calculator-intro,
.calculator-card {
	min-width: 0;
}

.calculator-intro > p:not( .eyebrow, .formula-note ) {
	color: var(--sg-muted);
}

.formula-note {
	display: flex;
	flex-direction: column;
	padding: 16px 18px;
	border-left: 4px solid var(--sg-accent);
	background: rgba( 255, 253, 249, 0.72 );
}

.formula-note span {
	color: var(--sg-muted);
	font-size: 0.88rem;
}

.calculator-card {
	padding: clamp( 24px, 4vw, 40px );
	border: 1px solid var(--sg-border);
	border-radius: var(--sg-radius);
	background: var(--sg-surface);
	box-shadow: var(--sg-shadow);
}

.calculator-fields {
	display: grid;
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	gap: 14px;
}

.field {
	min-width: 0;
}

.field label,
.search-form__label {
	display: block;
	margin-bottom: 7px;
	font-size: 0.88rem;
	font-weight: 700;
}

.field input,
.field select,
.search-form__input,
.comment-form input:not( [type="submit"] ),
.comment-form textarea {
	width: 100%;
	min-height: 48px;
	padding: 10px 12px;
	border: 1px solid var(--sg-border-strong);
	border-radius: 8px;
	background: #fff;
	color: var(--sg-text);
}

.field input[aria-invalid="true"] {
	border-color: var(--sg-error);
}

.field__with-unit {
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) auto;
	align-items: center;
	border: 1px solid var(--sg-border-strong);
	border-radius: 8px;
	background: #fff;
}

.field__with-unit:focus-within {
	outline: 3px solid var(--sg-accent);
	outline-offset: 2px;
}

.field__with-unit input {
	min-width: 0;
	border: 0;
	outline: 0;
}

.field__with-unit input:focus-visible {
	outline: 0;
}

.field__with-unit span {
	padding-right: 12px;
	color: var(--sg-muted);
	font-size: 0.82rem;
}

.form-error {
	margin: 14px 0 0;
	padding: 10px 12px;
	border-left: 4px solid var(--sg-error);
	background: rgba( 163, 47, 41, 0.08 );
	color: #7f211c;
	font-weight: 700;
}

.calculator-submit {
	width: 100%;
	margin-top: 20px;
}

.calculator-result {
	margin-top: 22px;
	padding: 22px;
	border: 1px solid rgba( 75, 63, 158, 0.28 );
	border-radius: 10px;
	background: rgba( 75, 63, 158, 0.06 );
}

.calculator-result p {
	margin-bottom: 10px;
}

.calculator-result__label {
	color: var(--sg-muted);
	font-size: 0.84rem;
	font-weight: 700;
}

.calculator-result__number {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.calculator-result__number strong {
	color: var(--sg-primary-dark);
	font-family: var(--sg-serif);
	font-size: clamp( 2.4rem, 7vw, 4.2rem );
	font-weight: 900;
	line-height: 1;
}

.calculator-result__note {
	color: var(--sg-muted);
	font-size: 0.84rem;
}

/* 翻譯表 */
.claims-section {
	background: var(--sg-primary-dark);
	color: #fff;
}

.claims-section .eyebrow,
.claims-section h2 {
	color: #fff;
}

.claims-section .section-heading--split > p {
	color: #e2deef;
}

.claims-table-wrap {
	overflow: hidden;
	border: 1px solid rgba( 255, 255, 255, 0.22 );
	border-radius: var(--sg-radius);
}

.claims-table {
	width: 100%;
	border-collapse: collapse;
	background: rgba( 255, 255, 255, 0.04 );
}

.claims-table th,
.claims-table td {
	width: 33.333%;
	padding: 20px;
	border-right: 1px solid rgba( 255, 255, 255, 0.16 );
	border-bottom: 1px solid rgba( 255, 255, 255, 0.16 );
	vertical-align: top;
	text-align: left;
}

.claims-table th:last-child,
.claims-table td:last-child {
	border-right: 0;
}

.claims-table tbody tr:last-child td {
	border-bottom: 0;
}

.claims-table th {
	background: rgba( 255, 255, 255, 0.08 );
	color: var(--sg-accent);
	font-size: 0.86rem;
}

.claims-table td {
	color: #f8f6ff;
}

/* 文章卡與最新文章 */
.latest-section {
	background: var(--sg-surface);
}

.latest-grid {
	display: grid;
	grid-template-columns: minmax( 0, 1.15fr ) minmax( 320px, 0.85fr );
	grid-template-rows: repeat( 3, minmax( 0, auto ) );
	gap: 16px;
}

.post-card {
	display: flex;
	min-width: 0;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--sg-border);
	border-radius: var(--sg-radius);
	background: var(--sg-surface);
	transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.post-card:hover {
	transform: translateY( -3px );
	border-color: var(--sg-border-strong);
	box-shadow: var(--sg-shadow);
}

.post-card__image,
.post-card__placeholder {
	display: block;
	overflow: hidden;
	background: rgba( 75, 63, 158, 0.08 );
	aspect-ratio: 16 / 9;
}

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

.post-card:hover .post-card__image img {
	transform: scale( 1.02 );
}

.post-card__placeholder {
	display: grid;
	place-items: center;
	color: var(--sg-primary);
}

.post-card__body {
	display: flex;
	min-width: 0;
	flex: 1;
	flex-direction: column;
	padding: 22px;
}

.post-card__title {
	margin: 12px 0 8px;
	font-size: 1.3rem;
}

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

.post-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 5px 14px;
	color: var(--sg-muted);
	font-size: 0.78rem;
}

.post-card__excerpt {
	margin: 12px 0 18px;
	color: var(--sg-muted);
	font-size: 0.9rem;
}

.post-card__link {
	margin-top: auto;
	font-weight: 700;
	text-decoration: none;
}

.post-card--featured {
	grid-row: 1 / span 3;
}

.post-card--featured .post-card__image,
.post-card--featured .post-card__placeholder {
	aspect-ratio: 16 / 10;
}

.post-card--featured .post-card__body {
	padding: clamp( 24px, 3vw, 34px );
}

.post-card--featured .post-card__title {
	font-size: clamp( 1.45rem, 2.5vw, 2rem );
}

.post-card--compact {
	display: grid;
	grid-template-columns: minmax( 120px, 0.36fr ) minmax( 0, 0.64fr );
}

.post-card--compact .post-card__image,
.post-card--compact .post-card__placeholder {
	height: 100%;
	aspect-ratio: auto;
}

.post-card--compact .post-card__body {
	padding: 18px;
}

.post-card--compact .post-card__title {
	font-size: 1.05rem;
}

.post-card--compact .post-card__link {
	display: none;
}

.post-card--compact .post-card__excerpt {
	display: -webkit-box;
	margin: 8px 0 10px;
	overflow: hidden;
	font-size: 0.82rem;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.post-card--compact .evidence-badge {
	padding: 3px 8px;
	font-size: 0.7rem;
}

.category-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.category-chip {
	display: inline-flex;
	min-height: 30px;
	align-items: center;
	padding: 3px 10px;
	border: 1px solid var(--sg-border-strong);
	border-radius: 999px;
	background: rgba( 75, 63, 158, 0.05 );
	color: var(--sg-primary-dark);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
}

.category-chip:hover {
	border-color: var(--sg-primary);
	background: rgba( 75, 63, 158, 0.1 );
}

.evidence-badge {
	display: inline-flex;
	width: fit-content;
	max-width: 100%;
	align-items: center;
	padding: 5px 10px;
	border: 1px solid rgba( 52, 113, 95, 0.35 );
	border-radius: 999px;
	background: rgba( 52, 113, 95, 0.08 );
	color: #285e4e;
	font-size: 0.75rem;
	font-weight: 700;
}

/* 信任四卡 */
.trust-section {
	background: var(--sg-cream);
}

.trust-grid {
	display: grid;
	grid-template-columns: repeat( 4, minmax( 0, 1fr ) );
	gap: 14px;
}

.trust-card {
	display: flex;
	min-width: 0;
	min-height: 250px;
	flex-direction: column;
	padding: 24px;
	border: 1px solid var(--sg-border);
	border-radius: var(--sg-radius);
	background: var(--sg-surface);
	color: var(--sg-text);
	text-decoration: none;
	transition: transform 180ms ease, border-color 180ms ease;
}

.trust-card:hover {
	transform: translateY( -3px );
	border-color: var(--sg-primary);
	color: var(--sg-text);
}

.trust-card__number {
	margin-bottom: auto;
	color: var(--sg-accent);
	font-family: var(--sg-serif);
	font-size: 1.25rem;
	font-weight: 900;
}

.trust-card strong {
	font-family: var(--sg-serif);
	font-size: 1.18rem;
	font-weight: 900;
}

.trust-card small {
	margin-top: 8px;
	color: var(--sg-muted);
	font-size: 0.84rem;
	line-height: 1.65;
}

.trust-card__link {
	margin-top: 20px;
	color: var(--sg-primary-dark);
	font-size: 0.82rem;
	font-weight: 700;
}

/* 文章庫 */
.archive-hero {
	padding-block: clamp( 52px, 7vw, 86px );
	border-bottom: 1px solid var(--sg-border);
	background: var(--sg-surface);
}

.archive-hero__inner {
	max-width: 860px;
}

.archive-hero h1 {
	margin-bottom: 16px;
}

.archive-hero__inner > p:not( .eyebrow ) {
	color: var(--sg-muted);
	font-size: 1.05rem;
}

.archive-hero .search-form {
	max-width: 660px;
	margin-top: 28px;
}

.archive-body {
	padding-block: clamp( 50px, 8vw, 96px );
}

.archive-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: center;
	margin-bottom: 34px;
}

.archive-categories__label {
	font-weight: 700;
}

.post-grid {
	display: grid;
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	gap: 20px;
}

.pagination {
	margin-top: 48px;
}

.pagination .page-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	padding: 0;
	margin: 0;
	list-style: none;
}

.pagination a,
.pagination .current,
.page-links a,
.page-links > span {
	display: inline-grid;
	min-width: 44px;
	min-height: 44px;
	place-items: center;
	padding: 6px 11px;
	border: 1px solid var(--sg-border);
	border-radius: 8px;
	background: var(--sg-surface);
	text-decoration: none;
}

.pagination .current {
	border-color: var(--sg-primary);
	background: var(--sg-primary);
	color: #fff;
}

.search-form__row {
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) auto;
	gap: 10px;
}

.search-form__button {
	min-width: 110px;
}

.empty-state {
	max-width: 720px;
	padding: 36px;
	border: 1px dashed var(--sg-border-strong);
	border-radius: var(--sg-radius);
	background: var(--sg-surface);
}

.empty-state .search-form {
	margin-top: 28px;
}

/* 單篇文章與一般頁面 */
.single-main,
.page-main {
	padding-block: clamp( 42px, 6vw, 76px );
}

.article-shell {
	max-width: 1080px;
}

.page-shell {
	max-width: 900px;
}

.breadcrumbs {
	margin-bottom: 26px;
	color: var(--sg-muted);
	font-size: 0.8rem;
}

.breadcrumbs a {
	color: var(--sg-muted);
}

.article-header {
	max-width: 960px;
	margin: 0 auto clamp( 36px, 6vw, 66px );
}

.article-header h1 {
	max-width: 900px;
	margin-block: 16px 20px;
}

.post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 5px 18px;
	color: var(--sg-muted);
	font-size: 0.82rem;
}

.post-meta span {
	position: relative;
}

.post-meta span:not( :last-child )::after {
	position: absolute;
	top: 50%;
	right: -11px;
	width: 3px;
	height: 3px;
	transform: translateY( -50% );
	border-radius: 50%;
	background: var(--sg-border-strong);
	content: "";
}

.evidence-badge--header {
	margin-top: 18px;
}

.review-facts {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 140px, 1fr ) );
	gap: 1px;
	margin-top: 24px;
	overflow: hidden;
	border: 1px solid var(--sg-border);
	border-radius: var(--sg-radius);
	background: var(--sg-border);
}

.review-facts__item {
	min-width: 0;
	padding: 15px;
	background: var(--sg-surface);
}

.review-facts dt {
	color: var(--sg-muted);
	font-size: 0.75rem;
	font-weight: 700;
}

.review-facts dd {
	margin: 3px 0 0;
	font-weight: 700;
}

.article-header__image {
	margin-top: 30px;
	overflow: hidden;
	border-radius: var(--sg-radius);
	background: rgba( 75, 63, 158, 0.07 );
}

.article-header__image img {
	display: block;
	width: 100%;
}

.single-layout {
	display: grid;
	gap: 48px;
	align-items: start;
	justify-content: center;
}

.single-layout--has-toc {
	grid-template-columns: minmax( 200px, 240px ) minmax( 0, var(--sg-reading) );
}

.single-layout--no-toc {
	grid-template-columns: minmax( 0, var(--sg-reading) );
}

.article-content,
.page-article,
.entry-content {
	min-width: 0;
}

.article-toc__sticky {
	position: sticky;
	top: calc( var(--sg-header-offset) + 16px );
	max-height: calc( 100vh - var(--sg-header-offset) - 32px );
	overflow: auto;
}

.toc-widget,
#ez-toc-container,
.ez-toc-container {
	width: 100% !important;
	padding: 18px !important;
	border: 1px solid var(--sg-border) !important;
	border-radius: var(--sg-radius) !important;
	background: var(--sg-surface) !important;
	box-shadow: none !important;
}

.toc-widget__title,
.toc-widget .widget-title {
	font-family: var(--sg-sans);
	font-size: 0.95rem;
}

.article-toc ul,
#ez-toc-container ul {
	padding-left: 18px;
	margin-bottom: 0;
}

.article-toc a,
#ez-toc-container a {
	color: var(--sg-muted);
	font-size: 0.82rem;
	text-decoration: none;
}

.entry-content {
	font-size: 18px;
	line-height: 1.85;
}

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

.entry-content h2 {
	margin-top: 2.2em;
	font-size: clamp( 1.55rem, 3vw, 2rem );
}

.entry-content h3 {
	margin-top: 1.8em;
}

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

.entry-content blockquote {
	padding: 20px 24px;
	margin: 2em 0;
	border-left: 5px solid var(--sg-accent);
	background: rgba( 232, 163, 61, 0.09 );
}

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

.entry-content img {
	max-width: 100%;
	border-radius: 8px;
}

.entry-content pre {
	max-width: 100%;
	padding: 18px;
	overflow-x: auto;
	border-radius: 8px;
	background: var(--sg-text);
	color: #fff;
	font-size: 0.86rem;
}

.entry-content code {
	word-break: break-word;
}

.entry-content .wp-block-table,
.table-scroll {
	max-width: 100%;
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	-webkit-overflow-scrolling: touch;
}

.entry-content table {
	width: 100%;
	min-width: 620px;
	border-collapse: collapse;
	background: var(--sg-surface);
}

.entry-content th,
.entry-content td {
	padding: 12px 14px;
	border: 1px solid var(--sg-border);
	text-align: left;
	vertical-align: top;
}

.entry-content th {
	background: rgba( 75, 63, 158, 0.08 );
}

.entry-content figcaption {
	color: var(--sg-muted);
	font-size: 0.8rem;
	text-align: center;
}

.article-footer {
	margin-top: 56px;
	padding-top: 28px;
	border-top: 1px solid var(--sg-border);
}

.affiliate-note {
	padding: 16px 18px;
	border: 1px solid var(--sg-border);
	border-radius: 8px;
	background: var(--sg-surface);
	color: var(--sg-muted);
	font-size: 0.82rem;
}

.post-navigation .nav-links {
	display: grid;
	grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	gap: 14px;
	margin-top: 26px;
}

.post-navigation a {
	display: flex;
	min-height: 100%;
	flex-direction: column;
	padding: 18px;
	border: 1px solid var(--sg-border);
	border-radius: var(--sg-radius);
	background: var(--sg-surface);
	color: var(--sg-text);
	text-decoration: none;
}

.post-navigation .nav-next {
	text-align: right;
}

.post-navigation__label {
	margin-bottom: 4px;
	color: var(--sg-muted);
	font-size: 0.75rem;
}

.page-header {
	margin-bottom: 34px;
}

.page-header--tools {
	max-width: var(--sg-reading);
}

.page-intro {
	max-width: var(--sg-reading);
	margin-bottom: 26px;
}

.tools-page .calculator-section {
	margin-top: 24px;
}

/* 留言 */
.comments-area {
	margin-top: 58px;
	padding-top: 34px;
	border-top: 1px solid var(--sg-border);
}

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

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

.comment-list .children {
	padding-left: 24px;
	list-style: none;
}

.comment-body {
	padding: 20px;
	margin-bottom: 14px;
	border: 1px solid var(--sg-border);
	border-radius: var(--sg-radius);
	background: var(--sg-surface);
}

.comment-meta {
	font-size: 0.8rem;
}

.comment-form label {
	display: block;
	margin-bottom: 6px;
	font-weight: 700;
}

.comment-form input[type="submit"] {
	min-height: 46px;
	padding: 10px 20px;
	border: 1px solid var(--sg-primary);
	border-radius: 10px;
	background: var(--sg-primary);
	color: #fff;
	font-weight: 700;
}

/* 404 */
.error-main {
	padding-block: clamp( 54px, 10vw, 120px );
}

.error-hero {
	max-width: 850px;
}

.error-card {
	position: relative;
	overflow: hidden;
	padding: clamp( 30px, 7vw, 72px );
	border: 1px solid var(--sg-border);
	border-radius: var(--sg-radius);
	background: var(--sg-surface);
	box-shadow: var(--sg-shadow);
}

.error-code {
	position: absolute;
	top: -36px;
	right: 20px;
	margin: 0;
	color: rgba( 75, 63, 158, 0.07 );
	font-family: var(--sg-serif);
	font-size: clamp( 7rem, 23vw, 13rem );
	font-weight: 900;
	line-height: 1;
}

.error-card > *:not( .error-code ) {
	position: relative;
}

.error-card > p:not( .eyebrow, .error-code ) {
	max-width: 620px;
	color: var(--sg-muted);
}

.error-card .search-form {
	max-width: 620px;
	margin-top: 32px;
}

/* 頁尾 */
.site-footer {
	padding-top: clamp( 54px, 8vw, 86px );
	background: var(--sg-text);
	color: #eeeaf6;
}

.site-footer__grid {
	display: grid;
	grid-template-columns: minmax( 280px, 1.2fr ) repeat( 2, minmax( 180px, 0.8fr ) );
	gap: 48px;
}

.site-footer a {
	color: #fff;
}

.site-footer__name {
	font-family: var(--sg-serif);
	font-size: 1.45rem;
	font-weight: 900;
	text-decoration: none;
}

.site-footer__brand p {
	margin-top: 10px;
	margin-bottom: 0;
}

.site-footer__identity {
	color: #cfc9df;
	font-size: 0.82rem;
}

.site-footer__nav h2 {
	color: #fff;
	font-family: var(--sg-sans);
	font-size: 0.9rem;
	letter-spacing: 0.05em;
}

.site-footer__nav ul {
	padding: 0;
	margin: 0;
	list-style: none;
}

.site-footer__nav a {
	display: inline-flex;
	min-height: 40px;
	align-items: center;
	color: #ddd8eb;
	font-size: 0.88rem;
	text-decoration: none;
}

.site-footer__nav a:hover {
	color: #fff;
	text-decoration: underline;
}

.site-footer__bottom {
	padding-block: 24px;
	margin-top: 46px;
	border-top: 1px solid rgba( 255, 255, 255, 0.14 );
	color: #cfc9df;
	font-size: 0.78rem;
}

.site-footer__bottom p {
	margin: 0;
}

.back-to-top {
	position: fixed;
	right: max( 18px, env( safe-area-inset-right ) );
	bottom: max( 18px, env( safe-area-inset-bottom ) );
	z-index: 900;
	display: grid;
	width: 50px;
	height: 50px;
	place-items: center;
	padding: 0;
	border: 1px solid var(--sg-border-strong);
	border-radius: 50%;
	background: var(--sg-surface);
	color: var(--sg-primary-dark);
	box-shadow: var(--sg-shadow);
}

@media ( min-width: 768px ) and ( max-width: 1120px ) {
	.site-header__inner {
		grid-template-columns: 1fr;
		gap: 0;
		padding-block: 12px;
	}

	.primary-navigation > .menu,
	.primary-navigation .menu--fallback {
		justify-content: flex-start;
	}
}

@media ( max-width: 960px ) {
	.hero__grid,
	.learning-investment__grid,
	.calculator-shell,
	.section-heading--split,
	.site-footer__grid {
		grid-template-columns: 1fr;
	}

	.hero-checklist {
		max-width: 680px;
	}

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

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

	.latest-grid {
		grid-template-columns: 1fr;
		grid-template-rows: auto;
	}

	.post-card--featured {
		grid-row: auto;
	}

	.single-layout--has-toc,
	.single-layout--no-toc {
		grid-template-columns: minmax( 0, var(--sg-reading) );
	}

	.article-toc__sticky {
		position: static;
		max-height: none;
	}
}

@media ( max-width: 767px ) {
	:root {
		--sg-header-offset: 110px;
	}

	body {
		font-size: 17px;
		line-height: 1.8;
	}

	.admin-bar .site-header {
		top: 46px;
	}

	.site-header__inner {
		grid-template-columns: minmax( 0, 1fr ) auto;
		gap: 10px;
		min-height: 82px;
		padding-block: 10px;
	}

	.site-brand__logo img {
		max-width: 32px;
		max-height: 32px;
	}

	.site-brand__name {
		font-size: 1.05rem;
	}

	.site-brand__identity {
		font-size: 0.7rem;
		line-height: 1.45;
	}

	.js .nav-toggle {
		display: inline-flex;
	}

	.primary-navigation {
		grid-column: 1 / -1;
		width: 100%;
	}

	.js .primary-navigation {
		display: none;
	}

	.js .primary-navigation.is-open {
		display: block;
	}

	.primary-navigation > .menu,
	.primary-navigation .menu--fallback {
		display: grid;
		grid-template-columns: 1fr;
		gap: 2px;
		padding: 10px 0 14px;
		border-top: 1px solid var(--sg-border);
	}

	.primary-navigation a,
	.primary-navigation summary {
		min-height: 46px;
		padding-inline: 12px;
	}

	.primary-navigation .sub-menu {
		position: static;
		width: 100%;
		max-width: 100%;
		padding: 4px 0 4px 16px;
		border: 0;
		background: transparent;
		box-shadow: none;
	}

	.primary-navigation .menu-item-has-children:not( :hover ):not( :focus-within ) > .sub-menu {
		display: block;
	}

	.hero {
		padding-block: 46px 58px;
	}

	.hero__grid {
		gap: 36px;
	}

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

	.hero__support {
		font-size: 1rem;
	}

	.hero__actions .button {
		width: 100%;
		min-height: 48px;
	}

	.hero-checklist {
		padding: 24px 20px;
	}

	.section {
		padding-block: 58px;
	}

	.section-heading--split {
		gap: 10px;
	}

	.learning-investment__grid {
		display: flex;
		flex-direction: column;
	}

	.quick-entries {
		order: -1;
	}

	.quick-entry {
		min-height: 88px;
		padding: 17px;
	}

	.investment-summary {
		grid-template-columns: 1fr;
	}

	.goal-grid {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
		gap: 10px;
	}

	.goal-card {
		min-height: 164px;
		padding: 17px;
	}

	.goal-card strong {
		font-size: 1.04rem;
	}

	.goal-card small {
		padding-right: 0;
		font-size: 0.76rem;
	}

	.goal-card__arrow {
		right: 16px;
		bottom: 14px;
	}

	.calculator-fields {
		grid-template-columns: 1fr;
	}

	.claims-table-wrap {
		overflow: visible;
		border: 0;
	}

	.claims-table,
	.claims-table tbody,
	.claims-table tr,
	.claims-table td {
		display: block;
		width: 100%;
	}

	.claims-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect( 0, 0, 0, 0 );
	}

	.claims-table {
		background: transparent;
	}

	.claims-table tr {
		margin-bottom: 12px;
		overflow: hidden;
		border: 1px solid rgba( 255, 255, 255, 0.22 );
		border-radius: var(--sg-radius);
		background: rgba( 255, 255, 255, 0.05 );
	}

	.claims-table td {
		padding: 15px 17px;
		border: 0;
		border-bottom: 1px solid rgba( 255, 255, 255, 0.14 );
	}

	.claims-table td:last-child {
		border-bottom: 0;
	}

	.claims-table td::before {
		display: block;
		margin-bottom: 3px;
		color: var(--sg-accent);
		content: attr( data-label );
		font-size: 0.73rem;
		font-weight: 700;
	}

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

	.post-card--compact {
		grid-template-columns: minmax( 100px, 0.35fr ) minmax( 0, 0.65fr );
	}

	.post-card--compact .post-card__body {
		padding: 14px;
	}

	.trust-card {
		min-height: 210px;
	}

	.search-form__row {
		grid-template-columns: 1fr;
	}

	.search-form__button {
		width: 100%;
	}

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

	.entry-content {
		font-size: 17px;
		line-height: 1.82;
	}

	.post-navigation .nav-links {
		grid-template-columns: 1fr;
	}

	.post-navigation .nav-next {
		text-align: left;
	}

	.site-footer__grid {
		gap: 34px;
	}

	.site-footer__nav a {
		min-height: 44px;
	}
}

@media ( max-width: 420px ) {
	.container {
		width: calc( 100% - 32px );
	}

	.site-brand {
		gap: 8px;
	}

	.site-brand__identity {
		font-size: 0.67rem;
	}

	.week-grid {
		gap: 6px;
	}

	.week-grid > div {
		padding: 10px 6px;
	}

	.quick-entry {
		grid-template-columns: auto minmax( 0, 1fr );
	}

	.quick-entry__arrow {
		display: none;
	}

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

	.post-card--compact .post-card__image,
	.post-card--compact .post-card__placeholder {
		aspect-ratio: 16 / 8;
	}
}

@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-toc,
	.back-to-top,
	.comments-area,
	.post-navigation,
	.affiliate-note {
		display: none !important;
	}

	body {
		background: #fff;
		color: #000;
		font-size: 12pt;
	}

	.article-shell,
	.single-layout {
		display: block;
		width: 100%;
		max-width: none;
	}

	a {
		color: #000;
	}
}
