/* Comments on the cards of the Home feed (17 November 2026), drawn by views/feed-comments.js. Loaded after the clean layer, in
   its hand: Hedvig, the inks, hairlines, the lilac ring for focus.

   Under a card's actions: one quiet line when the post has comments ("View all N comments" and the newest one or two, each a
   small portrait, the name, a short cut of the words and when), and the box to write one when Comment was pressed (a field,
   then Cancel and Post with their words). Nothing here moves on its own: the line and the box arrive with a short fade, and
   not at all for a reader who asked for less motion. */

/* the line: it sits in the card's column, under the foot's actions. Since 18 November 2026 (the owner: this can look better)
   each comment is a soft bubble beside a larger portrait: the name and when on its first line, the words under them in two
   lines at most; a press on the bubble opens the post at its comments. Under them, only when there are more, "View all N
   comments" with its arrow. The words keep their order in the page (name, words, when), so a screen reader says them as before. */
html .fc-cm__line:empty { display: none; }
html .fc-cm__line { padding: 4px 0 22px; font-size: 14.5px; line-height: 1.45; color: var(--cl-ink-2); }
html .fc-cm__line.is-new { animation: fc-cm-in .32s var(--cl-out) both; }
html .fc-cm__list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
html .fc-cm__c { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 10px; cursor: pointer; transition: opacity .2s var(--cl-out); }
html .fc-cm__c.is-sending { opacity: .7; }
html .fc-cm__av { display: block; width: 32px; height: 32px; margin-top: 2px; }
html .fc-cm__av > * { display: grid; width: 32px !important; height: 32px !important; place-items: center; border-radius: 50%; font-size: 11.5px !important; font-weight: 400; object-fit: cover; }
html .fc-cm__ini { background: var(--cl-surface-2); color: var(--cl-ink-3); }
html .fc-cm__say { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 8px; row-gap: 2px; justify-self: start; max-width: 100%; margin: 0; padding: 9px 14px 10px; border-radius: 6px 16px 16px 16px; background: color-mix(in srgb, var(--cl-ink) 4.5%, var(--cl-surface)); transition: background-color .16s var(--cl-out); }
@media (hover: hover) { html .fc-cm__c:hover .fc-cm__say { background: color-mix(in srgb, var(--cl-ink) 7.5%, var(--cl-surface)); } }
html .fc-cm__name { grid-column: 1; grid-row: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--cl-ink); }
html a.fc-cm__name { border-radius: 4px; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; cursor: pointer; transition: text-decoration-color .15s var(--cl-out); }
html a.fc-cm__name:hover { text-decoration-color: currentColor; }
html .fc-cm__when { grid-column: 2; grid-row: 1; font-size: 12.5px; color: var(--cl-ink-4); white-space: nowrap; }
html .fc-cm__words { grid-column: 1 / -1; grid-row: 2; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; color: var(--cl-ink-2); }
/* "View all N comments": under the bubbles, in line with them, a quiet link with its arrow, which steps forward under the pointer */
html .fc .fc-cm__all { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; margin: 8px 0 0 34px; padding: 0 10px 0 8px; border-radius: 999px; font-size: 14px; color: var(--cl-ink-3); cursor: pointer; transition: color .16s var(--cl-out), background-color .16s var(--cl-out); }
html .fc .fc-cm__all > i { font-size: 16px; color: var(--cl-ink-4); transition: color .16s var(--cl-out), translate .2s var(--cl-out); }
html .fc .fc-cm__all > .fc-cm__go { font-size: 13px; }
html .fc .fc-cm__all:hover { background: var(--cl-hover); color: var(--cl-ink); }
html .fc .fc-cm__all:hover > i { color: var(--cl-ink-2); }
html .fc .fc-cm__all:hover > .fc-cm__go { translate: 2px 0; }

/* Comment, while its box is open under it, stays marked as pressed */
html .fc .fc-act[data-comments][aria-expanded="true"] { background: var(--cl-surface-2); color: var(--cl-ink); }

/* the box to write one: a portrait, the field, and under it Cancel and Post */
html .fc-cm__write { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 12px; padding: 4px 0 22px; }
html .fc-cm__write.is-arriving { animation: fc-cm-in .26s var(--cl-out) both; }
html .fc-cm__me { display: grid; width: 32px; height: 32px; margin-top: 7px; place-items: center; overflow: hidden; border-radius: 50%; background: var(--cl-surface-2); font-size: 12px; color: var(--cl-ink-2); }
html .fc-cm__box { min-width: 0; }
html .fc-cm__field { display: block; width: 100%; min-height: 46px; max-height: 168px; margin: 0; padding: 11px 16px; border: 1px solid var(--cl-line-2); border-radius: 16px; outline: 0; background: var(--cl-surface); box-shadow: none; resize: none; font: inherit; font-size: 16px; line-height: 22px; color: var(--cl-ink); box-sizing: border-box; transition: border-color .2s var(--cl-out), box-shadow .3s var(--cl-out); }
html .fc-cm__field:hover { border-color: var(--cl-line-3); }
html .fc-cm__field:focus { border-color: var(--cl-lilac); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cl-lilac) 16%, transparent); }
/* the box opens with the keyboard in it: its hint stays (index.html hides the hint of a focused field) */
html .fc-cm__field::placeholder, html .fc-cm__field:focus::placeholder { color: var(--cl-ink-4); opacity: 1; transform: none; }
html .fc-cm__acts { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 10px; }
html .fc .fc-cm__cancel { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14.5px; color: var(--cl-ink-2); cursor: pointer; transition: background-color .16s var(--cl-out), color .16s var(--cl-out); }
html .fc .fc-cm__cancel:hover { background: var(--cl-hover); color: var(--cl-ink); }
html .fc .fc-cm__send { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 18px 0 15px; border-radius: 999px; background: var(--cl-ink); font-size: 14.5px; color: var(--cl-surface); cursor: pointer; transition: background-color .18s var(--cl-out), color .18s var(--cl-out), scale .12s var(--cl-out); }
html .fc .fc-cm__send > i { font-size: 15px; }
html .fc .fc-cm__send:hover { background: color-mix(in srgb, var(--cl-ink) 84%, var(--cl-surface)); }
html .fc .fc-cm__send:active { scale: .97; }
/* nothing written yet: Post waits, quiet (a press puts the keyboard in the field) */
html .fc .fc-cm__send.is-empty, html .fc .fc-cm__send.is-empty:hover { background: var(--cl-surface-2); color: var(--cl-ink-3); }
html .fc :is(.fc-cm__all, .fc-cm__cancel, .fc-cm__send, a.fc-cm__name):focus-visible { outline: 2px solid var(--cl-lilac); outline-offset: 2px; }

@keyframes fc-cm-in { from { opacity: 0; translate: 0 -4px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { html .fc-cm__line.is-new, html .fc-cm__write.is-arriving { animation: none; } }
html.a11y-reduce-motion .fc-cm__line.is-new, html.a11y-reduce-motion .fc-cm__write.is-arriving { animation: none; }

/* the list view of Home (wide screens): no comments under the rows. Since 18 November 2026 (the owner: "en la vista de lista
   mejor que no se vean los comments porque ocupan mucho espacio") the list shows the posts alone; the count stays on the
   Comment button, and a press on it still opens the box to write one, under the whole row. The comments live in the Cards
   view and on the post's own page. */
@media (min-width: 1024px) {
  html[data-home-view="list"] #feed > article.feed-card.fc > .fc-cm { grid-column: 1 / -1; }
  html[data-home-view="list"] #feed .fc-cm__line { display: none; }
  html[data-home-view="list"] #feed .fc-cm__write { padding: 6px 0 14px; }
}

/* phones: the card's own margins, words of 15 at least, presses of 44; the field above the keyboard and the bar at the foot
   of the screen out of the way while the doctor types (views/feed-comments.js keeps the box in sight) */
@media (max-width: 1023.98px) {
  html .fc-cm__line { padding: 2px 0 18px; font-size: 15px; }
  html .fc .fc-cm__all { min-height: 44px; margin-top: 4px; font-size: 15px; }
  html .fc-cm__name { font-size: 14.5px; }
  html .fc-cm__when { font-size: 13px; }
  html .fc-cm__write { grid-template-columns: minmax(0, 1fr); padding: 2px 0 18px; }
  html .fc-cm__me { display: none; }
  html .fc .fc-cm__cancel, html .fc .fc-cm__send { height: 44px; font-size: 15px; }
  html.fc-cm-typing .mnav, html.fc-cm-typing #backTop { display: none !important; }
}
