/*
 * The news card (D39 layout: top row with outlet and buttons; the headline
 * with the image beside it, then a full-width 2-line summary; the outlets row on
 * merged stories), its buttons and the swipe feedback. The lead story's
 * extra rules are in lead.css.
 */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 10px 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
  touch-action: pan-y;
}
.card.selected { box-shadow: 0 0 0 3px var(--focus); }
.card.leaving { opacity: 0; transform: translateX(var(--leave, 0)); }

.card-top { display: flex; gap: 6px; align-items: center; }
.card-meta { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.85rem; color: var(--text-2); }
.card-body { display: flex; gap: 12px; align-items: flex-start; }
.card-text { flex: 1; min-width: 0; }
.card-img { width: 104px; height: 72px; margin: 6px 0 4px; object-fit: cover; border-radius: 10px; flex: none; background: var(--line); }
@media (max-width: 420px) { .card-img { width: 84px; height: 60px; } }

.avatar {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-grid; place-items: center;
  color: #fff; font-size: 0.75rem; font-weight: 700;
}
.chip { padding: 1px 8px; border-radius: 999px; background: var(--cream); color: var(--text); font-size: 0.75rem; }
.chip.big { background: var(--honey); color: #1a1a1a; font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.chip.big img { width: 14px; height: 14px; }

.card-title { margin: 6px 0 4px; font-size: 1.2rem; font-weight: 700; line-height: 1.35; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.card.read .card-title { color: var(--read); font-weight: 400; }

.card-summary { margin: 0; color: var(--text-2); font-size: 0.95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-summary.open { -webkit-line-clamp: unset; }
.more {
  display: block; margin: 0 auto; width: 44px; height: 28px; padding: 0;
  background: none; border: 0; border-radius: 8px; color: var(--text-2);
  font-size: 1.4rem; line-height: 1; cursor: pointer; transition: transform 0.15s ease;
}
.more::before {
  /* A chevron drawn with two borders, pointing down. */
  content: ""; display: inline-block; width: 10px; height: 10px;
  border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
}
.more:hover { background: var(--cream); }
.more.open { transform: rotate(180deg); }

/* The outlets row (D39): overlapping avatars and "N אתרים · השוו ניסוחים". */
.also { margin-top: 8px; font-size: 0.85rem; }
.outlets {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 10px 4px 12px;
  background: var(--cream); border: 0; border-radius: 999px; font: inherit; color: var(--text); cursor: pointer;
}
.outlets:hover { filter: brightness(0.97); }
.outlets[aria-expanded="true"] { box-shadow: inset 0 0 0 1.5px var(--honey); }
.stack { display: inline-flex; }
.stack .avatar { box-shadow: 0 0 0 2px var(--cream); }
.stack .avatar + .avatar { margin-inline-start: -6px; }
.avatar.more-count { background: var(--text-2); font-size: 0.65rem; width: auto; min-width: 22px; padding: 0 4px; border-radius: 11px; }
.outlets-text { font-weight: 600; }
.versions { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; font-size: 0.95rem; }
.versions li { display: flex; gap: 8px; align-items: flex-start; }
.versions li .avatar { flex: none; margin-top: 2px; }
.versions a { text-decoration: none; font-weight: 600; }
.versions a:hover { text-decoration: underline; }
.versions small { color: var(--text-2); display: block; }

.ltr { direction: ltr; text-align: left; }

.card-actions { display: flex; gap: 2px; flex: none; }
.icon-btn {
  min-width: 38px; min-height: 38px; border: 0; border-radius: 10px;
  display: inline-grid; place-items: center;
  background: transparent; color: var(--text-2); font-size: 1.1rem; cursor: pointer;
}
/* With a mouse the buttons stay quiet until the card is pointed at or
   focused (D39); on touch they stay as they are (no hover there). */
@media (hover: hover) and (pointer: fine) {
  .card-actions { opacity: 0.35; transition: opacity 0.15s ease; }
  .card:hover .card-actions, .card:focus-within .card-actions, .card.selected .card-actions { opacity: 1; }
}
.icon-btn:hover { background: var(--cream); color: var(--text); }
.icon-btn.on { color: var(--honey); }

.menu {
  position: absolute; inset-inline-end: 12px; top: 52px; z-index: 4;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.18); padding: 4px; min-width: 180px;
}
.menu button { display: block; width: 100%; text-align: start; padding: 10px 12px; background: none; border: 0; font: inherit; color: var(--text); cursor: pointer; border-radius: 8px; }
.menu button:hover { background: var(--cream); }

.affirmation { background: var(--cream); border-radius: var(--radius); padding: 14px; margin: 10px 0; text-align: center; }
.affirmation small { display: block; color: var(--text-2); margin-bottom: 4px; }
