/* default variables */
:root {
    --responsive-mode: "default";
    --container-width: 1024px;
    --container-gutter: calc(calc(100% - var(--container-width)) / 2);
    --gutter-default: 15px;
    --whitespace: 50px;
    --system-ui-fonts: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --gutter-sm: calc(var(--gutter-default) / 2);
    --gutter-1x: calc(var(--gutter-default) * 1);
    --gutter-2x: calc(var(--gutter-default) * 2);
    --gutter-3x: calc(var(--gutter-default) * 3);
}

/* base styles */
body {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    min-height: 100svh;
    font-family: var(--system-ui-fonts);
    font-size: 18px;
}

/* body::before,
body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  z-index: 0;
  pointer-events: none;
}

body::before {
  top: 0;
  height: env(safe-area-inset-top);
  background: var(--safe-area-top-color);
}

body::after {
  bottom: 0;
  height: env(safe-area-inset-bottom);
  background: var(--safe-area-bottom-color);
} */

header,
section,
footer {
    padding: var(--whitespace, 50px) 0;
}

/* typography */
p:not(:last-child) { margin-bottom: 0.75em; }
a { color: inherit; }
:where(a):visited { color: inherit; } /* don't change the color of visited links */
pre:has(code) { overflow-x: scroll; }
pre:has(code) { margin-bottom: var(--gutter-1x, 15px); }
svg { color: inherit; }

/* simple grid system */
content-container {
    display: block;
    width: var(--container-width);
    margin-left: var(--container-gutter);
    margin-right: var(--container-gutter);
    padding: 0;
}
content-row {
    width: 100%;
    max-width: 100%;
    gap: var(--gutter-1x, 15px);
    align-items: center;
}
[grid] {
    display: grid;
    box-sizing: content-box;
    grid-template-columns: repeat(auto-fit, minmax(250px,1fr)); /* MAGIC */
    grid-template-rows: auto;
    /* grid-auto-flow: column; */
}
[flex] {
    display: flex;
    flex-direction: row;
}
[spread] { justify-content: space-between; }
[spread] > :first-child { text-align: start; }
[spread] > :last-child { text-align: end; }

[whitespace] {
    display: flex;
    flex: 1 1 0;
    margin: 0;
    padding: 0;
}

[column] {
    display: flex;
    flex-direction: column;
    justify-items: start;
    justify-content: start;
}
[column][aligned] {
    align-items: center;
    text-align: center;
}
[columns='2'] { grid-template-columns: repeat(2, 1fr); }
[columns='3'] { grid-template-columns: repeat(3, 1fr); }
[columns='4'] { grid-template-columns: repeat(4, 1fr); }
[columns='5'] { grid-template-columns: repeat(5, 1fr); }
[columns='6'] { grid-template-columns: repeat(6, 1fr); }
[columns='7'] { grid-template-columns: repeat(7, 1fr); }
[columns='8'] { grid-template-columns: repeat(8, 1fr); }

[centered] {
    text-align: center;
}

/* button, */
link-button > :is(a, a:hover) {
    display: inline-block;
    /* border-style: solid; */
    /* border-width: 2px; */
    /* border-radius: 10px; */

    font-weight: 600;
    text-decoration: none;
    box-shadow: none;

    cursor: pointer;
    pointer-events: all;

    width: 100%;
    border: 3px solid var(--outline-color);
    padding: 6px 1lh;
    border-radius: 1lh;
    /* text-align: center; */
    /* box-shadow: none; */
}
link-button { display: block; }

/* responsive */
@media only screen and (min-width: 1280px) {
    :root {
        --responsive-mode: "lg";
        --container-width: 1080px;
    }
    [hidden-lg] {
        display: none;
    }
}

@media only screen and (min-width: 768px) and (max-width: 1279px) {
    :root {
        --responsive-mode: "md";
        --container-width: 720px;
    }
    [hidden-md] {
        display: none;
    }
}

@media only screen and (max-width: 767px) {
    :root {
        --responsive-mode: "sm";
        --container-width: 90vw;
        --container-gutter: 5vw;
        --gutter-default: 10px;
    }
    [hidden-sm] {
        display: none;
    }
}
