/* Catalog style "demo23" — tags add-on (loaded instead of _tags.css). */
/* "Suits a site for …" as the cover's legend: tags are white pills with a lime count badge; the
   active / agreed tag turns deep green with a lime count; on the covers they ride the shade as
   small glass pills. Mirrors /demo23/ like demo23.css. */

/* list page: a white tile row under the view pills */
.tagcloud { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 12px 0 0; padding: 12px 14px; border-radius: var(--r-big); background: var(--card); box-shadow: var(--lift); }
.tagcloud__title { margin: 0; padding: 7px 10px; background: var(--lime); color: var(--green); font: 800 12px/1 var(--font); letter-spacing: 0.16em; text-transform: uppercase; }
.tagcloud__list { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.tagcloud__item { min-width: 0; }
.tagcloud__link {
    display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 40px; padding: 6px 8px 6px 14px; border-radius: 999px;
    background: var(--white); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font: 700 14px/1.25 var(--font); text-decoration: none; overflow-wrap: anywhere;
    transition: background 200ms ease, color 200ms ease, box-shadow 200ms ease;
}
.tagcloud__link:hover { box-shadow: inset 0 0 0 2px var(--green); }
.tagcloud__link.is-active { background: var(--green); box-shadow: none; color: #fff; }
.tagcloud__count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--ground); color: var(--ink); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tagcloud__link.is-active .tagcloud__count { background: var(--lime); color: var(--green); }
.tagcloud__empty { margin: 0; color: var(--muted); font-size: 15px; }

.listing__tag { grid-column: 1; }
.listing__tag strong { padding: 2px 8px; border-radius: 6px; background: var(--lime); color: var(--green); font-weight: 800; }
.listing__tag a { color: var(--green); font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* covers: glass pills between the cover line and the actions */
.post__fits { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.post--card .post__fits { grid-row: 7; grid-column: 1 / -1; margin-top: 12px; }
.post__fit { min-width: 0; }
.post__fit a {
    display: inline-flex; align-items: center; max-width: 100%; min-height: 30px; padding: 4px 11px; border-radius: 999px;
    background: rgb(255 255 255 / 0.14); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.3); color: #fff; font: 700 13px/1.25 var(--font); text-decoration: none; overflow-wrap: anywhere;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background 200ms ease, color 200ms ease;
}
.post__fit a:hover { background: var(--lime); box-shadow: none; color: var(--green); }

/* post: a card like the comments, tags as tappable pills */
.fits { margin-top: clamp(20px, 2vw, 32px); padding: clamp(22px, 3vw, 40px); border-radius: var(--r-big); background: var(--card); box-shadow: var(--lift); }
.fits__title { margin: 0 0 10px; font: 900 clamp(30px, 3vw, 46px)/0.95 var(--font); letter-spacing: -0.045em; }
.fits__title::before { content: "Legend"; display: table; margin-bottom: 14px; padding: 6px 9px; background: var(--green); color: var(--lime); font: 800 11px/1 var(--font); letter-spacing: 0.16em; text-transform: uppercase; }
.fits__intro { max-width: 58ch; margin: 0 0 20px; color: var(--muted); }
.fits__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.fits__item { min-width: 0; max-width: 100%; }
.fits__vote { margin: 0; }
.fits__tag {
    display: inline-flex; align-items: center; gap: 10px; max-width: 100%; min-height: 48px; padding: 6px 8px 6px 18px; border: 0; border-radius: 999px;
    background: var(--white); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); font: 700 16px/1.25 var(--font); text-align: left; overflow-wrap: anywhere; cursor: pointer;
    transition: background 200ms ease, color 200ms ease, box-shadow 200ms ease, transform 150ms ease;
}
.fits__tag:hover { box-shadow: inset 0 0 0 2px var(--green); }
.fits__tag:active { transform: scale(0.97); }
.fits__tag.is-mine { background: var(--green); box-shadow: none; color: #fff; }
.fits__tag.is-mine::before { content: "✓"; margin-left: -6px; color: var(--lime); font-weight: 900; }
.fits__tag.is-mine:hover { background: var(--ink); }
.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(--ground); color: var(--ink); font-size: 13px; font-weight: 900; font-variant-numeric: tabular-nums; }
.fits__tag.is-mine .fits__count { background: var(--lime); color: var(--green); }
.fits__empty { margin: 0 0 22px; padding: 16px 18px; border-radius: var(--r-tile); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); }

.fits-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; padding-top: 20px; border-top: 1px solid var(--line); }
.fits-form__label { width: 100%; font: 800 12px/1.2 var(--font); letter-spacing: 0.14em; text-transform: uppercase; }
.fits-form__input {
    flex: 1 1 220px; min-width: 0; max-width: 400px; min-height: 50px; padding: 12px 16px; border: 2px solid transparent; border-radius: 999px;
    background: var(--white); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); font: 400 16px/1.4 var(--font); transition: border-color 200ms ease, box-shadow 200ms ease;
}
.fits-form__input::placeholder { color: #66756c; }
.fits-form__input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 4px rgb(200 240 106 / 0.75); }
.fits-form__submit { justify-content: center; min-height: 50px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--lime); color: var(--green); text-decoration: none; cursor: pointer; transition: background 200ms ease, transform 150ms ease; }
.fits-form__submit:hover { background: var(--lime-2); }
.fits-form__submit:active { transform: scale(0.97); }

@media (max-width: 420px) {
    .fits-form__input { flex-basis: 100%; max-width: none; }
    .fits-form__submit { flex: 1 0 100%; }
}
