/* Catalog style "demo9" — tags add-on (loaded instead of _tags.css). */
/* "Suits a site for …" as gallery labels: on the stone wall the tags are small floor-plan tiles in Newsreader, on the cards outlined label chips; in the charcoal room they are dark tiles and an agreed one turns gallery green with the yellow bar of a picked score. Mirrors /demo9/ like demo9.css. */

/* list page: a row of tiles under the floor plan */
.tagcloud { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin: 22px 0 0; }
.tagcloud__title { flex: none; margin: 0; font-family: var(--serif); font-size: 20px; font-weight: 400; }
.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: baseline; gap: 10px; max-width: 100%; min-height: 44px; padding: 9px 16px;
    background: var(--stone-2); color: var(--ink); font-family: var(--serif); font-size: 19px; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere;
    transition: background 300ms var(--ease), color 300ms var(--ease);
}
.tagcloud__link:hover { background: #bcb6ad; }
.tagcloud__link.is-active { background: var(--green); color: var(--green-ink); }
.tagcloud__count { font-family: var(--sans); font-size: 13px; color: var(--soft); font-variant-numeric: tabular-nums; }
.tagcloud__link.is-active .tagcloud__count { color: var(--green-soft); }
.tagcloud__empty { margin: 0; color: var(--soft); font-size: 15px; }

.listing__tag strong { font-family: var(--serif); font-size: 1.1em; font-weight: 500; color: var(--ink); }
.listing__tag a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.listing__tag a:hover { color: var(--brand); }

/* cards: outlined label chips under the stats */
.post__fits { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 10px; padding: 0; list-style: none; }
.post__fit { min-width: 0; }
.post__fit a {
    display: inline-flex; align-items: center; max-width: 100%; min-height: 28px; padding: 2px 9px; border: 1px solid rgb(29 28 31 / 0.32);
    color: var(--ink); font-size: 13px; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; transition: background 300ms var(--ease), border-color 300ms var(--ease);
}
.post__fit a:hover { background: var(--mat); border-color: var(--ink); }

/* post: in the words column between the rating plaque and the visitors' book, beside the hung shot */
.post--full .fits { grid-column: 2; grid-row: 6; }
.post--full .comments { grid-row: 7; }
.post--full .post__shot { grid-row: 2 / span 6; }
.post--full .post__nav { grid-row: 8; }

.fits { margin-top: clamp(48px, 6vw, 80px); padding-top: 16px; border-top: 1px solid rgb(230 229 227 / 0.2); }
.fits__title { margin: 0 0 12px; font-family: var(--serif); font-weight: 300; font-variation-settings: "opsz" 72; font-size: clamp(30px, 2.8vw, 44px); line-height: 1.05; letter-spacing: -0.015em; }
.fits__intro { margin: 0 0 22px; color: var(--charcoal-soft); font-size: 16px; line-height: 1.6; }
.fits__list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 28px; padding: 0; list-style: none; }
.fits__item { min-width: 0; max-width: 100%; }
.fits__vote { margin: 0; }
.fits__tag {
    display: inline-flex; align-items: baseline; gap: 10px; max-width: 100%; min-height: 48px; padding: 11px 18px; border: 0; border-radius: 0;
    background: var(--charcoal-2); color: var(--charcoal-ink); font-family: var(--serif); font-size: 20px; font-weight: 400; line-height: 1.25;
    text-align: left; overflow-wrap: anywhere; cursor: pointer; transition: background 300ms var(--ease), color 300ms var(--ease);
}
.fits__tag:hover { background: #3b3a3f; }
.fits__tag.is-mine { background: var(--green); color: var(--green-ink); box-shadow: inset 0 -4px 0 var(--yellow); }
.fits__tag.is-mine::before { content: "✓"; font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--yellow); }
.fits__tag.is-mine:hover { background: #26493a; }
.fits__tag:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.fits__count { font-family: var(--sans); font-size: 13px; color: var(--charcoal-soft); font-variant-numeric: tabular-nums; }
.fits__tag.is-mine .fits__count { color: var(--green-soft); }
.fits__empty { margin: 0 0 24px; font-family: var(--serif); font-size: 20px; color: var(--charcoal-soft); }

.fits-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 0; }
.fits-form__label { width: 100%; font-family: var(--serif); font-size: 19px; }
.fits-form__input {
    flex: 1 1 240px; min-width: 0; max-width: 360px; min-height: 48px; padding: 11px 14px; border: 1px solid rgb(230 229 227 / 0.4); border-radius: 0;
    background: var(--charcoal-2); color: var(--charcoal-ink); font: 400 16px/1.5 var(--sans); transition: border-color 200ms ease;
}
.fits-form__input::placeholder { color: #9d9890; }
.fits-form__input:hover { border-color: var(--charcoal-ink); }
.fits-form__input:focus { border-color: var(--charcoal-ink); outline: 2px solid var(--yellow); outline-offset: 2px; }
.fits-form__submit {
    justify-content: center; padding: 0 28px; border: 0; border-radius: 999px; background: var(--mat); color: var(--ink);
    text-decoration: none; cursor: pointer;
}
.catalog--post .fits-form__submit:hover { background: var(--yellow); color: var(--ink); }
.fits-form__submit:active { transform: scale(0.97); }

@media (max-width: 1100px) {
    .post--full .fits, .post--full .comments, .post--full .post__shot, .post--full .post__nav { grid-column: 1; grid-row: auto; }
}
@media (max-width: 520px) {
    .tagcloud__title { width: 100%; }
    .fits-form__input { flex-basis: 100%; max-width: none; }
    .fits-form__submit { flex: 1 0 100%; }
}
