body {
    font-family: Lora, Arial, sans-serif;
    line-height: 1.5;
    margin: 2rem;
    color: #222;
}


h1 {
    margin-bottom: 0.25rem;
}


h2 {
    margin-top: 2rem;
}


h3 {
    margin-top: 1.5rem;
}


table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}


th,
td {
    border: 1px solid #ccc;
    padding: 0.6rem;
    text-align: left;
    vertical-align: top;
}


th {
    background: #f5f5f5;
}


/* =========================================================
       Checkbox column
       ========================================================= */

th.check-column,
td.check-column {
    width: 50px;
    text-align: center;
    vertical-align: middle;
}


/* =========================================================
       Criterion column
       ========================================================= */

th.criterion-column {
    width: auto;
}


/* =========================================================
       Priority and status columns
       ========================================================= */

th.priority-column,
th.status-column {
    width: 20%;
}


/* =========================================================
      Reusable Materials column
       ========================================================= */

th.resources-column,
td.resources-column {
    width: 100px;
    text-align: center;
    vertical-align: middle;
}


td.resources-column a {
    text-decoration: none;
    font-weight: bold;
}


td.resources-column a:hover {
    text-decoration: underline;
}


td.check-column input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}


label {
    cursor: pointer;
}


select {
    padding: 0.35rem;
    width: 100%;
    max-width: 220px;
}


section {
    margin-bottom: 2rem;
}


.intro {
    margin-bottom: 2rem;
}

/* =========================================================
       Framework overview and pipeline
       ========================================================= */

.framework-intro {
    max-width: 900px;
}

.framework-intro .lead {
    font-size: 1.2rem;
    line-height: 1.6;
}

.framework-pipeline {
    margin: 3rem 0 3.5rem;
}

.pipeline-header {
    max-width: 900px;
    margin-bottom: 2rem;
}

.pipeline-kicker {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.78rem;
    font-weight: bold;
    letter-spacing: 0.12em;
    color: #666;
}

.pipeline-header h2 {
    margin: 0 0 0.5rem;
}

.pipeline-header p {
    margin: 0;
    color: #555;
    max-width: 800px;
}

.pipeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    max-width: 1000px;
}

.pipeline-step {
    position: relative;
    display: grid;
    grid-template-columns: 3.5rem 1fr;
    gap: 1.25rem;
    border: 1px solid #d8d8d8;
    background: #fff;
    padding: 1.4rem 1.5rem;
    min-height: 0;
}

.pipeline-step+.pipeline-step {
    border-top: none;
}

.pipeline-step:not(:last-child)::after {
    content: "↓";
    position: absolute;
    left: 1.05rem;
    bottom: -0.8rem;
    z-index: 2;
    width: 1.5rem;
    height: 1.5rem;
    text-align: center;
    line-height: 1.35rem;
    background: #fff;
    color: #777;
    font-size: 1.2rem;
    font-weight: bold;
}

.start-step {
    border: 2px solid #555;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #777;
    border-radius: 50%;
    font-weight: bold;
}

.step-phase {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.72rem;
    line-height: 1.3;
    font-weight: bold;
    letter-spacing: 0.06em;
    color: #666;
}

.step-content {
    max-width: 850px;
}

.step-content h3 {
    margin: 0 0 0.7rem;
}

.step-content p {
    margin: 0;
    color: #444;
}

.step-callout {
    margin-top: 1.2rem;
    padding: 0.8rem;
    border-left: 3px solid #555;
    background: #f5f5f5;
    font-size: 0.92rem;
}

.pipeline-footer {
    margin-top: 1.5rem;
    padding: 1.1rem 1.3rem;
    border-top: 2px solid #222;
    border-bottom: 1px solid #ccc;
}

.pipeline-footer strong {
    font-size: 1.05rem;
}

.pipeline-footer p {
    margin: 0.35rem 0 0;
    color: #555;
}

@media (max-width: 600px) {
    .pipeline-step {
        grid-template-columns: 2.8rem 1fr;
        gap: 0.9rem;
        padding: 1.2rem;
    }

    .pipeline-step:not(:last-child)::after {
        left: 0.7rem;
    }
}


.legend {
    background: #f8f8f8;
    border: 1px solid #ddd;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
}


.legend p {
    margin-top: 0.25rem;
}


.instructions {
    background: #f8f8f8;
    border-left: 4px solid #999;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0 2rem;
}


.sources {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid #ccc;
}


.sources li {
    margin-bottom: 0.5rem;
}


.methodology {
    margin-bottom: 2rem;
}


.error {
    padding: 1rem;
    background: #ffe6e6;
    border: 1px solid #cc0000;
    color: #990000;
}

/* =========================================================
       Export / Import
       ========================================================= */

.data-exchange {
    margin: 1.5rem 0 2rem;
}

.exchange-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.exchange-card {
    border: 1px solid #d8d8d8;
    background: #fff;
    padding: 1.2rem 1.4rem;
    margin: 0;
}

.exchange-card h3 {
    margin-top: 0;
}

.exchange-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0.8rem 0;
}

.exchange-button {
    padding: 0.45rem 1rem;
    border: 1px solid #555;
    background: #fff;
    color: #222;
    font: inherit;
    cursor: pointer;
}

.exchange-button:hover,
.exchange-button:focus-visible {
    background: #f0f0f0;
}

.exchange-button.primary {
    background: #333;
    border-color: #333;
    color: #fff;
}

.exchange-button.primary:hover,
.exchange-button.primary:focus-visible {
    background: #111;
}

.exchange-hint {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
}

.exchange-label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.exchange-card input[type="file"] {
    display: block;
    max-width: 100%;
    margin-bottom: 0.8rem;
}

.exchange-mode {
    border: 1px solid #e0e0e0;
    padding: 0.5rem 0.9rem 0.7rem;
    margin: 0 0 0.3rem;
}

.exchange-mode legend {
    font-size: 0.9rem;
    font-weight: bold;
    width: auto;
    margin: 0;
    padding: 0 0.3rem;
    border: none;
}

.exchange-mode label {
    display: block;
    font-weight: normal;
    margin: 0.15rem 0;
}

.import-report:empty {
    display: none;
}

.import-report {
    margin-top: 0.6rem;
    padding: 0.7rem 0.9rem;
    border-left: 3px solid #555;
    background: #f5f5f5;
    font-size: 0.92rem;
}

.import-report p {
    margin: 0;
}

.import-report ul {
    margin: 0.4rem 0 0;
    padding-left: 1.2rem;
}

.import-report.success {
    border-left-color: #2e7d32;
    background: #eef7ee;
}

.import-report.warning {
    border-left-color: #b26a00;
    background: #fff6e5;
}

.import-report.error {
    border-left-color: #cc0000;
    background: #ffe6e6;
    color: #990000;
}

@keyframes imported-flash {
    from {
        background: #fff3b0;
    }

    to {
        background: transparent;
    }
}

tr.imported-change td {
    animation: imported-flash 2.5s ease-out;
}


/* =========================================================
       Controls: view options
       ========================================================= */

.exchange-card.view-card {
    margin-bottom: 1.25rem;
}

.view-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem 1.5rem;
    margin-bottom: 0.8rem;
}

.toggle-option {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-weight: normal;
}

.toggle-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.exchange-button:disabled {
    opacity: 0.45;
    cursor: default;
    background: #fff;
}


/* =========================================================
       Category order (move up / down)
       ========================================================= */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    margin-bottom: 0.6rem;
}

.section-header h2 {
    margin: 0;
}

.section-position {
    display: inline-block;
    min-width: 1.8rem;
    color: #888;
    font-weight: normal;
}

.section-move {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.section-move button {
    width: 2.2rem;
    height: 2.2rem;
    border: 1px solid #999;
    background: #fff;
    color: #333;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.section-move button:hover:not(:disabled),
.section-move button:focus-visible {
    background: #f0f0f0;
    border-color: #555;
}

.section-move button:disabled {
    opacity: 0.3;
    cursor: default;
}


/* =========================================================
       Notes column
       ========================================================= */

#checklist.notes-hidden .notes-column {
    display: none;
}

th.notes-column {
    width: 22%;
}

#checklist:not(.notes-hidden) th.priority-column,
#checklist:not(.notes-hidden) th.status-column {
    width: 17%;
}

td.notes-column textarea {
    display: block;
    width: 100%;
    min-height: 2.6rem;
    padding: 0.35rem;
    border: 1px solid #ccc;
    font: inherit;
    font-size: 0.92rem;
    resize: vertical;
}


/* =========================================================
       Slightly wider content on large screens only
       ========================================================= */

@media (min-width: 1200px) {

    .wide-content-column {
        flex: 0 0 83.333333%;
        max-width: 83.333333%;
        margin-left: 8.333333%;
    }

}
