/* 無障礙（A 級）共用樣式 —— 2026-10-15 */

/* 隱藏文字：外觀不變，螢幕報讀軟體與檢測工具讀得到 */
.a11y-sr {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* 跳到主要內容：平常移出畫面，聚焦時固定在左上角 */
.a11y-skip {
	position: absolute;
	left: -10000px;
	top: auto;
	z-index: 100000;
	padding: 10px 18px;
	background: #232323;
	color: #fff !important;
	font-size: 16px;
	line-height: 1.4;
	text-decoration: none;
	transition: none !important;
}
.a11y-skip:focus {
	position: fixed;
	left: 10px;
	top: 10px;
	outline: 3px solid #f5c400;
	outline-offset: 2px;
}

/* 導盲磚 U／C／Z：平常移出畫面；聚焦時只改 left 並顯示（不可改 fixed，瀏覽器才會捲動到定位點） */
.a11y-acc {
	position: absolute;
	left: -10000px;
	top: auto;
	z-index: 99999;
	display: inline-block;
	padding: 2px 8px;
	background: #fff;
	color: #232323 !important;
	font-size: 16px;
	line-height: 1.5;
	text-decoration: none;
	transition: none !important;
	scroll-margin-top: calc(var(--a11y-sticky-h, 90px) + 10px);
}
.a11y-acc:focus {
	left: auto;
	outline: 3px solid #f5c400;
	outline-offset: 2px;
}
#C { scroll-margin-top: calc(var(--a11y-sticky-h, 90px) + 10px); }
/* U 在頁面最上方：前台 header 高度為 0（選單 nav 是 fixed），不設 top 會落在選單下方 */
#U.a11y-acc { top: 0; scroll-margin-top: 0; }
#U.a11y-acc:focus { top: 8px; left: 8px; }

/* 鍵盤焦點外框（只在鍵盤操作時出現） */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid #f5c400 !important;
	outline-offset: 2px;
}

/* 下拉子選單：鍵盤聚焦時展開（滑鼠由 main.js 加 .open） */
.navbar .navbar-nav .dropdown:focus-within > .dropdown-menu {
	display: block;
}

/* 標題改標籤不改外觀：沿用原標籤的字級與行高（style.css＋custom.css）
   權重刻意壓低（等同標籤選擇器），元素上原有的 lh-sm、fs-xx 等 class 仍可覆寫 */
body :where(.a11y-h2) { font-size: 3.438rem; line-height: 3.438rem; }
body :where(.a11y-h4) { font-size: 2.375rem; line-height: 2.575rem; }
body :where(.a11y-h5) { font-size: 2rem; line-height: 2rem; }
body :where(.a11y-h6) { font-size: 1.75rem; line-height: 1.75rem; }

/* 輪播暫停／播放鈕 */
.a11y-swiper-toggle {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 20;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(35, 35, 35, 0.75);
	color: #fff;
	font-size: 14px;
	line-height: 40px;
	text-align: center;
	cursor: pointer;
}
.a11y-swiper-toggle:hover { background: rgba(35, 35, 35, 0.95); }
.a11y-swiper-toggle .a11y-swiper-icon::before { content: "\275A\275A"; font-size: 10px; letter-spacing: -1px; }
.a11y-swiper-toggle[aria-pressed="true"] .a11y-swiper-icon::before { content: "\25B6"; font-size: 14px; letter-spacing: 0; }

/* 網站導覽頁清單 */
.a11y-sitemap ul { list-style: disc; padding-left: 1.5em; margin-bottom: 1.2em; }
.a11y-sitemap ul ul { list-style: circle; margin-bottom: 0.3em; }
.a11y-sitemap li { margin-bottom: 0.3em; }
.a11y-sitemap a { text-decoration: underline; }

/* 會員版型（dashlite）：h4 改 h2 後，還原 .nk-block-head h2:not(:last-child) 加的下邊距 */
.nk-block-head h2.h4:not(:last-child) { margin-bottom: 0.5rem; }

/* 會員表單必填說明 */
.a11y-required-note { font-size: 0.875rem; margin-bottom: 1rem; color: #526484; }

/* 內文連結加底線（1.4.1：不只靠顏色區分連結） */
.custom_content a:not(.btn) { text-decoration: underline; }
