/* Catalog style "demo6" — tags add-on (loaded instead of _tags.css). */
/* "Suits a site for …" as part of the contents ledger: paper pills in heavy Schibsted, an agreed tag goes ink with the yellow underbar of a picked rating; on the post it is a ledger section beside the pinned cover. Mirrors /demo6/ like demo6.css. */

/* list page: a line of pills under the category words */
.tagcloud { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 18px 0 0; }
.tagcloud__title { flex: none; margin: 0; font-size: 15px; font-weight: 700; color: var(--soft); }
.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: 8px; max-width: 100%; min-height: 40px; padding: 9px 16px; border-radius: 999px;
    background: var(--paper); color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere;
    transition: background 200ms ease, color 200ms ease, box-shadow 200ms ease;
}
.tagcloud__link:hover { background: #fff; box-shadow: inset 0 0 0 2px var(--ink); }
.tagcloud__link.is-active { background: var(--ink); color: var(--paper); box-shadow: inset 0 -4px 0 var(--yellow); }
.tagcloud__count { font-size: 14px; font-weight: 900; color: var(--green); font-variant-numeric: tabular-nums; }
.tagcloud__link.is-active .tagcloud__count { color: var(--yellow); }
.tagcloud__empty { margin: 0; color: var(--soft); font-size: 15px; }

.listing__tag strong { color: var(--ink); font-weight: 900; }
.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 paper pills in the words column, under the stats */
.post--card .post__fits { grid-column: 2; }
.post__fits { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; padding: 0; list-style: none; }
.post__fit { min-width: 0; }
.post__fit a {
    display: inline-flex; align-items: center; max-width: 100%; min-height: 30px; padding: 3px 12px; border-radius: 999px;
    background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 700; line-height: 1.25; text-decoration: none; overflow-wrap: anywhere;
    transition: box-shadow 200ms ease;
}
.post__fit a:hover { box-shadow: inset 0 0 0 2px var(--ink); }

/* post: a ledger section between the rating and the comments, in the words column next to the pinned shot */
.post--full .fits { grid-column: 1; grid-row: 6; }
.post--full .comments { grid-row: 7; }
.post--full .post__shot { grid-row: 1 / span 7; }
.post--full .post__nav { grid-row: 8; }

.fits { max-width: 70ch; margin-top: clamp(56px, 6vw, 88px); padding-top: 18px; border-top: 3px solid var(--ink); }
.fits__title { margin: 0 0 12px; font-size: clamp(30px, 3vw, 44px); font-weight: 900; line-height: 1; letter-spacing: -0.04em; }
.fits__intro { max-width: 56ch; margin: 0 0 22px; color: var(--soft); font-size: 17px; }
.fits__list { display: flex; flex-wrap: wrap; gap: 8px; 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: center; gap: 10px; max-width: 100%; min-height: 48px; padding: 8px 20px; border: 0; border-radius: 999px;
    background: var(--paper); color: var(--ink); font: 700 17px/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 { background: #fff; box-shadow: inset 0 0 0 2px var(--ink); }
.fits__tag:active { transform: scale(0.97); }
.fits__tag.is-mine { background: var(--ink); color: var(--paper); box-shadow: inset 0 -4px 0 var(--yellow); }
.fits__tag.is-mine::before { content: "✓"; font-weight: 900; color: var(--yellow); }
.fits__tag.is-mine:hover { background: var(--deep); }
.fits__tag:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.fits__count { font-size: 15px; font-weight: 900; color: var(--green); font-variant-numeric: tabular-nums; }
.fits__tag.is-mine .fits__count { color: var(--yellow); }
.fits__empty { margin: 0 0 24px; color: var(--soft); font-size: 18px; }

.fits-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 0; }
.fits-form__label { width: 100%; font-size: 15px; font-weight: 700; }
.fits-form__input {
    flex: 1 1 240px; min-width: 0; max-width: 380px; min-height: 50px; padding: 12px 20px; border: 2px solid var(--line); border-radius: 999px;
    background: #fff; color: var(--ink); font: 400 17px/1.4 var(--font); transition: border-color 200ms ease;
}
.fits-form__input::placeholder { color: #6a726b; }
.fits-form__input:hover { border-color: var(--soft); }
.fits-form__input:focus { outline: 3px solid var(--green); outline-offset: 2px; border-color: var(--ink); }
.fits-form__submit {
    justify-content: center; min-height: 50px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--ink); color: var(--paper);
    text-decoration: none; cursor: pointer;
}
.fits-form__submit:hover { background: var(--green); color: #fff; }
.fits-form__submit:active { transform: scale(0.97); }

@media (max-width: 1000px) {
    .post--full .fits, .post--full .comments, .post--full .post__shot, .post--full .post__nav { grid-column: 1; grid-row: auto; }
}
@media (max-width: 760px) {
    .post--card .post__fits { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    .tagcloud { gap: 8px; }
    .tagcloud__title { width: 100%; }
    .fits-form__input { flex-basis: 100%; max-width: none; }
    .fits-form__submit { flex: 1 0 100%; }
}
