:root {
    --primary: #BA4333;
    --primary-dark: #8a3227;
    --grey: #ffffff;
    --grey-light: #f6f7f9;
    --grey-lighter: #e6e9ec;
    --warning: #e67e22;
    --info: #3498db;
    --success: #27ae60;
    --background: #f3f5f7;
    --text: #111827;
    --muted: #6b7280;
}

* {
    box-sizing: border-box;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
}

.app-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100%;
}

header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--grey-lighter);
    margin-bottom: 30px;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary);
}

header h1 a {
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
}

header h1 a:hover {
    text-decoration: none;
    opacity: 0.85;
}

header p {
    margin: 5px 0 0;
    color: #888;
    font-size: 0.9rem;
}

.card {
    background-color: var(--grey);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.4rem;
    margin: 0 0 5px;
    color: var(--text);
}

.card-id {
    color: var(--primary);
    font-size: 0.85rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.card-text {
    color: var(--muted);
    margin-bottom: 20px;
}

.warning-box {
    background-color: rgba(230, 126, 34, 0.15);
    border-left: 4px solid var(--warning);
    padding: 15px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 20px;
}

.warning-box::before {
    content: "⚠️ ";
}

.info-box {
    background-color: rgba(52, 152, 219, 0.15);
    border-left: 4px solid var(--info);
    padding: 15px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 20px;
}

.section-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #888;
    margin: 20px 0 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.aandachtspunten, .stappen-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aandachtspunten li, .stappen-list li {
    background-color: var(--grey-light);
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    position: relative;
    padding-left: 35px;
}

.aandachtspunten li::before {
    content: "•";
    position: absolute;
    left: 15px;
    color: var(--primary);
    font-weight: bold;
}

.stappen-list li {
    counter-increment: step-counter;
}

.stappen-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 12px;
    color: var(--primary);
    font-weight: bold;
    font-size: 0.85rem;
}

.stappen-list {
    counter-reset: step-counter;
}

.stap-toelichting {
    color: #999;
    font-size: 0.9rem;
    margin-top: 5px;
}

.opties {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
}

.optie-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 15px 20px;
    background-color: var(--grey-light);
    border: 2px solid var(--grey-lighter);
    color: var(--text);
    border-radius: 10px;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.optie-btn.clickable {
    cursor: pointer;
}

.optie-btn.clickable:hover {
    border-color: var(--primary);
    background-color: var(--grey-lighter);
}

.optie-btn:not(.clickable) {
    cursor: default;
}

.optie-btn .optie-label {
    font-weight: 500;
}

.optie-btn .optie-actie {
    color: var(--muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.optie-btn .optie-arrow {
    float: right;
    color: var(--primary);
}

.nav-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--grey-lighter);
}

.btn {
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

.btn svg {
    height: 20px;
    width: 20px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    text-decoration: none;
    color: white;
}

.btn-secondary {
    background-color: var(--grey-lighter);
    color: var(--text);
    border: 1px solid #d0d0d0;
}

.btn-secondary:hover {
    background-color: #ececec;
    text-decoration: none;
    color: var(--text);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.breadcrumb-item {
    color: #888;
    cursor: pointer;
}

.breadcrumb-item:hover {
    color: var(--primary);
}

.breadcrumb-item::after {
    content: "→";
    margin-left: 8px;
    color: #555;
}

.breadcrumb-item:last-child::after {
    content: "";
}

.breadcrumb-item:last-child {
    color: var(--primary);
}

.lees-ook {
    background-color: var(--grey-light);
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.lees-ook-title {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 5px;
}

a {
    color: var(--primary);
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

abbr[data-def-key] {
    text-decoration: underline dotted var(--primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    cursor: pointer;
    font-style: normal;
}

.step-ref {
    font-weight: 700;
    cursor: pointer;
}

/* Definitie-dialog */
#def-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 200;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 20px 20px;
}

#def-overlay.open {
    display: flex;
}

#def-dialog {
    background: var(--grey);
    border-radius: 12px;
    padding: 25px;
    max-width: 520px;
    width: 100%;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}

#def-term {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--grey-lighter);
}

#def-body {
    color: var(--muted);
    line-height: 1.7;
    font-size: 0.95rem;
    margin: 0 0 20px;
}

.def-dialog-footer {
    padding-top: 15px;
    border-top: 1px solid var(--grey-lighter);
}

.contact-info {
    background-color: var(--grey-light);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.contact-info h3 {
    margin: 0 0 15px;
    color: var(--primary);
}

.contact-info p {
    margin: 5px 0;
}

.loading {
    text-align: center;
    padding: 50px;
    color: var(--muted);
}

.toelichting-details {
    background-color: var(--grey-light);
    border-radius: 8px;
    margin-bottom: 12px;
}

.toelichting-details summary {
    padding: 12px 15px;
    cursor: pointer;
    font-weight: 500;
    color: var(--muted);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toelichting-details summary::-webkit-details-marker {
    display: none;
}

.toelichting-details summary::before {
    content: "▶";
    font-size: 0.7rem;
    color: var(--primary);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.toelichting-details[open] summary::before {
    transform: rotate(90deg);
}

.toelichting-details summary:hover {
    color: var(--text);
}

.toelichting-content {
    padding: 0 15px 15px 35px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.toelichting-content p {
    margin: 0 0 10px;
}

.toelichting-content p:last-child {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .app-container {
        padding: 15px;
    }

    .card {
        padding: 20px;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .nav-buttons {
        flex-wrap: wrap;
    }

    .nav-buttons .btn {
        flex: 1 1 auto;
        min-width: 120px;
        justify-content: center;
        padding: 12px 15px;
    }
}

@media (max-width: 400px) {
    .nav-buttons {
        flex-direction: column;
    }

    .nav-buttons .btn {
        width: 100%;
    }
}
