/* --- Base Styles --- */
:root {
    --primary-color: #003366; /* High contrast dark blue */
    --text-color: #222222;    /* Near black for readability */
    --bg-color: #ffffff;
    --focus-color: #ffdd00;   /* Bright yellow for focus ring */
    --link-color: #0044cc;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    font-size: 1.125rem; /* approx 18px */
}

/* --- Layout Utility --- */
.container {
    max-width: 50rem;
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- Accessibility: Skip Link --- */
.skip-link {
    position: absolute;
    top: -3rem;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    z-index: 100;
    text-decoration: none;
    font-weight: bold;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* --- Header & Nav --- */
header {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 1rem 0;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
}

nav ul {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid transparent;
}

nav a:hover,
nav a:focus {
    border-bottom: 2px solid #ffffff;
    outline: 2px solid var(--focus-color);
    outline-offset: 4px;
}

nav a[aria-current="page"] {
    border-bottom: 2px solid #ffffff;
}

/* --- Main Content --- */
main {
    padding: 2rem 0;
}

h2, h3 {
    color: var(--primary-color);
}

a {
    color: var(--link-color);
}

a:focus {
    background-color: var(--focus-color);
    color: #000;
    outline: 2px solid #000;
    text-decoration: none;
}

/* --- Buttons --- */
.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    border: 2px solid var(--primary-color);
    margin-top: 1rem;
}

.button:hover {
    background-color: #002244;
    text-decoration: underline;
}

.button:focus {
    background-color: var(--primary-color);
    color: #ffffff;
    outline: 4px solid var(--focus-color);
    outline-offset: 2px;
}

/* --- Section List Styles --- */
.section-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.section-list li {
    margin-bottom: 1.5rem;
}

.section-card {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-left: 5px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 4px;
}

.section-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.section-card a {
    text-decoration: none;
    font-size: 1.25rem;
    display: block;
}

.section-card a:hover {
    text-decoration: underline;
}

.section-card p {
    margin-bottom: 0;
    color: #444;
}

/* --- Lesson Specific Styles --- */
.lesson-instructions {
    background-color: #f4f7fa;
    padding: 1.5rem;
    border-radius: 4px;
    border-left: 5px solid var(--primary-color);
    margin-bottom: 2rem;
}

.practice-label {
    display: block;
    font-weight: bold;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.lesson-textarea {
    width: 100%;
    height: 400px;
    padding: 1rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.2rem;
    line-height: 2; /* Helps with visual tracking */
    border: 2px solid #ccc;
    border-radius: 4px;
    resize: vertical;
}

.lesson-textarea:focus {
    border-color: var(--primary-color);
    outline: 4px solid var(--focus-color);
}