/* Четиво: list (list.html) and article page (detail.html). Tokens come from gildiyata.css.
   Cover images: upload 1920x1080 (16:9). They show at most 960 css px wide, so 1920 is sharp on retina. */
.art { max-width: 960px; margin: 0 auto; padding: 8px 0 80px; }
.art-crumb { font-size: .82rem; color: var(--text-muted); padding: 16px 0 0; }
.art-crumb a:hover { color: var(--gold); text-decoration: none; }
.art-eyebrow { font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.art-head { margin: 0; padding: 20px 0 28px; display: flex; flex-direction: column; gap: 16px; }
.art-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.art-head h1 { font-family: var(--font-display); font-weight: 900; color: var(--white); letter-spacing: -.02em; line-height: 1.1; font-size: clamp(2rem, 5.5vw, 3.2rem); text-wrap: balance; }
.art-lede { font-size: 1.1rem; line-height: 1.6; color: var(--text-muted); max-width: 62ch; }
.art-byline { display: flex; align-items: center; gap: 12px; font-size: .85rem; color: var(--text-muted); }
.art-avatar { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--gold); background: var(--bg-card-2); color: var(--gold-light); display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.art-cover { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; aspect-ratio: 16/9; background: var(--bg-card); }
.art-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-cover__fallback { height: 100%; display: grid; place-items: center; font-size: 2.6rem; color: rgba(201,162,39,.25);
  background: radial-gradient(ellipse at 20% 10%, rgba(201,162,39,.25), transparent 60%), radial-gradient(ellipse at 90% 100%, rgba(192,57,43,.25), transparent 60%), var(--bg-card); }
.art-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; padding-top: 36px; }
.art-layout:not(:has(.art-toc)) { grid-template-columns: minmax(0, 680px); justify-content: center; }
.art-toc { position: sticky; top: calc(var(--topbar-h) + 24px); align-self: start; font-size: .82rem; }
.art-toc .art-eyebrow { display: block; margin-bottom: 10px; }
.art-toc a { display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--border); color: var(--text-muted); }
.art-toc a:hover { color: var(--white); text-decoration: none; }
.art-toc a.on { border-color: var(--gold); color: var(--white); }
.art-body { min-width: 0; }

/* Body typography */
.art-prose { font-size: 1.04rem; line-height: 1.8; color: #e6e6ee; }
.art-prose > * + * { margin-top: 1.2em; }
.art-prose h2, .art-prose h3 { font-family: var(--font-display); color: var(--white); letter-spacing: -.02em; line-height: 1.2; text-wrap: balance; scroll-margin-top: calc(var(--topbar-h) + 24px); }
.art-prose h2 { font-size: 1.7rem; margin-top: 2em; }
.art-prose h3 { font-size: 1.25rem; margin-top: 1.6em; }
.art-prose a { color: var(--gold-light); border-bottom: 1px solid var(--border-gold); }
.art-prose a:hover { text-decoration: none; border-color: var(--gold); }
.art-prose ul, .art-prose ol { padding-left: 1.3em; }
.art-prose li { margin-top: .4em; }
.art-prose li::marker { color: var(--gold); }
.art-prose blockquote { margin-top: 1.8em; padding: 4px 0 4px 22px; border-left: 3px solid var(--gold); font-family: var(--font-display); font-size: 1.35rem; line-height: 1.4; color: var(--white); }
.art-prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.2em 0; }
.art-prose code { background: var(--bg-card-2); border: 1px solid var(--border); border-radius: 4px; padding: .1em .35em; font-size: .88em; }
.art-prose pre { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; overflow-x: auto; }
.art-prose pre code { background: none; border: 0; padding: 0; }
.art-prose table { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; border: 1px solid var(--border); border-radius: 10px; font-size: .9rem; }
.art-prose th, .art-prose td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.art-prose th { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); background: var(--bg-card); }
.art-prose figure { margin-top: 2em; }
.art-prose img { max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); display: block; }
.art-prose figcaption { font-size: .8rem; color: var(--text-muted); margin-top: 8px; }
.art-prose .admonition { padding: 16px 18px; border-radius: 8px; border: 1px solid rgba(111,159,207,.3); border-left: 3px solid #6f9fcf; background: rgba(30,45,61,.35); font-size: .95rem; line-height: 1.65; }
.art-prose .admonition-title { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8fb7e0; margin: 0 0 4px; }
.art-prose .admonition.warning, .art-prose .admonition.danger { border-color: rgba(207,176,111,.3); border-left-color: #cfb06f; background: rgba(61,48,30,.35); }
.art-prose .admonition.warning .admonition-title, .art-prose .admonition.danger .admonition-title { color: #e0c487; }
.art-prose .admonition.tip { border-color: rgba(111,207,111,.3); border-left-color: #6fcf6f; background: rgba(30,61,30,.3); }
.art-prose .admonition.tip .admonition-title { color: #8fe08f; }

/* Hand-off cards, sources, more */
.art-handoff { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 24px; padding: 22px 24px; border-radius: 12px; border: 1px solid var(--border-gold); background: linear-gradient(135deg, rgba(30,10,10,.9), rgba(10,10,24,.9)); }
.art-handoff--tool { background: var(--bg-card); margin-top: 16px; }
.art-handoff h3 { font-family: var(--font-display); color: var(--white); font-size: 1.15rem; margin: 4px 0; }
.art-handoff p { color: var(--text-muted); font-size: .9rem; max-width: 46ch; }
.art-sources { margin-top: 2.4em; padding-top: 1.2em; border-top: 1px solid var(--border); font-size: .85rem; color: var(--text-muted); }
.art-sources ol { padding-left: 1.2em; margin-top: 8px; }
.art-sources a { color: var(--gold-light); }
.art-more { margin-top: 64px; }
.art-more h2 { font-family: var(--font-display); color: var(--white); font-size: 1.45rem; margin-bottom: 16px; }
.art-progress { position: fixed; left: 0; right: 0; top: var(--topbar-h); height: 3px; z-index: 90; }
.art-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #c9a227, #f0c040); }

@media (max-width: 900px) { .art-layout, .art-layout:not(:has(.art-toc)) { grid-template-columns: minmax(0, 1fr); } .art-toc { display: none; } }
@media (max-width: 680px) { .art-prose { font-size: 1rem; } .art-prose h2 { font-size: 1.45rem; } .art-prose blockquote { font-size: 1.15rem; } .art-handoff { padding: 18px; } }

/* ── List page: title, hero and filters use the full content width ── */
.chetivo-list { max-width: 1320px; padding-bottom: 80px; }
.chetivo-list .article-hero { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.chetivo-list .article-hero__thumb { position: relative; align-self: stretch; aspect-ratio: 16/9; background: var(--bg-card-2); }
.chetivo-list .article-hero__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.chetivo-list .article-hero__thumb--placeholder { position: absolute; inset: 0; min-height: 0; }
.chetivo-list .article-hero__body { padding: 40px 44px; }
.chetivo-list .article-hero__title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.chetivo-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
@media (max-width: 900px) { .chetivo-list .article-hero { grid-template-columns: 1fr; } .chetivo-list .article-hero__thumb { aspect-ratio: 16/9; } .chetivo-list .article-hero__body { padding: 24px; } }

/* Topic badge (primary) + article type (secondary) */
.article-card__badge--topic { background: rgba(201,162,39,.12); border-color: rgba(201,162,39,.3); color: var(--gold); }
.article-card__kind { font-size: .72rem; color: var(--text-muted); }

/* Filters: one panel, a labelled row per dimension */
.chetivo-filters { display: flex; flex-direction: column; gap: 12px; margin: 28px 0 28px; padding: 16px 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; }
.chetivo-filters .topic-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.chetivo-filters .topic-pills__label { flex: 0 0 52px; font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.chetivo-filters .topic-pill { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; font-size: .8rem; font-weight: 600; white-space: nowrap; border-radius: 100px; border: 1px solid var(--border); background: var(--bg-card-2); color: var(--text-muted); transition: color .15s, border-color .15s, background .15s; }
.chetivo-filters .topic-pill:hover { color: var(--white); border-color: var(--border-gold); text-decoration: none; }
.chetivo-filters .topic-pill--active { background: var(--gold); border-color: var(--gold); color: #14110a; }
.chetivo-filters .topic-pill--active:hover { color: #14110a; background: var(--gold-light); }
.chetivo-filters .topic-pills--sub { padding-left: 60px; margin: 0; border: 0; }
.chetivo-filters .topic-pills--sub .topic-pill { min-height: 30px; font-size: .75rem; }
.chetivo-filters .topic-pills--kind .topic-pill--active { background: rgba(201,162,39,.14); border-color: var(--gold); color: var(--gold-light); }

/* ── Phones ── */
@media (max-width: 680px) {
  .art { padding: 0 16px 56px; }
  .art-crumb { padding-top: 12px; }
  .art-head { padding: 14px 0 20px; gap: 14px; }
  .art-head h1 { font-size: 1.85rem; line-height: 1.15; }
  .art-lede { font-size: 1.02rem; }
  .art-byline { font-size: .8rem; align-items: flex-start; }
  .art-cover { border-radius: 12px; }
  .art-layout { padding-top: 24px; gap: 0; }
  .art-prose { line-height: 1.75; }
  .art-prose table { font-size: .82rem; }
  .art-prose th, .art-prose td { padding: 8px 10px; }
  .art-more { margin-top: 44px; }
  .chetivo-list { padding-left: 16px; padding-right: 16px; }
  .chetivo-list .page-header { padding: 24px 0 18px; margin-bottom: 20px; }
  .chetivo-list .article-hero { margin-bottom: 20px; border-radius: 12px; }
  .chetivo-list .article-hero__body { padding: 18px; }
  .chetivo-list .article-hero__title { font-size: 1.35rem; }
  .chetivo-filters { margin: 20px -16px 22px; padding: 14px 16px; border-radius: 0; border-left: 0; border-right: 0; }
  .chetivo-filters .topic-pills { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .chetivo-filters .topic-pills::-webkit-scrollbar { display: none; }
  .chetivo-filters .topic-pills__label { flex: none; margin-right: 2px; }
  .chetivo-filters .topic-pills--sub { padding-left: 16px; }
  .chetivo-grid { gap: 16px; }
}
