.problems-head {
    margin-bottom: var(--sp-8);
}

.problems-head h1 {
    font-size: var(--fs-800);
    letter-spacing: -0.02em;
}

.problems-head p {
    margin-top: var(--sp-4);
    color: var(--color-muted);
    font-size: var(--fs-300);
}

.problem-year {
    display: grid;
    grid-template-columns: var(--sp-10) minmax(0, 1fr);
    gap: var(--sp-6);
    margin-bottom: var(--sp-7);
}

.problem-year:last-child {
    margin-bottom: 0;
}

.problem-year__label {
    padding-top: var(--sp-5);
    font-family: var(--font-sans);
    font-size: var(--fs-200);
    font-weight: var(--fw-medium);
    font-variant-numeric: tabular-nums;
    line-height: var(--lh-normal);
    letter-spacing: normal;
    color: var(--color-muted);
}

.problem-year__list {
    min-width: 0;
    list-style: none;
}

.problem {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0 var(--sp-5);
    padding: var(--sp-5) 0;
    border-top: var(--rule);
}

.problem__title {
    font-size: var(--fs-500);
    font-weight: var(--fw-semi);
    line-height: var(--lh-snug);
}

.problem__title-link {
    color: var(--color-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.problem__title-link:hover {
    color: var(--color-accent-hover);
    text-decoration-thickness: 2px;
}

.problem__title-link:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}

.problem__venue {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    margin-top: var(--sp-2);
    font-size: var(--fs-100);
    color: var(--color-muted);
}

.problem__venue a {
    color: inherit;
}

.problem__role {
    color: var(--color-accent);
}

.problem__actions,
.problem__statements {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-4);
    font-size: var(--fs-100);
}

.problem__actions {
    justify-content: flex-end;
}

.problem__link {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    color: var(--color-text);
    white-space: nowrap;
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--color-text) 20%, transparent);
    text-underline-offset: 3px;
}

.problem__link--own {
    color: var(--color-accent);
    text-decoration-color: var(--color-accent);
}

.problem__link:hover {
    color: var(--color-accent);
    text-decoration-color: var(--color-accent);
}

.problem__link .icon {
    opacity: 0.5;
}

.problem__toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-2) 0;
    border: 0;
    background: none;
    color: var(--color-muted);
    font: inherit;
    white-space: nowrap;
    cursor: pointer;
}

.problem__toggle:hover {
    color: var(--color-accent);
}

.problem__toggle:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

.problem__details {
    grid-column: 1 / -1;
    padding-top: var(--sp-5);
    max-width: 62ch;
    font-size: var(--fs-200);
    line-height: var(--lh-relaxed);
    color: var(--color-muted);
    overflow-wrap: anywhere;
}

.problem__details[hidden] {
    display: none;
}

.problem__statements {
    margin-top: var(--sp-3);
}

@media (max-width: 720px) {
    .problems-head {
        margin-bottom: var(--sp-7);
    }

    .problem-year {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--sp-4);
    }

    .problem-year__label {
        padding-top: 0;
    }

    .problem {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--sp-4);
    }

    .problem__actions {
        justify-content: flex-start;
    }

    .problem__details {
        padding-top: 0;
    }
}
