:root {
    --accent-color: #751fff;
    --border-color: #eee;
    --subtle-color: color-mix(in oklch, var(--accent-color) 50%, var(--background-color));
    --gray-color: color-mix(in oklch, #000 20%, var(--background-color));
    --background-color: #ccc;
    --text-color: #000;
    --header-color: #000;
    --panel-color: #ddd;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 14px;
    position: relative;
    height: 100vh;
    color: var(--text-color);
    background: var(--background-color);
    padding: 0;

    font-family: Inter;
    font-optical-sizing: auto;
    font-style: normal;
    font-variation-settings: "slnt" 0;
    line-height: 1.5;
}

body {
    background: var(--background-color);
    padding: 1rem;
    margin: 0;
}

.container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
}

.items {
    width: 100%;
}

.category {
    border: 1px solid var(--panel-color);
    display: grid;
    grid-template-areas: "title" "comments" "contents";
    margin: 0 0 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.2rem 0.6rem rgba(0, 0, 0, 0.3);
    background: var(--panel-color);
}

.category .category {
    box-shadow: 0 0.1rem 0.3rem rgba(0, 0, 0, 0.3);
    margin: 0 0.5rem 1rem;
}

.category:last-of-type {
    margin-bottom: 0.2rem;
}

.category-title {
    padding: 0.2rem 0.8rem 0.4rem;
    grid-area: title;
    background: linear-gradient(to bottom, var(--border-color), var(--panel-color));
    color: var(--header-color);
    font-weight: bold;
    text-shadow: 1px 1px 0 #fff;
}

.category-comment {
    margin: 0.2rem 1rem;
    padding-bottom: 0.2rem;
    grid-area: comments;
    border-bottom: 1px solid var(--subtle-color);
}

.category-contents {
    margin: 0.4rem 0.2rem;
    grid-area: contents;
}

.item {
    border-bottom: 1px solid var(--gray-color);
    display: grid;
    grid-template-areas: "weight name added" "price link tags" "_ comments tags";
    grid-template-columns: auto 1fr auto;
    margin: 0 0.5rem 0;
    padding-bottom: 0.2rem;
    gap: 0.2rem 0;
}

.item.state-closed {
    opacity: 0.5;
    filter: grayscale();
}

.item:last-child {
    border: none;
}

.item-name {
    grid-area: name;
    font-weight: bold;
}

.item.state-closed .item-name {
    text-decoration: line-through;
}

.item-weight {
    grid-area: weight;
    margin-right: 1rem;
}

.item-weight-full {
    color: var(--accent-color);
}

.item-weight-empty {
    color: var(--gray-color);
}

.item-added {
    grid-area: added;
    font-size: x-small;
    text-align: right;
}

.item-link {
    grid-area: link;
}

.item-price {
    grid-area: price;
    text-align: right;
    margin-right: 1rem;
}

.item-price::before {
    font-size: smaller;
    content: "ca. ";
}

.item-tags {
    grid-area: tags;
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.5rem;
    align-items: start;
    font-size: small;
    justify-content: end;
}

.item-tag {
    background: var(--subtle-color);
    color: var(--header-color);
    border-radius: 0.5rem;
    padding: 0 0.5rem;
}

.item-comments {
    grid-area: comments;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url(/assets/Inter-VariableFont_slnt,wght.ttf) format('woff2');
}

@media (max-width: 768px) {
    body {
        padding: 1rem 0;
    }

    body .container {
        width: 100%;
        max-width: unset;
        padding: 0;
    }

    .category {
        border-radius: 0;
    }

    .item {
        grid-template-areas: "weight name" "price link" "_ comments" "_ tags" "_ added";
        grid-template-columns: auto 1fr;
    }

    .item-added {
        text-align: left;
    }

    .item-tags {
        justify-content: start;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

@media (min-width: 1200px) {
    .containerl {
        max-width: 1140px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}