:root {
    --bg: #f6f7fb;
    --card: #ffffff;
    --muted: #6b7280;
    --accent: #6b21a8;
    --success: #16a34a;
    --danger: #dc2626;
    --border: #e6e9ef;
    --radius: 12px;
    --card-max-width: 800px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    background: var(--bg);
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 0;
    color: #111827;
}

main {
    margin-bottom: 5px;
}

#header-placeholder {
}

.site-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 0;
    margin: 0;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: block !important;
    visibility: visible !important;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.home-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
    padding: 6px 12px;
    border-radius: 6px;
}

.home-link:hover {
    opacity: 0.8;
    background: rgba(255,255,255,0.1);
}

.home-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.home-text {
    font-size: 14px;
}

.hamburger {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 15px;
        max-width: none;
    }
    
    .home-text {
        display: none;
    }
}

.gap {
    height: 5vh;
}

#footer-placeholder {
    position: absolute;
    top: 100vh;
    width: 100%;
    text-align: center;
}

.content-wrapper {
    height: 90vh;
    display: flex;
    flex-direction: column;
    margin-top: 0;
}

.card {
    position: relative;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 1.1rem auto 0;
    width: 100%;
    max-width: var(--card-max-width, 800px);
    padding: 0.625rem 1.5rem;
    text-align: center;
    height: 75vh;
    overflow-y: auto;
}

h1 {
    font-size: 18px;
    margin: 1.25rem 0 0.5rem;
    color: #111827;
}

p.lead {
    margin: 0 0 1.25rem;
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.card-content {
    padding: 0px;
}

.card-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    order: 2;
    margin-top: 0.5rem;
    width: 100%;
    max-width: var(--card-max-width, 800px);
    margin-left: auto;
    margin-right: auto;
}

.nav-btn {
    display: block;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    border: 1px solid var(--accent);
}

.nav-btn:hover {
    background: #5a35a8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(91, 35, 173, 0.3);
}

.nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.nav-btn-prev {
    border-top-left-radius: var(--radius);
    border-bottom-left-radius: var(--radius);
}

.nav-btn-next {
    border-top-right-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
}

.nav-icon {
    font-size: 1rem;
    font-weight: bold;
}

.message {
    display: none;
    margin-top: 0.75rem;
    padding: 0.625rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    border: 1px solid;
    white-space: nowrap;
    text-align: center;
    justify-content: center;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.message.success {
    color: #22c55e;
    font-weight: normal;
    font-size: 0.75rem;
    border: none;
    background: none;
    display: block;
}

.message.success::before {
    content: "✅ ";
}

.message.failure {
    color: #ef4444;
    font-weight: normal;
    font-size: 0.75rem;
    border: none;
    background: none;
    flex-direction: row;
    display: block;
}

.message.failure::before {
    content: "❌ ";
}

.message.detailed-failure {
    color: #6b1220;
    font-weight: normal;
    font-size: 0.75rem;
    border: none;
    background: none;
    flex-direction: row;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .card {
        padding: 0.5rem 1rem;
        max-width: none;
        height: 70vh;
        overflow-y: auto;
        width: 90%;
        margin: 0.1rem auto 0;
    }

    #footer-placeholder {
        position: static;
        top: auto;
    }

    h1 {
        font-size: 1rem;
        margin: 1rem 0 0.4rem;
    }

    p.lead {
        font-size: 0.8rem;
        margin: 0 0 1rem;
    }

    .nav-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        gap: 0.4rem;
    }

    .nav-icon {
        font-size: 0.9rem;
    }

    .message {
        font-size: 0.75rem;
        padding: 0.5rem;
        margin-top: 0.6rem;
    }

    #header-placeholder {
        display: block;
    }

    #footer-placeholder {
        display: none;
    }

    .card-nav {
        width: 90%;
        height: 3rem;
    }

    .nav-btn:hover {
        transform: none;
    }
}

#expectedValue {
    color: #22c55e;
}

.tasks-overview-container {
    text-align: center;
    margin-top: 20px;
}

.tasks-overview-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.tasks-overview-btn:hover {
    background-color: #0056b3;
}

/* Task List Modern Styles - 4 Button Grid Layout */
.task-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin: 1.25rem 0;
    justify-content: center;
    align-items: stretch;
}

.task-list li {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.625rem 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    min-height: 3rem;
    width: 100%;
    box-sizing: border-box;
}

.task-list li:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.task-list a {
    cursor: pointer;
    font-weight: 500;
    color: #495057;
    margin: 0;
    text-decoration: none;
    width: 100%;
    text-align: center;
    font-size: 0.875rem;
    line-height: 1.2;
    display: block;
    box-sizing: border-box;
}

.task-list a:hover {
    color: #007bff;
}

/* Responsive adjustments for 4-column grid */
@media (max-width: 1200px) {
    .task-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.625rem;
    }
    .task-list li {
        padding: 0.5rem 0.4rem;
        min-height: 2.75rem;
    }
    .task-list a {
        font-size: 0.8125rem;
    }
}

@media (max-width: 768px) {
    .task-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .task-list li {
        padding: 0.4375rem 0.375rem;
        min-height: 2.5rem;
    }
    .task-list a {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .task-list {
        grid-template-columns: 1fr;
        gap: 0.375rem;
    }
    .task-list li {
        padding: 0.375rem 0.5rem;
        min-height: 2.25rem;
        max-width: 12rem;
        margin: 0 auto;
    }
    .task-list a {
        font-size: 0.6875rem;
    }
}

@media (max-height: 768px) {
    .card {
        min-height: 25rem;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 0.3rem 0.6rem;
        max-width: none;
        min-height: 40rem;
        width: 90%;
        margin: 1.5rem auto 0;
    }

    #footer-placeholder {
        position: static;
        top: auto;
    }

    h1 {
        font-size: 0.8rem;
        margin: 0.6rem 0 0.25rem;
    }

    p.lead {
        font-size: 0.7rem;
        margin: 0 0 0.6rem;
    }

    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.7rem;
        gap: 0.25rem;
    }

    .nav-icon {
        font-size: 0.75rem;
    }

    .message {
        font-size: 0.65rem;
        padding: 0.3rem;
        margin-top: 0.4rem;
    }

    #header-placeholder {
        display: block;
    }

    #footer-placeholder {
        display: none;
    }

    .card-nav {
        width: 90%;
        height: 3rem;
    }

    .nav-btn:hover {
        transform: none;
    }

    .nav-btn-prev {
}

@media (max-width: 375px) {
    .card {
        padding: 0.25rem 0.5rem;
        max-width: none;
        min-height: 40rem;
        width: 90%;
        margin: 1.5rem auto 0;
    }

    #footer-placeholder {
        position: static;
        top: auto;
    }

    h1 {
        font-size: 0.75rem;
        margin: 0.5rem 0 0.2rem;
    }

    p.lead {
        font-size: 0.65rem;
        margin: 0 0 0.5rem;
    }

    .nav-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.65rem;
        gap: 0.2rem;
    }

    .nav-icon {
        font-size: 0.7rem;
    }

    .message {
        font-size: 0.6rem;
        padding: 0.25rem;
        margin-top: 0.35rem;
    }

    #header-placeholder {
        display: block;
    }

    .card-nav {
        width: 90%;
        height: 3rem;
    }

    .nav-btn:hover {
        transform: none;
    }
}
