/* SF Pro Display — локальные OTF; стек как на устройствах Apple */
:root {
    --font-sans: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    /* Единый вес интерфейса — Regular (400) */
    --font-weight-ui: 400;
    --font-weight-strong: 400;
    --font-weight-meta: 400;
    --font-weight-chat: 400;
}

@font-face {
    font-family: 'SF Pro Display';
    src: url('/static/fonts/sf-pro-display/SF-Pro-Display-Ultralight.otf') format('opentype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'SF Pro Display';
    src: url('/static/fonts/sf-pro-display/SF-Pro-Display-Thin.otf') format('opentype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'SF Pro Display';
    src: url('/static/fonts/sf-pro-display/SF-Pro-Display-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'SF Pro Display';
    src: url('/static/fonts/sf-pro-display/SF-Pro-Display-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'SF Pro Display';
    src: url('/static/fonts/sf-pro-display/SF-Pro-Display-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'SF Pro Display';
    src: url('/static/fonts/sf-pro-display/SF-Pro-Display-Semibold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'SF Pro Display';
    src: url('/static/fonts/sf-pro-display/SF-Pro-Display-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'SF Pro Display';
    src: url('/static/fonts/sf-pro-display/SF-Pro-Display-Heavy.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'SF Pro Display';
    src: url('/static/fonts/sf-pro-display/SF-Pro-Display-Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* Одно сглаживание для светлой и тёмной темы: субпиксель (subpixel) даёт более «толстый» текст,
   grayscale (antialiased) — более тонкий; разный режим при переключении темы воспринимается как смена начертания. */
html {
    font-family: var(--font-sans);
    font-weight: var(--font-weight-ui);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "liga" 1;
}
body {
    font-family: var(--font-sans);
    font-weight: inherit;
}

strong, b,
th {
    font-weight: var(--font-weight-strong);
}
