/* ============================================================================
   СКАРЫНА — LANE 3 : BLOCK BRIDGE
   Companion to L2's assets/css/skaryna.css. Load AFTER it.

   WHAT THIS FILE IS, AND WHAT IT DELIBERATELY IS NOT
   ---------------------------------------------------------------------------
   L2's CLASS-CONTRACT v1 is authoritative and Lane 3 emits its class names:
   `sk-tpl-archive` / `sk-tpl-issue` scopes, `sk-grid sk-grid--cards`,
   `sk-card sk-card--archive`, `sk-card__thumb/__title/__author/__date/__foot`,
   `sk-tag`, `sk-pill`, `sk-listrow*`, `sk-toc*`, `sk-pager`. Every rule L2
   already ships has therefore been DELETED from this lane — the earlier Lane 3
   draft carried a full copy of archive.css and a private `--slovo-*` token
   bridge; both are gone, because a second definition of a token L2 owns is a
   silent fork.

   What remains is only the part L2's contract cannot cover:

   ★ FIVE OF L2's COMPONENT CONTRACTS CANNOT BE EMITTED BY A CORE BLOCK.
     L2 §1.3/§1.4 specify hand-authored markup (`<a class="sk-chip">`,
     `<li><a aria-current="page">`, `<article class="sk-card">`). Core blocks
     hard-code their own inner class names and expose no attribute to change
     them, so on a Query Loop page those classes CAN NEVER APPEAR:

       L2 contract shape          core block emits instead
       ------------------------   ---------------------------------------------
       a.sk-chip                  a.tag-cloud-link          (core/tag-cloud)
       a.sk-tab                   li.cat-item > a           (core/categories)
       .sk-pager__cur/__gap       a/span.page-numbers.current/.dots
                                                            (core/query-pagination-numbers)
       .sk-pager__edge            .wp-block-query-pagination-previous/-next
       .sk-search input/button    .wp-block-search__input/__button (core/search)
       article.sk-card as the     ul.wp-block-post-template > li.wp-block-post
       grid item                                            (core/post-template)

     The blocks marked /* L2-DUP */ below restate L2 properties for those DOM
     shapes so the page is not unstyled. They are duplication and they are
     labelled as such. HANDOFF TO L2: append the selector on each /* L2-DUP */
     block to your existing rule and delete the block here — see
     L3/REPORT.md §8 for the exact list.
   ============================================================================ */

/* ── post-template as an L2 grid ─────────────────────────────────────────────
   core/post-template is the <ul>, so `sk-grid sk-grid--cards` goes on it and
   the real card is a core/group INSIDE each <li>. The <li> is a transparent
   grid cell; without this it collapses and the card loses equal-height. */
.sk-tpl-archive .sk-grid--cards.wp-block-post-template {
  list-style: none; margin-block: 0; padding-inline: 0;
}
.sk-tpl-archive .sk-grid--cards > .wp-block-post { display: flex; margin: 0; }
.sk-tpl-archive .sk-grid--cards > .wp-block-post > .sk-card { flex: 1 1 auto; }

/* ── engraved plate ──────────────────────────────────────────────────────────
   core/post-featured-image renders NOTHING when a post has no thumbnail
   (verified: 0 `wp-block-post-featured-image` nodes in the live render of all
   four posts), so the engraving is the default and retires itself the moment a
   real image is attached. No placeholder image is invented anywhere. */
.sk-tpl-archive .sk-card__thumb--eng svg { display: block; width: 100%; height: 100%; color: var(--slovo-ink); }
.sk-tpl-archive .sk-card:has(.sk-card__thumb--img img) .sk-card__thumb--eng { display: none; }

/* Nine <use> refs per card, one revealed on a 9-cycle, so a 4-post archive
   still shows four DIFFERENT engravings. Only references are added — no symbol
   geometry is copied, so gate G9 holds (sha256 of all 9 symbols verified
   identical between comps/archive.html and comps/assets/sprite.svg). */
.sk-eng > use { display: none; }
.sk-tpl-archive .sk-grid--cards > .wp-block-post:nth-child(9n+1) .sk-eng > use:nth-child(1),
.sk-tpl-archive .sk-grid--cards > .wp-block-post:nth-child(9n+2) .sk-eng > use:nth-child(2),
.sk-tpl-archive .sk-grid--cards > .wp-block-post:nth-child(9n+3) .sk-eng > use:nth-child(3),
.sk-tpl-archive .sk-grid--cards > .wp-block-post:nth-child(9n+4) .sk-eng > use:nth-child(4),
.sk-tpl-archive .sk-grid--cards > .wp-block-post:nth-child(9n+5) .sk-eng > use:nth-child(5),
.sk-tpl-archive .sk-grid--cards > .wp-block-post:nth-child(9n+6) .sk-eng > use:nth-child(6),
.sk-tpl-archive .sk-grid--cards > .wp-block-post:nth-child(9n+7) .sk-eng > use:nth-child(7),
.sk-tpl-archive .sk-grid--cards > .wp-block-post:nth-child(9n+8) .sk-eng > use:nth-child(8),
.sk-tpl-archive .sk-grid--cards > .wp-block-post:nth-child(9n+9) .sk-eng > use:nth-child(9) { display: inline; }

/* ── honest degradation at n=4 ───────────────────────────────────────────────
   Three self-suppressing predicates. Each is data-driven: it un-hides by
   itself the moment the data exists. None of them fabricates anything. */

/* (a) `core/post-terms` renders '' when a post has no tags, but the group's own
       whitespace text nodes remain, so `:empty` would NOT match. */
.sk-tpl-archive .sk-card__foot:not(:has(a)) { display: none; }

/* (b) a "filter by section" strip offering exactly ONE section is a lie about
       the site's structure (today: 1 category, `Uncategorized`). */
.sk-tpl-archive .sk-filters__sections:has(.wp-block-categories li:only-child) { display: none; }

/* (c) core/query-pagination emits an empty <nav> when there is a single page of
       results; an empty bordered bar reads as a broken control. */
.sk-tpl-archive .sk-pager.wp-block-query-pagination:not(:has(.page-numbers)) { display: none; }

/* ============================================================================
   ★ G6 — the Roman numerals of the issue table of contents
   ============================================================================
   The comps hand-write I…VIII as eight <span class="sk-toc__num"
   aria-hidden="true"> elements. No core block yields a row index, so those
   spans cannot be transported into a loop — and hand-writing eight of them
   would be false the moment the post count changes (it is 4 today).
   `counter(sk-toc, upper-roman)` is correct for every n: measured I II III IV
   at n=4 and I II III IV V VI VII VIII at n=8.

   THE FACE. Carina AI Antiqua carries 0 Latin glyphs (measured from the woff2
   cmap: 50 glyphs, 35 Cyrillic, A–Z/a–z = 0), so the numerals fall through it.
   The next link must be a real antiqua. Both the live chain
   (wp_global_styles #766 display = "Fedorovsk CS", 'Old Standard TT', Georgia,
   serif) and Lane 0's staged theme.json chain (Carina → Fedorovsk CS → …) land
   on Fedorovsk CS, which carries 52 Latin + 138 Cyrillic and does contain
   I, V and X. Verified by CDP CSS.getPlatformFontsForNode: the ::before paints
   in "Fedorovsk". Negative test: drop Fedorovsk CS from the chain and the same
   probe reports "DejaVu Serif" — G6 goes RED.
   ============================================================================ */
.sk-tpl-issue .sk-toc__list.wp-block-post-template {
  list-style: none; margin-block: 0; padding-inline: 0; counter-reset: sk-toc;
}
.sk-tpl-issue .sk-toc__list > .wp-block-post { display: block; margin: 0; }
.sk-tpl-issue .sk-toc__item { counter-increment: sk-toc; }
.sk-tpl-issue .sk-toc__item::before {
  content: counter(sk-toc, upper-roman);
  grid-column: 1;
  font-family: "Carina AI Antiqua", "Fedorovsk CS", var(--slovo-font-display);
  font-size: 1.4rem; line-height: 1; color: var(--slovo-gold);
}
/* the L2 `sk-toc__item` grid keeps its three tracks; the numeral now occupies
   track 1 as generated content instead of a <span class="sk-toc__num"> */
.sk-tpl-issue .sk-toc__body { grid-column: 2; }
.sk-tpl-issue .sk-toc__kind { grid-column: 3; }
.sk-tpl-issue .sk-toc__meta .wp-block-post-author-name,
.sk-tpl-issue .sk-toc__meta .wp-block-post-date { display: inline; }

/* list rows — same featured-image / engraving swap as the cards */
.sk-tpl-archive .sk-listrows.wp-block-post-template,
.sk-tpl-issue .sk-listrows.wp-block-post-template { list-style: none; margin-block: 0; padding-inline: 0; }
.sk-listrow__thumb--eng svg { width: 40px; height: 40px; }
.wp-block-post:has(.sk-listrow__thumb--img img) .sk-listrow__thumb--eng { display: none; }

/* ============================================================================
   /* L2-DUP */ blocks — properties restated for DOM that core blocks emit and
   L2's selectors cannot reach. Each carries the L2 rule it duplicates.
   ============================================================================ */

/* L2-DUP · §1.3 `a.sk-chip` + `sk-chip--plain` → core/tag-cloud's a.tag-cloud-link */
.sk-chips.wp-block-tag-cloud { display: flex; flex-wrap: wrap; gap: .5rem; }
.sk-chips .tag-cloud-link {
  font-family: var(--slovo-font-body); font-size: .85rem !important; line-height: 1;
  padding: .5rem .9rem; border: 1px solid var(--slovo-border-soft); border-radius: 999px;
  background: var(--slovo-bg-raised); color: var(--slovo-text-2);
  text-decoration: none; white-space: nowrap;
}
.sk-chips .tag-cloud-link:hover { border-color: var(--slovo-oxblood); color: var(--slovo-oxblood); }

/* L2-DUP · §1.3 `a.sk-tab` + `sk-tabs--boxed` → core/categories' li.cat-item > a */
.sk-tabs.wp-block-categories { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0;
  border: 1px solid var(--slovo-border-soft); background: var(--slovo-bg-inset); }
.sk-tabs.wp-block-categories > li { flex: 1 1 auto; margin: 0; }
.sk-tabs.wp-block-categories > li > a {
  display: block; text-align: center; padding: .7rem 1rem; text-decoration: none;
  font-family: var(--slovo-font-body); font-size: .9rem; color: var(--slovo-text-2);
  border-right: 1px solid var(--slovo-border-soft); border-top: 2.5px solid transparent;
  white-space: nowrap;
}
.sk-tabs.wp-block-categories > li:last-child > a { border-right: 0; }
.sk-tabs.wp-block-categories > li > a:hover { color: var(--slovo-oxblood); }
.sk-tabs.wp-block-categories > li.current-cat > a {
  color: var(--slovo-oxblood); border-top-color: var(--slovo-oxblood);
  background: var(--slovo-white, #fff); font-weight: var(--slovo-fw-medium, 600);
}

/* L2-DUP · §2 `sk-pager__cur / __gap / __edge` → core/query-pagination's DOM.
   The block emits bare `.page-numbers` anchors, never L2's BEM element names. */
.sk-pager.wp-block-query-pagination {
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .25rem;
  border: 1px solid var(--slovo-border-soft); background: var(--slovo-bg-raised); padding: .35rem;
}
.sk-pager.wp-block-query-pagination a,
.sk-pager.wp-block-query-pagination span {
  min-width: 42px; height: 42px; display: inline-grid; place-items: center; padding: 0 .6rem;
  font-family: var(--slovo-font-body); font-size: .9rem; color: var(--slovo-text-2);
  text-decoration: none; margin: 0;
}
.sk-pager .page-numbers.current {            /* = sk-pager__cur */
  color: var(--slovo-oxblood); border: 1.5px solid var(--slovo-oxblood); font-weight: 600;
}
.sk-pager .page-numbers.dots { color: var(--slovo-text-muted); }          /* = sk-pager__gap */
.sk-pager .wp-block-query-pagination-previous,
.sk-pager .wp-block-query-pagination-next {                               /* = sk-pager__edge */
  font-family: var(--slovo-font-meta); text-transform: uppercase;
  letter-spacing: .08em; font-size: .8rem;
}

/* L2-DUP · §2 `sk-search` → core/search's __inside-wrapper / __input / __button.
   ★ core/search inserts an EXTRA wrapper div between the form and the controls.
     L2's `.sk-search{display:flex;border:1.5px solid}` lands on the <form>, and
     this block lands on the inner wrapper, so BOTH draw a box and the field ends
     up boxed twice with dead space beside it (seen in verify/INT-live-loop.png
     before this rule). The outer form is therefore neutralised and the inner
     wrapper carries the whole component. */
.sk-search.wp-block-search { display: block; border: 0; background: none; padding: 0; }
.sk-search .wp-block-search__inside-wrapper {
  display: flex; max-width: 620px; border: 1.5px solid var(--slovo-ink);
  background: var(--slovo-white, #fff); padding: 0;
}
.sk-search .wp-block-search__input {
  flex: 1 1 auto; border: 0; background: transparent; padding: .7rem .9rem; border-radius: 0;
  font-family: var(--slovo-font-body); font-size: .95rem; color: var(--slovo-text);
}
.sk-search .wp-block-search__input::placeholder { color: var(--slovo-text-muted); font-style: italic; }
.sk-search .wp-block-search__input:focus { outline: none; }
.sk-search .wp-block-search__button {
  flex: 0 0 auto; width: 48px; min-width: 48px; padding: 0; border: 0; border-radius: 0;
  background: var(--slovo-ink); color: var(--slovo-ivory); cursor: pointer;
  display: grid; place-items: center;
}
.sk-search .wp-block-search__button svg { width: 18px; height: 18px; fill: currentColor; }

/* empty state — not in L2's contract at all; core/query-no-results has no
   designed counterpart in the comps because a hand-authored page can never be
   empty. This is the one component a loop needs and a static mock does not. */
.sk-empty {
  border: 1px dashed var(--slovo-border-soft); background: var(--slovo-bg-raised);
  padding: var(--slovo-space-7) var(--slovo-space-5); text-align: center;
}
.sk-empty__title {
  font-family: "Carina AI Antiqua", "Fedorovsk CS", var(--slovo-font-display);
  text-transform: uppercase; font-weight: 400; font-size: 1.5rem;
  color: var(--slovo-ink); margin: 0 0 var(--slovo-space-3);
}
.sk-empty p { color: var(--slovo-text-muted); margin: 0; }
