:root {
    --primary-color: #2c3e50; /* Midnight Blue */
    --secondary-color: #3498db; /* Peter River Blue */
    --accent-color: #1abc9c; /* Turquoise */
    --light-accent-color: #e8f8f5; /* Very light turquoise for backgrounds */
    --background-color: #ecf0f1; /* Clouds */
    --card-bg-color: #ffffff;
    --text-color: #34495e; /* Wet Asphalt */
    --light-text-color: #7f8c8d; /* Asbestos */
    --border-color: #bdc3c7; /* Silver */
    --success-color: #2ecc71; /* Emerald */
    --font-primary: 'Open Sans', sans-serif;
    --font-headings: 'Montserrat', sans-serif;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 960px;
    margin: 20px auto;
}

.main-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
}

.main-header .header-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.main-header h1 {
    font-family: var(--font-headings);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.main-header p {
    font-size: 1rem;
    opacity: 0.9;
}

.card {
    background-color: var(--card-bg-color);
    padding: 25px 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    margin-bottom: 30px;
}

.card h2 {
    font-family: var(--font-headings);
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    display: flex;
    align-items: center;
}
.icon-title {
    margin-right: 12px;
    color: var(--secondary-color);
}

.question-group {
    margin-bottom: 20px;
}

.question-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.question-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}
.question-group input[type="text"]:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.question-group .checkbox-label {
    display: inline-flex; /* To align icon and text */
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    margin-left: 5px; /* space for checkbox */
}
.question-group input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.question-group .checkbox-label i {
    margin-right: 8px;
    color: var(--secondary-color);
    width: 20px; /* For alignment */
}


.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 20px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: var(--font-headings);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 15px;
}
.action-btn:hover {
    background-color: #16a085; /* Darker turquoise */
}
.action-btn i {
    margin-right: 10px;
}

/* Checklist Display Styles */
#checklist-output #displayAppName {
    color: var(--secondary-color);
    font-weight: bold;
}
.checklist-controls {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.control-btn {
    padding: 8px 15px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}
.control-btn:hover {
    background-color: var(--primary-color);
}
.control-btn i {
    margin-right: 6px;
}


.ssdlc-stage {
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden; /* For the border-radius to affect children */
}

.stage-header {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}
.stage-header:hover {
    background-color: var(--secondary-color);
}
.stage-header h3 {
    font-family: var(--font-headings);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}
.stage-header i.title-icon {
    margin-right: 10px;
    color: var(--accent-color);
}
.stage-header .toggle-arrow {
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}
.ssdlc-stage.open .stage-header .toggle-arrow {
    transform: rotate(90deg);
}

.stage-items {
    list-style-type: none;
    padding: 0; /* Remove padding from ul, add to li */
    background-color: var(--card-bg-color); /* Changed for distinct look from header */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.ssdlc-stage.open .stage-items {
    /* max-height is set by JS for smooth animation */
    padding-top: 5px; /* Add slight padding when open */
    padding-bottom: 5px;
}


.stage-items li {
    padding: 12px 20px;
    border-bottom: 1px solid var(--light-accent-color);
    display: flex;
    align-items: flex-start; /* Align icon with first line of text */
    font-size: 0.95rem;
}
.stage-items li:last-child {
    border-bottom: none;
}
.stage-items li i.item-icon {
    margin-right: 12px;
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-top: 2px; /* Fine-tune vertical alignment */
    width: 20px;
    text-align: center;
}
.stage-items li input[type="checkbox"].task-checkbox { /* Added class for specific styling */
    margin-right: 12px;
    transform: scale(1.2);
    cursor: pointer;
    margin-top: 4px; /* Align checkbox with text */
    accent-color: var(--secondary-color); /* Modern checkbox color */
}


footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: var(--light-text-color);
    font-size: 0.9rem;
}

/* Print styles */
@media print {
    body {
        padding: 0;
        font-size: 10pt; /* Adjust base font size for print */
        background-color: #fff; /* White background for print */
        color: #000;
    }
    .container {
        max-width: 100%;
        margin: 0;
        box-shadow: none;
    }
    .main-header, .project-questions-section, footer, .checklist-controls {
        display: none !important; /* Hide non-checklist elements */
    }
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
        padding: 15px;
        margin-bottom: 15px;
    }
    .checklist-display-section {
        display: block !important; /* Ensure checklist is visible */
    }
     #checklist-output h2 {
        font-size: 1.5rem; /* Adjust for print */
        border-bottom: 1px solid #000;
        color: #000;
    }
    .ssdlc-stage {
        margin-bottom: 15px;
        border: 1px solid #aaa;
        page-break-inside: avoid; /* Try to keep stages from splitting across pages */
    }
    .stage-header {
        background-color: #eee !important; /* Light grey for print header */
        color: #000 !important;
        padding: 8px 12px;
    }
    .stage-header i.title-icon, .stage-header .toggle-arrow {
        display: none; /* Hide interactive icons for print */
    }
     .stage-items {
        max-height: none !important; /* Ensure all items are visible */
        overflow: visible !important;
        padding: 5px 0 !important;
        background-color: #fff !important;
    }
    .stage-items li {
        padding: 6px 10px;
        border-bottom: 1px solid #ddd;
        font-size: 9pt;
    }
     .stage-items li input[type="checkbox"].task-checkbox {
        transform: scale(1); /* Normal size checkbox */
        margin-right: 8px;
        vertical-align: middle; /* Align checkbox better in print */
    }
    .stage-items li i.item-icon {
        font-size: 1rem;
        margin-top: 1px;
        /* Optionally hide icons in print if too busy, or use simpler ones */
        /* display: none; */
    }
    /* Make sure to expand all sections for print in JS */
}