:root {
    --fg: #000;
    --md: #555;
    --lt: #f5f5f5;
    --eb: #fadada;
    --border-radius: 3px;
    --padding-smaller: 8px;
    --padding-base: 12px;
    --padding-larger: 24px;
}

a { color: var(--fg); }

main p { margin-bottom: 1em; }
main img { max-width: 100%; height: auto; }

main > article[data-note-id] {
    margin-top: 2em;
    padding-bottom: 1em;
}

main > article[data-note-id]:last-child {
    border-bottom: none;
}

article[data-note-id] header {
    display: grid;
    grid-template-columns: 2em 1fr;
    gap: 0 var(--padding-smaller);
    align-items: center;
    margin-bottom: .5em;
}

article[data-note-id] header .avatar {
    grid-row: 1 / 3;
    width: 2em;
    height: 2em;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
}

article[data-note-id] header .avatar svg {
    color: limegreen;
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 12px;
    height: 12px;
    background-color: white;
    border-radius: 50%;
}

article[data-note-id] header .avatar div {
    background-color: var(--md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: .75em;
}

article[data-note-id] header .avatar div,
article[data-note-id] header .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

article[data-note-id] header a {
    text-decoration: none;
}

article[data-note-id] header a:hover {
    text-decoration: underline;
}

article[data-note-id] header > span:not(.avatar) {
    grid-column: 2;
    font-weight: 700;
    font-size: .875em;
}

article[data-note-id] header > a:has(time),
article[data-note-id] header > time {
    grid-column: 2;
    font-weight: normal;
    font-style: italic;
    color: var(--md);
    font-size: .8em;
}

article[data-note-id] section p {
    margin-bottom: 1em;
}

article[data-note-id] section p:last-child {
    margin-bottom: 0;
}

article[data-note-id] section .reposted,
article[data-note-id] section .highlighted {
    color: var(--md);
    font-style: italic;
    font-size: .875em;
    margin-bottom: .5em;
}

article[data-note-id] section img,
article[data-note-id] section video,
article[data-note-id] section iframe {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

article[data-note-id] section iframe {
    aspect-ratio: 16 / 9;
}

article[data-note-id] section .media {
    display: block;
    margin-top: var(--padding-base);
}

article[data-note-id] section .media:only-child {
    margin-top: 0;
}

article[data-note-id] section article[data-note-id] {
    background-color: var(--lt);
    padding: var(--padding-smaller);
    border-radius: var(--border-radius);
    margin-top: .5em;
    border-bottom: none;
}

article[data-note-id] section .reposted + article[data-note-id] {
    margin-top: 0;
}

article[data-note-id] section article[data-note-id] article[data-note-id] {
    background-color: white;
}

article[data-note-id] .repost-error {
    padding: var(--padding-smaller);
    background-color: var(--eb);
    border-radius: var(--border-radius);
}

article[data-note-id] .longform-card {
    border-radius: var(--border-radius);
    padding: var(--padding-base);
    background-color: var(--lt);
}

article[data-note-id] .longform-card img {
    margin-bottom: var(--padding-smaller);
    border-radius: var(--border-radius);
}

article[data-note-id] .longform-card a {
    text-decoration: none;
}

article[data-note-id] .longform-card a p:last-of-type {
    text-decoration: underline;
}

article[data-note-id] .live-event-status {
    display: inline-block;
    padding: 2px var(--padding-smaller);
    border-radius: var(--border-radius);
    font-size: .85em;
    font-weight: 700;
    background-color: var(--lt);
    color: var(--md);
    margin-bottom: var(--padding-smaller);
}

article[data-note-id] section .highlight-text {
    margin: .5em 0;
    padding: var(--padding-base);
    border-left: 3px solid var(--fg);
    background-color: var(--lt);
    font-style: italic;
}

article[data-note-id] section .highlight-context {
    font-size: .9em;
    color: var(--md);
    margin-bottom: .5em;
}

article[data-note-id] section .highlight-source {
    text-decoration: none;
}

article[data-note-id] section .highlight-source:hover {
    text-decoration: underline;
}

nav.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2em;
    padding-top: 1em;
    font-size: .875em;
}

.pagination-info {
    color: var(--md);
    font-style: italic;
}

.empty-state {
    margin-top: 2em;
}

.empty-state p {
    color: var(--md);
    font-style: italic;
}
