/* base.css — общая типографика и утилиты. Цвета — в dark_root.css */

html, body { margin: 0; padding: 0; }

html {
    background: var(--back-global);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    background: var(--back2);
    color: var(--text1);
    font-family: var(--tl-font);
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Элементы форм по умолчанию не наследуют шрифт — исправляем */
button, input, select, textarea { font-family: inherit; }

/* ---------- Типографика ---------- */
a { text-decoration: none; color: var(--text0); }
a:visited { color: var(--text0); }

p, .p { margin: 0; }

h1, h2, h3 { color: var(--tl-ink); }

::selection { background: var(--tl-blue-soft); color: var(--tl-ink); }

/* Видимый фокус для клавиатуры (мышь/тач его не показывают) */
:focus-visible {
    outline: 2px solid var(--tl-blue);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ---------- Утилиты ---------- */
.hidden { display: none !important; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.error,
#error {
    color: var(--text-error);
    font-size: 15px;
    margin: 0 0 20px;
}
.error:empty,
#error:empty { display: none; }

/* ---------- Общий мелкий аватар (хедер / карточки) ---------- */
.avatar-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}

/* ---------- Пустые состояния с силуэтом гор ----------
   <div class="tl-empty">
       <div class="tl-empty__ridge"></div>
       <p class="tl-empty__title">Заголовок</p>
       <p class="tl-empty__text">Пояснение</p>
       <a class="tl-empty__action" href="...">Действие</a>
   </div>                                                   */
.tl-empty {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 520px;
    margin: 8px auto;
    padding: 28px 22px 26px;
    text-align: center;
    background: var(--tl-surface);
    border: 1px solid var(--tl-line);
    border-radius: var(--tl-r-l);
    overflow: hidden;
    grid-column: 1 / -1;
}
.tl-empty__ridge {
    height: 64px;
    margin: -6px -22px 14px;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 520 64' preserveAspectRatio='none'%3E%3Cpath d='M0 64 L0 50 L46 30 L78 42 L130 12 L168 36 L196 26 L248 54 L292 22 L330 40 L372 6 L410 34 L452 24 L520 52 L520 64 Z' fill='%23000'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 520 64' preserveAspectRatio='none'%3E%3Cpath d='M0 64 L0 50 L46 30 L78 42 L130 12 L168 36 L196 26 L248 54 L292 22 L330 40 L372 6 L410 34 L452 24 L520 52 L520 64 Z' fill='%23000'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
    background: linear-gradient(180deg, var(--tl-blue-soft), var(--tl-ridge-fill));
}
.tl-empty__title {
    font-family: var(--tl-font-display);
    font-weight: 600;
    font-size: 17px;
    line-height: 1.3;
    color: var(--tl-ink);
    margin: 0 0 6px;
}
.tl-empty__text {
    font-size: 14px;
    color: var(--tl-ink-2);
    margin: 0 auto;
    max-width: 38ch;
}
.tl-empty__action,
.tl-empty__action:visited {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--tl-magenta);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}
.tl-empty__action:hover { filter: brightness(1.06); }

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

/* ---------- Значок подписки PRO у ника (лента, страница поста, профиль) ---------- */
.pro-badge {
    display: inline-block;
    margin-left: 5px;
    padding: 0 5px;
    border-radius: 5px;
    background: var(--tl-grad);
    color: #fff;
    font-family: var(--tl-font-display);
    font-size: 9px;
    font-weight: 700;
    line-height: 15px;
    letter-spacing: .02em;
    vertical-align: 1px;
    text-shadow: none;
}
