Switserland is a true confederation. It consists of 26 cantons and in most ways each canton is sovereign.

As an example, swiss cantons are considerably more independent from the Swiss Confederacy (i.e. what most people know and call 'Switserland' the entity) than the states of the USA are.

As an example of how far that goes: Switzerland essentially does not have a capital. The cantons usually do, though. Bern is the seat of the Federal Assembly and is usually considered the capital, more because social norms and systems are based on the notion that all countries must have one.

Swiss cantons can work together and often do, but evidently, not on this.

It’s a federal republic like the US and many others. (Edit to add: « federal state » may be s better term.)

is it though? I guess it depends on the definition you use. The line between federation and confederation is rather thin, and I believe those terms were historically even used as synonyms. Switzerland is at least called Confoederatio Helvetica, but you could probably argue it's a federation due to the centralized government. But then we also have to keep in mind that the sovereignty and the power of the country stays with the people and the cantons, and not the central government due to it's direct democracy.

> is it though?

The federal goverment and the federal assembly seem to think it is, maybe because the federal laws say so starting with the federal constitution.

yeah, that's true, a lot of stuff refers to it as a federation

Even things like citizenship and elections are fully decentralized, which has some.. interesting outcomes sometimes, like the fact that one canton didn't allow women's suffrage until 1990 (!) [0] or that a lady who's lived there for 34 years had her citizenship application denied because the local dairy farmers found her animal rights activism "annoying". [1]

[0] https://en.wikipedia.org/wiki/Women%27s_suffrage_in_Switzerl... [1] https://www.bbc.com/news/newsbeat-38595807

Ultimately the people are sovereign, but realistically the Kantons are. Which is why that often cited „lady denied citizenship“ is incomplete. The Kantonal court overturned the decision of the municipality and gave her citizenship.

It’s also why it took considerable more effort to force Appenzell to accept women’s suffrage.

Citizenship is federal (you're a citizen of the country, not the canton), but the procedure for getting citizenship varies and usually involves being in good standing with the local community. Especially in rural areas this sometimes needs court intervention if people are being too arbitrary.