/* ==========================================================================
   ГЛОССАРИЙ · СТОМАТОЛОГИЯ — дизайн-система
   Палитра: #084C27 (доминанта), #E57824 (акцент)
   ========================================================================== */

:root {
    --g-main:        #084C27;
    --g-main-dark:   #063D1F;
    --g-main-deep:   #052E17;
    --g-main-bright: #128A4E;
    --g-main-tint:   #F3F6F4;
    --g-main-tint2:  #E6EDE9;
    --g-acc:         #E57824;
    --g-acc-light:   #EB9A5A;
    --g-acc-deep:    #894816;
    --g-acc-tint:    #FCF2E9;
    --g-paper:       #FAF9F6;
    --g-surface:     #ffffff;
    --g-ink:         #22302A;
    --g-body:        #2C3E35;
    --g-muted:       #5C7065;
    --g-line:        #E0E2DD;
    --g-success:     #7FD6A4;
    --g-font:        "Manrope", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- База страницы термина ---------- */
body.rondo-glossary-page {
    background: var(--g-paper);
    font-family: var(--g-font);
    scrollbar-width: thin;
    scrollbar-color: var(--g-main) #E6EDE9;
}
html:has(body.rondo-glossary-page) {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--g-main) #E6EDE9;
}
body.rondo-glossary-page ::selection { background: rgba(8, 76, 39, .18); }

html:has(body.rondo-glossary-page)::-webkit-scrollbar,
body.rondo-glossary-page::-webkit-scrollbar { width: 10px; }
html:has(body.rondo-glossary-page)::-webkit-scrollbar-track,
body.rondo-glossary-page::-webkit-scrollbar-track { background: #E6EDE9; }
html:has(body.rondo-glossary-page)::-webkit-scrollbar-thumb,
body.rondo-glossary-page::-webkit-scrollbar-thumb {
    background: var(--g-main);
    border-radius: 8px;
    border: 2px solid #E6EDE9;
}
html:has(body.rondo-glossary-page)::-webkit-scrollbar-thumb:hover,
body.rondo-glossary-page::-webkit-scrollbar-thumb:hover { background: var(--g-main-dark); }

body.rondo-glossary-page .glossary-single-wrapper {
    max-width: 1384px;
    margin: 0 auto;
    padding: 28px clamp(16px, 4vw, 32px) 72px;
    background: transparent;
    font-family: var(--g-font);
    color: var(--g-body);
    box-sizing: border-box;
}

.g-eeat__avatar img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; display: block; }
.g-eeat__name a { color: inherit; text-decoration: none; }
.g-eeat__name a:hover { text-decoration: underline; text-underline-offset: 3px; }

body.rondo-glossary-page .glossary-single-wrapper *,
body.rondo-glossary-page .glossary-single-wrapper *::before,
body.rondo-glossary-page .glossary-single-wrapper *::after { box-sizing: border-box; }

.g-icon { width: 18px; height: 18px; flex: none; }

/* ---------- Прогресс чтения ---------- */
.g-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 9999; pointer-events: none; }
.g-progress__bar {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--g-acc), var(--g-main-bright), var(--g-main));
    transform: scaleX(0);
    transform-origin: 0 50%;
}

/* ---------- HERO: «ламинированные слои» ---------- */
.g-hero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: clamp(26px, 4.5vw, 52px);
    color: #fff;
    background:
        radial-gradient(120% 140% at 85% 110%, rgba(229, 120, 36, .28), transparent 55%),
        linear-gradient(128deg, var(--g-main-deep) 0%, var(--g-main) 58%, var(--g-main-bright) 100%);
    box-shadow: 0 24px 60px -30px rgba(5, 46, 23, .55);
    isolation: isolate;
}
.g-hero__bg { position: absolute; inset: 0; z-index: -1; }
.g-hero__glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .4; }
.g-hero__glow--blue {
    width: 420px; height: 420px; left: -120px; top: -160px;
    background: var(--g-main-bright);
    animation: g-drift 14s ease-in-out infinite alternate;
}
.g-hero__glow--gold {
    width: 340px; height: 340px; right: -80px; bottom: -140px;
    background: var(--g-acc); opacity: .3;
    animation: g-drift 18s ease-in-out infinite alternate-reverse;
}
.g-hero__layers {
    position: absolute; inset: -20px;
    background:
        repeating-linear-gradient(178deg, rgba(255, 255, 255, .06) 0 2px, transparent 2px 20px),
        repeating-linear-gradient(178deg, rgba(229, 120, 36, .16) 0 1px, transparent 1px 44px);
    -webkit-mask-image: linear-gradient(100deg, transparent 25%, #000 75%);
    mask-image: linear-gradient(100deg, transparent 25%, #000 75%);
    animation: g-layers 16s ease-in-out infinite alternate;
}
.g-hero__letter {
    position: absolute; right: -6px; bottom: -52px;
    font-size: clamp(180px, 26vw, 300px);
    font-weight: 800; line-height: .8;
    color: rgba(255, 255, 255, .045);
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, .13);
    user-select: none;
}
.g-hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes g-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(30px, 20px, 0); } }
@keyframes g-layers { from { transform: translateX(-8px); } to { transform: translateX(8px); } }

/* ---------- Хлебные крошки ---------- */
.g-crumbs {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 6px 8px; font-size: 13.5px; margin-bottom: 26px;
    animation: g-rise .55s ease both;
}
.g-crumbs a { color: #B8D8C5; text-decoration: none; transition: color .15s ease; }
.g-crumbs a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.g-crumbs__sep { color: var(--g-acc-light); }
.g-crumbs [aria-current] { color: #E2F0E8; opacity: .85; }

/* ---------- Чипы ---------- */
.g-hero__chips { display: flex; flex-wrap: wrap; gap: 8px; animation: g-rise .55s .08s ease both; }
.g-chip {
    display: inline-flex; align-items: center;
    padding: 6px 13px; border-radius: 999px;
    font-size: 12.5px; font-weight: 600; letter-spacing: .02em; text-decoration: none;
    border: 1px solid rgba(229, 120, 36, .55);
    background: rgba(229, 120, 36, .12);
    color: var(--g-acc-light);
    transition: background-color .15s ease, border-color .15s ease;
}
a.g-chip:hover { background: rgba(229, 120, 36, .24); border-color: var(--g-acc-light); }
.g-chip--label { border-color: rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .09); color: #E2F0E8; }

/* ---------- Заголовок и мета ---------- */
.g-hero__title {
    margin: 18px 0 20px; max-width: 22ch;
    font-size: clamp(30px, 4.6vw, 46px);
    font-weight: 800; line-height: 1.12; letter-spacing: -0.01em;
    color: #fff; text-wrap: balance;
    animation: g-rise .55s .16s ease both;
}
.g-hero__meta {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 10px 20px; font-size: 13.5px; color: #C5D8CE;
    animation: g-rise .55s .24s ease both;
}
.g-meta { display: inline-flex; align-items: center; gap: 7px; }
.g-meta .g-icon { width: 16px; height: 16px; opacity: .85; }
.g-copy {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(255, 255, 255, .08);
    color: #EAF3EE;
    font: 600 13px/1 var(--g-font);
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.g-copy:hover { background: rgba(255, 255, 255, .16); border-color: var(--g-acc-light); }
.g-copy.is-done { border-color: var(--g-acc-light); color: var(--g-acc-light); }
.g-copy .g-icon { width: 15px; height: 15px; }

/* ---------- Краткое определение ---------- */
.g-def {
    position: relative; z-index: 2;
    margin: -34px 0 28px; padding: 22px 26px;
    background: var(--g-surface);
    border: 1px solid var(--g-line);
    border-left: 4px solid var(--g-acc);
    border-radius: 16px;
    box-shadow: 0 18px 40px -18px rgba(5, 46, 23, .28);
    animation: g-rise .55s .32s ease both;
}
.g-def__label { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--g-acc-deep); }
.g-def__text { margin: 0; font-size: clamp(16.5px, 1.6vw, 19px); line-height: 1.65; color: var(--g-ink); }
.g-def + .g-layout { margin-top: 0; }

/* ---------- Раскладка ---------- */
.g-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
    margin-top: 28px;
}
.g-article {
    background: var(--g-surface);
    border: 1px solid var(--g-line);
    border-radius: 20px;
    padding: clamp(22px, 4vw, 44px);
    box-shadow: 0 10px 30px -22px rgba(5, 46, 23, .2);
    min-width: 0;
}


.g-article a {
    color: #ffb576 !important;
}

/* ---------- Типографика контента ---------- */
.g-article__content { font-size: 17px; line-height: 1.75; color: var(--g-body); overflow-wrap: break-word; }
.g-article__content > *:first-child { margin-top: 0; }
.g-article__content p { margin: 0 0 1.1em; }
.g-article__content h2 {
    margin: 1.8em 0 .7em; padding-left: 15px;
    border-left: 4px solid var(--g-acc);
    font-size: clamp(22px, 2.4vw, 27px); font-weight: 800; line-height: 1.25;
    color: var(--g-main-deep);
    scroll-margin-top: 110px;
}
.g-article__content h3 { margin: 1.5em 0 .5em; font-size: 19px; font-weight: 700; color: var(--g-main-deep); scroll-margin-top: 110px; }
.g-article__content a {
    color: #ffffff;
    text-decoration: underline;
    text-decoration-color: rgba(8, 76, 39, .35);
    text-underline-offset: 3px;
    transition: color .15s ease, text-decoration-color .15s ease;
}
.g-article__content a:hover { color: var(--g-main-dark); text-decoration-color: var(--g-acc); }
.g-article__content strong { color: var(--g-ink); font-weight: 700; }
.g-article__content ul, .g-article__content ol { margin: 0 0 1.1em; padding-left: 1.35em; }
.g-article__content li { margin: .35em 0; }
.g-article__content ul li::marker { color: var(--g-acc-deep); }
.g-article__content ol li::marker { color: var(--g-main); font-weight: 700; }
.g-article__content blockquote {
    margin: 1.4em 0; padding: 16px 20px;
    background: var(--g-acc-tint);
    border-left: 4px solid var(--g-acc);
    border-radius: 0 12px 12px 0;
    color: var(--g-ink);
}
.g-article__content blockquote p:last-child { margin-bottom: 0; }
.g-article__content img { max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--g-line); }
.g-article__content hr { border: none; height: 1px; background: var(--g-line); margin: 2em 0; }

/* ---------- Таблицы ---------- */
.g-article__content .rondo-table-scroll,
.g-article__content .g-table-scroll,
.rondo-table-scroll,
.g-table-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    margin: 1.4em 0;
    border: 1px solid var(--g-line);
    border-radius: 12px;
    background: var(--g-surface);
    box-shadow: 0 4px 14px rgba(5, 46, 23, .08);
    scrollbar-width: thin;
    scrollbar-color: var(--g-main) var(--g-main-tint);
}
.rondo-table-scroll::-webkit-scrollbar,
.g-table-scroll::-webkit-scrollbar { height: 8px; }
.rondo-table-scroll::-webkit-scrollbar-track,
.g-table-scroll::-webkit-scrollbar-track { background: var(--g-main-tint); }
.rondo-table-scroll::-webkit-scrollbar-thumb,
.g-table-scroll::-webkit-scrollbar-thumb { background: var(--g-main); border-radius: 8px; }
.rondo-table-scroll::-webkit-scrollbar-thumb:hover,
.g-table-scroll::-webkit-scrollbar-thumb:hover { background: var(--g-main-dark); }
.rondo-table-scroll:focus-visible,
.g-table-scroll:focus-visible { outline: 2px solid var(--g-acc); outline-offset: 2px; }

.g-article__content table {
    width: 100%;
    min-width: 540px;
    border-collapse: collapse;
    font-size: 15px;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
}
.g-article__content thead th,
.g-article__content tbody tr:first-child th {
    background: var(--g-main-tint);
    color: var(--g-main-deep);
    font-weight: 700;
    text-align: left;
    padding: 12px 14px;
    font-size: 14px;
    border-bottom: 2px solid rgba(8, 76, 39, .25);
    white-space: nowrap;
}
.g-article__content td {
    padding: 11px 14px;
    font-size: 15px;
    border-bottom: 1px solid var(--g-line);
    vertical-align: top;
    min-width: 0;
    overflow-wrap: break-word;
}
.g-article__content tbody tr:nth-child(even) td { background: var(--g-main-tint); }
.g-article__content tbody tr:hover td { background: var(--g-main-tint2); }
.g-article__content tr:last-child td { border-bottom: none; }
.g-article__content tbody td:first-child { font-weight: 600; color: var(--g-main-deep); }

/* ---------- Футер статьи ---------- */
.g-article__footer {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
    gap: 12px; margin-top: 34px; padding-top: 20px;
    background-color: #fff;
    border-top: 1px dashed var(--g-line);
    font-size: 13.5px; color: var(--g-muted);
}
.g-article__updated { display: inline-flex; align-items: center; gap: 7px; }
.g-article__updated .g-icon { width: 15px; height: 15px; }
.g-article__back { display: inline-flex; align-items: center; gap: 7px; color: var(--g-main); font-weight: 600; text-decoration: none; }
.g-article__back:hover { color: var(--g-main-dark); text-decoration: underline; text-underline-offset: 3px; }
.g-article__back .g-icon { width: 15px; height: 15px; }

/* ---------- Сайдбар: оглавление + CTA ---------- */
.g-aside { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.g-toc { background: var(--g-surface); border: 1px solid var(--g-line); border-radius: 16px; overflow: hidden; }
.g-toc__summary {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 16px 20px; font-size: 15px; font-weight: 700; color: var(--g-main-deep);
    cursor: pointer; list-style: none; user-select: none;
}
.g-toc__summary::-webkit-details-marker { display: none; }
.g-toc__summary .g-icon { width: 16px; height: 16px; color: var(--g-acc-deep); transition: transform .2s ease; }
.g-toc[open] .g-toc__summary .g-icon { transform: rotate(180deg); }
.g-toc__list {
    margin: 0; padding: 2px 12px 14px; list-style: none;
    max-height: 46vh; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: #B9CCC0 transparent;
}
.g-toc__list::-webkit-scrollbar { width: 6px; }
.g-toc__list::-webkit-scrollbar-track { background: transparent; }
.g-toc__list::-webkit-scrollbar-thumb { background: #B9CCC0; border-radius: 6px; }
.g-toc__list::-webkit-scrollbar-thumb:hover { background: var(--g-main); }
.g-toc__link {
    display: block; padding: 8px 10px;
    border-left: 2px solid transparent; border-radius: 8px;
    font-size: 14px; line-height: 1.4; color: var(--g-muted); text-decoration: none;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.g-toc__link:hover { background: var(--g-main-tint); color: var(--g-main); }
.g-toc__link.is-active { background: var(--g-main-tint); border-left-color: var(--g-acc); color: var(--g-main-deep); font-weight: 600; }

.g-cta {
    padding: 24px; border-radius: 18px; color: #E2F0E8;
    background:
        radial-gradient(120% 120% at 100% 0%, rgba(229, 120, 36, .25), transparent 55%),
        linear-gradient(150deg, var(--g-main-deep), var(--g-main));
    box-shadow: 0 18px 40px -22px rgba(5, 46, 23, .5);
}
.g-cta__eyebrow { margin: 0 0 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--g-acc-light); }
.g-cta__title { margin: 0 0 10px; font-size: 20px; font-weight: 800; line-height: 1.3; color: #fff; }
.g-cta__text { margin: 0; font-size: 14px; line-height: 1.6; color: #C5D8CE; }
.g-cta__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.g-btn {
    display: inline-flex; justify-content: center; align-items: center; gap: 8px;
    padding: 12px 18px; border-radius: 12px;
    font: 700 14px/1.2 var(--g-font); text-decoration: none;
    transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.g-btn .g-icon { width: 16px; height: 16px; }
.g-btn--gold { background: var(--g-acc); color: #fff; }
.g-btn--gold:hover { background: var(--g-acc-light); color: #fff; transform: translateY(-1px); }
.g-btn--ghost { border: 1px solid rgba(255, 255, 255, .3); color: #EAF3EE; }
.g-btn--ghost:hover { border-color: var(--g-acc-light); transform: translateY(-1px); }

/* ---------- Соседние термины ---------- */
.g-neighbors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.g-nb {
    display: flex; flex-direction: column; gap: 7px;
    padding: 18px 20px;
    background: var(--g-surface);
    border: 1px solid var(--g-line);
    border-radius: 16px;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.g-nb:hover { border-color: var(--g-acc); box-shadow: 0 14px 30px -20px rgba(5, 46, 23, .35); transform: translateY(-2px); }
.g-nb--next { text-align: right; align-items: flex-end; }
.g-nb__label { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--g-muted); }
.g-nb__label .g-icon { width: 14px; height: 14px; color: var(--g-acc-deep); }
.g-nb__title { font-size: 16.5px; font-weight: 700; line-height: 1.35; color: var(--g-main-deep); }

/* ---------- Связанные термины ---------- */
.g-related { margin-top: 38px; }
.g-related__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px 16px; }
.g-related__title { margin: 0; font-size: 24px; font-weight: 800; color: var(--g-main-deep); }
.g-related__title::after { content: ""; display: block; width: 56px; height: 3px; margin-top: 8px; border-radius: 2px; background: var(--g-acc); }
.g-related__all { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--g-main); text-decoration: none; }
.g-related__all:hover { color: var(--g-main-dark); text-decoration: underline; text-underline-offset: 3px; }
.g-related__all .g-icon { width: 15px; height: 15px; }
.g-related__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 20px 0 0; padding: 0; list-style: none; }
.g-card {
    display: flex; align-items: center; gap: 14px; height: 100%;
    padding: 16px 18px;
    background: var(--g-surface);
    border: 1px solid var(--g-line);
    border-radius: 14px;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.g-card:hover { border-color: var(--g-acc); box-shadow: 0 16px 34px -22px rgba(5, 46, 23, .4); transform: translateY(-3px); }
.g-card__letter {
    display: grid; place-items: center; flex: none;
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--g-acc-tint);
    border: 1px solid rgba(229, 120, 36, .35);
    color: var(--g-acc-deep);
    font-size: 20px; font-weight: 800;
}
.g-card__body { min-width: 0; }
.g-card__title { display: block; font-size: 15.5px; font-weight: 700; line-height: 1.35; color: var(--g-ink); }
.g-card__meta { display: block; margin-top: 3px; font-size: 12.5px; color: var(--g-muted); }
.g-card > .g-icon { margin-left: auto; width: 16px; height: 16px; color: var(--g-main); opacity: 0; transform: translateX(-4px); transition: opacity .15s ease, transform .15s ease; }
.g-card:hover > .g-icon { opacity: 1; transform: translateX(0); }

/* Появление карточек */
.g-reveal {
    opacity: 1;
    visibility: visible;
    transform: none;
    animation: g-related-in .5s ease both;
    animation-delay: var(--reveal-delay, 0ms);
}
.g-reveal.is-visible { opacity: 1; transform: none; }
@keyframes g-related-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Тост ---------- */
.g-toast {
    position: fixed; left: 50%; bottom: 28px; z-index: 10000;
    display: flex; align-items: center; gap: 10px;
    padding: 12px 18px; border-radius: 12px;
    background: var(--g-main-deep);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #fff;
    font: 600 14px/1.3 var(--g-font);
    box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .45);
    opacity: 0; transform: translate(-50%, 16px);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
}
.g-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.g-toast .g-icon { width: 16px; height: 16px; color: var(--g-success); }

/* ---------- Фокус с клавиатуры ---------- */
body.rondo-glossary-page a:focus-visible,
body.rondo-glossary-page button:focus-visible,
body.rondo-glossary-page summary:focus-visible {
    outline: 2px solid var(--g-acc);
    outline-offset: 2px;
    border-radius: 6px;
}

@keyframes g-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   АРХИВ /glossary/
   ========================================================================== */
.glossary-container { max-width: 1384px; margin: 0 auto; padding: 40px 20px 80px; }
.glossary-nav { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 40px; padding-bottom: 20px; border-bottom: 2px solid var(--g-line); }
.glossary-nav-title { display: block; width: 100%; font-weight: 600; font-size: 14px; margin-bottom: 10px; color: var(--g-ink); }
.glossary-nav-link {
    display: inline-block; padding: 8px 12px;
    background: var(--g-main-tint); color: var(--g-main-deep);
    text-decoration: none; border-radius: 6px; font-weight: 600;
    border: 1px solid transparent;
    transition: background-color .25s ease, color .25s ease;
}
.glossary-nav-link:hover { background: var(--g-main); color: #fff; }
.glossary-letter-section { margin-bottom: 40px; }
.glossary-letter-heading {
    font-size: 40px; font-weight: 700; color: var(--g-main-deep);
    margin: 0 0 24px 0; padding-bottom: 16px;
    border-bottom: 3px solid var(--g-acc);
    letter-spacing: 1px; line-height: 1.2;
    scroll-margin-top: 120px;
}
.glossary-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.glossary-card-link { text-decoration: none; color: inherit; display: block; height: 100%; border-radius: 10px; }
.glossary-card {
    display: flex; flex-direction: column; height: 100%;
    border: 1px solid var(--g-line); border-radius: 10px;
    padding: 24px; background: var(--g-surface);
    box-shadow: 0 2px 6px rgba(5, 46, 23, .08);
    transition: box-shadow .25s ease, border-color .25s ease;
}
.glossary-card-link:hover .glossary-card { box-shadow: 0 8px 20px rgba(5, 46, 23, .15); border-color: var(--g-acc); }
.glossary-card-title { margin: 0 0 12px 0; font-size: 18px; font-weight: 600; color: var(--g-ink); line-height: 1.3; transition: color .25s ease; }
.glossary-card-link:hover .glossary-card-title { color: var(--g-main-dark); }
.glossary-card-excerpt {
    margin: 0; font-size: 14px; color: var(--g-muted); line-height: 1.6;
    flex-grow: 1; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}

/* Кластеры на архиве */
.glossary-page-intro {
    margin: 0 0 24px;
    max-width: 720px;
    font-size: 16px;
    line-height: 1.65;
    color: var(--g-muted);
}
.glossary-clusters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 32px;
}
.glossary-cluster-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(229, 120, 36, .45);
    background: var(--g-acc-tint);
    color: var(--g-acc-deep);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.glossary-cluster-chip:hover {
    background: var(--g-acc);
    border-color: var(--g-acc);
    color: #fff;
}
.glossary-cluster-chip__count {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(8, 76, 39, .12);
    color: var(--g-main-deep);
    font-size: 11px;
    font-weight: 700;
}
.glossary-card-meta {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--g-acc-deep);
}

/* ==========================================================================
   E-E-A-T + медицинский дисклеймер (стоматология)
   ========================================================================== */
.g-eeat {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 16px 20px;
    margin: 20px 0 28px;
    background: var(--g-main-tint);
    border: 1px solid var(--g-line);
    border-left: 4px solid var(--g-main);
    border-radius: 12px;
}
.g-eeat__avatar {
    flex: none;
    width: 48px; height: 48px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--g-main);
    color: #fff;
}
.g-eeat__avatar svg { width: 26px; height: 26px; }
.g-eeat__body p { margin: 0; line-height: 1.4; }
.g-eeat__name { font-size: 15px; font-weight: 700; color: var(--g-ink); }
.g-eeat__spec { font-size: 13px; color: var(--g-muted); margin-top: 2px !important; }
.g-eeat__review { font-size: 12.5px; color: var(--g-muted); margin-top: 4px !important; }

.g-disclaimer {
    margin: 32px 0 8px;
    padding: 20px 24px;
    background: var(--g-acc-tint);
    border: 1px solid rgba(229, 120, 36, .35);
    border-left: 4px solid var(--g-acc);
    border-radius: 12px;
}
.g-disclaimer__label {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--g-acc-deep);
}
.g-disclaimer__text {
    margin: 0 0 14px;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--g-body);
}
.g-disclaimer__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--g-main);
    color: #fff;
    text-decoration: none;
    font: 600 14px/1 var(--g-font);
    transition: background-color .15s ease;
}
.g-disclaimer__btn:hover { background: var(--g-main-dark); }
.g-disclaimer__btn .g-icon { width: 15px; height: 15px; }

/* ==========================================================================
   АДАПТИВ
   ========================================================================== */
@media (max-width: 1023px) {
    .g-layout { grid-template-columns: 1fr; }
    .g-aside { display: contents; }
    .g-toc { order: -1; }
    .g-cta { order: 3; margin-top: 4px; }
    .g-toc__summary { cursor: pointer; }
    .g-hero__letter { font-size: clamp(140px, 30vw, 220px); bottom: -34px; }
}
@media (min-width: 1024px) { .g-toc__summary { cursor: default; } }
@media (max-width: 768px) {
    .glossary-container { padding: 28px 16px 60px; }
    .glossary-letter-heading { font-size: 30px; }
    .glossary-items { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
    .g-article__content table { min-width: 520px; }
}
@media (max-width: 640px) {
    body.rondo-glossary-page .glossary-single-wrapper { padding-top: 18px; padding-bottom: 56px; }
    .g-hero { border-radius: 18px; }
    .g-crumbs { margin-bottom: 20px; font-size: 12.5px; }
    .g-hero__meta { gap: 8px 14px; }
    .g-copy span { display: none; }
    .g-copy { padding: 8px 10px; }
    .g-def { margin-top: -24px; padding: 18px; }
    .g-article { border-radius: 16px; }
    .g-article__content { font-size: 16px; }
    .g-neighbors { grid-template-columns: 1fr; }
    .g-neighbors__spacer { display: none; }
    .g-nb--next { text-align: left; align-items: flex-start; }
    .g-related__grid { grid-template-columns: 1fr; }
    .g-toast { left: 16px; right: 16px; bottom: 16px; transform: translateY(16px); }
    .g-toast.is-visible { transform: translateY(0); }
}
@media (max-width: 480px) {
    .glossary-container { padding: 24px 12px 52px; }
    .glossary-letter-heading { font-size: 26px; margin-bottom: 16px; padding-bottom: 12px; }
    .glossary-items { grid-template-columns: 1fr; gap: 12px; }
    .glossary-card { padding: 16px; }
    .glossary-card-title { font-size: 16px; }
    .glossary-card-excerpt { font-size: 13px; }
    .glossary-nav { gap: 6px; margin-bottom: 20px; }
    .glossary-nav-link { padding: 4px 10px; font-size: 12px; }
    .g-article__content table { min-width: 480px; }
    .g-article__content thead th,
    .g-article__content tbody tr:first-child th { padding: 9px 10px; font-size: 12.5px; }
    .g-article__content td { padding: 8px 10px; font-size: 13.5px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html:has(body.rondo-glossary-page) { scroll-behavior: auto; }
    .g-hero__glow, .g-hero__layers,
    .g-crumbs, .g-hero__chips, .g-hero__title, .g-hero__meta, .g-def { animation: none; }
    .g-reveal { animation: none; opacity: 1; transform: none; }
    .g-card, .g-nb, .g-btn, .g-copy { transition: none; }
}

/* ---------- Печать ---------- */
@media print {
    .g-progress, .g-aside, .g-toast, .g-copy, .g-neighbors, .g-related { display: none !important; }
    .g-hero { background: #fff; color: #000; box-shadow: none; }
    .g-hero__title, .g-crumbs [aria-current] { color: #000; }
    .g-hero__bg { display: none; }
    .g-def, .g-article { box-shadow: none; }
    .rondo-table-scroll, .g-table-scroll { overflow: visible; box-shadow: none; }
    .g-article__content table { min-width: 0; }
}

