/**************************************************
Classless CSS stylesheet v1.0, Michel Maillard 
**************************************************/

/*************/
/* Variables */
/*************/

:root {
  --hue: 300;
  --primary-color: hsl(var(--hue), 50%, 60%);
  --secondary-color: hsl(var(--hue), 50%, 30%);
  --max-width: 40rem;
  --spacing: 1rem;
  --grey100: #f8f9fa;
  --grey200: #e9ecef;
  --grey300: #dee2e6;
  --grey400: #ced4da;
  --grey500: #adb5bd;
  --grey600: #868e96;
  --grey700: #495057;
  --grey800: #343a40;
  --grey900: #212529;
  --text-font-size: clamp(.8rem, 2.2vw, 1.4rem);
}


/*************/
/* reset.css */
/*************/

/* Box sizing rules */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Prevent font size inflation */
html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
    margin-block-end: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'],
nav ul {
    list-style: none;
}

nav a {
    text-decoration: none;
}

/* Set core body defaults */
body {
    min-height: 100vh;
    line-height: 1.5;
}

/* Set shorter line heights on headings and interactive elements */
h1,
h2,
h3,
h4,
button,
input,
label {
    line-height: 1.1;
}

/* Balance text wrapping on headings */
h1,
h2,
h3,
h4 {
    text-wrap: balance;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
    text-decoration-skip-ink: auto;
    color: currentColor;
}

/* Make images easier to work with */
img,
picture {
    max-width: 100%;
    display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
    min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
    scroll-margin-block: 5ex;
}

/************/
/* base.css */
/************/

html {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: var(--text-font-size);
}

header {
    text-align: center ;
    h1 {
        font-family: cursive;
    }
}

section {
    overflow-x: auto;
}

pre {
    background-color: var(--grey300);
    font-size: smaller;
    padding: 20px;
    border-left: 3px solid var(--primary-color);
    margin: 20px 0;
    overflow-x: auto;
}

footer {
    text-align: center;
}

/************/
/* flex.css */
/************/

body {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
}

main aside {
    flex-grow: 1;
}

main section {
    flex: 3 1 21em;
}


/*************/
/* space.css */
/*************/

aside nav ul {
    padding-left: 0;
}

header>*,
main>*,
footer>* {
    margin: var(--spacing);
    padding: 0 var(--spacing);
}

footer {
    padding-bottom: var(--spacing);
}


/**************/
/* colors.css */
/**************/

header {
    background-color: var(--primary-color);
    color: var(--grey100);
}

main,
footer {
    background-color: var(--grey200)
}

footer {
    border-top: 1px solid var(--secondary-color)
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: var(--grey900);
        color: var(--grey100);
    }

    main,
    footer {
        background-color: var(--grey700)
    }
}

/******************/
/* navigation.css */
/******************/

[aria-label=Primary] {
    ul {
        display: flex;
        justify-content: center;
        list-style: none;
        padding: 0;
        flex-wrap: wrap;
    }

    li {
        border: 1px solid var(--grey100);
        border-radius: 5px;
        margin: .2em;
        padding: .5em 1em;

        ul {
            display: none;
        }
    }

    a {
        text-decoration: none;
    }

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

    li:hover ul {
        display: block;
        position: absolute;
        background-color: var(--secondary-color);
        border: 1px solid var(--grey100);
        border-radius: 5px;
        margin: 0;
        padding: 0;
        z-index: 1;
    }

    li ul li {
        border: none;
        margin: 0;
        padding: 0;
    }

    li ul li a {
        display: block;
        padding: .5em 1em;
    }

    li:hover {
        background-color: var(--grey800);
    }

    li ul li a:active {
        background-color: #e0e0e0;
    }
}

[aria-label="Pagination"],
[aria-label="Footer"] ul {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;

    a {
        padding: .2em .5em;
        border: 1px solid var(--grey800);
        border-radius: 5px;
    }

    a:hover {
        background-color: var(--primary-color);
    }
}

/* Path: assets/css/typography.css */

/************/
/* form.css */
/************/