/* Catalog style "demo18" — tags add-on (loaded instead of _tags.css). */
/* tags: the deck's pills — the cloud is a paper strip in the page column above the deck (the fixed
   category pill keeps the bottom of the screen), on a post the tags ride in a deep pill track like
   the score scale; the agreed ones turn yellow */

/* list page: one strip under the style bar, in the same column as the deck */
.tagcloud { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; max-width: 1720px; margin: 0 auto; padding: 16px var(--edge) 0; }
.tagcloud__title { flex: none; margin: 0; font: 700 14px/1 var(--font); color: var(--green); }
.tagcloud__list { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.tagcloud__link {
    display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 8px 0 16px; border-radius: 999px;
    background: var(--paper); box-shadow: 0 1px 0 rgb(18 22 18 / 0.06); color: var(--ink); font: 500 15px/1.2 var(--font); text-decoration: none;
    transition: background 250ms ease, color 250ms ease;
}
.tagcloud__link:hover { background: var(--deep); color: #fff; }
.tagcloud__link.is-active { background: var(--deep); color: #fff; font-weight: 700; }
.tagcloud__count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: var(--ground); color: var(--soft); font: 700 12px/1 var(--font); }
.tagcloud__link:hover .tagcloud__count { background: rgb(255 255 255 / 0.14); color: #fff; }
.tagcloud__link.is-active .tagcloud__count { background: var(--yellow); color: var(--ink); }
.tagcloud__link:focus-visible { outline-color: var(--green); }
.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 under the counters, on paper and on deep slides */
.post__fits { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 16px; padding: 0; list-style: none; }
.post__fit a { display: inline-block; padding: 6px 11px; border-radius: 999px; background: var(--ground); color: var(--ink); font: 500 13px/1.2 var(--font); text-decoration: none; transition: background 250ms ease, color 250ms ease; }
.post__fit a::before { content: "#"; margin-right: 2px; color: var(--green); font-weight: 700; }
.post__fit a:hover { background: var(--deep); color: #fff; }
.post__fit a:hover::before { color: var(--yellow); }
.post--even .post__fit a { background: rgb(255 255 255 / 0.1); color: #f1f3ee; }
.post--even .post__fit a::before { color: var(--yellow); }
.post--even .post__fit a:hover { background: #fff; color: var(--ink); }
.post--even .post__fit a:hover::before { color: var(--green); }

/* post: a paper slide like the rating, the tags in a deep pill track */
.fits { margin-top: 56px; padding: clamp(24px, 3.4vw, 48px); border-radius: 22px; background: var(--paper); box-shadow: 0 24px 50px -30px rgb(15 42 26 / 0.45); }
.fits__title { margin: 0 0 12px; font: 900 clamp(34px, 3.8vw, 56px)/0.95 var(--font); letter-spacing: -0.045em; }
.fits__intro { max-width: 56ch; margin: 0 0 24px; color: var(--soft); }
.fits__list {
    display: flex; flex-wrap: wrap; gap: 2px; width: fit-content; max-width: 100%; margin: 0 0 28px; padding: 4px; list-style: none;
    border-radius: 26px; background: var(--deep); box-shadow: 0 10px 30px rgb(0 0 0 / 0.18);
}
.fits__vote { margin: 0; }
.fits__tag {
    display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 8px 0 18px; border: 0; border-radius: 999px;
    background: transparent; color: var(--on-deep); font: 500 16px/1.2 var(--font); text-align: left; cursor: pointer; transition: background 250ms ease, color 250ms ease;
}
.fits__tag:hover { background: rgb(255 255 255 / 0.1); color: #fff; }
.fits__tag.is-mine { background: var(--yellow); color: var(--ink); font-weight: 700; }
.fits__tag.is-mine::before { content: "✓"; font-weight: 900; }
.fits__tag.is-mine:hover { background: #fff; }
.fits__tag:focus-visible { position: relative; z-index: 1; outline: 3px solid #fff; outline-offset: 2px; }
.fits__count { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; background: rgb(255 255 255 / 0.12); color: #fff; font: 700 13px/1 var(--font); }
.fits__tag.is-mine .fits__count { background: var(--ink); color: var(--yellow); }
.fits__empty { margin: 0 0 24px; color: var(--soft); }
.fits-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 0; }
.fits-form__label { width: 100%; font: 700 14px/1.2 var(--font); color: var(--green); }
.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(--ground); box-shadow: inset 0 0 0 2px #cfd6cc; 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(--green); outline-offset: 3px; box-shadow: inset 0 0 0 2px var(--deep); }
.fits-form__submit { border: 0; cursor: pointer; background: var(--ink); color: #fff; }
.fits-form__submit:hover { background: var(--green); }

@media (max-width: 860px) {
    .tagcloud__title { width: 100%; }
    .fits__list { border-radius: 24px; }
    .fits-form__input { max-width: none; }
}
