/* =============================================================
   BASE / ELEMENTS
   
   Стили на уровне тегов: заголовки, ссылки, dl, sup.
   
   Подключается ПОСЛЕ reset.css и ДО common.css —
   чтобы старые стили могли переопределить.
   
   Содержимое — то, что было в common.css, но на новых переменных.
   Дублирование временное: когда отключим common.css,
   этот файл станет единственным источником.
   ============================================================= */

/* ---------------------------------------------------------
   ЗАГОЛОВКИ
   Размеры оставляем браузерные (1.5em, 1.17em и т.д.).
   Вес — 600, как было в common.css.
   --------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
}

/* ---------------------------------------------------------
   ТЕКСТОВЫЕ ЭЛЕМЕНТЫ
   --------------------------------------------------------- */

/* В проекте <b> был приглушённым — 500, а не 700 */
b {
    font-weight: 500;
}

p,
ol>li {
    line-height: 1.5;
}

/* Надстрочный индекс */
sup {
    font-size: smaller;
    color: var(--red-700);
    margin-left: .5em;
}

/* ---------------------------------------------------------
   ССЫЛКИ
   --------------------------------------------------------- */

a {
    color: var(--blue-700);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--duration-fast) var(--ease-default);
}

a:hover {
    color: var(--blue-900);
}

a:active,
a.active {
    color: var(--blue-500);
    text-decoration: underline;
    text-decoration-style: wavy;
}

/* ---------------------------------------------------------
   СПИСКИ ОПРЕДЕЛЕНИЙ (dl)
   --------------------------------------------------------- */

dl {
    display: grid;
    grid-template-columns: max-content auto;
    gap: 10px;
    align-items: end;
}

dl dt {
    position: relative;
    margin: 0;
    padding-right: .5rem;
}

dl dd {
    margin: 0;
    padding-left: .5rem;
    position: relative;
    z-index: 1;
    min-width: 80px;
}

/* Пунктирная линия между dt и dd */
dl.dotted-bridge dt::after {
    content: '';
    position: absolute;
    bottom: 1px;
    left: 0;
    right: 0;
    border-bottom: 1px dotted rgba(0, 26, 52, .16);
}

/* Разделитель для группы определений */
dl dt.section-start,
dl dd.section-start {
    margin-top: 20px;
    position: relative;
}

dl dt.section-start::before,
dl dd.section-start::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    height: 1px;
    background-color: var(--border-default);
}

/* ---------------------------------------------------------
   ФОРМЫ
   --------------------------------------------------------- */

/* Кнопки — курсор как у интерактивных элементов */
button {
    cursor: pointer;
}

/* Readonly — данные можно скопировать, но не менять */
[readonly] {
    background-color: var(--bg-surface-alt);
    color: var(--text-secondary);
    border-color: var(--border-default);
    box-shadow: none;
    cursor: default;
}

/* Disabled — полностью недоступно */
[disabled] {
    background-color: var(--bg-surface-alt);
    color: var(--text-tertiary);
    border-color: var(--border-light);
    box-shadow: none;
    cursor: not-allowed;
    opacity: .7;
}

/* ---------------------------------------------------------
   ПРОЧЕЕ
   --------------------------------------------------------- */

/* Подсветка выделения текста */
::selection {
    background-color: var(--blue-300);
    color: var(--blue-900);
}

/* <mark> — подсвеченный фрагмент */
mark {
    background-color: var(--yellow-300);
}