/* =====================================================================
   Easy Shop · база: сброс, типографика, фокус, утилиты.
   Цвета и размеры — только токены из tokens.css.
   ===================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html,
body { height: 100%; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--fw-text) var(--fs-14)/1.45 var(--font-sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, dt, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-size: inherit; font-weight: var(--fw-head); }

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  font-variant-numeric: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: inherit;
  -webkit-tap-highlight-color: transparent;
}
button:disabled { cursor: not-allowed; }

input, textarea, select {
  font: inherit;
  font-variant-numeric: inherit;
  color: inherit;
  margin: 0;
}

table { border-collapse: collapse; border-spacing: 0; }
img, svg { display: block; }
[hidden] { display: none !important; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
::selection { background: var(--accent-soft); }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }

/* ---------- иконки: штрих всегда 1.75px на экране при любом размере ---------- */
.ic {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75px;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ic > * { vector-effect: non-scaling-stroke; }
.ic .ic-fill { fill: currentColor; stroke: none; }
.ic--12 { width: 12px; height: 12px; }
.ic--14 { width: 14px; height: 14px; }
.ic--16 { width: 16px; height: 16px; }
.ic--18 { width: 18px; height: 18px; }
.ic--24 { width: 24px; height: 24px; }
.ic--28 { width: 28px; height: 28px; }
.ic--spin { animation: spin .9s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- утилиты ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: .92em; }
.muted { color: var(--text-3); }
.dim { color: var(--text-2); }
.pos { color: var(--ok); }
.neg { color: var(--danger); }
.strong { font-weight: var(--fw-btn); }
.truncate { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow { flex: 1 1 0; min-width: 0; }
.row { display: flex; align-items: center; gap: var(--s-8); min-width: 0; }
.row--wrap { flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: var(--s-8); min-width: 0; }
.stack--lg { gap: var(--gap); }

.link {
  color: var(--accent-text);
  font-size: var(--fs-13);
  font-weight: var(--fw-btn);
  border-radius: var(--r-xs);
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--t-1);
}
.link:hover { text-decoration-color: currentColor; }

.kbd {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 var(--s-6);
  border-radius: var(--r-xs);
  border: 1px solid var(--border);
  background: var(--surface-3);
  color: var(--text-2);
  font: 500 var(--fs-11)/1 var(--font-sans);
  white-space: nowrap;
  flex: none;
}

.eyebrow {
  font-size: var(--fs-11);
  font-weight: var(--fw-head);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* экран запуска (до того как main.js построит интерфейс) */
.boot {
  display: grid;
  place-items: center;
  align-content: center;
  gap: var(--s-16);
  height: 100vh;
  height: 100dvh;
}
.boot__mark { width: 56px; height: 56px; animation: blink 1.6s ease-in-out infinite; }
.boot__text { max-width: 320px; padding: 0 var(--s-16); color: var(--text-2); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
