/* ---- 頁首 -------------------------------------------------------------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 30;
	padding: 12px 0;
	background: rgba(255, 248, 235, .92);
	backdrop-filter: blur(10px);
}

.site-header .shell {
	background: #fff;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	padding: 8px 16px;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.site-logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	text-decoration: none;
	padding: 4px;
}
.site-logo img {
	display: block;
	width: 190px;
	max-width: 52vw;
	height: auto;
}

.menu-btn {
	display: none;           /* 沒有 JS 就永遠不顯示，連結本來就都看得到 */
	margin-left: auto;
	width: 46px; height: 46px;
	border: 0;
	border-radius: 50%;
	background: var(--orange-soft);
	cursor: pointer;
	place-items: center;
}
.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
	display: block;
	width: 20px; height: 2px;
	background: var(--brown);
	border-radius: 2px;
	content: "";
	position: relative;
}
.menu-btn span::before { position: absolute; top: -6px; }
.menu-btn span::after  { position: absolute; top: 6px; }

.site-nav { margin-left: auto; }
.site-nav ul {
	list-style: none;
	display: flex;
	align-items: center;
	gap: clamp(4px, 2vw, 28px);
	margin: 0;
	padding: 0;
}
.site-nav a {
	position: relative;
	display: block;
	padding: 10px 12px;
	color: var(--brown);
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}
.site-nav a::after {
	content: "";
	position: absolute;
	left: 50%; bottom: 4px;
	width: 0; height: 4px;
	background: var(--orange);
	border-radius: var(--radius-pill);
	transform: translateX(-50%);
	transition: width .18s ease;
}
.site-nav a:hover { color: var(--orange-text); }
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { width: 60%; }
/* 目前頁面不只靠底線的顏色表示，也加深字色——避免只用顏色傳達資訊 */
.site-nav a[aria-current="page"] { color: var(--orange-text); }
/* 這是純文字，不是 <a>；公開頁面不輸出入口路徑，並以灰階清楚表達暫不開放。 */
.site-nav__inactive {
	display: block;
	padding: 10px 12px;
	color: #988f86;
	font-weight: 700;
	white-space: nowrap;
	cursor: not-allowed;
	opacity: .58;
	filter: grayscale(1);
}

@media (max-width: 860px) {
	.site-header .shell { padding: 6px 12px; }
	.site-nav { width: 100%; margin-left: 0; }
	.site-nav ul {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
		padding: 4px 0 8px;
	}
	.site-nav a {
		padding: 12px 8px;
		text-align: center;
		background: #fff8ef;
		border-radius: 14px;
	}
	.site-nav a::after { display: none; }
	.site-nav a[aria-current="page"] {
		background: var(--orange-soft);
		box-shadow: inset 0 0 0 2px var(--orange);
	}
	.site-nav__inactive {
		padding: 12px 8px;
		text-align: center;
		background: #fff8ef;
		border-radius: 14px;
	}

	/* 有 JS 才收合；漢堡鈕也只在有 JS 時出現 */
	.js .menu-btn { display: grid; }
	.js .site-nav { display: none; }
	.js .site-nav.is-open { display: block; }
}

/* 首頁與獨立任務辦法頁共用的導覽外觀。 */
.site-header {
 --orange: #ff681b; --orange-text: #c04c08; --orange-soft: #fff3e7;
 --brown: #3b2117; --radius-lg: 26px; --radius-pill: 999px;
 --shadow-sm: 0 4px 14px rgba(92, 52, 21, .08);
 border: 0;
 font-family: system-ui, -apple-system, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
 font-size: 16px;
 line-height: 1.7;
}
.site-header .shell { width: 100%; max-width: 1200px; margin-inline: auto; }
.site-nav li { margin: 0; padding: 0; }
.site-header :focus-visible { outline: 3px solid #005fcc; outline-offset: 3px; }
.skip-link {
	position: absolute;
	left: 50%;
	top: 0;
	transform: translate(-50%, -120%);
	z-index: 100;
	padding: 12px 24px;
	background: var(--brown);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	border-radius: 0 0 var(--radius-sm) var(--radius-sm);
	transition: transform .15s ease;
}
.skip-link:focus {
	transform: translate(-50%, 0);
	color: #fff;
}


.site-header-noscript { margin: 8px 16px 0; text-align: center; }
