/*
 * Shared bits of the case study and blog templates (Paper page
 * "Site · Case studies + Blog (templates)"): tag pills, filter chips,
 * the ink nav strip on light pages, and the whole-card link.
 * Loaded by /en/work, /en/work/<slug>, /en/blog (+ archives) and posts.
 */

[hidden] { display: none !important; }

/* ── Tag pills (11px caps) ─────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 14px;
  white-space: nowrap;
}
.pill--green { background: var(--emerald); color: var(--ink); }
.pill--ink { border-color: var(--chip-line-on-ink); color: var(--text-on-ink); }
.pill--ink-green { border-color: var(--chip-line-on-ink); color: var(--emerald); }
.pill--line { border-color: var(--line-input); color: var(--muted); }

/* ── Filter chips (links; the visual chip is 38px, the tap area 44px) ─ */
.fchip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 9px 17px;
  border: 1px solid var(--line-input);
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease, transform var(--dur-press) var(--ease-out);
}
.fchip::after { content: ''; position: absolute; inset: -3px 0; }
.fchip:active { transform: scale(0.97); }
.fchip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 600; }
.fchip__count { color: var(--muted); }
.fchip.is-active .fchip__count { color: var(--text-on-ink); }
@media (hover: hover) and (pointer: fine) {
  .fchip:not(.is-active):hover { border-color: var(--ink); }
}

/* ── Ink strip behind the fixed nav on pages with a light top ──────── */
.nav-strip { height: 104px; background: var(--ink); }

/* ── Whole-card link: the title link stretches over its card ───────── */
.stretch { position: relative; }
.stretch-link { color: inherit; text-decoration: none; }
.stretch-link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.stretch:has(.stretch-link:focus-visible) { outline: 3px solid var(--emerald); outline-offset: 3px; }
.stretch-link:focus-visible { outline: none; }

@media (max-width: 767px) {
  .fchip { padding: 8px 15px; }
  .nav-strip { height: 82px; }
}
