/* Catalog style "demo20" — tags add-on (loaded instead of _tags.css): outline pills in the control column, green glow when agreed. Mirrors /demo20/. */
/*
 * List page: the tag cloud lives in the left control column under the sections menu, a list of
 * outline pills like the site's "Choose magazine" button; the active one turns solid green.
 * Cards: small "#tag" links under the counters. Post: a glass tile; each tag is a pill button
 * with a "+" dot, agreed (is-mine) = solid green with a yellow tick and glow.
 */

/* list page: the cloud */
.tagcloud { min-width: 0; }
.tagcloud__title { margin: 0 0 12px; padding-left: 4px; color: var(--yellow); font: 600 13px/1.2 var(--head); letter-spacing: 0.08em; text-transform: uppercase; }
.tagcloud__list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tagcloud__item { min-width: 0; max-width: 100%; }
.tagcloud__link {
    display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 36px; padding: 5px 6px 5px 14px; border: 1px solid var(--line-2); border-radius: 50px;
    color: var(--menu); font-size: 14px; line-height: 1.25; text-decoration: none; overflow-wrap: anywhere; transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.tagcloud__link:hover { border-color: var(--green-text); color: #fff; }
.tagcloud__link.is-active { border-color: var(--green-fill); background: var(--green-fill); color: #fff; font-weight: 700; }
.tagcloud__count { display: inline-grid; place-items: center; flex: none; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 50px; background: var(--tile-2); color: var(--mute); font-size: 12px; font-weight: 700; }
.tagcloud__link.is-active .tagcloud__count { background: var(--yellow); color: #18171a; }
.tagcloud__empty { margin: 0; padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: 16px; color: var(--mute); font-size: 14px; line-height: 1.5; }
.listing__tag { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 8px 6px 16px; border: 1px solid var(--line-2); border-radius: 50px; font-size: 15px; }
.listing__tag strong { color: var(--green-text); }
.listing__tag a { padding: 4px 12px; border-radius: 50px; background: var(--tile-2); color: var(--ink); font-size: 13px; text-decoration: none; }
.listing__tag a:hover { background: var(--green-fill); color: #fff; }

/* cards */
.post__fits { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: -4px 0 12px; padding: 0; list-style: none; }
.post__fit a { color: var(--green-text); font-size: 14px; text-decoration: none; }
.post__fit a::before { content: "#"; margin-right: 1px; color: var(--mute); }
.post__fit a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* post: the tag block */
.fits { margin-top: 44px; padding: 26px 28px; background: var(--tile); border: 1px solid var(--line); border-radius: var(--radius); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.fits__title { margin: 0 0 6px; color: var(--ink); font: 600 26px/1.2 var(--head); }
.fits__intro { max-width: 62ch; margin: 0 0 18px; color: var(--mute); }
.fits__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.fits__item { max-width: 100%; }
.fits__vote { margin: 0; }
.fits__tag {
    display: inline-flex; align-items: center; gap: 10px; max-width: 100%; min-height: 44px; padding: 6px 8px 6px 8px; border: 1px solid var(--line-2); border-radius: 50px;
    background: rgb(0 0 0 / 0.22); color: var(--ink); font: 400 15px/1.25 var(--text); text-align: left; overflow-wrap: anywhere; cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.fits__tag::before { content: "+"; display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: rgb(70 154 88 / 0.2); color: var(--green-text); font-weight: 700; line-height: 1; }
.fits__tag:hover { border-color: var(--green-text); }
.fits__tag.is-mine { border-color: var(--green-fill); background: var(--green-fill); color: #fff; font-weight: 700; box-shadow: 0 0 24px rgb(83 245 126 / 0.25); }
.fits__tag.is-mine::before { content: "✓"; background: var(--yellow); color: #18171a; font-size: 14px; }
.fits__tag.is-mine:hover { filter: brightness(1.1); }
.fits__tag:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.fits__count { display: inline-grid; place-items: center; flex: none; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 50px; background: var(--tile-2); color: var(--menu); font-size: 12px; font-weight: 700; }
.fits__tag.is-mine .fits__count { background: rgb(0 0 0 / 0.25); color: #fff; }
.fits__empty { margin: 0 0 22px; padding: 12px 16px; border: 1px dashed var(--line-2); border-radius: 14px; color: var(--mute); }
.fits-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; padding-top: 18px; border-top: 1px solid var(--line); }
.fits-form__label { width: 100%; color: var(--menu); font-size: 14px; font-weight: 700; }
.fits-form__input { flex: 1 1 220px; min-width: 0; max-width: 380px; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 50px; background: rgb(0 0 0 / 0.32); color: var(--ink); font: inherit; }
.fits-form__input::placeholder { color: rgb(255 255 255 / 0.5); }
.fits-form__input:focus { border-color: var(--green-text); outline: none; box-shadow: 0 0 0 3px rgb(83 245 126 / 0.22); }
.fits-form__submit { min-height: 44px; cursor: pointer; }

@media (max-width: 760px) {
    .fits { padding: 22px 18px; }
}
