@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #f5f6fa;
    --card-bg: #ffffff;
    --text: #1f2430;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --radius: 14px;
    --shadow: 0 2px 10px rgba(20, 20, 40, 0.06);
    --shadow-hover: 0 6px 20px rgba(20, 20, 40, 0.10);

    --yellow: #e0a800;
    --yellow-bg: #fff8e1;
    --orange: #e0691a;
    --orange-bg: #fff1e6;
    --blue: #2563eb;
    --blue-bg: #eaf1ff;
    --purple: #7c3aed;
    --purple-bg: #f3ecff;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
}

/* ---------- Legacy / base selectors kept for compatibility ---------- */

h3 {
    font-size: 20px;
    margin-top: 22px;
}

h2 {
    font-size: 24px;
    margin: 0;
}

p {
    font-size: 16px;
    line-height: 1.6;
}

li {
    font-size: 16px;
    line-height: 1.55;
}

ul {
    margin-bottom: 15px;
}

.highlight {
    background-color: #ffe066;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.highlight-blue {
    background-color: #cfe2ff;
    color: #1d4ed8;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ---------- Layout ---------- */

.lab-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    max-width: 1180px;
    margin: 90px auto 60px;
    padding: 0 24px;
}

.lab-sidebar {
    position: sticky;
    top: 90px;
    flex: 0 0 260px;
    align-self: flex-start;
}

.sidebar-inner {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    border: 1px solid var(--border);
}

.sim-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sim-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none !important;
    transition: background 0.15s ease;
}

.sim-nav-link em {
    font-style: normal;
    color: var(--text-muted);
    display: block;
    font-size: 12px;
    font-weight: 400;
}

.sim-nav-link:hover {
    background: #f2f3f7;
}

.sim-nav-link.active {
    background: #eef2ff;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: 0 0 9px;
}

.dot-yellow { background: var(--yellow); }
.dot-orange { background: var(--orange); }
.dot-blue { background: var(--blue); }
.dot-purple { background: var(--purple); }

.lab-main {
    flex: 1 1 auto;
    min-width: 0;
}

.lab-note {
    background: var(--orange-bg);
    border: 1px solid var(--orange);
    border-radius: var(--radius);
    padding: 12px 22px;
    margin-bottom: 18px;
}

.lab-note p {
    margin: 0;
    color: var(--orange);
    font-weight: 500;
}

.about {
    position: static;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
    box-shadow: var(--shadow);
    margin-bottom: 26px;
}

.about p {
    margin: 0;
    color: var(--text-muted);
}

/* ---------- Simulation cards ---------- */

.sim-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 18px;
    overflow: hidden;
    scroll-margin-top: 100px;
    transition: box-shadow 0.2s ease;
}

.sim-card:hover {
    box-shadow: var(--shadow-hover);
}

.sim-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
}

.sim-icon {
    flex: 0 0 44px;
    height: 44px;
    width: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.sim-heading {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sim-heading h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sim-tag {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 3px 9px;
    border-radius: 999px;
    color: var(--text-muted);
    background: #f2f3f7;
}

.sim-sub {
    font-size: 13px;
    color: var(--text-muted);
}

.sim-progress-badge {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 999px;
    background: #f2f3f7;
    color: var(--text-muted);
    white-space: nowrap;
}

.sim-progress-badge.complete {
    background: #e7f9ee;
    color: #1a8a4a;
}

.chevron {
    flex: 0 0 auto;
    font-size: 20px;
    color: var(--text-muted);
    transition: transform 0.25s ease;
}

.sim-card.open .chevron {
    transform: rotate(180deg);
}

.sim-body {
    max-height: 0;
    overflow: hidden;
    padding: 0 26px;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.sim-card.open .sim-body {
    max-height: 4000px;
    padding: 0 26px 26px;
}

/* Theme accents */

.theme-yellow .sim-icon { background: var(--yellow-bg); color: var(--yellow); }
.theme-yellow { border-top: 4px solid var(--yellow); }

.theme-orange .sim-icon { background: var(--orange-bg); color: var(--orange); }
.theme-orange { border-top: 4px solid var(--orange); }

.theme-blue .sim-icon { background: var(--blue-bg); color: var(--blue); }
.theme-blue { border-top: 4px solid var(--blue); }

.theme-purple .sim-icon { background: var(--purple-bg); color: var(--purple); }
.theme-purple { border-top: 4px solid var(--purple); }

/* ---------- Step list / checklist behaviour ---------- */

.step-list {
    list-style: none;
    padding-left: 0;
    margin: 0 0 15px;
}

.step-list > li.step {
    position: relative;
    padding: 10px 14px 10px 40px;
    margin-bottom: 6px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.step-list > li.step:hover {
    background: #f7f8fb;
}

.step-list > li.step::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 12px;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 2px solid #c7cad1;
    background: #fff;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.step-list > li.step::after {
    content: '';
    position: absolute;
    left: 16px;
    top: 15px;
    width: 4px;
    height: 8px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s ease;
}

.step-list > li.step.done {
    color: var(--text-muted);
    text-decoration: line-through;
    text-decoration-color: #c7cad1;
}

.step-list > li.step.done::before {
    background: #22c55e;
    border-color: #22c55e;
}

.step-list > li.step.done::after {
    transform: rotate(45deg) scale(1);
}

/* nested sub-lists inside a step are informational, not clickable tasks */
.step-list ul {
    list-style: disc;
    margin: 8px 0 4px 6px;
    padding-left: 22px;
}

.step-list ul li {
    cursor: default;
    margin-bottom: 4px;
}

/* Keycap styling for buttons / controls mentioned inline */
.sim-body b {
    background: #f2f3f7;
    border: 1px solid #dfe1e8;
    border-bottom-width: 2px;
    border-radius: 5px;
    padding: 1px 6px;
    font-weight: 600;
    font-size: 0.93em;
}

.placeholder-box {
    background: #fbfbfd;
    border: 1px dashed #d7d9e0;
    border-radius: 10px;
    padding: 18px 20px;
}

.placeholder-box p {
    margin: 0 0 8px;
    color: var(--text-muted);
}

.placeholder-box p:last-child {
    margin-bottom: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
    .lab-wrapper {
        flex-direction: column;
        margin-top: 70px;
        padding: 0 16px;
    }

    .lab-sidebar {
        position: static;
        flex: 1 1 auto;
        width: 100%;
    }

    .sim-nav {
        flex-direction: row;
        overflow-x: auto;
        gap: 8px;
    }

    .sim-nav-link {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .sim-nav-link em {
        display: none;
    }

    .sim-header {
        padding: 14px 16px;
        gap: 12px;
    }

    .sim-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .sim-progress-badge {
        display: none;
    }
}