/* Blog: list, category, article, cards (port of proto/panel.css "блог", blog.html, article.html).
   The long-text base (.ih, .ig, .toc, .doc, tables) is in service.css. */

/* ---------- list ---------- */
.ih.bh h1 { margin-top: 8px; font-size: clamp(40px, 10.4vw, 88px); line-height: .98; font-weight: 600; letter-spacing: -.045em; }
.bh .lp2 { max-width: 34em; margin-top: 14px; font-size: 17px; line-height: 1.5; color: var(--tx-body); }
.blist { padding-top: 24px; }
.bcount { font-size: 13px; color: var(--tx2); }
.bempty { padding: 24px; border-radius: var(--r-card); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.bempty h2 { font-size: 24px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; }
.bempty p { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--tx-body); }
.bempty .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chips { display: flex; gap: 6px; margin-top: 24px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 10px; border-radius: var(--r-pill); font-size: 15px; color: var(--tx-body); background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.chips a .gl { width: 18px; height: 18px; color: var(--c, var(--tx2)); }
.chips a em { font-style: normal; font-size: 13px; color: var(--tx3); font-variant-numeric: tabular-nums; }
.chips a[aria-current="page"] { color: var(--tx); background: color-mix(in srgb, var(--c, #fff) 14%, transparent); box-shadow: inset 0 0 0 1.5px var(--tx); }
.chips a.all { padding-left: 14px; }
.pgn { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 32px; }
.pgn a, .pgn span { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: var(--r-ctl); font-size: 15px; font-variant-numeric: tabular-nums; color: var(--tx-body); }
.pgn a { background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line); }
.pgn a[aria-current="page"] { color: var(--bg); background: var(--tx); box-shadow: none; }
.pgn .gap { color: var(--tx3); }

/* ---------- card ---------- */
.ags { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; margin-top: 20px; }
.acard { --c: #8a93a6; position: relative; display: flex; flex-direction: column; border-radius: var(--r-card); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; transition: box-shadow .2s, background-color .2s; }
.acov { position: relative; height: 136px; overflow: hidden; background: radial-gradient(70% 90% at 80% 10%, color-mix(in srgb, var(--c) 34%, transparent), transparent 70%), var(--card); border-bottom: 1px solid var(--line); }
.acov .gl { position: absolute; right: 18px; top: 50%; width: 96px; height: 96px; transform: translateY(-50%); color: var(--c); }
.abody { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.abody .sn { font-size: 13px; font-weight: 600; color: var(--c); }
.abody h3 { margin-top: 6px; font-size: 20px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
.abody h3 a::after { content: ""; position: absolute; inset: 0; }
.abody p { margin-top: 8px; font-size: 15px; line-height: 1.45; color: var(--tx-body); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.abody .am { margin-top: auto; padding-top: 14px; font-size: 13px; color: var(--tx2); }
/* block heading with an "All articles" link (home) */
.bhd { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: 24px; row-gap: 4px; }
.bhd > h2 { font-size: 28px; line-height: 1.1; font-weight: 600; letter-spacing: -.03em; text-wrap: balance; }
.bhd a { display: inline-flex; align-items: center; max-width: 100%; min-height: 44px; font-size: 15px; color: var(--tx); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* ---------- article ---------- */
.stag { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 32px; margin-top: 4px; padding: 0 12px 0 8px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; color: var(--tx); background: color-mix(in srgb, var(--c, var(--sys)) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, var(--sys)) 40%, transparent); }
.stag .gl { width: 18px; height: 18px; color: var(--c, var(--sys)); }
.ih .ah1 { margin-top: 14px; font-size: 38px; line-height: 1.04; font-weight: 600; letter-spacing: -.035em; text-wrap: balance; overflow-wrap: break-word; }
.alead { max-width: 30em; margin-top: 16px; font-size: 20px; line-height: 1.35; font-weight: 500; letter-spacing: -.015em; color: var(--tx-body); text-wrap: pretty; }
.byl { display: flex; align-items: center; gap: 12px; margin-top: 20px; font-size: 13px; color: var(--tx2); }
.byl .av { flex: none; width: 40px; height: 40px; border-radius: var(--r-pill); background: var(--s2) url(../img/author-head-160.webp) center / cover; box-shadow: inset 0 0 0 1px var(--line2); }
.byl b { display: block; font-size: 15px; font-weight: 600; color: var(--tx); }
.byl b a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.byl .upd2 { display: block; }
.kor { padding: 18px 20px; border-radius: var(--r-card); background: color-mix(in srgb, var(--sys) 8%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sys) 30%, transparent); }
.doc .kor h2 { margin-top: 0; font-size: 13px; line-height: 1.3; font-weight: 600; letter-spacing: 0; color: var(--tx2); }
.kor ul { margin: 10px 0 0; padding-left: 20px; font-size: 15px; line-height: 1.5; color: var(--tx); }
.kor li + li { margin-top: 6px; }
.kor li::marker { color: var(--sys); }
.adoc > section { scroll-margin-top: 80px; }
.adoc > section > h2:first-child { margin-top: 0; }
.adoc > * + section { margin-top: 48px; }
.doc blockquote { margin: 28px 0 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--sys); }
.doc blockquote p { margin: 0; font-size: 20px; line-height: 1.4; font-weight: 500; letter-spacing: -.015em; color: var(--tx); }
.doc blockquote cite { display: block; margin-top: 10px; font-size: 13px; font-style: normal; color: var(--tx2); }
.fig { margin: 28px 0 0; padding: 16px; border-radius: var(--r-card); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.fig svg { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; }
.fig figcaption { margin-top: 12px; font-size: 13px; line-height: 1.4; color: var(--tx2); }
.doc .tw { margin-top: 16px; }
.doc .tw table { margin-top: 0; }
.tw caption { margin-bottom: 10px; text-align: left; font-size: 13px; color: var(--tx2); }
.adoc > .src { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--tx2); }
.doc .src h2 { margin-top: 0; font-size: 15px; letter-spacing: 0; color: var(--tx2); }
.src ol { margin: 12px 0 0; padding-left: 20px; }
.src li + li { margin-top: 6px; }
.aside .scta { display: none; }
/* the CoreTypes plate on phones (as on the result) */
.plate { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 16px; border-radius: var(--r-ctl); background: var(--s3); box-shadow: inset 0 0 0 1px var(--line2), 0 18px 34px -12px #000; font-size: 15px; font-weight: 500; line-height: 1.2; letter-spacing: -.012em; transform: translateY(calc(100% + 16px)); visibility: hidden; transition: transform .35s var(--ease), visibility .35s; }
.plate.on { transform: none; visibility: visible; }
.plate .btn { flex: none; min-height: 44px; padding: 0 16px; }

@media (max-width: 899px) {
  .doc .tw td { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
  .doc .tw td::before { content: attr(data-l); font-size: 13px; color: var(--tx2); }
}
@media (min-width: 900px) {
  .bh .lp2 { font-size: 20px; }
  .bempty { padding: 32px; } .bempty h2 { font-size: 28px; }
  .chips { flex-wrap: wrap; overflow: visible; }
  .acov { height: 156px; } .acov .gl { width: 112px; height: 112px; }
  .ags { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .bhd > h2 { font-size: 38px; }
  .ih .ah1 { font-size: 56px; max-width: 16em; }
  .alead { font-size: 24px; }
  .kor { padding: 22px 26px; }
  .doc blockquote p { font-size: 24px; }
  .fig { padding: 24px; }
  .adoc > * + section { margin-top: 64px; }
  .aside { position: sticky; top: 24px; display: grid; gap: 28px; align-self: start; }
  .aside .toc { position: static; }
  .toc a[aria-current] { color: var(--tx); box-shadow: inset 2px 0 0 var(--sys); margin-left: -1px; }
  .aside .scta { display: block; position: relative; overflow: clip; padding: 20px; border-radius: var(--r-card); background: var(--card); box-shadow: inset 0 0 0 1px var(--line2); }
  .scta::before { content: ""; position: absolute; left: 50%; bottom: -160px; width: 420px; height: 260px; transform: translateX(-50%); background: radial-gradient(50% 50% at 50% 50%, color-mix(in srgb, var(--sys) 50%, transparent), transparent 100%); pointer-events: none; }
  .scta > * { position: relative; }
  .scta h2 { font-size: 20px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; }
  .scta p { margin-top: 8px; font-size: 15px; line-height: 1.45; color: var(--tx-body); }
  .scta .btn { width: 100%; margin-top: 16px; white-space: normal; text-align: center; }
  .plate { display: none !important; }
  /* a table wider than the column scrolls inside its wrapper, never the page */
  .doc .tw { overflow-x: auto; }
}
@media (hover: hover) and (pointer: fine) {
  .acard:hover { background: var(--s2); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent); }
  .chips a:hover { background: rgba(255,255,255,.09); color: var(--tx); }
  .pgn a:hover { background: rgba(255,255,255,.1); color: var(--tx); }
  a.stag:hover { background: color-mix(in srgb, var(--c, var(--sys)) 22%, transparent); }
}
