/* Catalog style "demo19" — tags add-on (loaded instead of _tags.css). */
/* tags: slot labels in a pill rail — the cloud stays in the page flow above the stack (never
   sticky), on cards the tags sit in the slot body, on a post they open their own rounded page
   between the score and the comments; the agreed ones go deep green with a yellow count */

/* list page: a pill rail under the numbered categories */
.tagcloud { position: static; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 18px 0 0; }
.tagcloud__title { margin: 0; font: 700 14px/1.2 var(--font); color: var(--green); }
.tagcloud__list { display: flex; flex-wrap: wrap; gap: 2px; min-width: 0; margin: 0; padding: 4px; list-style: none; border-radius: 26px; background: var(--paper); }
.tagcloud__link {
    display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 8px 0 16px; border-radius: 999px;
    color: var(--ink); font: 700 15px/1.2 var(--font); text-decoration: none; transition: background 250ms ease, color 250ms ease;
}
.tagcloud__link:hover { background: var(--ground); }
.tagcloud__link.is-active { background: var(--deep); color: #f1f3ee; }
.tagcloud__count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: var(--ground); color: var(--green); font: 900 12px/1 var(--font); font-variant-numeric: tabular-nums; }
.tagcloud__link.is-active .tagcloud__count { background: var(--yellow); color: var(--ink); }
.tagcloud__empty { margin: 0; color: var(--soft); font-size: 15px; }
.listing__tag strong { font-weight: 900; color: var(--ink); }
.listing__tag a { color: var(--green); font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.listing__tag a:hover { color: var(--ink); }

/* cards: small pills in the slot body, under the score */
.post__fits { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.post__fit a { display: inline-block; padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 2px #cfd6cc; color: var(--ink); font: 700 13px/1.2 var(--font); text-decoration: none; transition: background 250ms ease, color 250ms ease, box-shadow 250ms ease; }
.post__fit a:hover { background: var(--ink); color: #fff; box-shadow: none; }
.post--even .post__fit a { box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.25); color: #f1f3ee; }
.post--even .post__fit a:hover { background: #fff; color: var(--ink); }

/* post: its own rounded page in the stack (static, like the rating and comments) */
.fits { position: static; padding: clamp(28px, 5vw, 64px); border-radius: var(--radius); background: var(--paper); }
.fits__title {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 14px; margin: 0 0 16px; padding-top: 16px; border-top: 2px solid var(--ink);
    font: 900 clamp(34px, 4vw, 56px)/0.95 var(--font); letter-spacing: -0.045em;
}
.fits__title::before { content: "02" / ""; font-size: 0.4em; letter-spacing: 0; color: var(--green); font-variant-numeric: tabular-nums; }
.fits__intro { max-width: 56ch; margin: 0 0 26px; color: var(--soft); font-size: 18px; }
.fits__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; padding: 0; list-style: none; }
.fits__vote { margin: 0; }
.fits__tag {
    display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 10px 0 22px; border: 0; border-radius: 999px;
    background: var(--ground); color: var(--ink); font: 700 clamp(17px, 1.4vw, 20px)/1.2 var(--font); letter-spacing: -0.01em; text-align: left; cursor: pointer;
    transition: background 250ms ease, color 250ms ease, transform 500ms var(--ease);
}
.fits__tag:hover { background: #dce1d8; transform: translateY(-3px); }
.fits__tag.is-mine { background: var(--deep); color: #f1f3ee; }
.fits__tag.is-mine::before { content: "✓"; color: var(--yellow); font-weight: 900; }
.fits__tag.is-mine:hover { background: var(--green); }
.fits__tag:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.fits__count { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 9px; border-radius: 999px; background: var(--paper); color: var(--green); font: 900 14px/1 var(--font); font-variant-numeric: tabular-nums; }
.fits__tag.is-mine .fits__count { background: var(--yellow); color: var(--ink); }
.fits__empty { margin: 0 0 28px; color: var(--soft); font-size: 18px; }
.fits-form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; padding: clamp(20px, 3vw, 36px); border-radius: calc(var(--radius) - 8px); background: var(--deep); color: #f1f3ee; }
.fits-form :focus-visible { outline-color: var(--yellow); }
.fits-form__label { width: 100%; font: 700 14px/1.2 var(--font); color: var(--yellow); }
.fits-form__input { flex: 1 1 240px; max-width: 420px; min-width: 0; min-height: 48px; padding: 11px 20px; border: 0; border-radius: 999px; background: var(--paper); color: var(--ink); font: 400 17px/1.4 var(--font); }
.fits-form__input::placeholder { color: var(--soft); }
.fits-form__input:focus { outline: 3px solid var(--yellow); outline-offset: 3px; }
.fits-form__submit { border: 0; cursor: pointer; background: var(--yellow); color: var(--ink); }
.fits-form__submit:hover { background: #fff; color: var(--ink); }

@media (max-width: 640px) {
    .tagcloud__list { border-radius: 22px; }
    .fits-form__input { max-width: none; }
}
