{% extends "base.html" %}
{% block title %}{{ item.title }} · ARGOS{% endblock %}
{% block content %}
{# data-item-id (ARG-207): drives feed-events.js's Dwell timer — the script
reads this attribute on DOMContentLoaded to know which item to attribute
the sendBeacon Dwell event to on visibilitychange/pagehide. #}
{# Back goes to the list the reader came from (``back_to``, from the
Referer — see app._detail_origin). #}
{% set from_portfolio = back_to | default('feed') == 'portfolio' %}
{{ '포트폴리오' if from_portfolio else '관측 피드' }}
{# The hero's view-transition name matches the feed card cover
(_macros.cover) so the cover morphs into this hero on navigation. #}
{% if item.image_url and item.image_url | is_favicon %}
{# image_url is attacker-controllable (crawled): escaped only, never CSS url(). #}
{{ item.source_url | domain }}
{% elif item.image_url %}
{# og:image is attacker-controllable (crawled): render via an HTML-escaped
rather than inline CSS url() to avoid CSS-context injection. #}
{% else %}
◎
{% endif %}
{% if item.category %}
{{ item.category.value }}
{% endif %}
{% if item.trust_score is not none %}
{% set pct = ((item.trust_score|float) * 100)|round(0)|int %}
{{ pct }}신뢰도
{% endif %}
{{ item.title }}
{% include "_detail_trust.html" %}
{% include "_detail_actions.html" %}
{% if item.summary %}
{{ item.summary }}
{% endif %}
{% if item.digest %}
{% for para in item.digest.split('\n\n') %}
{% if para.strip() %}
{% include "_detail_genealogy.html" %}
{# Stable wrapper so a detail-page status mutation can refresh this section
out-of-band (_detail_actions_oob.html) — its Keep-vs-non-Keep layout
depends on item.status, so the action bar alone going stale isn't enough
(codex P2). #}