body {
    max-width: 40em;
    margin: auto;
    padding: 0 1em;
    font-family: sans-serif;
}

h1 {
    text-align: center;
}

h1, h2, h3 {
    font-weight: normal;
    color: hsl(0, 100%, 30%);
}

h1 img {
    display: block;
    margin: auto;
    margin-bottom: 0.5ex;
    max-width: 40vw;
    max-height: 30vh;
}

nav {
    margin-left: 2ch;
    margin-right: 2ch;
    padding-top: 0.25em;
    padding-bottom: 0.25em;
    border-left: 1px solid hsl(0, 100%, 30%);
    display: flex;
    flex-direction: column;
}

nav a {
    color: inherit;
    text-decoration: none;
    padding-left: 1ch;
    padding-top: 0.375em;
    padding-bottom: 0.375em;
    border-left: 0.25em solid transparent;
    white-space: nowrap;
}

nav a.selected {
    border-left-color: hsl(0, 100%, 30%);
}

nav a:hover {
    background-color: hsla(0, 100%, 30%, 0.1);
}

ol {
    padding-left: 2ch;
    margin-left: 0;
}

li {
    margin-top: 1em;
    margin-bottom: 1em;
}

svg {
    display: block;
    max-width: calc(100% - 2 * 0.25em);
    height: auto;
    border: 0.25em solid hsl(0, 100%, 30%);
    margin: 1em 0;
}

svg path:not([d$='z']) {
    stroke: hsl(0, 100%, 30%);
    stroke-width: 0.25em;
    /* Square endcaps fix subpixel rounding at the edge of the image. */
    stroke-linecap: square;
}

svg path[d$='z'] {
    fill: hsl(0, 100%, 30%);
}

input {
    border: none;
    border-radius: 3px;
}

.copied {
    position: absolute;
    background-color: hsla(0, 100%, 25%, 0.8);
    color: white;
    border-radius: 0.2em;
    --margin-left: 0.2em;
    margin-left: var(--margin-left);
    padding: 0 1ch;
    /* The 1500ms here matches how long the JS creates the element for. */
    animation: slide-in 67ms linear,
               slide-out 133ms linear calc(1500ms - 133ms);
}

@keyframes slide-in {
    from {
        margin-left: calc(var(--margin-left) - 0.5em);
        opacity: 0;
    }
}

@keyframes slide-out {
    to {
        margin-left: calc(var(--margin-left) + 1em);
        opacity: 0;
    }
}

.copybox {
    border: 1px solid maroon;
    margin: 1em 0;
    padding-left: 1ch;
    padding-right: 1ch;
    padding-bottom: 1ex;
    padding-top: 0;
}
.copybox::before {
    display: block;
    background: hsla(0, 100%, 30%, 0.1);
    padding: 1ex 1ch;
    margin-left: -1ch;
    margin-right: -1ch;
    margin-bottom: 1ex;
}

.copybox.ottawa::before {
    content: "Ottawa Contra Dance";
}
.copybox.montreal-en::before {
    content: "ContraMontreal (English)";
}
.copybox.montreal-fr::before {
    content: "ContraMontreal (français)";
}

.copybox div {
    display: flex;
}

.copybox input {
    flex: 1 1;    
    min-width: 2em; /* Smaller than the default 'auto' */
    text-overflow: ellipsis;
}

.copybox button {
    margin-right: 1ch;
    font-size: inherit;
}

.linkbox {
    margin: 0.5em 0;
}

.linkbox a {
    display: inline-block;
    padding: 0.5em;
    border-radius: 0.5em;
    background-color: maroon;
    color: white;
    text-decoration: none;
}

/* Firefox doesn't seem to draw a focus ring on these. */
.linkbox a:focus {
    box-shadow: inset 0 0 0 2px maroon,
                inset 0 0 0 3px;
}
