/* crimes.css — a tribute to cohost.org */

:root {
    --cohost-beige: rgb(255, 249, 242);
    --cohost-peach: rgb(255, 216, 168);
    --cohost-red: rgb(131, 37, 79);
    --cohost-black: rgb(25, 25, 25);
    --cohost-dark-gray: rgb(74, 72, 71);
    --cohost-medium-gray: rgb(104, 102, 100);
    --cohost-light-gray: rgb(130, 127, 124);
    --cohost-border: rgb(222, 217, 211);
}

html {
    background-color: var(--cohost-beige);
    color: black;
    font-family: system-ui, Arial, sans-serif;
    font-size: 16px;
    font-size-adjust: from-font;
    text-underline-position: from-font;
    line-height: 1.75;
}

#masthead, p > ins:only-child::before {
    font-family: ui-rounded, system-ui, Arial, sans-serif;
}

body {
    margin: 0;
    padding: 8px;
}

@media (min-width: 768px) { html { font-size: 20px; } }
@media (min-width: 1024px) { html { font-size: 24px; } }

main {
    background-color: white;
    margin: 0 auto 16px;
    border: 1px solid var(--cohost-border);
}

main, aside.news {
    max-width: 72ch;
    box-shadow: 4px 4px 4px rgba(0 0 0 / 0.12);
}

#skipnav {
    display: block;
    position: absolute;
    inset-block-start: -2em;
}

#skipnav:focus {
    position: static;
    inset-block-start: auto;
}

#masthead {
    background-color: var(--cohost-red);
    color: white;
    margin: -8px -8px 8px -8px;
    padding: 0.25em 0 1em;
    display: flex;
    align-items: baseline;
    justify-content: space-around;
    gap: 1ch;
}

#masthead [rel=alternate] img {
    width: 1em;
    height: auto;
    aspect-ratio: 1;
    vertical-align: text-bottom;
}

#masthead ul, #masthead li {
    display: inline;
}

#masthead h1, #masthead li {
    font-size: 1.25rem;
}

@media (max-width: 350px) {
    #masthead li:not(:last-child) {
        display: none;
    }
}

@media (max-width: 600px) {
    #masthead :lang(ga) {
        display: none;
    }
}

main > :not(header) {
    margin-inline: 0.5rem;
}

main > header, footer {
    padding: 12px;
}

main > footer {
    padding-top: 0;
}

main > p:first-child {
    margin-top: 0;
}

main > h1 + p {
    margin-top: 0.75em;
}

main > header {
    background-color: var(--cohost-beige);
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--cohost-border);
}

main > header > a    { flex-grow: 0; }
main > header > span { flex-grow: 1; text-align: right; font-weight: bold; }

main > header > a:nth-child(2)  { color: var(--cohost-dark-gray); }
main > header > a:nth-child(3)  {
    color: var(--cohost-light-gray);
    font-size: 0.875em;
}

h1 {
    font-size: 1.25em;
    margin: 0;
}

blockquote {
    margin-left: 0;
    border-left: 0.25rem solid var(--cohost-border);
    padding-left: 0.5rem;
    font-style: italic;
}

blockquote :is(cite, em, i) {
    font-style: normal;
}

pre, code, body > footer {
    font-family: ui-monospace, "Cascadia Code", monospace;
}

aside.news {
    background: var(--cohost-peach);
    border-radius: 8px;
    font-size: 0.875em;
    margin: 1em auto 1.25em;
    padding: 0.5em 1em;
}

aside.news span {
    display: inline-block;
    width: 50px;
    background-image: url(/images/cohost.svg);
    background-repeat: no-repeat;
    background-position: center;
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
}

footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.875rem;
}

a {
    color: black;
    text-decoration: underline;
}

a.mention::before {
    content: "@";
}

#masthead a,
main > header a,
aside.news a,
footer a {
    text-decoration: none;
}

#masthead a {
    color: white;
}

main > footer a {
    color: var(--cohost-medium-gray);
}

main > header a:hover, footer a:hover {
    text-decoration: underline;
}

footer a[rel~=tag]::before,
footer a[href*="cohost.org"]::before {
    content: "#";
}

footer a[href*="cohost.org"] q {
    quotes: none;
}

.halmos {
    display: inline-block;
    content: url(/images/cohost.svg);
    height: 0.625ic;
}

body > footer {
    background-color: var(--cohost-black);
    color: white;
    margin: 8px -8px -8px -8px;
}

body > footer a {
    color: white;
}

p:has(ins:only-child) {
    margin-left: 12px;
    border-left: 0.25rem solid var(--cohost-peach);
    padding-left: 0.5rem;
}

p > ins:only-child::before {
    display: inline;
    content: "Update " attr(datetime) ": ";
    font-weight: bold;
}

ins {
    text-decoration: none;
}
