/* Shared polish layer, loaded after each page's own styles. Typography and
   interaction refinement only — system fonts are deliberate (instant, and
   native CJK rendering); this makes them render at their best. */

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font-family: inherit; }

h1, h2 { letter-spacing: -0.01em; }

/* times, counts, uids: digits align in columns */
table, td, th, .counts .n, .uid,
input[type=date], input[type=time], input[type=datetime-local] {
  font-variant-numeric: tabular-nums;
}

/* touch feel: no grey tap flash, a subtle press, smooth state changes */
button, a { -webkit-tap-highlight-color: transparent; }
button {
  transition: background-color .15s ease, opacity .15s ease,
    transform .06s ease;
}
button:active { transform: scale(.97); }

/* keyboard/focus affordances the inline styles never had */
:focus-visible { outline: 2px solid #2f81f7; outline-offset: 2px; }
input:focus, select:focus, textarea:focus {
  border-color: #2f81f7 !important;
  outline: none;
}

::selection { background: #2f81f7; color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #26303b; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #33414f; }
::-webkit-scrollbar-track { background: transparent; }

@media print {
  button:active { transform: none; }
}
