/* --- UU-tilsynet Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #202122;
    background-color: #fff;
    /* Flex Column ensures footer stays at bottom */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Skip Link (WCAG 2.4.1) --- */
.skip-link {
    position: absolute;
    top: -100px;
    left: 10px;
    background: #3366cc;
    color: #fff;
    padding: 10px;
    z-index: 100;
}

.skip-link:focus {
    top: 10px;
}

/* --- Layout --- */
header {
    padding: 10px 20px;
    border-bottom: 1px solid #a2a9b1;
}

.site-title {
    font-size: 1.2rem;
    font-family: serif;
    font-weight: bold;
}

.content-wrapper {
    display: flex;
    flex: 1; /* Pushes footer down */
}

nav[aria-label="Hovedmeny"] {
    width: 200px;
    background-color: #f6f6f6;
    border-right: 1px solid #a2a9b1;
    padding: 20px;
}

nav ul {
    list-style: none;
}

nav a {
    color: #3366cc;
    text-decoration: none;
    font-size: 0.9rem;
}

nav a:focus, main a:focus {
    outline: 3px solid #ffcc00; /* High visibility focus indicator */
}

main {
    flex: 1;
    padding: 20px 40px;
    max-width: 900px;
}

/* --- Typography --- */
h1 {
    font-family: serif;
    border-bottom: 1px solid #a2a9b1;
    padding-bottom: 5px;
    margin-bottom: 20px;
}

h2 {
    margin: 25px 0 10px;
}

.toc {
    display: table;
    background: #f8f9fa;
    border: 1px solid #a2a9b1;
    padding: 15px;
    margin: 20px 0;
}

/* --- Footer --- */
footer {
    background-color: #f6f6f6;
    border-top: 1px solid #a2a9b1;
    padding: 20px 40px;
    font-size: 0.8rem;
}

.footer-links {
    list-style: none;
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

/* Responsive Mobile Rules */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }
    nav[aria-label="Hovedmeny"] {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #a2a9b1;
    }
}