/* Links in running text – on the website and in all editors (loaded on every page).
   Download links (files under uploads/, folders of the download area) stand out as chips with an
   arrow and the file type, so that visitors see at once that a click opens or saves a file. */
:is(.content-text, .rich-text, .rte-content, .rich-editor, .pe-article-summary, .ti-summary, .article-summary) a {
    color: var(--green);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
:is(.content-text, .rich-text, .rte-content, .rich-editor, .pe-article-summary, .ti-summary, .article-summary) a:hover { color: var(--green-dark); text-decoration-thickness: 2px; }
/* External addresses get an arrow: they open another website in a new tab. */
:is(.content-text, .rich-text, .rte-content, .rich-editor, .pe-article-summary, .ti-summary, .article-summary) a[href^="http"]::after { margin-left: .15em; font-size: .85em; text-decoration: none; content: '↗'; display: inline-block; }

:is(.content-text, .rich-text, .rte-content, .rich-editor, .pe-article-summary, .ti-summary, .article-summary) :is(a[href^="uploads/"], a[href*="?downloads"]) {
    --dl-tag: #2f5f8a;
    display: inline-flex;
    align-items: baseline;
    gap: .35em;
    margin: 0 .05em;
    padding: .05em .3em .05em .45em;
    border: 1px solid #c9dccf;
    border-radius: 6px;
    background: var(--mint);
    color: var(--green-dark);
    font-weight: 700;
    line-height: 1.45;
    text-decoration: none;
    white-space: normal;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
:is(.content-text, .rich-text, .rte-content, .rich-editor, .pe-article-summary, .ti-summary, .article-summary) :is(a[href^="uploads/"], a[href*="?downloads"]):hover {
    border-color: var(--green);
    background: #dcebe1;
    color: var(--green-dark);
}
/* Arrow (file) or folder in front, file type behind. */
:is(.content-text, .rich-text, .rte-content, .rich-editor, .pe-article-summary, .ti-summary, .article-summary) a[href^="uploads/"]::before { content: '⇩'; font-weight: 800; }
:is(.content-text, .rich-text, .rte-content, .rich-editor, .pe-article-summary, .ti-summary, .article-summary) a[href*="?downloads"]::before { content: '📁'; font-size: .9em; }
:is(.content-text, .rich-text, .rte-content, .rich-editor, .pe-article-summary, .ti-summary, .article-summary) :is(a[href^="uploads/"], a[href*="?downloads"])::after {
    align-self: center;
    padding: .1em .4em;
    border-radius: 4px;
    background: var(--dl-tag);
    color: #fff;
    font-size: .68em;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.3;
    text-transform: uppercase;
    content: 'Datei';
}
:is(.content-text, .rich-text, .rte-content, .rich-editor, .pe-article-summary, .ti-summary, .article-summary) a[href*="?downloads"]::after { --dl-tag: #a8892f; content: 'Ordner'; background: #a8892f; }
:is(.content-text, .rich-text, .rte-content, .rich-editor, .pe-article-summary, .ti-summary, .article-summary) a[href^="uploads/"][href$=".pdf"]::after { background: #c0533f; content: 'PDF'; }
:is(.content-text, .rich-text, .rte-content, .rich-editor, .pe-article-summary, .ti-summary, .article-summary) :is(a[href^="uploads/"][href$=".docx"], a[href^="uploads/"][href$=".doc"], a[href^="uploads/"][href$=".odt"])::after { background: #2f5f8a; content: 'Word'; }
:is(.content-text, .rich-text, .rte-content, .rich-editor, .pe-article-summary, .ti-summary, .article-summary) :is(a[href^="uploads/"][href$=".xlsx"], a[href^="uploads/"][href$=".xls"], a[href^="uploads/"][href$=".ods"])::after { background: #1f7a4d; content: 'Excel'; }
:is(.content-text, .rich-text, .rte-content, .rich-editor, .pe-article-summary, .ti-summary, .article-summary) :is(a[href^="uploads/"][href$=".pptx"], a[href^="uploads/"][href$=".ppt"], a[href^="uploads/"][href$=".odp"])::after { background: #c56a1c; content: 'PowerPoint'; }
:is(.content-text, .rich-text, .rte-content, .rich-editor, .pe-article-summary, .ti-summary, .article-summary) :is(a[href^="uploads/"][href$=".jpg"], a[href^="uploads/"][href$=".png"], a[href^="uploads/"][href$=".gif"], a[href^="uploads/"][href$=".webp"])::after { background: #7a6bb5; content: 'Bild'; }
