/* 完整名額表 v2（2026-11-27）：總數拆解＋依管道一列＋校區切換 */
.adm-page .aq { --aq-g: #121316; --aq-x: #D7141E; --aq-i: #6b7280; }
.aq .labs-section-head { margin-bottom: 20px; }

/* 總覽：150 = 128 + 22 */
.aq-sum { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.aq-eq { display: flex; align-items: stretch; gap: 10px; }
.aq-eq > i { align-self: center; font-style: normal; font-size: 26px; font-weight: 900; color: var(--ink-3); }
.aq-big { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 14px 16px; border: 2px solid var(--ink); border-radius: 16px; background: #fff; min-width: 0; }
.aq-big small { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.aq-big b { font-size: clamp(34px, 4.2vw, 48px); line-height: 1.05; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.aq-big span { font-size: 12.5px; color: var(--ink-3); }
.aq-big.is-all { background: var(--yellow); box-shadow: 4px 4px 0 var(--ink); }
.aq-big.is-x b { color: var(--aq-x); }
.aq-campus { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 14px 16px; border: 2px solid var(--ink); border-radius: 16px; background: #fff; }
.aq-cbar { display: flex; height: 46px; border-radius: 10px; overflow: hidden; border: 2px solid var(--ink); }
.aq-cbar span { flex: var(--f) 1 0; display: flex; align-items: center; padding: 0 12px; min-width: 0; white-space: nowrap; }
.aq-cbar .tp { background: var(--tp); color: #fff; }
.aq-cbar .hc { background: var(--hc); color: var(--ink); justify-content: center; padding: 0 6px; min-width: 76px; }
.aq-cbar b { font-size: 15px; font-weight: 900; }
.aq-campus p { margin: 0; font-size: 13.5px; color: var(--ink-2); white-space: pre-wrap; }

/* 工具列 */
.aq-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; margin-bottom: 12px; }
.aq-seg { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.aq-seg > span { font-size: 14px; font-weight: 700; color: var(--ink-2); margin-right: 2px; }
.aq-seg button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer; transition: background .2s, transform .2s; }
.aq-seg button:hover { transform: translateY(-1px); }
.aq-seg button.is-on { background: var(--ink); color: #fff; }
.aq i.tp, .aq i.hc { display: inline-block; width: 11px; height: 11px; border-radius: 3px; border: 1.5px solid var(--ink); vertical-align: -1px; }
.aq i.tp { background: var(--tp); }
.aq i.hc { background: var(--hc); }
.aq-seg button.is-on i { border-color: #fff; }
.aq-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--ink-2); }
.aq-legend li { display: inline-flex; align-items: center; gap: 6px; }

/* 類型標籤 */
.aq-ty { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 1.5; white-space: nowrap; border: 1.5px solid currentColor; }
.aq-ty.is-g { color: #fff; background: var(--aq-g); border-color: var(--aq-g); }
.aq-ty.is-x { color: var(--aq-x); background: #fff; }
.aq-ty.is-m { color: var(--ink); background: linear-gradient(90deg, #fff 0 50%, #ffe1e2 50%); border-color: var(--ink); }
.aq-ty.is-i { color: var(--aq-i); background: #fff; border-style: dashed; }

/* 表格 */
.adm-page .aq-t-table { min-width: 680px; }
.adm-page .aq-t-table th, .adm-page .aq-t-table td { padding: 12px 14px; }
.adm-page .aq-t-table td + td, .adm-page .aq-t-table th + td { border-left: 0; }
.adm-page .aq-t-table thead th { font-size: 13.5px; text-align: center; white-space: nowrap; }
.adm-page .aq-t-table thead th:first-child { text-align: left; }
.adm-page .aq-t-table thead th small { display: block; font-weight: 500; font-size: 11.5px; opacity: .7; letter-spacing: 0; }
.adm-page .aq-t-table thead i { border-color: #fff; margin-right: 4px; }
.aq-t-table tbody th small { display: block; }
.aq-n { width: 13%; font-variant-numeric: tabular-nums; }
.aq-n b { display: block; font-size: 20px; font-weight: 800; color: var(--ink); }
.aq-n small { display: block; font-size: 11.5px; color: var(--ink-3); line-height: 1.35; margin-top: 2px; }
.adm-page .aq-t-table td.aq-t { width: 30%; text-align: left; background: #fffbea; }
.aq-t .aq-bar { display: inline-block; vertical-align: middle; width: calc(100% - 76px); height: 12px; border-radius: 99px; background: #efeae0; overflow: hidden; margin-right: 10px; }
.aq-t .aq-bar i { display: block; height: 100%; width: var(--w); background: var(--ink); border-radius: 99px; transition: width .45s cubic-bezier(.2,.8,.2,1); }
.aq-t > b { font-size: 26px; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; vertical-align: middle; }
.aq-t > small { font-size: 13px; color: var(--ink-3); margin-left: 2px; vertical-align: middle; }
.aq-k { width: 15%; }
.aq-k .aq-tyn { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.aq-wrap .aq-incl th, .aq-wrap .aq-incl td { background: repeating-linear-gradient(135deg, #fff 0 8px, #f7f7f5 8px 16px) !important; }
.aq-incl .aq-n b, .aq-incl .aq-t > b { color: var(--aq-i); }
.aq-incl .aq-bar i { background: repeating-linear-gradient(90deg, var(--aq-i) 0 4px, transparent 4px 7px); }

/* tfoot 小計／合計 */
.adm-page .aq-t-table tfoot th, .adm-page .aq-t-table tfoot td { font-size: 16px; }
.adm-page .aq-t-table tfoot tr.aq-sub th, .adm-page .aq-t-table tfoot tr.aq-sub td { background: #faf8f2; font-weight: 700; border-bottom: 1px solid var(--line); }
.adm-page .aq-t-table tfoot tr.aq-sub th small { display: block; font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.adm-page .aq-t-table tfoot td.aq-t { font-size: 20px; font-weight: 900; }
.adm-page .aq-t-table tfoot tr.aq-total th, .adm-page .aq-t-table tfoot tr.aq-total td { background: var(--yellow); font-size: 18px; font-weight: 900; border-top: 2px solid var(--ink); }
.adm-page .aq-t-table tfoot tr.aq-total td.aq-t { font-size: 26px; }
.aq-total .aq-k small { font-size: 12px; font-weight: 500; }

.aq-t-table th small, .aq-t-table td small { line-height: 1.4; }
.aq-t-table tbody th b { font-size: 17px; }
.aq-n small { white-space: nowrap; }

/* 校區切換：非選定欄淡出 */
.aq-wrap[data-c="tp"] .hc, .aq-wrap[data-c="hc"] .tp:not(i) { opacity: .28; }
.aq-wrap[data-c="tp"] thead th.tp, .aq-wrap[data-c="hc"] thead th.hc { box-shadow: inset 0 -4px 0 var(--yellow); }
.aq-wrap[data-c="tp"] i.hc, .aq-wrap[data-c="hc"] i.tp { opacity: .4; }
.aq-wrap .aq-row-zero { opacity: .4; }

.aq .at-note a { color: var(--ink) !important; border-bottom: 1px solid currentColor; font-weight: 700; }

/* 平板 */
@media (max-width: 991px) {
	.aq-sum { grid-template-columns: 1fr; }
}
/* 手機：每列變成卡片 */
@media (max-width: 640px) {
	.aq-eq { gap: 6px; }
	.aq-eq > i { font-size: 18px; }
	.aq-big { padding: 10px 10px; border-radius: 12px; }
	.aq-big small { font-size: 12px; }
	.aq-big span { font-size: 11px; }
	.aq-legend { font-size: 12.5px; }
	.aq-wrap { overflow: visible; border: 0; background: transparent; border-radius: 0; }
	.adm-page .aq-t-table, .aq-t-table tbody, .aq-t-table tfoot { display: block !important; min-width: 0; }
	.aq-t-table thead { display: none; }
	.aq-t-table tr { display: grid; grid-template-columns: 1fr 1fr auto; grid-template-areas: "n n t" "a b k"; gap: 8px 10px; align-items: center; margin-bottom: 10px; padding: 14px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; }
	.adm-page .aq-t-table tr > * { padding: 0; border: 0 !important; background: transparent !important; width: auto; text-align: left; }
	.aq-t-table tr > th { grid-area: n; }
	.aq-t-table tr > .tp { grid-area: a; }
	.aq-t-table tr > .hc { grid-area: b; }
	.aq-t-table tr > .aq-t { grid-area: t; text-align: right; }
	.aq-t-table tr > .aq-k { grid-area: k; text-align: right; }
	.aq-t .aq-bar { display: none; }
	.aq-n { display: flex; flex-direction: column; padding: 6px 10px !important; border-radius: 10px; background: #f6f4ee !important; }
	.aq-n::before { font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
	.aq-n.tp::before { content: "台北"; }
	.aq-n.hc::before { content: "新竹"; }
	.aq-n b { font-size: 18px; }
	.adm-page .aq-t-table tfoot tr.aq-sub, .adm-page .aq-t-table tfoot tr.aq-total { border-style: dashed; }
	.adm-page .aq-t-table tfoot tr.aq-total { background: var(--yellow); border-style: solid; box-shadow: 4px 4px 0 var(--ink); }
	.aq-incl { background: repeating-linear-gradient(135deg, #fff 0 8px, #f7f7f5 8px 16px) !important; border-style: dashed !important; }
	.aq-wrap .aq-incl th, .aq-wrap .aq-incl td { background: transparent !important; }
	.aq-incl .aq-n { background: rgba(255,255,255,.8) !important; }
	.aq-wrap[data-c="tp"] .aq-n.hc, .aq-wrap[data-c="hc"] .aq-n.tp { display: none; }
	.aq-wrap[data-c="tp"] .aq-t-table tr, .aq-wrap[data-c="hc"] .aq-t-table tr { grid-template-areas: "n n t" "a a k"; }
	.aq-wrap[data-c="hc"] .aq-t-table tr > .hc { grid-area: a; }
}
@media (prefers-reduced-motion: reduce) { .aq-t .aq-bar i { transition: none; } }
@media (min-width: 641px) { .adm-page .aq-t-table tfoot td.aq-t { text-align: right; padding-right: 36px; } }
@media (max-width: 640px) {
	.aq-seg > span { width: 100%; }
	.aq-seg button { padding: 6px 11px; font-size: 13.5px; }
	.aq-big span { line-height: 1.35; }
	.adm-page .aq-t-table tr > td.aq-n { background: #f6f4ee !important; padding: 6px 10px !important; }
	.adm-page .aq-t-table tfoot td.aq-t { font-size: 24px; }
}

/* 開頭快速選單（2026-11-27b）：名額表在前、獎學金第二 */
.adm-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 10px; margin-top: 18px; }
.adm-jump .sch-pill { margin-top: 0; }
.aj-quota { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px 8px 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--ink); color: #fff !important; font-weight: 900; font-size: 15px; text-decoration: none !important; box-shadow: 3px 3px 0 var(--yellow, #ffd24d); transition: transform .15s; }
.aj-quota b { display: inline-grid; place-items: center; min-width: 44px; height: 28px; padding: 0 8px; border-radius: 999px; background: var(--yellow, #ffd24d); color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.aj-quota i { font-style: normal; }
.aj-quota:hover { transform: translate(-2px, -2px); }
.aj-sm { display: inline-flex; align-items: center; padding: 6px 4px; color: var(--ink) !important; font-weight: 700; font-size: 14.5px; border-bottom: 1.5px solid currentColor; text-decoration: none !important; }
.aj-sm:hover { color: var(--brand, #D7141E) !important; }
#quota, #scholarship, #finder, #timeline { scroll-margin-top: 90px; }
@media (max-width: 640px) { .aj-quota, .adm-jump .sch-pill { font-size: 14px; } }
.aj-more { display: inline-flex; gap: 14px; }
