/* =========================================================
   核心能力指標 abilities.html 專用樣式
   沿用 labs.css／based.css／courseplan.css
   ========================================================= */
.ab-page { --a1: #4F86B0; --a2: #9B6BCB; --a3: #D9707F; --a4: #4F86B0; --a5: #9B6BCB; --a6: #D9707F; }

/* 5 → 6 對應 */
.five-six { display: grid; gap: 10px; }
.fs-row { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1.25fr); align-items: center; gap: 0; }
.fs-from { background: #fff; border-radius: 14px; padding: 14px 18px; box-shadow: 0 1px 0 var(--line); }
.fs-from b { display: block; font-size: 16px; font-weight: 900; color: var(--ink); }
.fs-from span { font-size: 13px; color: var(--ink-3); line-height: 1.6; }
.fs-arrow { position: relative; height: 2px; background: var(--ink); margin: 0 8px; }
.fs-arrow::after { content: ""; position: absolute; right: -2px; top: -5px; border: 6px solid transparent; border-left: 8px solid var(--ink); border-right: 0; }
.fs-to { display: grid; gap: 8px; }
.fs-to span { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; border-radius: 12px; padding: 12px 16px; font-weight: 700; font-size: 15.5px; }
.fs-to span i { font-style: normal; font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: #ffd24d; }
.fs-head { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1.25fr); font-size: 12.5px; font-weight: 700; color: var(--ink-3); letter-spacing: .06em; margin-bottom: 4px; }
.fs-head span:last-child { grid-column: 3; }

/* 教育目標 × 能力 矩陣 */
.goal-matrix-wrap { overflow-x: auto; background: var(--paper); border-radius: 20px; box-shadow: 0 1px 0 var(--line), 0 24px 50px -40px rgba(18, 19, 22, .45); }
.goal-matrix { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; }
.goal-matrix th, .goal-matrix td { padding: 14px 10px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.goal-matrix thead th { font-size: 13px; font-weight: 700; color: var(--ink-2); background: #fafaf8; border-bottom: 2px solid var(--ink); line-height: 1.4; }
.goal-matrix tbody th { text-align: left; padding-left: 20px; width: 34%; }
.goal-matrix tbody th b { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--ink); }
.goal-matrix tbody th b i { font-style: normal; width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: #ffd24d; display: grid; place-items: center; font-size: 15px; flex: none; }
.goal-matrix tbody th small { display: block; font-weight: 400; font-size: 13px; color: var(--ink-3); margin: 4px 0 0 40px; line-height: 1.6; }
.dot-p, .dot-s { display: inline-block; width: 18px; height: 18px; border-radius: 50%; }
.dot-p { background: var(--ink); }
.dot-s { border: 2.5px solid var(--ink); }
.matrix-legend { display: flex; gap: 18px; font-size: 13px; color: var(--ink-2); margin-top: 12px; flex-wrap: wrap; }
.matrix-legend span { display: inline-flex; align-items: center; gap: 6px; }
.matrix-legend .dot-p, .matrix-legend .dot-s { width: 14px; height: 14px; }

/* 碩士班 */
.master-band { background: var(--ink); color: #fff; border-radius: 24px; padding: clamp(24px, 4vw, 44px); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 32px; align-items: center; }
.master-band h4 { margin: 0 0 10px; font-size: 26px; font-weight: 900; color: #fff; }
.master-band p { margin: 0; font-size: 14.5px; line-height: 1.85; color: rgba(255, 255, 255, .72); }
.master-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; counter-reset: ms; }
.master-list li { counter-increment: ms; border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; padding: 14px 16px; font-weight: 700; font-size: 15px; display: flex; gap: 10px; align-items: center; }
.master-list li::before { content: "0" counter(ms); font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: #ffd24d; }

/* 基本能力（校訂） */
.cesg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.cesg div { border-radius: 14px; padding: 14px 16px; background: var(--paper); box-shadow: 0 1px 0 var(--line); display: flex; align-items: center; gap: 12px; }
.cesg b { font-size: 30px; font-weight: 900; line-height: 1; color: var(--brand); font-family: ui-monospace, Menlo, monospace; }
.cesg span { font-size: 15px; font-weight: 700; }
.basic-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.basic { background: var(--paper); border-radius: 18px; padding: 20px; box-shadow: 0 1px 0 var(--line), 0 20px 40px -34px rgba(18, 19, 22, .45); }
.basic h4 { margin: 0 0 12px; font-size: 18px; font-weight: 900; color: var(--ink); padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.basic dl { margin: 0; display: grid; gap: 10px; }
.basic dt { font-size: 14px; font-weight: 700; color: var(--ink); }
.basic dd { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 5px; }
.basic dd span { font-size: 12.5px; padding: 3px 8px; border-radius: 6px; background: #f3f3f0; color: var(--ink-2); }

/* 課程精進機制 */
.mech { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mech div { background: var(--paper); border-radius: 18px; padding: 22px; box-shadow: 0 1px 0 var(--line); }
.mech b { display: block; font-size: 18px; font-weight: 900; margin-bottom: 6px; color: var(--ink); }
.mech p { margin: 0; font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.mech i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #f3f3f0; color: var(--brand); font-size: 18px; margin-bottom: 12px; }

@media (max-width: 991px) {
	.master-band { grid-template-columns: 1fr; }
	.basic-grid, .cesg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mech { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
	.fs-row, .fs-head { grid-template-columns: 1fr; }
	.fs-head span:last-child { display: none; }
	.fs-arrow { width: 2px; height: 22px; margin: 4px auto; }
	.fs-arrow::after { right: -5px; top: auto; bottom: -2px; border: 6px solid transparent; border-top: 8px solid var(--ink); border-bottom: 0; }
	.basic-grid, .master-list { grid-template-columns: 1fr; }
}
.goal-matrix th, .goal-matrix td { background: transparent; color: var(--ink); }
.goal-matrix thead th { background: #fafaf8; color: var(--ink-2); }
