/* See https://tess.oconnor.cx/colophon#markup */

@import "variables.css";

.feed-only {
    display: none;
}

[lang=und-fonipa] > a[rel=help] {
    text-decoration: none;
}

a.mention {
    text-decoration: none;
}

a.mention:not(.u-url)::before {
    content: "@";
}

[href*="cohost.org"].mention::before {
    display: none;
}
[href*="cohost.org"].mention {
    display: inline-block;

    font-weight: bold;
    text-decoration: none;
    white-space: pre-wrap;

    padding-left: 1ch;

    /* black to #83254f with filters */
    filter: invert(18%) sepia(37%) saturate(2903%) hue-rotate(303deg) brightness(95%) contrast(92%);
    background-image: url(/images/cohost.svg);
    background-position: left;
    background-repeat: no-repeat;
}
[href*="cohost.org"].mention > * {
    color: black;
    filter: invert(1);
    mix-blend-mode: difference;
}
[href*="instagram.com"].mention::before {
    display: none;
}
[href*="instagram.com"].mention {
    background-image: url(/images/instagram.svg);

    display: inline-block;

    text-decoration: none;
    white-space: pre-wrap;

    padding-left: 21px;

    background-position: -3px 50%;
    background-size: contain;
    background-repeat: no-repeat;
}
@media (prefers-color-scheme: dark) {
    [href*="instagram.com"].mention {
        background-image: url(/images/instagram-dark.svg);
    }
}
[href*="linkedin.com"].mention:not(.u-url)::before {
    content: "in";
    background-color: rgb(10, 102, 194);
    color: white;
    border-radius: 2px;
    font-weight: 900;
    padding: 0 0.25ch;
    margin-right: 0.125ch;
}
[href*="livejournal.com"].mention:not(.u-url)::before {
    display: none;
}
[href*="livejournal.com"].mention {
    display: inline-block;
    white-space: pre-wrap;
    font-weight: bold;
    padding-left: 18px;
    background-image: url(/images/lj.svg);
    background-repeat: no-repeat;
    background-position: left;
    text-decoration: none;
}
[href*="reddit.com"].mention:not(.u-url)::before {
    content: "u/";
}
[href*="watchcrunch.com"].mention {
    position: relative;
}
[href*="watchcrunch.com"].mention:not(.u-url)::before {
    content: "○";
    color: rgb(18, 184, 134);
    font-weight: bold;
    position: relative;
    bottom: -1px;
    left: -1px;
}
[href*="wikipedia.org"].mention:not(.u-url)::before {
    content: "User:";
}

abbr.postnominal {
    text-transform: lowercase;
    font-variant: small-caps;
}

article.draft h1::before {
    content: "DRAFT: ";
}

caption.prominent {
    caption-side: top;
    border-bottom: none;
    font-weight: bold;
}

dl.metadata {
    font-size: 0.875em;
    display: grid;
    grid-template-columns: auto auto;
    align-items: baseline;
    max-width: var(--metadata-width);
    padding: 0.5rem;
}

dl.metadata > dt {
    grid-column: 1;
    text-align: right;
}

dl.metadata > dd {
    grid-column: 2;
    text-align: left;
    margin-left: 1rem;
}

.embed-container {
    display: flex;
    justify-content: center;
}

section.gallery > figure {
    margin: 0;
    line-height: 1;
}

section.gallery > figure > figcaption {
    margin: 0.5rem;
}

@media (min-width: 900px) {
    section.gallery {
        display: grid;
        grid-template-columns: auto auto;
    }
@media (min-width: 1500px) {
    section.gallery {
        grid-template-columns: auto auto auto;
    }
}

.halmos {
    line-height: 1;
    font-size: 1.2em;
    text-decoration: none;
    color: inherit;
}

hr.fleuron, hr.dinkus, hr[title] {
    border: 0;
    text-align: center;
}
hr[title]::after { content: attr(title); }
hr.fleuron::after { content: "❧"; font-size: 3em; }
hr.dinkus::after { content: "✻ ✻ ✻"; }

.latex, .tex, .latex sub, .tex sub {
  font-size: 1em;
}

.latex sub, .tex sub, .latex sup {
  text-transform: uppercase;
}

.latex sub, .tex sub {
  vertical-align: -0.5ex;
  margin-left: -0.1667em;
  margin-right: -0.125em;
}

.latex sup {
  font-size: 0.85em;
  vertical-align: 0.15em;
  margin-left: -0.36em;
  margin-right: -0.15em;
}

@media (min-width: 400px) {
    .multicol-toc {
        column-count: 2;
    }
}
@media (min-width: 700px) {
    .multicol-toc {
        column-count: 3;
    }
}
@media (min-width: 900px) {
    .multicol-toc {
        column-count: 4;
    }
}

.nobr {
    white-space: nowrap;
}

.verse {
    font-family: var(--serif-font-stack);
    white-space: pre-line;
    font-style: italic;
}
