/* ---------- articles (02.12.2026): /articles/ (content/article.list.tpl) and an article (content/article.item.tpl) ----------
   Loaded only by those two templates. Kanon tokens throughout: Forum for titles, Onest for text, no radii, hairlines.
   Every card is one link: the photo eases in, the title gets the site's drawn line, line after line (an inline span,
   so the line never runs past the last word). */

/* ===== card (the list and «Ещё статьи») ===== */
.a-card { display: flex; flex-direction: column; gap: var(--space-4); color: var(--ink); text-decoration: none; min-width: 0; }
.a-card__pic { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: var(--paper-2); }
.a-card__pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.a-card__body { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.a-card__title { font-family: var(--font-display); font-weight: var(--display-weight, 500); font-size: clamp(1.25rem, 1.1rem + .45vw, 1.5rem); line-height: 1.2; letter-spacing: -0.01em; text-wrap: pretty; }
.a-card__title > span {
	background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
	transition: background-size var(--dur) var(--ease);
}
.a-card__text { color: var(--ink-2); font-size: 1rem; line-height: 1.55; }
.a-card__text p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.a-card__text p + p { display: none; }
.a-card__more { align-self: flex-start; margin-top: var(--space-1); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); transition: color var(--dur) var(--ease); }
.a-card__more::after { content: ""; display: inline-block; width: 18px; height: 1px; margin-left: 10px; vertical-align: middle; background: currentColor; transition: width var(--dur) var(--ease); }
@media (hover: hover) {
	.a-card:hover .a-card__pic img { transform: scale(1.03); }
	.a-card:hover .a-card__title > span { background-size: 100% 1px; }
	.a-card:hover .a-card__more { color: var(--ink); }
	.a-card:hover .a-card__more::after { width: 30px; }
}
.a-card:focus-visible { outline: 1px solid var(--ink); outline-offset: 6px; }

/* ===== /articles/ ===== */
/* the head is a row on the same 7/5 grid as the newest article below: the title over the photo, the lead over the text */
.a-list__head {
	display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-4) var(--space-7); align-items: end;
	padding-bottom: var(--space-6); border-bottom: 1px solid var(--line);
}
.a-list__head .x-h1 { margin: 0; line-height: 1; }
.a-list__lead { margin: 0; max-width: 40ch; color: var(--ink-2); font-size: 1.1rem; line-height: 1.5; }
.a-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-8) var(--space-6); padding-top: var(--space-7); }
/* the newest article opens the page wide: photo on the left, text on the right */
.a-grid > .a-card:first-child {
	grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-7); align-items: center;
	padding-bottom: var(--space-8); border-bottom: 1px solid var(--line);
}
.a-grid > .a-card:first-child .a-card__title { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.6rem); line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance; }
.a-grid > .a-card:first-child .a-card__text { font-size: 1.1rem; max-width: 46ch; }
.a-grid > .a-card:first-child .a-card__text p { -webkit-line-clamp: 5; }
.a-grid > .a-card:first-child .a-card__body { gap: var(--space-4); }

@media (max-width: 1023px) {
	.a-list__head { grid-template-columns: minmax(0, 1fr); padding-bottom: var(--space-5); }
	.a-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-7) var(--space-5); padding-top: var(--space-6); }
	.a-grid > .a-card:first-child { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); padding-bottom: var(--space-7); }
}
@media (max-width: 640px) {
	.a-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-7); padding-top: var(--space-5); }
	.a-grid > .a-card:first-child { padding-bottom: 0; border-bottom: 0; }
	.a-grid > .a-card:first-child .a-card__text p { -webkit-line-clamp: 3; }
}

/* ===== article =====
   One centred axis: the head and the text column sit in the middle, the cover takes the full width.
   (Before 04.12 everything hung on the left edge and the cover shrank from max-height + aspect-ratio.) */
.a-art { display: grid; grid-template-columns: minmax(0, 1fr); }
.a-head { max-width: 920px; width: 100%; margin-inline: auto; padding-bottom: var(--space-7); text-align: center; }
.a-head .a-title, .a-head .a-lead { margin-inline: auto; }
.a-back { display: inline-flex; align-items: center; gap: 10px; margin-bottom: var(--space-5); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); text-decoration: none; transition: color var(--dur) var(--ease); }
.a-back::before { content: ""; width: 8px; height: 8px; border-left: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); margin-left: 2px; }
.a-back:hover { color: var(--ink); }
.a-head .a-title { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.4rem); line-height: 1.06; max-width: 22ch; margin-bottom: var(--space-5); text-wrap: balance; }
.a-lead { max-width: 60ch; color: var(--ink-2); font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); line-height: 1.5; }
.a-lead p + p { margin-top: .6em; }

/* full width always; the height is capped by the screen, so a wide window gets a wider crop, not a narrower picture */
.a-cover { margin: 0 0 var(--space-8); width: 100%; height: min(74svh, 50vw); overflow: hidden; background: var(--paper-2); }
.a-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* the text column: ~70 characters a line, centred; the display face for the headings, the site's hairlines for lists */
.a-body { max-width: 44rem; width: 100%; margin-inline: auto; font-size: 1.0625rem; line-height: 1.7; }
.a-body > :first-child { margin-top: 0; }
.a-body p { margin: 0; }
.a-body p + p { margin-top: 1em; }
.a-body h2 { font-family: var(--font-display); font-weight: var(--display-weight, 500); font-size: clamp(1.55rem, 1.2rem + 1vw, 2rem); line-height: 1.15; letter-spacing: -0.01em; margin: 1.9em 0 .6em; text-wrap: balance; }
.a-body h3 { font-family: var(--font-display); font-weight: var(--display-weight, 500); font-size: clamp(1.25rem, 1.1rem + .4vw, 1.45rem); line-height: 1.2; margin: 1.6em 0 .45em; }
.a-body h2 + h3 { margin-top: .9em; }
.a-body ul, .a-body ol { margin: 1em 0 0; padding: 0; list-style: none; }
.a-body li { position: relative; padding-left: 28px; }
.a-body li + li { margin-top: .55em; }
.a-body ul > li::before { content: ""; position: absolute; left: 2px; top: .85em; width: 12px; height: 1px; background: var(--ink); }
.a-body ol { counter-reset: a-ol; }
.a-body ol > li { counter-increment: a-ol; }
.a-body ol > li::before { content: counter(a-ol); position: absolute; left: 0; top: 0; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.a-body ul + p, .a-body ol + p { margin-top: 1em; }
.a-body a { color: var(--link, var(--ink)); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); transition: text-decoration-color var(--dur) var(--ease); }
.a-body a:hover { text-decoration-color: currentColor; }
.a-body strong { font-weight: 600; }
.a-fig { margin: 2.2em 0; }
.a-fig img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--paper-2); }
.a-fig + p, .a-fig + ul { margin-top: 0; }
/* on a wide screen the pictures in the text step out of the column a little */
@media (min-width: 1100px) { .a-fig { margin-inline: -8rem; } }
/* the last paragraph is where to buy: set apart by a hairline */
.a-body > p.a-shop { margin-top: 2.2em; padding-top: 1.4em; border-top: 1px solid var(--line); color: var(--ink-2); }

/* ===== «Ещё статьи» ===== */
.a-more { margin-top: var(--space-9); padding-top: var(--space-6); border-top: 1px solid var(--line-strong); }
.a-more__h { font-family: var(--font-display); font-weight: var(--display-weight, 500); font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); line-height: 1.1; margin-bottom: var(--space-6); }
.a-more__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
.a-more__all { display: inline-flex; align-items: center; gap: 12px; margin-top: var(--space-7); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.a-more__all::after { content: ""; width: 22px; height: 1px; background: currentColor; transition: width var(--dur) var(--ease); }
.a-more__all:hover::after { width: 34px; }

@media (max-width: 1023px) {
	.a-more__list { gap: var(--space-5); }
	.a-more__list .a-card__title { font-size: 1.15rem; }
}
@media (max-width: 640px) {
	.a-head { text-align: left; padding-bottom: var(--space-6); }
	.a-cover { margin-bottom: var(--space-6); margin-inline: calc(var(--gutter) * -1); width: auto; height: auto; aspect-ratio: 4 / 3; }
	.a-body { font-size: 1rem; line-height: 1.65; }
	.a-fig { margin-inline: calc(var(--gutter) * -1); }
	.a-more { margin-top: var(--space-8); }
	.a-more__list { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
}

@media (prefers-reduced-motion: reduce) {
	.a-card__pic img, .a-card__title > span, .a-card__more, .a-card__more::after, .a-back, .a-more__all::after { transition: none; }
}
