:root {
    --background: #fff;
    --background-hover: rgba(141, 141, 141, 0.12);
    --background-active: rgba(141, 141, 141, 0.50);
    --text-color: #161616;
    --text-secondary-color: #525252;
    --link-color: #4447ae;
    --link-hover-color: #4f53bb;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #161616;
        --background-hover: rgba(141, 141, 141, 0.16);
        --background-active: rgba(141, 141, 141, 0.40);
        --text-color: #f4f4f4;
        --text-secondary-color: #c6c6c6;
        --link-color: #b9bae4;
        --link-hover-color: #a7a9dd;
    }
}

@view-transition {
    navigation: auto;
}

html {
    background: var(--background);
    color: var(--text-color);
    font: 1rem/1.5 'Geist Variable', sans-serif;
    scrollbar-gutter: stable;
}

body {
    max-width: 50rem;
    margin: 2rem auto;
    padding: 0 1rem;
}

header {
    margin: 1rem 0 2rem;
}

footer {
    color: var(--text-secondary-color);
    display: flex;
    font-size: 0.875rem;
    gap: 1rem;
    margin: 4rem 0 2rem;
}

footer a {
    color: inherit;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

h1 {
    font-size: 1.75rem;
    font-weight: 600;
}

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

a:hover {
    color: var(--link-hover-color);
}

.logo {
    display: inline-block;
}

.logo svg {
    display: block;
    height: 3rem;
    width: 3rem;
}

.item-list {
    display: flex;
    flex-flow: column;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.item-list li {
    align-items: flex-start;
    display: flex;
    flex-flow: column;
}

.item-list a {
    text-decoration: none;
}

.item-list a:hover {
    text-decoration: underline;
}

.item-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.item-source,
.item-meta {
    color: var(--text-secondary-color);
    font-size: 0.875rem;
}

.item-source {
    align-items: center;
    display: flex;
    gap: 0.25rem;
}

.item-source img {
    height: 1.15em;
    width: auto;
    filter: grayscale(1);
}

.source-header {
    margin: 0 0 2rem;
}

.source-header:has(.source-icon) {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 1rem;
}

.source-header .source-icon {
    align-self: center;
    grid-column: 1;
    grid-row: 1 / span 2;
}

.source-header h1 {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
}

.source-header .source-meta {
    grid-column: 2;
    grid-row: 2;
    color: var(--text-secondary-color);
}

.source-icon {
    background: var(--background-hover);
    display: inline-block;
    height: 3rem;
    width: 3rem;
    padding: 0.5rem;

    img {
        display: block;
        height: auto;
        width: 100%;
    }
}

.source-list {
    display: flex;
    margin: 0;
    padding: 0;
    flex-flow: column;
    gap: 1rem;
}

.source-list li {
    display: block;
}

.source-list a {
    align-items: center;
    display: flex;
    gap: 0.5rem;
}

.source-list img {
    height: 1.5rem;
    width: 1.5rem;
}

.source-list a:not(:has(img))::before {
    background: var(--background-hover);
    border-radius: 50%;
    content: "";
    height: 1.5rem;
    width: 1.5rem;
}

.pagination {
    display: flex;
    margin: 2rem 0 0;
    padding: 0;
}

.pagination li {
    display: block;
}

.pagination li a,
.pagination li span {
    align-items: center;
    box-sizing: border-box;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    line-height: 1;
    min-inline-size: 2.5rem;
    padding: 0.75rem;
    user-select: none;
}

.pagination li a {
    text-decoration: none;
}

.pagination li a:hover {
    background: var(--background-hover);
}

.pagination li span[aria-current] {
    font-weight: 600;
    border-bottom: 2px solid var(--link-color);
    padding-bottom: calc(0.75rem - 2px);
}

.pagination li .disabled {
    color: var(--text-secondary-color);
    cursor: not-allowed;
}
