/* TNW contextual Pretext / living-editorial enhancements */
.tnw-context-marker {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange, #E8481C);
  box-shadow: 0 0 0 0 rgba(232,72,28,.42);
  opacity: 0;
  transform: scale(.7);
  transition: left 220ms ease, top 220ms ease, opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
  z-index: 6;
}
.tnw-context-card {
  position: relative;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.tnw-context-card::after {
  content: attr(data-context-note);
  display: block;
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--orange, #E8481C);
  opacity: 0;
  transition: max-height 220ms ease, margin-top 220ms ease, opacity 160ms ease;
}
.tnw-context-card:hover,
.tnw-context-card.is-context-active {
  background: var(--cream-2, #EFE9D9);
  transform: translateY(-2px);
}
.tnw-context-card:hover::after,
.tnw-context-card.is-context-active::after {
  max-height: 64px;
  margin-top: 18px;
  opacity: 1;
}
.tnw-context-scope { position: relative; }
.tnw-context-scope.has-context-marker .tnw-context-marker { opacity: 1; transform: scale(1); }
.tnw-context-hot {
  color: var(--orange, #E8481C);
  font-style: italic;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  cursor: help;
}
.post-card__excerpt[data-pretext-lines="true"] {
  min-height: calc(var(--tnw-lines, 3) * 1.55em);
}
.post-card__excerpt .tnw-excerpt-line {
  display: block;
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 160ms ease, transform 160ms ease;
}
.post-card:hover .post-card__excerpt .tnw-excerpt-line:nth-child(1) {
  color: var(--orange, #E8481C);
  transform: translateX(3px);
}
.post-content .tnw-context-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 4px;
  padding: 4px 9px 5px;
  border: 1px solid var(--rule, rgba(26,22,19,.18));
  border-radius: 999px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 10px;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--orange, #E8481C);
  background: var(--cream-2, #EFE9D9);
  vertical-align: middle;
}
.post-content .tnw-context-note::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange, #E8481C);
}
@media (max-width: 760px) {
  .tnw-context-card:hover { transform: none; }
  .tnw-context-card::after { max-height: none; margin-top: 14px; opacity: .9; }
  .tnw-context-marker { display: none; }
}
