:root {
    --bg-primary: #0036B7;
    --bg-secondary: #6c757d;
    --bg-white: #fff;
    --text-main: #28a745;
    --text-heading: #343a40;
    --text-light: #B1EBC0;
    --text-gray: #6c757d;
    --text-dark: #333;
    --bg-chip: #dc3545;
    --bg-a: #ffc107;
    --bg-aa: #6EDCED;
    --bg-aaa: #B1EBC0;
    --bg-perceivable: ;
    --bg-operable: ;
    --bg-understandable: ;
    --bg-robust: ;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

ul {
    list-style-type: none;
    padding: 0;
}

body {
    font-family: "Work Sans", sans-serif;;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--text-light);
    color: var(--text-dark);
}

.skip-link,
.sr-only {
    position: absolute;
    white-space: nowrap;
}

.skip-link {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1em;
    overflow: hidden;
    width: 1em;
}

.skip-link:focus {
    clip: auto;
    clip-path: none;
    height: auto;
    left: 0;
    padding: 0.625em;
    top: 0;
    width: auto;
    background: var(--tertiary-color);
    color: var(--black);
    z-index: 1000;
}

.sr-only {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1em;
    margin: -1em;
    overflow: hidden;
    padding: 0;
    width: 1em;
}

.container {
    margin: 0 auto;
    max-width: 1000px;
    padding: 0 1rem;
}

a {
    color: var(--text-dark);
}

a:focus,
a:hover,
.menu-toggle:focus {
    outline: var(--text-dark) solid 2px;
    outline-offset: 3px;
    position: relative;
}

/* Navbar */
.navbar {
    background-color: var(--bg-white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    transition: padding 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    z-index: 1000;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-container {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 1000px;
    padding: 0 1rem;
    transition: padding 0.3s ease;
}

/* Menu links */
.menu-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    display: none;
    font-size: 1em;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: var(--text-color);
    display: inline-block;
    font-size: var(--font-size);
    font-weight: 600;
    text-decoration: none;
    transition: font-size 0.5s ease;
    width: 100%;
}

.navbar.small .nav-menu a {
    font-size: 1rem;
}

.nav-menu li {
    margin-left: 1.5rem;
}

/* MAIN */

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

#filter-section {
    background-color: #fff;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#filter-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
}

.filter-chip {
    display: inline-block;
    font-family: inherit;
    padding: 0.4rem 0.8rem;
    background-color: #e0e0e0;
    border: 1px solid #ccc;
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    font-size: 0.9em;
}

.filter-chip:hover {
    background-color: #d0d0d0;
}

.filter-chip.active {
    background-color: var(--bg-primary);
    color: var(--text-light);
    border-color: var(--bg-primary);
    font-weight: bold;
}

#active-filters-info {
    font-size: 0.9em;
    color: #555;
}

#active-filter-list {
    font-weight: bold;
    color: var(--text-dark);
}

#sc-list-section {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sc-card {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    background-color: #fff;
    transition: transform 0.2s ease-in-out; /* Add transition for potential future effects */
}

.sc-card.hidden {
    display: none; /* Hide cards that don't match filter */
}


.sc-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--bg-primary);
}

.sc-card .sc-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 0.8rem;
    border-bottom: 1px dashed #eee;
    padding-bottom: 0.5rem;
}

.sc-card .sc-meta strong {
 color: #333;
}

.sc-card .sc-level {
    display: inline-block;
    padding: 0.1em 0.5em;
    border-radius: 3px;
    font-weight: bold;
    font-size: 0.85em;
    margin-left: 0.5em;
}

.sc-card .sc-level-A { background-color: var(--bg-a); color: black; }
.sc-card .sc-level-AA { background-color: var(--bg-aa); color: black; }
.sc-card .sc-level-AAA { background-color: var(--bg-aaa); color:black; }

.sc-card h4 {
    margin-top: 1rem;
    margin-bottom: 0.3rem;
    font-size: 1em;
    color: #444;
}

.sc-card p, .sc-card ul {
    margin-bottom: 0.5rem;
    font-size: 0.95em;
}

.loading-message, .no-results-message {
    text-align: center;
    color: #222;
    padding: 2rem;
    font-style: italic;
}

/* Add basic responsiveness */
@media (max-width: 600px) {
    header {
        padding: 1rem;
    }
    main {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    #filter-section, #sc-list-section {
        padding: 1rem;
    }
    .sc-card {
        padding: 1rem;
    }
}

/* Footer */
footer {
    background-color: var(--tertiary-color);
    color: var(--black);
    margin-top: 5rem;
    padding: 2.5rem 0;
    text-align: center;
}

footer a {
    color: var(--black);
}

footer p>a {
    text-decoration: solid underline var(--text-dark) 2px;
}

footer a:focus,
footer a:hover {
    outline-color: var(--text-dark);
}

footer .to-the-top {
    border-top: 1px solid var(--text-dark);
    margin-top: 2.5rem;
    padding-top: 2rem;
    text-align: right;
}

footer .to-the-top-long {
    display: inline;
}

footer .to-the-top-short {
    display: none;
}

@media (max-width: 30em) {

    /* 480px */
    footer .to-the-top-long {
        display: none;
    }

    footer .to-the-top-short {
        display: inline;
    }

    .navbar .nav-logo img {
        height: auto;
        width: 150px;
    }
}