/* Catalog style "demo21" — tags add-on (loaded instead of _tags.css). */
/*
 * "Suits a site for …" in the almanac: the cloud is a rail block of italic Fraunces entries with
 * their counts, like the demo's "coming up" list; on cards the tags are small italic notes; on the
 * post the tags are hairline pills that turn into the green "today" pill once you agree.
 * Mirrors /demo21/ like demo21.css.
 */

/* list page: the cloud in the rail */
.tagcloud { padding-top: 26px; padding-bottom: 28px; }
.tagcloud__list { display: grid; margin: 8px 0 0; padding: 0; list-style: none; }
.tagcloud__item { min-width: 0; border-bottom: 1px dotted var(--line-2); }
.tagcloud__item:last-child { border-bottom: 0; }
.tagcloud__link {
    display: flex; align-items: baseline; gap: 10px; min-height: 36px; padding: 7px 0 6px 10px; border-left: 2px solid transparent;
    font: 400 1.02rem/1.25 var(--serif); text-decoration: none; overflow-wrap: anywhere; transition: border-color 0.15s, color 0.15s;
}
.tagcloud__link:hover { border-left-color: var(--line-2); color: var(--green); }
.tagcloud__link.is-active { border-left-color: var(--green); color: var(--green); font-weight: 600; }
.tagcloud__count { margin-left: auto; font: italic 400 0.95rem/1 var(--serif); color: var(--muted); }
.tagcloud__empty { margin: 8px 0 0; font: italic 400 1rem/1.4 var(--serif); color: var(--muted); }
.listing__tag { margin: 10px 0 0; font: italic 400 1.1rem/1.4 var(--serif); color: var(--muted); }
.listing__tag strong { font-style: normal; font-weight: 600; color: var(--green); }
.listing__tag a { color: var(--ink); text-underline-offset: 3px; }

/* cards: italic notes before the counters */
.post--card .post__fits { order: 6; }
.post__fits { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0 0 10px; padding: 0; list-style: none; }
.post__fit { min-width: 0; }
.post__fit a { font: italic 400 0.95rem/1.35 var(--serif); color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.post__fit a::before { content: "◦ "; color: var(--green); }
.post__fit a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }

/* post: the tag block between the rating and the comments */
.fits { max-width: 820px; margin-top: 56px; padding-top: 14px; border-top: 1px solid var(--ink); }
.fits__title { margin: 0 0 8px; font: 400 clamp(28px, 2.6vw, 36px)/1.1 var(--serif); letter-spacing: -0.015em; }
.fits__intro { max-width: 58ch; margin: 0 0 18px; font: italic 400 1.08rem/1.45 var(--serif); 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: 44px; padding: 6px 8px 6px 16px;
    border: 1px solid var(--line-2); border-radius: 999px; background: rgb(255 255 255 / 0.45); color: var(--ink);
    font: 400 1.05rem/1.25 var(--serif); text-align: left; overflow-wrap: anywhere; cursor: pointer; transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.fits__tag:hover { border-color: var(--ink); background: #fbf9f4; }
.fits__tag:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.fits__count { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; background: var(--paper-2); font: italic 400 0.95rem/1 var(--serif); color: var(--muted); }
.fits__tag.is-mine { border-color: var(--green); background: var(--green); color: var(--paper); font-weight: 600; }
.fits__tag.is-mine::before { content: "✓"; font: 600 0.95rem/1 var(--sans); }
.fits__tag.is-mine .fits__count { background: rgb(243 239 230 / 0.18); color: var(--paper); }
.fits__tag.is-mine:hover { background: var(--green-2); }
.fits__empty { margin: 0 0 22px; font: italic 400 1.15rem/1.4 var(--serif); color: var(--muted); }

.fits-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; margin: 0; padding-top: 16px; border-top: 1px dotted var(--line-2); }
.fits-form__label { width: 100%; font: 600 0.7rem/1.3 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.fits-form__input {
    flex: 1 1 240px; min-width: 0; max-width: 380px; min-height: 44px; padding: 8px 2px; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
    background: transparent; color: var(--ink); font: 400 1.2rem/1.3 var(--serif);
}
.fits-form__input::placeholder { color: #7a7366; font-style: italic; }
.fits-form__input:focus { outline: none; border-bottom: 2px solid var(--green); background: rgb(31 77 58 / 0.06); }
.fits-form__submit {
    min-height: 44px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--green); color: var(--paper); text-decoration: none; cursor: pointer;
    font: 600 0.8rem/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase;
}
.fits-form__submit:hover { background: var(--green-2); color: var(--paper); }

@media (max-width: 1000px) {
    .tagcloud__list { display: flex; flex-wrap: wrap; gap: 0 22px; }
    .tagcloud__item { border-bottom: 0; }
    .tagcloud__link { padding-left: 0; border-left: 0; }
    .tagcloud__link.is-active { text-decoration: underline; text-underline-offset: 4px; }
    .tagcloud__count { margin-left: 0; }
}
