/* Catalog style "demo33" — tags add-on (loaded instead of _tags.css): tags as the sign-up form's role chips — outlined, green when chosen. Mirrors /demo33/. */
/*
 * List page: the tag cloud is step 2 of the promise column (a yellow "2" in a dark disc), its
 * tags are chips like the demo's gender / role chips; the active one is filled green. Cards:
 * small outlined chips under the counters. Post: a form card — the tags are chip buttons with a
 * "+" disc (agreed = green fill, tick), the add-a-tag row is a dark field with a green focus ring
 * and a green button beside it.
 */

/* list page: step 2 */
.tagcloud { position: relative; min-width: 0; margin: 30px 0 0; }
.tagcloud__title { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; color: rgb(255 255 255 / 0.88); font: 600 13px/1.2 var(--label); letter-spacing: 0.02em; }
.tagcloud__title::before {
    content: "2"; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2);
    color: var(--yellow); font: 600 12px/1 var(--label);
}
.tagcloud__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tagcloud__item { min-width: 0; max-width: 100%; }
.tagcloud__link {
    display: inline-flex; align-items: center; gap: 10px; max-width: 100%; min-height: 40px; padding: 4px 6px 4px 16px; border: 1px solid var(--line-strong); border-radius: 20px;
    color: rgb(255 255 255 / 0.84); font: 400 14px/1.25 var(--text); text-decoration: none; overflow-wrap: anywhere; transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.tagcloud__link:hover { border-color: rgb(255 255 255 / 0.42); color: #fff; }
.tagcloud__link.is-active { background: var(--green-fill); border-color: var(--green-fill); color: #fff; font-weight: 700; }
.tagcloud__count { display: inline-grid; place-items: center; flex: none; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--field); color: var(--yellow); font: 600 11px/1 var(--label); }
.tagcloud__link.is-active .tagcloud__count { background: rgb(0 0 0 / 0.25); color: #fff; }
.tagcloud__empty { max-width: 46ch; margin: 0; padding: 12px 16px; border: 1px dashed var(--line-strong); border-radius: var(--field-r); color: var(--muted); font-size: 14px; line-height: 1.5; }
.listing__tag strong { color: var(--yellow); font-weight: 700; }
.listing__tag a { color: var(--yellow); text-underline-offset: 4px; }
.listing__tag a:hover { color: #fff; }

/* cards: the most agreed tags */
.post__fits { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 16px; padding: 0; list-style: none; }
.post__fit a {
    display: inline-flex; align-items: center; min-height: 28px; padding: 2px 12px; border: 1px solid var(--line-strong); border-radius: 14px;
    color: rgb(255 255 255 / 0.84); font-size: 13px; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere;
}
.post__fit a:hover { background: var(--green-fill); border-color: var(--green-fill); color: #fff; }

/* post: the tag block as a form card */
.fits {
    margin-top: 56px; padding: 30px 32px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--card-r);
    box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.8);
}
.fits__title { display: flex; align-items: center; gap: 14px; margin: 0 0 10px; color: var(--ink); font: 700 32px/1.12 var(--serif); }
.fits__title::before {
    content: "#"; flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2);
    color: var(--yellow); font: 600 15px/1 var(--label);
}
.fits__intro { max-width: 62ch; margin: 0 0 22px; color: var(--soft); }
.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: 44px; padding: 6px 8px 6px 8px; border: 1px solid var(--line-strong); border-radius: 22px;
    background: transparent; color: rgb(255 255 255 / 0.86); font: 400 15px/1.25 var(--text); text-align: left; overflow-wrap: anywhere; cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.fits__tag::before { content: "+"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); color: var(--yellow); font: 600 15px/1 var(--label); }
.fits__tag:hover { border-color: rgb(255 255 255 / 0.45); color: #fff; }
.fits__tag.is-mine, .fits__tag[aria-pressed="true"] { background: var(--green-fill); border-color: var(--green-fill); color: #fff; font-weight: 700; }
.fits__tag.is-mine::before, .fits__tag[aria-pressed="true"]::before { content: "✓"; background: rgb(0 0 0 / 0.25); color: #fff; font-size: 13px; }
.fits__tag.is-mine:hover { background: var(--green-deep); }
.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; margin-left: 2px; padding: 0 8px; border-radius: 13px; background: var(--field); color: var(--yellow); font: 600 12px/1 var(--label); }
.fits__tag.is-mine .fits__count { background: rgb(0 0 0 / 0.25); color: #fff; }
.fits__empty { margin: 0 0 24px; padding: 12px 16px; border: 1px dashed var(--line-strong); border-radius: var(--field-r); color: var(--muted); }
.fits-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; padding-top: 22px; border-top: 1px dashed var(--line-strong); }
.fits-form__label { width: 100%; color: rgb(255 255 255 / 0.88); font: 600 13px/1.2 var(--label); letter-spacing: 0.02em; }
.fits-form__input {
    flex: 1 1 240px; min-width: 0; height: 50px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--field-r); background: var(--field);
    color: #fff; font: 400 16px/1.3 var(--text); transition: border-color 0.2s, box-shadow 0.2s;
}
.fits-form__input::placeholder { color: rgb(255 255 255 / 0.45); }
.fits-form__input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgb(70 154 88 / 0.5); }
.fits-form__submit {
    min-width: 120px; min-height: 50px; padding: 0 24px; border-radius: var(--field-r); background: var(--green-fill); color: #fff; font: 600 15px/1 var(--label);
    text-decoration: none; transition: background 0.2s;
}
.fits-form__submit:hover { background: var(--green-deep); color: #fff; }

@media (max-width: 600px) {
    .fits { padding: 22px 16px; border-radius: 18px; }
    .fits__title { font-size: 26px; }
    .fits-form__submit { flex: 1 1 100%; }
}
