/* ==========================================================================
   IPS — blog listing (/blog) + article (article.html)
   Loaded after system.css; the shared pieces (.phead, .fbar, .cards, .post-card,
   .empty, .pcta) live there and in extra.css.
   ========================================================================== */

/* ---------- Page transitions into the blog / an article ----------
   (a view transition is styled by the page being opened, so this covers every card morph that lands here)
   The morphing photo stays inside its frame: both snapshots are scaled with object-fit: cover, and while the
   box changes shape (16:10 card -> wide cover) the card photo would spill over its edges as a ghost copy. */
::view-transition-image-pair(ips-morph) { overflow: clip; border-radius: var(--radius); }

/* ---------- Listing ---------- */
/* the page title is longer than the other listings' one-word titles: give it a column more */
@media (min-width: 1025px) {
  .bl-head .phead__title { grid-column: 1 / span 9; }
  .bl-head .phead__aside { grid-column: 10 / span 3; }
}
.nw { white-space: nowrap; }
.bl { padding-bottom: var(--sec); }

/* the filter strip runs edge to edge; while the header is shown it sits right under it */
[data-page="blog"] .fbar {
  margin-left: calc(var(--pad) * -1); margin-right: calc(var(--pad) * -1); padding-left: var(--pad); padding-right: var(--pad);
  transition: top .7s var(--ease);
}
[data-page="blog"] .header:not(.is-hidden) ~ main .fbar { top: calc(var(--header-h) - 1px); }
.fbar .filter.is-zero { opacity: .45; }
[data-page="blog"] .fsearch input { -webkit-appearance: none; appearance: none; }
[data-page="blog"] .fsearch input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
/* phone-only parts of the search: the field's own result count + close, the button that opens it */
.fsearch__n, .fsearch__x, .fsearch-btn { display: none; }
@media (min-width: 761px) {
  [data-page="blog"] .fbar__tools { margin-left: auto; } /* stays on the right */
  [data-page="blog"] .fsearch input { width: clamp(200px, 18vw, 260px); }
}

/* tablets + phones: the topics are one swipeable row, softly faded on the side that has more */
@media (max-width: 1024px) {
  [data-page="blog"] .fbar { flex-wrap: nowrap; }
  [data-page="blog"] .fbar__group {
    flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    padding-top: 5px; padding-bottom: 5px; margin-top: -5px; margin-bottom: -5px; /* room for the keyboard focus ring */
  }
  [data-page="blog"] .fbar__group::-webkit-scrollbar { display: none; }
  [data-page="blog"] .fbar__group .filter { flex: none; }
  [data-page="blog"] .fbar__label { display: none; }
  [data-page="blog"] .fbar__tools { flex: none; flex-wrap: nowrap; }
  .fbar__group.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
  .fbar__group.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent 4px, #000 36px); mask-image: linear-gradient(90deg, transparent 4px, #000 36px); }
  .fbar__group.fade-l.fade-r {
    -webkit-mask-image: linear-gradient(90deg, transparent 4px, #000 36px, #000 calc(100% - 36px), transparent);
    mask-image: linear-gradient(90deg, transparent 4px, #000 36px, #000 calc(100% - 36px), transparent);
  }
}
@media (min-width: 761px) and (max-width: 1024px) {
  /* tablets are touch screens too: 44px targets */
  [data-page="blog"] .fbar__group .filter { height: 44px; }
  [data-page="blog"] .fsearch input { width: 200px; height: 44px; font-size: 15px; }
}

/* phones: one compact sticky line (about 64px) — topic chips + a search button that swaps the chips for the field */
@media (max-width: 760px) {
  [data-page="blog"] .fbar { position: sticky; gap: 8px; padding-top: 10px; padding-bottom: 10px; margin-bottom: 18px; }
  [data-page="blog"] .fbar__group { margin-left: calc(var(--pad) * -1); padding-left: var(--pad); } /* chips glide in from the screen edge */
  [data-page="blog"] .fbar__group .filter { height: 44px; min-height: 44px; padding: 0 15px; font-size: 14px; }
  [data-page="blog"] .fbar__tools { width: auto; gap: 0; }
  [data-page="blog"] .freset, [data-page="blog"] .fsearch { display: none; }
  /* the count lives on the chips and inside the open field; screen readers still hear the live total */
  [data-page="blog"] .fcount { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .fsearch-btn {
    display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 2px;
    background: var(--white); transition: border-color .3s var(--ease);
  }
  .fsearch-btn:active { border-color: var(--ink); }
  .fsearch-btn svg { width: 16px; height: 16px; }
  /* search open */
  [data-page="blog"] .fbar.is-search .fbar__group, [data-page="blog"] .fbar.is-search .fsearch-btn { display: none; }
  [data-page="blog"] .fbar.is-search .fbar__tools { flex: 1 1 auto; min-width: 0; }
  [data-page="blog"] .fbar.is-search .fsearch {
    display: flex; align-items: center; flex: 1 1 auto; width: auto; min-width: 0; height: 44px;
    border: 1px solid var(--ink); border-radius: 2px; background: var(--white);
  }
  [data-page="blog"] .fsearch svg { left: 13px; }
  /* 16px text: iOS doesn't zoom the page when the field takes focus */
  [data-page="blog"] .fsearch input { flex: 1 1 auto; width: auto; min-width: 0; height: 42px; padding: 0 6px 0 38px; border: 0; background: transparent; font-size: 16px; }
  .fsearch__n { display: block; flex: none; font-size: 12.5px; line-height: 1; color: var(--text-3); white-space: nowrap; }
  .fsearch__n:empty { display: none; }
  .fsearch__x { display: block; flex: none; position: relative; width: 42px; height: 42px; }
  .fsearch__x::before, .fsearch__x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.4px; background: currentColor; transform: translate(-50%, -50%) rotate(45deg); }
  .fsearch__x::after { transform: translate(-50%, -50%) rotate(-45deg); }
}

/* short screens (a phone held sideways): the bar scrolls away with the page instead of taking a third of the screen */
@media (max-width: 1024px) and (max-height: 520px) {
  [data-page="blog"] .fbar { position: relative; top: auto !important; }
}

/* featured (newest) post: image ~2/3 + text */
.bfeat { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; }
.bfeat__media { grid-column: 1 / span 8; aspect-ratio: 16 / 9; }
.bfeat__media img { transition: transform 1.4s var(--ease), opacity .9s var(--ease); }
.bfeat:hover .bfeat__media img { transform: scale(1.035); }
.bfeat__body { grid-column: 9 / span 4; align-self: stretch; display: flex; flex-direction: column; gap: 14px; padding: 2px 0 4px; }
.bfeat__title { font-weight: 500; font-size: clamp(24px, 2.45vw, 42px); line-height: 1.18; letter-spacing: -.005em; transition: color .4s; }
html[lang="ka"] .bfeat__title { line-height: 1.28; }
.bfeat:hover .bfeat__title { color: var(--slate); }
.bfeat__ex { color: var(--text-2); font-size: clamp(15px, 1.15vw, 17.5px); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.bfeat__go { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.bfeat__go .arr { width: 14px; height: 14px; flex: none; transition: transform .6s var(--ease); }
.bfeat:hover .bfeat__go .arr { transform: translate(3px, -3px); }
.bfeat .noimg { display: grid; place-items: center; }
.bfeat .noimg .logo-symbol { width: 40%; height: auto; }

.bfeat + .bl__grid { margin-top: clamp(28px, 3vw, 44px); padding-top: clamp(24px, 2.6vw, 40px); border-top: 1px solid var(--line); }

/* empty states */
.bl-empty { display: grid; justify-items: center; gap: 10px; }
.bl-empty__t { font-weight: 500; font-size: clamp(22px, 1.9vw, 30px); line-height: 1.25; color: var(--ink); }
.bl-empty__d { max-width: 480px; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.bl-empty .btn { margin-top: 14px; }

@media (max-width: 1180px) {
  .bfeat__media { grid-column: 1 / span 7; }
  .bfeat__body { grid-column: 8 / span 5; }
}
@media (max-width: 760px) {
  .bfeat__media { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
  .bfeat__body { grid-column: 1 / -1; gap: 10px; padding-top: 16px; }
  .bfeat__title { font-size: 25px; }
  .bfeat__ex { -webkit-line-clamp: 3; }
  .bfeat__go { min-height: 44px; padding-top: 0; }
  .bl-empty { padding-top: 48px; padding-bottom: 48px; }
  .bl-empty .btn { height: 44px; }
  /* card text reads at 15px on phones; small links get a 44px tap area without moving anything */
  .bl .post-card__ex, .arel .post-card__ex, .arail .post-card__ex { font-size: 15px; }
  .bl-head .crumbs a, .ahead .crumbs a, .ahead__meta a { padding: 12px 0; margin: -12px 0; }
}

/* ---------- Article: reading progress ---------- */
.aprog { position: fixed; left: 0; right: 0; top: 0; z-index: 61; height: 2px; pointer-events: none; transition: opacity .4s var(--ease); }
.aprog span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; will-change: transform; }
.menu-open .aprog { opacity: 0; }

/* ---------- Article: header ---------- */
.ahead { padding-top: calc(var(--header-h) + clamp(18px, 2.6vw, 44px)); }
.ahead .crumbs { margin-bottom: clamp(20px, 2.4vw, 34px); }
.ahead__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: clamp(14px, 1.5vw, 20px); color: var(--text-3); }
.ahead__meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.ahead__meta a { transition: opacity .3s var(--ease); }
.ahead__meta a:hover { opacity: .7; }
.ahead__title { max-width: 1180px; font-size: clamp(30px, 3.9vw, 64px); overflow-wrap: break-word; }
.ahead__dek { max-width: 820px; margin-top: clamp(16px, 1.8vw, 26px); font-size: clamp(18px, 1.45vw, 23px); line-height: 1.5; color: var(--text-2); }
html[lang="ka"] .ahead__dek { line-height: 1.6; }

/* ---------- Article: cover (framed like the project cover: 10px inset, rounded) ---------- */
.acover { padding: 0 10px; margin-top: clamp(28px, 3.4vw, 52px); }
.acover__media { width: 100%; aspect-ratio: 16 / 9; max-height: calc(var(--vh, 1vh) * 70); min-height: 280px; }
.acover__media img { position: absolute; left: 0; top: -6%; width: 100%; height: 112%; object-fit: cover; will-change: transform; transition: opacity .8s var(--ease); }
/* touch screens: no scroll-linked parallax, the photo simply fills its frame */
.acover--still .acover__media img { top: 0; height: 100%; will-change: auto; }
/* the photo fades in once loaded (over the card photo that holds the frame after a morph, or the light frame) */
.js .acover__media img:not(.is-loaded) { opacity: 0; }
.js .acover__media[data-reveal="img"] img { transition: opacity .8s var(--ease) 0s, transform 1.9s var(--ease) var(--d, 0s); }

/* ---------- Article: body grid (contents rail cols 1–3, reading column cols 4–9) ---------- */
.abody { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding-top: clamp(40px, 4.6vw, 76px); }
.atoc { grid-column: 1 / span 3; grid-row: 1 / span 3; }
.atoc__in { position: sticky; top: calc(var(--header-h) + 28px); max-width: 280px; transition: top .7s var(--ease); }
.header.is-hidden ~ main .atoc__in { top: 28px; }
.atoc__label { display: block; margin-bottom: 12px; color: var(--text-3); }
.atoc__nav { position: relative; border-left: 1px solid var(--line); }
.atoc__bar { position: absolute; left: -1px; top: 0; width: 2px; height: 0; background: var(--ink); opacity: 0; transition: transform .7s var(--ease), height .7s var(--ease), opacity .4s var(--ease); }
.atoc__list a { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 4px; padding: 7px 0 7px 16px; font-size: 14px; line-height: 1.45; color: var(--text-3); transition: color .4s var(--ease); }
.atoc__list a:hover { color: var(--text-2); }
.atoc__list a.is-active { color: var(--ink); }
.atoc__n, .atoc-m__list .atoc__n { font-family: var(--f-latin); font-size: 10.5px; line-height: 1; letter-spacing: .06em; padding-top: .5em; }
.atoc__copy { margin-top: 22px; }

/* copy-link / share buttons */
.ico { width: 15px; height: 15px; flex: none; }
[data-copy], [data-share] { gap: 10px; }
[data-copy] .ico--ok { display: none; }
[data-copy].is-done .ico--ok { display: block; }
[data-copy].is-done .ico--link { display: none; }

/* contents on tablets / phones: one "Contents" control above the text, unfolds in place */
.atoc-m { display: none; }
.atoc-m summary {
  display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 6px 0; list-style: none; cursor: pointer;
  font-size: 16px; font-weight: 500; -webkit-tap-highlight-color: transparent;
}
.atoc-m summary::-webkit-details-marker { display: none; }
.atoc-m summary::after {
  content: ""; width: 7px; height: 7px; margin: 0 6px 0 auto; border-right: 1.4px solid currentColor; border-bottom: 1.4px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .5s var(--ease);
}
.atoc-m[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.atoc-m__ico { width: 16px; height: 16px; flex: none; color: var(--text-3); }
.atoc-m__n { font-family: var(--f-latin); font-size: 11px; font-weight: 400; letter-spacing: .06em; color: var(--text-3); }
.atoc-m__list { padding-bottom: 10px; }
.atoc-m__list li + li { border-top: 1px solid var(--line-2); }
.atoc-m__list a { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px; align-content: center; min-height: 48px; padding: 9px 0; font-size: 15.5px; line-height: 1.45; color: var(--text-2); }
.atoc-m__list a.is-active { color: var(--ink); }
.atoc-m__list .atoc__n { padding-top: .45em; color: var(--text-3); }
/* a soft unfold where the browser can animate to "auto" (elsewhere it simply opens) */
@supports (interpolate-size: allow-keywords) {
  .atoc-m { interpolate-size: allow-keywords; }
  .atoc-m::details-content { height: 0; overflow: clip; transition: height .45s var(--ease), content-visibility .45s allow-discrete; }
  .atoc-m[open]::details-content { height: auto; }
  .atoc-m.no-anim::details-content { transition: none; }
}

/* ---------- Article: reading column ---------- */
/* cols 4–9 sit in the middle of the 12-column grid; on very wide screens the measure is capped and stays centred */
.prose { grid-column: 4 / span 6; justify-self: center; width: 100%; max-width: 760px; min-width: 0; font-size: 18px; line-height: 1.75; font-weight: 400; color: var(--ink); overflow-wrap: break-word; }
html[lang="en"] .prose { font-size: 18.5px; line-height: 1.7; }
.prose > * + * { margin-top: 1.15em; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 2.1em; font-weight: 500; font-size: clamp(24px, 1.9vw, 30px); line-height: 1.26; letter-spacing: -.005em; scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h3 { margin-top: 1.75em; font-weight: 500; font-size: clamp(19px, 1.4vw, 22px); line-height: 1.36; scroll-margin-top: calc(var(--header-h) + 24px); }
html[lang="ka"] .prose h2 { line-height: 1.34; }
html[lang="ka"] .prose h3 { line-height: 1.42; }
html[lang="en"] .prose h2, html[lang="en"] .prose h3 { font-family: var(--f-latin); font-weight: 600; letter-spacing: -.015em; }
.prose > h2 + *, .prose > h3 + * { margin-top: .6em; }
.prose strong, .prose b { font-weight: 600; }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: rgba(32, 45, 71, .32); transition: color .3s var(--ease), text-decoration-color .3s var(--ease); }
.prose a:hover { color: var(--slate); text-decoration-color: currentColor; }

/* lists: brand parallelogram bullets, 01 02 03 numbers */
.prose ul, .prose ol { display: grid; gap: .5em; }
.prose li { position: relative; padding-left: 30px; }
.prose ul > li::before { content: ""; position: absolute; left: 5px; top: .68em; width: 8px; height: 10px; background: var(--steel); clip-path: polygon(0 0, 100% 28%, 100% 100%, 0 72%); }
.prose ol { counter-reset: prose-ol; }
.prose ol > li { counter-increment: prose-ol; }
.prose ol > li::before { content: counter(prose-ol, decimal-leading-zero); position: absolute; left: 0; top: .6em; font-family: var(--f-latin); font-size: 11.5px; font-weight: 500; line-height: 1; letter-spacing: .04em; color: var(--text-3); }
.prose li > ul, .prose li > ol { margin-top: .5em; }
.prose li > p + p { margin-top: .5em; }

/* quote */
.prose blockquote { margin: 1.8em 0; padding: 2px 0 2px clamp(18px, 2vw, 28px); border-left: 2px solid var(--ink); font-size: 1.18em; line-height: 1.55; font-weight: 400; }
.prose blockquote p + p { margin-top: .6em; }
.prose blockquote cite, .prose blockquote footer { display: block; margin-top: .9em; font-size: 13px; font-style: normal; line-height: 1.45; color: var(--text-3); }

/* tables (wrapped by the page script so they can scroll sideways on phones) */
.prose__table { margin: 1.9em 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; min-width: 460px; border-collapse: collapse; font-size: 15px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: 12px 18px 12px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th:last-child, .prose td:last-child { padding-right: 0; }
.prose thead th { padding-top: 0; font-size: 13px; font-weight: 500; color: var(--text-3); border-bottom-color: var(--ink); }
.prose tbody th { font-weight: 500; }
.prose caption { caption-side: bottom; padding-top: 10px; text-align: left; font-size: 13px; color: var(--text-3); }

/* figures */
.prose figure { margin: 2em 0; }
.prose img { display: block; width: 100%; height: auto; object-fit: cover; border-radius: var(--radius); background: var(--mist-3); }
.prose img:not([width]) { aspect-ratio: auto 3 / 2; } /* placeholder box until a lazy image of unknown size loads */
@media (min-width: 761px) {
  /* portrait shots don't run the full column height: capped, kept at their own proportions */
  .prose .is-portrait img, .prose img.is-portrait { width: auto; max-width: 100%; height: min(calc(var(--vh, 1vh) * 76), 700px); }
}
.prose figcaption { margin-top: 12px; font-size: 13.5px; line-height: 1.55; color: var(--text-3); }
.prose hr { height: 1px; margin: 2.4em 0; border: 0; background: var(--line); }

/* "View project" after the text: at most two small buttons (thumbnail, label over the name, arrow); the thumbnail
   is the morph source, so it grows into the project cover */
.aproj { grid-column: 4 / span 6; justify-self: center; width: 100%; max-width: 760px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: clamp(32px, 3.4vw, 48px); }
.aproj--one { grid-template-columns: minmax(0, 380px); }
.aproj__a {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 7px 18px 7px 7px;
  border: 1px solid var(--line); border-radius: 2px; transition: border-color .4s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.aproj__a:hover, .aproj__a:active { border-color: var(--ink); }
.aproj__media { flex: none; width: 48px; height: 48px; border-radius: 1px; }
.aproj__media img { transition: opacity .9s var(--ease), transform 1.2s var(--ease); }
.aproj__a:hover .aproj__media img { transform: scale(1.08); }
.aproj__media.noimg { display: grid; place-items: center; }
.aproj__media.noimg .logo-symbol { width: 62%; height: auto; }
.aproj__t { flex: 1 1 auto; min-width: 0; display: grid; gap: 3px; }
.aproj__l { color: var(--text-3); }
.aproj__n { font-weight: 500; font-size: 15.5px; line-height: 1.32; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.aproj__a .arr { flex: none; width: 14px; height: 14px; transition: transform .6s var(--ease); }
.aproj__a:hover .arr { transform: translate(3px, -3px); }

/* end of the article: back to the blog, copy link / share */
.aend { grid-column: 4 / span 6; justify-self: center; width: 100%; max-width: 760px; display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: clamp(36px, 4vw, 56px); padding-top: 14px; border-top: 1px solid var(--line); }
.aproj + .aend { margin-top: clamp(28px, 3vw, 40px); }
.aend__back { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; font-weight: 500; }
.aend__back .ico { width: 14px; height: 14px; transition: transform .6s var(--ease); }
.aend__back:hover .ico { transform: translateX(-4px); }
/* desktop: "copy link" already sits under the sticky contents column, so the end row keeps only "all articles" */
@media (min-width: 1025px) { .aend__copy { display: none; } }

/* ---------- Article: related posts + contact row ---------- */
.acta { padding-top: var(--sec-tight); padding-bottom: var(--sec-tight); }
.arel + .acta { padding-top: 0; }
.anf__btn { margin-top: 18px; }
.rail-dots { display: none; }

/* ---------- Article: responsive ---------- */
@media (max-width: 1180px) {
  .prose, .aproj, .aend { grid-column: 4 / span 8; }
}
@media (max-width: 1024px) {
  .atoc { display: none; }
  .atoc-m { display: block; margin-bottom: 30px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .atoc-m, .prose, .aproj, .aend { grid-column: 1 / -1; justify-self: start; width: 100%; max-width: 720px; }
}
/* tablets: related cards two in a row, never a lonely third */
@media (min-width: 761px) and (max-width: 1024px) {
  .arail > :nth-child(3):last-child { display: none; }
}

/* phones: a calm reading column (17px, ~40 characters a line), edge-to-edge figures and tables, swipeable related rails */
@media (max-width: 760px) {
  .ahead__title { font-size: clamp(28px, 8vw, 32px); }
  html[lang="ka"] .ahead__title { line-height: 1.18; }
  .ahead__dek { font-size: 17px; line-height: 1.55; }
  .acover { padding: 0 6px; }
  .acover__media { aspect-ratio: 4 / 3; max-height: none; min-height: 0; }
  .abody { padding-top: 26px; }
  .atoc-m { margin-bottom: 26px; }

  .prose { font-size: 17px; line-height: 1.72; }
  html[lang="en"] .prose { font-size: 17.5px; line-height: 1.66; }
  .prose > * + * { margin-top: 1.05em; }
  .prose h2 { margin-top: 1.95em; font-size: 23px; }
  .prose h3 { margin-top: 1.6em; font-size: 19.5px; }
  .prose > h2 + h3 { margin-top: .9em; }
  .prose ul, .prose ol { gap: .75em; }
  .prose li { padding-left: 25px; }
  .prose ul > li::before { left: 3px; }
  .prose blockquote { margin: 1.6em 0; padding-left: 16px; font-size: 1.1em; }

  /* figures run edge to edge, the caption stays on the text line */
  .prose figure { margin: 1.8em calc(var(--pad) * -1); }
  .prose figure img { border-radius: 0; }
  .prose figcaption { padding: 0 var(--pad); font-size: 14px; }

  /* tables: edge to edge, scroll sideways inside their own box; the first column stays pinned, a fade shows there is more */
  .prose__table { margin: 1.7em calc(var(--pad) * -1); }
  .prose__table.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
  .prose table { min-width: 640px; border-collapse: separate; border-spacing: 0; }
  .prose th, .prose td { min-width: 168px; } /* a property reads in two or three lines, not five */
  .prose th:first-child, .prose td:first-child { position: sticky; left: 0; z-index: 1; min-width: 150px; padding-left: var(--pad); background: var(--paper); }
  .prose th:last-child, .prose td:last-child { padding-right: var(--pad); }
  .prose__table.fade-l th:first-child, .prose__table.fade-l td:first-child { box-shadow: 12px 0 14px -14px rgba(20, 28, 45, .45); }

  /* "View project": full-width rows, one under the other */
  .aproj, .aproj--one { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 34px; }
  .aproj__a { padding-right: 16px; }
  .aproj__n { font-size: 15px; }
  .aend { gap: 12px; padding-top: 10px; }
  .aproj + .aend { margin-top: 26px; }
  .aend .btn { height: 44px; }

  /* related posts: a swipeable rail with dots (as on the home page) */
  .arail {
    display: flex; grid-template-columns: none; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    scroll-padding-left: var(--pad); gap: 10px; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad) 4px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .arail::-webkit-scrollbar { display: none; }
  .arail > * { flex: 0 0 82%; min-width: 0; scroll-snap-align: start; }
  .rail-dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
  .rail-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--mist-2); transition: background-color .3s, transform .3s var(--ease); }
  .rail-dots i.is-on { background: var(--ink); transform: scale(1.25); }
  /* related blocks: the title, the rail, then the "all ..." link under it (the cards come up sooner) */
  .arel { display: flex; flex-direction: column; }
  .arel .sec-head { display: contents; }
  .arel .sec-head__title { order: 1; margin-bottom: 20px; }
  .arel .arail { order: 2; }
  .arel .rail-dots { order: 3; }
  .arel .sec-head__aside { order: 4; align-self: flex-start; margin-top: 24px; }
  .arel .sec-head .btn { height: 44px; }
  .acta .pcta__text { grid-column: 1 / -1; }
}

/* ---------- Article: not found ---------- */
.anf:last-child { padding-bottom: var(--sec); } /* no posts to suggest below */
