/* ============================================================
   WORTECK — Base CSS
   Design tokens and component styles are defined in base.html
   This file provides global resets and low-level utilities.
   ============================================================ */

/* ── Font smoothing ─────────────────────────────────────── */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── Scrollbar (webkit) ─────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2E2E2E; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3E3E3E; }

/* ── Selection ──────────────────────────────────────────── */
::selection { background: rgba(230,146,1,.25); color: #fff; }

/* ── Focus visible ──────────────────────────────────────── */
:focus-visible {
  outline: 2px solid #E69201;
  outline-offset: 2px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

/* ── Images ─────────────────────────────────────────────── */
img { image-rendering: auto; }
img[loading="lazy"] { opacity: 1; transition: opacity .2s; }

/* ── Safe area support ──────────────────────────────────── */
.safe-top    { padding-top:    env(safe-area-inset-top); }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom); }
.safe-left   { padding-left:   env(safe-area-inset-left); }
.safe-right  { padding-right:  env(safe-area-inset-right); }

/* ── Utility ─────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.no-select { user-select: none; -webkit-user-select: none; }
