/* ══════════════════════════════════════════════════
   iTracker Design System — 基礎（reset、全域元素、動畫、捲軸、icon 雙色調）
   正本：design-system/components/base.css（tracker 建置複製到 wwwroot/css/ds/，勿手改產物）。
   v1.0 自 wwwroot/css/site.css 原樣搬入（規則與原相對順序不變）。
   ══════════════════════════════════════════════════ */
/* ── Reset ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-feature-settings: 'cv11', 'ss01', 'ss03', 'palt';
  letter-spacing: -.003em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-size: var(--fs-body);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
html { accent-color: var(--accent); }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
input, select, textarea { font-family: inherit; }
/* ── 全域動畫 ─────────────────────────────────────── */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* ── 鍵盤可達（DS v2 5.5）─────────────────────────────
   非原生按鈕但可點的元素（role=button / data-kbd-click）一律補焦點框；
   Enter／空白鍵觸發由 site-core.js 全域委派處理。 */
[role="button"][tabindex]:focus-visible, [data-kbd-click]:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-sm); }
tr[data-kbd-click]:focus-visible, .issue-row[data-kbd-click]:focus-visible { box-shadow: inset 0 0 0 2px var(--focus-ring-color); border-radius: 0; }
/* 跳到主內容：平時移出畫面，Tab 第一下才出現 */
.skip-link {
  position: fixed; left: var(--space-3); top: -48px; z-index: 10000;
  padding: var(--space-2) var(--space-3); border-radius: var(--r-sm);
  background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border-card);
  box-shadow: var(--shadow-pop); font-size: var(--fs-body);
}
.skip-link:focus { top: var(--space-3); outline: none; box-shadow: var(--focus-ring); }
/* 使用者系統設定「減少動態」：全站動畫／轉場壓到近乎瞬間（保留終態） */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
/* 次要態淡字 */
svg[stroke="currentColor"]:not(.ico-line) {
  fill: currentColor;
  fill-opacity: var(--icon-fill);
}
/* 全站細捲軸（layout-refresh）：標準屬性優先（Chromium 121+／Firefox 吃 scrollbar-width 後忽略 ::-webkit-scrollbar），
   Safari 走下方 webkit 規則；顏色吃日夜 token。 */
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
::-webkit-scrollbar       { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: var(--r-pill); border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); background-clip: padding-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }
