/* Научная статья на book.nexxe.su (aas-policy): поверх book.css и research.css — таблицы, вставки, термины, источники. */
.aas .a-title { font-size: clamp(38px, 5.4vw, 74px); line-height: 1.06; }
.aas .r-meta a { color: var(--red); }
.aas .chap h2 { font-size: clamp(26px, 3vw, 38px); }
.aas .chap h3 { font-size: 22px; margin: 26px 0 10px; }
.aas .r-art { max-width: 800px; min-width: 0; }   /* иначе широкие таблицы раздвигают колонку на телефоне */
.aas .r-layout > * { min-width: 0; }
.aas .r-art, .aas .r-hero { overflow-wrap: break-word; hyphens: auto; }
.aas .r-toc a { font-size: 14px; padding: 6px 0; }
.aas .r-toc { max-height: calc(100vh - 110px); overflow-y: auto; padding-right: 6px; }

/* безопасность и «коротко» */
.a-safety { margin: 0 0 34px; padding: 14px 18px; border: 1px solid #f1c8c2; background: #fff4f2; border-radius: 12px; font-size: 15px; }
.a-safety b { display: block; font-size: 12px; letter-spacing: .2em; color: #a3402f; margin-bottom: 4px; }
.a-safety p { margin: 0; color: #5a3a33; }
.a-brief { margin: 0 0 22px; padding: 0; list-style: none; counter-reset: b; }
.a-brief li { counter-increment: b; display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 18px; }
.a-brief li::before { content: counter(b); font-family: Georgia, serif; font-style: italic; font-size: 26px; color: var(--red); line-height: 1; }
.a-not { padding: 16px 20px; border: 1px dashed var(--mut); border-radius: 14px; margin-bottom: 26px; }
.a-not b { font-family: Georgia, serif; font-weight: 400; font-size: 19px; }
.a-not ul { margin: 8px 0 0; padding-left: 20px; } .a-not li { margin: 4px 0; }

/* вставки */
.a-box { margin: 26px 0; padding: 18px 22px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--red); transform: rotate(-.3deg); }
.a-box .small { margin: 0 0 4px; }
.a-box h4 { font-family: Georgia, serif; font-weight: 400; font-size: 19px; letter-spacing: .04em; margin: 0 0 8px; }
.a-box p:last-child { margin: 0; }
.a-box.main { border: 2px solid var(--red); transform: rotate(.4deg); }

/* таблицы: на телефоне листаются вбок */
.a-table { margin: 26px 0; }
.a-table figcaption { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--mut); margin-bottom: 8px; }
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); background: #fff; }
.a-table table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 14.5px; line-height: 1.45; }
.a-table th { text-align: left; font-weight: 600; background: #f6f0e7; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: bottom; }
.a-table td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.a-table td:first-child { font-weight: 600; }

/* списки */
.a-ul, .a-ol { margin: 0 0 18px; padding-left: 22px; } .a-ul li, .a-ol li { margin: 6px 0; }
.lead-in { font-weight: 600; }

/* ссылки на источники в тексте */
.cr { color: var(--red); text-decoration: none; border-bottom: 1px dotted rgba(226,88,74,.5); }
.cr:hover { border-bottom-style: solid; }
.a-refs { padding-left: 34px; font-size: 14.5px; }
.a-refs li { margin: 6px 0; scroll-margin-top: 90px; }
.a-refs li:target { background: rgba(226,88,74,.12); }
.a-refs a { color: var(--red); white-space: nowrap; }

/* термины: подсказка при наведении и по нажатию */
.term { border-bottom: 1.5px dotted var(--red); cursor: help; position: relative; }
.term:hover::after, .term:focus::after { content: attr(data-tip); position: absolute; left: 0; top: 100%; margin-top: 6px; z-index: 20; width: max-content; max-width: min(320px, 80vw);
  padding: 10px 12px; background: var(--ink); color: var(--paper); font: 400 14px/1.4 "Segoe UI", system-ui, sans-serif; border-radius: 10px; box-shadow: 0 10px 24px -12px rgba(0,0,0,.5); white-space: normal; }
.term:focus { outline: none; }
.a-gloss { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; margin: 14px 0 26px; }
.a-gloss div { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.a-gloss dt { font-family: Georgia, serif; font-size: 18px; color: var(--red); }
.a-gloss dd { margin: 2px 0 0; font-size: 15px; }

@media (max-width: 900px) {
  .aas .r-toc { max-height: none; overflow: visible; }
  .a-gloss { grid-template-columns: 1fr; }
  .a-brief li { font-size: 17px; }
}
