/* Общая основа: шрифты, палитра «картотека архива», сброс. Шрифты — свои файлы (OFL), без CDN. */
@font-face {
  font-family: 'Old Standard';
  src: url('/shared/fonts/old-standard-tt-cyrillic-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Old Standard';
  src: url('/shared/fonts/old-standard-tt-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: 'Old Standard';
  src: url('/shared/fonts/old-standard-tt-cyrillic-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Old Standard';
  src: url('/shared/fonts/old-standard-tt-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('/shared/fonts/ibm-plex-mono-cyrillic-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('/shared/fonts/ibm-plex-mono-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}

:root {
  /* картотечный ящик, карточка, тушь, графит, линовка, штемпельная краска */
  --field: #e6e9e2;
  --card: #ffffff;
  --ink: #14161b;
  --ink-2: #4b505a;
  --rule: #c4c9bf;
  --stamp: #4325b0;
  --stamp-ink: #2d1785;
  --stamp-soft: #ebe6fa;
  --danger: #a1261b;
  --ok: #1d6b3a;

  --display: 'Old Standard', 'Times New Roman', Georgia, serif;
  --text: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --r: 4px;
  --focus: 0 0 0 3px var(--card), 0 0 0 5px var(--stamp);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--field);
  color: var(--ink);
  font: 400 16px/1.45 var(--text);
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
}
p {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
[hidden] {
  display: none !important;
}
.mono {
  font-family: var(--mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  background: var(--ink);
  color: var(--card);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.btn:hover {
  background: var(--stamp-ink);
  border-color: var(--stamp-ink);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn.quiet {
  background: transparent;
  color: var(--ink);
}
.btn.quiet:hover {
  background: var(--stamp-soft);
}
.btn.danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.btn.danger:hover {
  background: var(--danger);
  color: var(--card);
}
.btn.stamp {
  background: var(--stamp);
  border-color: var(--stamp);
}
.btn.stamp:hover {
  background: var(--stamp-ink);
}

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