/*
 * Icon system — Blueprint Phase E.3 (v0.21.3)
 *
 * Pensio inlines SVG icons via the {% icon %} template tag (see
 * core/templatetags/icons.py). Each rendered SVG carries a default
 * `icon` class plus optional `icon--sm` / `icon--lg` modifiers that
 * map to design tokens.
 *
 * The bare `.icon` class is intentionally minimal — kept as a CSS hook
 * for future per-context styling without changing the default sizing
 * (which still comes from the SVG's intrinsic width/height attributes,
 * 24px for most partials).
 */

/* ⛔ **A LINE ICON THAT LOSES ITS ATTRIBUTES MUST GO BLANK, NOT BLACK.**
 * The LINE family declares `fill="none" stroke="currentColor"` as attributes on
 * the partial, which is right — but attributes are the weakest source in the
 * cascade and, more importantly, they can be STRIPPED. Measured: Trix's own
 * HTML sanitizer keeps `class` and drops `viewBox`, `d`, `fill` and `stroke`
 * from any SVG inside an attachment's content, which left
 * `<rect width="6" height="11">` painting a solid black square where the
 * microphone should have been.
 *
 * Restating the two values here is a no-op for every icon that still has its
 * attributes, and turns the failure mode from a black box into nothing at all.
 * ⚠️ Scoped to `--line` deliberately: FEATURE icons paint with `var(--accent)`
 * and ILLUSTRATIVE ones carry baked fills on purpose (dark.css §5), so forcing
 * either single-tone would leave a blank disc.
 */
.icon--line {
    fill: none;
    stroke: currentColor;
}

/* ⭐ **A FEATURE MARK'S PICTURE IS DRAWN IN `--mark-ink`, NOT IN ITS PLACE'S
 * TEXT COLOUR** (2026-10-06). The detail is the `currentColor` half of the
 * mark, so it took whatever the nav link, the palette row or the button was
 * painting — and in light that sat 2.31:1 off the `var(--accent)` body,
 * measured on every FEATURE mark in the app by the light pass of
 * tests/browser/test_every_word_reads_in_the_dark.py. Pinned once here
 * rather than in each place that wears a mark.
 * ⚠️ `svg.` so it outranks `.btn__mark`'s resting `--icon-mark` (0,1,0)
 * whatever the load order — ON PURPOSE, and this is the one place that is
 * allowed to: in light `--icon-mark` is the 2.31:1 colour. It still loses to
 * the states in buttons.css that hand a mark back to its button (0,2,0),
 * white on a filled primary. In dark nothing moves: `--mark-ink` is
 * `currentColor`, and on a control's mark it is re-pointed at `--icon-mark`
 * (`dark.css` §5), so a mark there keeps the colour `.btn__mark` gives it. */
svg.icon--feature {
    color: var(--mark-ink);
}

.icon--sm {
    width: var(--icon-size-sm);
    height: var(--icon-size-sm);
}

.icon--lg {
    width: var(--icon-size-lg);
    height: var(--icon-size-lg);
}

/*
 * Source icon — used on entry/relationship cards to indicate origin
 * (Obsidian plugin, web GUI, filesystem sync). Replaces the emoji
 * variants 🟣 / 🖥️ / 📂 in v0.21.4.
 */
.source-icon {
    color: var(--ink-faint);
    vertical-align: -0.15em;
}
