@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Next:ital,wght@0,200..800;1,200..800&display=swap');

:root {
    --sans-serif-font: 'Atkinson Hyperlegible Next', sans-serif;
    --serif-font: serif;

    --base-font-size: max(16px,calc(100svw / 80));
    --code-font-size: 1rem;
    --font-scale: 100;
    --font-family: var(--sans-serif-font);
    
    --section-gap: 5lh;

    --spacing: 1em;

    color-scheme: light dark;
    font-size: var(--base-font-size);

    --readable-width: 80ch;
}

body {
  font-family: var(--font-family);
  line-height: 1.5;
}

h1,h2,h3,h4,h5,h6 {
    text-wrap: balance;
}

p {
  margin-block: 1lh;
}

button {
    font-size: inherit;
    font-family: inherit;
}

body {
    max-width: var(--readable-width);
    margin-inline: auto;
    padding-inline: 0.5em;
}

#site-title {
    margin-block: 0;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;

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

#ncl-logo {
    max-height: 2lh;
}
header {
    display: grid;
    grid-template-columns: 1fr min-content;
    gap: 1em;
    align-items: center;
    margin-bottom: 2lh;
    border-bottom: medium solid;
}

header h1 {
    margin-block: 0.5lh;
}

header nav {
    grid-column: span 2;
}
header nav menu {
    list-style: none;
    display: flex;
    justify-content: space-evenly;
    padding-left: 0;
    gap: var(--spacing);
    margin-block: 0;

    & [aria-current="page"] {
        font-weight: bold;
    }
}

h1 {
    text-align: center;
}

body[data-section="checklist"] :is(h2,h3) {
    text-align: center;
}

h1,h2,h3 {
    break-after: avoid;
}

table {
    border-collapse: collapse;
    width: 100%;
}

td, th {
  border: thin solid;
  padding-inline: 0.5em;
  padding-block: 0.5lh;
}

td {
    vertical-align: top;
}

td p:first-child {
    margin-top: 0;
}

td p:last-child {
    margin-bottom: 0;
}

td ul {
    margin-block: 0;
    padding-left: 1em;
}


thead th {
    font-size: 1.2rem;
}


tbody th {
    vertical-align: top;
}

tbody th span {
    position: sticky;
    top: 0;
}

dt {
    font-weight: bold;
}
* ~ dt {
    margin-top: 1lh;
}

dd :first-child {
    margin-top: 0;
}


section ~ section, footer {
    margin-top: var(--section-gap);
}

footer {
    padding-top: 1lh;
    border-top: thin solid CanvasText;
}

#event-categories-key {
    display: grid;
    grid-template-columns: max-content auto;
    gap: 1lh 1em;
}

.categories {
    font-style: italic;
    list-style: none;
    padding: 0;
}

.categories li {
    display: inline-block;
}


tr[data-categories] td {
    display: none;
}

:is(
    main:has(input[name="category-C"]:checked) [data-categories*="C"],
    main:has(input[name="category-M"]:checked) [data-categories*="M"],
    main:has(input[name="category-P"]:checked) [data-categories*="P"],
) td {
    display: revert;
}

@media screen {
    .print-only {
        display: none !important;
    }
}

section.checklist-group:has(table) {
    display: none;
}

:is(
    main:has(input[name="category-C"]:checked) section.checklist-group:has([data-categories*="C"]),
    main:has(input[name="category-M"]:checked) section.checklist-group:has([data-categories*="M"]),
    main:has(input[name="category-P"]:checked) section.checklist-group:has([data-categories*="P"]),
) {
    display: revert;
}


#photos ul {
    list-style: none;
    padding: 0;

    & img {
        max-width: 100%;
    }

    & li ~ li {
        margin-block: 2lh;
    }

    & figcaption > p:first-child {
        margin-top: 0;
    }
}

@media screen and (max-width: 80ch) {

    thead {
        display: none;
    }

    tr {
        display: flex;
        flex-wrap: wrap;
    }

    th {
        display: block;
        width: 100%;
    }

    th,td {
        border: none;
    }

    td {
        display: block;
        flex-grow: 1;
        padding: 0;
        margin-bottom: 0.5lh;
    }

    td ul {
        display: flex;
        gap: 2em;

        margin-bottom: 1lh;
    }
}

@media print {
    :root {
        --section-gap: 1lh;
        --readable-width: 100svw;
    }
    .no-print {
        display: none !important;
    }
    
    col.action {
        width: 10em;
    }
}
