/* ─────────────────────────────────────
   References — a pointer inside her words
   ─────────────────────────────────────

   ⭐ ONE MARK, SIX STATES, ONE PLACE. Every reference she can meet in prose —
   an entry, a person, the entry she is already on, a note not written yet, one
   that is no longer here, and the same thing inside the composer.

   ⛔ IT WAS FIVE STATES ACROSS TWO IMPLEMENTATIONS IN `main.css`, AND ONE OF
   THEM FAILED AA. `.wikilink-*` (from `core/wikilinks/render.py`) and
   `.entry-content a[href*="…"]` (from the picker's inserted anchors) painted the
   same object with duplicated rules. Both hardcoded rgba; neither used a token;
   there was no dark block at all.

   ⛔ AND A PERSON WAS PAINTED WITH THE SUCCESS COLOUR. `.wikilink-relationship`
   was `rgba(34, 197, 94, 0.1)` — `#22c55e`, `--success`, the green-tick family —
   with `color: var(--success-dark)`. `dark.css` §78 redefines `--success`,
   `--success-bg`, `--success-text` and `--success-border` but NOT
   `--success-dark`, so every person mention rendered `#15803d` on the reader's
   dark grounds: ~3.2:1 against `--surface-raised`, under the 4.5:1 floor. Live
   on every entry that named someone.

   ⭐ SO THE PILL IS GONE, AND THAT IS THE POINT. Background, padding, radius and
   `font-weight: 500` were decoration inside her sentences, and the grammar says
   *nothing for her words*. What is left is the least a mark can be and still say
   "this is a link": colour and a rule under it.

   ⭐ THE THREE SIGNALS, AND EACH CARRIES ONE FACT:
     · COLOUR  — sage means it goes somewhere.
     · THE DASH — a dashed rule means it does not.
     · WEIGHT  — full text colour is something AHEAD of her (not written yet);
                 receded is something BEHIND her (no longer there).
   Read together they need no legend, which is why "not linked yet" and "no
   longer in your journal" are two states and not one.

   ⚠️ AN ENTRY AND A PERSON SHARE ONE MARK, deliberately. They were two colours;
   in her own sentence the words already say which is which — a name or a title —
   and the destination is not worth a second hue inside her writing.

   ⚠️ TOKENS ONLY, so `themes/dark.css` carries the whole dark story and this
   sheet needs no dark block. Verified in both themes:
     --primary        5.53 light · 7.46–9.17 dark
     --text-color    14.66 light · 11.78–14.48 dark
     --text-secondary 7.82 light · 6.69–8.22 dark

   📐 docs/ideas/a-reference-that-is-not-in-her-words.md
      ("What a reference looks like in her words"). */

/* The shared shape. No box — a rule under the words, and nothing else. */
.wikilink,
.entry-content a[href*="/relationships/"],
.entry-content a[href*="/entries/"],
.prose a[href*="/relationships/"],
.prose a[href*="/entries/"],
.trix-content a[href*="/relationships/"],
.trix-content a[href*="/entries/"] {
    text-decoration-line: none;
    text-decoration-thickness: 0.1em;
    text-underline-offset: 0.18em;
    transition: color var(--duration-quick) var(--ease-out),
                text-decoration-color var(--duration-quick) var(--ease-out);
}

/* ── 1 + 2 · A live reference: an entry, or a person ──────────────────────
   Sage, with a rule under it in the same tone. Both syntaxes, both families. */
.wikilink-entry,
.wikilink-relationship,
.entry-content a[href*="/relationships/"],
.entry-content a[href*="/entries/"],
.prose a[href*="/relationships/"],
.prose a[href*="/entries/"] {
    color: var(--primary);
    text-decoration-line: underline;
}

.wikilink-entry:hover,
.wikilink-relationship:hover,
.entry-content a[href*="/relationships/"]:hover,
.entry-content a[href*="/entries/"]:hover,
.prose a[href*="/relationships/"]:hover,
.prose a[href*="/entries/"]:hover {
    color: var(--primary-dark);
}

/* ── 3 · The entry she is already on ──────────────────────────────────────
   Not a link, so it gets no rule: following it would go nowhere. */
.wikilink-self {
    color: var(--text-secondary);
    text-decoration-line: none;
    cursor: default;
}

/* ── 4 · A note not written yet ───────────────────────────────────────────
   ⭐ FULL TEXT COLOUR, because this is something AHEAD of her — an intention,
   not a loss. The dash says the destination is not there; the weight says it
   still could be. `render.py` emits this for an unresolved `[[Note]]`. */
.wikilink-unresolved {
    color: var(--text-color);
    text-decoration-line: underline;
    text-decoration-style: dashed;
    text-decoration-color: var(--text-muted);
    cursor: default;
}

/* ── 5 · No longer here ───────────────────────────────────────────────────
   ⛔ THE STATE THAT DID NOT EXIST, AND ITS ABSENCE SHIPPED A LIVE 404.
   Deleting a person is `person.delete()` and nothing else; no view rewrites
   stored `content_html`. So a picker-inserted
   `<a href="/relationships/…">@Fernanda</a>` stayed a styled link pointing at a
   `get_object_or_404`. The confirmed path — the one we want people using — had
   the worst outcome of the three syntaxes.

   ⚠️ `relationship_confirm_delete.html` is not the gap and must not change: it
   already promises *"Your entries are untouched. Every word stays exactly as you
   wrote it."* It is honest about WORDS and silent about LINKS, which is exactly
   how a dead link ends up looking alive. This state makes the promise true to
   look at as well.

   ⭐ RECEDED, because this is something BEHIND her. And no hover, no cursor, no
   action: offering to tidy it would invite her to edit a past entry to satisfy a
   broken pointer. The entry said what it said.

   ⚠️ Applied by `render_wikilinks` at render time to any anchor whose target no
   longer resolves for this user — both syntaxes, no migration, neither FK
   touched. */
.reference--gone {
    color: var(--text-secondary);
    text-decoration-line: underline;
    text-decoration-style: dashed;
    text-decoration-color: var(--text-muted);
    cursor: default;
}

/* ── 6 · The same reference, while she is still writing ───────────────────
   ⛔ THERE WAS NO `.trix-content a` RULE ANYWHERE IN `static/css/`, so a
   reference she had just picked inherited `a { color: var(--primary);
   text-decoration: none }` — sage text, no rule, nothing to distinguish it from
   the sentence around it. `editor-references.js` claims in its own header that a
   picked reference *"shows as an underlined link in the editor"*. It did not.

   ⭐ So writing and reading now agree: what she picks looks like what she will
   read back. ⚠️ Scoped to Pensio's own destinations on purpose — a URL she
   pastes into an entry is an ordinary link and keeps ordinary link behaviour. */
.trix-content a[href*="/relationships/"],
.trix-content a[href*="/entries/"] {
    color: var(--primary);
    text-decoration-line: underline;
}
