@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;500;600;700&family=Libre+Franklin:wght@300;400;500;600;700&family=Lora:wght@400;500;600&display=swap');

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

body {
    font-family: 'Libre Franklin', sans-serif;
    background: #f0f1ef;
    min-height: 100vh;
    color: #06333d;
    line-height: 1.5;
    padding-top: 64px;
}

/* Toolbar */
.toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #06333d;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 24px;
    z-index: 1000;
    overflow: hidden;
}

.toolbar-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.toolbar-center {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    padding: 0 24px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.toolbar-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: #f0f1ef;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.part-badge {
    background: rgba(240, 241, 239, 0.15);
    color: #f0f1ef;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid rgba(240, 241, 239, 0.3);
}

.toolbar-btn {
    height: 36px;
    padding: 0 12px;
    gap: 6px;
    border: 1px solid rgba(240, 241, 239, 0.6);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f0f1ef;
    font-family: Inconsolata, monospace;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
}

.toolbar-btn:hover:not(:disabled) {
    background: #f0f1ef;
    border-color: #f0f1ef;
    color: #06333d;
}

.toolbar-btn:disabled {
    opacity: 0.25;
    cursor: default;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* index.html: screens fill the full viewport */
#screens-container {
    max-width: none;
    margin: 0;
    padding: 0;
}

/* Screen system */
.screen {
    height: calc(100vh - 64px);
    overflow-y: auto;
}

.screen.hidden {
    display: none;
}

/* Content screens: internal padding and centred children */
#screen-howto,
#screen-why,
#screen-who,
#screen-feel,
#screen-canvas,
#screen-reflection {
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #06333d;
}

#screen-howto > *,
#screen-why > *,
#screen-who > *,
#screen-feel > *,
#screen-canvas > *,
#screen-reflection > * {
    max-width: 900px;
    width: 100%;
    flex-shrink: 0;
}

/* Screen 8: outer shell, inner splash fills it */
#screen-part2 {
    display: flex;
    padding: 0;
}

#screen-part2 > .screen-splash {
    flex: 1;
}

/* Splash screens (Screen 1 & 8) */
.screen-splash {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #06333d;
}

.splash-content {
    max-width: 560px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.splash-part-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #ff405f;
    text-align: center;
}

.splash-heading {
    font-family: 'Lora', Georgia, serif;
    font-size: 2.25rem;
    font-weight: 400;
    color: #f0f1ef;
    line-height: 1.55;
    text-align: center;
}

.splash-btn {
    font-family: Inconsolata, monospace;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #f0f1ef;
    background-color: transparent;
    border: 1px solid #f0f1ef;
    border-radius: 6px;
    padding: 10px 28px;
    cursor: pointer;
    transition: background 0.15s;
}

.splash-btn:hover {
    background: rgba(240, 241, 239, 0.12);
}

/* Part 2 splash — inverted (light bg, dark text) */
.screen-part2-splash {
    background: #f0f1ef;
}

.screen-part2-splash .splash-part-label {
    color: #ff405f;
}

.screen-part2-splash .splash-heading {
    color: #06333d;
}

.screen-part2-splash .splash-btn {
    color: #06333d;
    border-color: #06333d;
}

.screen-part2-splash .splash-btn:hover {
    background: rgba(6, 51, 61, 0.08);
}

/* Centred nav row below content cards */
.screen-nav {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.header {
    text-align: center;
    margin-bottom: 20px;
    padding: 0 20px;
}

.header h1 {
    color: #06333d;
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.header p {
    color: #06333d;
    font-size: 0.95rem;
    font-weight: 400;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.4;
}

/* UX Explanation Section */
.ux-explanation {
    padding: 40px 0;
    margin-bottom: 40px;
    text-align: center;
}

/* Canvas Explanation Section */
.canvas-explanation {
    padding: 40px 0;
    margin-bottom: 40px;
    text-align: center;
}

.canvas-explanation h2 {
    font-family: 'Lora', Georgia, serif;
    color: #f0f1ef;
    font-size: 2.25rem;
    font-weight: 400;
    margin-bottom: 24px;
}

.canvas-explanation > p {
    font-family: 'Libre Franklin', sans-serif;
    color: #f0f1ef;
    font-size: 0.9rem;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.canvas-flow {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 20px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.canvas-step {
    background: #f0f1ef;
    border-radius: 6px;
    padding: 24px 20px;
    max-width: 200px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.step-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 12px;
}

.canvas-step h3 {
    color: #06333d;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.canvas-step p {
    font-family: 'Libre Franklin', sans-serif;
    color: #06333d;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.canvas-outcome {
    font-family: 'Libre Franklin', sans-serif;
    padding: 16px 0;
    color: #f0f1ef;
    font-size: 0.9rem;
    max-width: 500px;
    margin: 0 auto;
}

.ux-explanation h2 {
    font-family: 'Lora', Georgia, serif;
    color: #06333d;
    font-size: 2.25rem;
    font-weight: 400;
    margin-bottom: 24px;
}

.ux-explanation > p {
    font-family: 'Libre Franklin', sans-serif;
    color: #06333d;
    font-size: 0.9rem;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.flow-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.flow-step {
    padding: 20px;
    max-width: 180px;
    text-align: center;
}

.step-number {
    background: #ff405f;
    color: #f0f1ef;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.flow-step p {
    font-family: 'Libre Franklin', sans-serif;
    color: #06333d;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.flow-arrow {
    color: #ff405f;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Centre arrow text vertically when siblings are stretched to equal height */
.canvas-flow > .flow-arrow {
    display: flex;
    align-items: center;
}

.tip {
    font-family: 'Libre Franklin', sans-serif;
    padding: 16px 0;
    color: #06333d;
    font-size: 0.9rem;
    max-width: 500px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .flow-steps {
        flex-direction: column;
        gap: 16px;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
}

.stage-selector {
    padding: 40px 0 0;
    margin-bottom: 0;
}

#p2-sub-stages > .container {
    padding-top: 40px;
}

.stage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 32px;
}

.stage-circle {
    background: #ffffff;
    border-radius: 10px;
    padding: 28px 20px;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease,
                border-bottom-width 0.22s ease, min-height 0.3s ease, padding 0.3s ease;
    text-align: center;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 3px solid transparent;
}

/* Column border colours */
.stage-col-1 { border-bottom-color: #06333d; }
.stage-col-2 { border-bottom-color: #ff405f; }
.stage-col-3 { border-bottom-color: #4472ec; }
.stage-col-4 { border-bottom-color: #e99cd1; }

.stage-circle:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
}

/* Active (selected) stage state */
.stage-circle.active {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
    border-bottom-width: 4px;
}
.stage-col-1.active { background: rgba(6, 51, 61, 0.07); }
.stage-col-2.active { background: rgba(255, 64, 95, 0.07); }
.stage-col-3.active { background: rgba(68, 114, 236, 0.07); }
.stage-col-4.active { background: rgba(233, 156, 209, 0.22); }

/* In compact mode suppress the lift on hover and active — prevents jumping */
.stage-grid.compact .stage-circle:hover,
.stage-grid.compact .stage-circle.active {
    transform: none;
}

.stage-circle h3 {
    font-family: 'Libre Franklin', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
    color: #06333d;
    transition: font-size 0.2s ease, margin-bottom 0.2s ease;
}

.stage-circle p {
    font-family: 'Libre Franklin', sans-serif;
    font-size: 0.88rem;
    color: #06333d;
    line-height: 1.4;
    overflow: hidden;
    transition: opacity 0.15s ease, max-height 0.25s ease;
    max-height: 4em;
}

/* Compact mode: stage grid collapses to a slim navigation row after selection */
.stage-grid.compact {
    gap: 10px;
    margin-top: 20px;
}

.stage-grid.compact .stage-circle {
    min-height: 52px;
    padding: 10px 10px;
}

.stage-grid.compact .stage-circle h3 {
    font-size: 0.8rem;
    margin-bottom: 0;
}

.stage-grid.compact .stage-circle p {
    opacity: 0;
    max-height: 0;
}

.cards-section {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding: 0;
    margin-bottom: 0;
    margin-top: 0;
    transition: max-height 0.5s ease, opacity 0.35s ease, padding 0.4s ease, margin 0.4s ease;
}

.cards-section.visible {
    max-height: 5000px;
    opacity: 1;
    padding: 4px 0 24px;
    margin-top: 0;
    margin-bottom: 40px;
}

.navigation {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    margin-bottom: 24px;
}

.nav-btn {
    font-family: Inconsolata, monospace;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #789096;
    background-color: transparent;
    border: 1px solid #789096;
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.nav-btn:hover {
    color: #06333d;
    border-color: #06333d;
}

.nav-btn.primary {
    color: #06333d;
    border-color: #06333d;
}

.nav-btn.primary:hover {
    background: rgba(6, 51, 61, 0.06);
}

.cards-grid {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.cards-grid.cards-5 {
    gap: 8px;
}

.cards-grid.cards-4 {
    gap: 16px;
}

.method-card {
    perspective: 1000px;
    width: 220px;
    height: 300px;
    cursor: pointer;
    border-radius: 12px;
    flex-shrink: 0;
}

.cards-grid.cards-5 .method-card {
    width: 200px;
}

.cards-grid.cards-4 .method-card {
    width: 240px;
}

.method-card:hover {
    transform: translateY(-2px);
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    border-radius: 12px;
}

.method-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.method-card.banked {
    opacity: 0.4;
    filter: grayscale(100%);
}

.method-card.banked:hover {
    opacity: 0.6;
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 1px solid rgba(6,51,61,0.12);
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cards-grid.cards-5 .card-front,
.cards-grid.cards-5 .card-back {
    padding: 16px;
}

.card-front {
    flex-direction: column;
    justify-content: space-between;
    background: white;
    background-image:
        url('./BRINK_PATTERN_PLANE-01.png'),
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 64, 95, 0.02) 10px, rgba(255, 64, 95, 0.02) 20px);
    background-size: 200px 200px, 20px 20px;
    background-repeat: repeat;
    background-position: 0 0;
    color: #06333d;
}

.card-front-actions {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

.card-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 8px;
    text-align: center;
    border-bottom: 2px solid #ff405f;
    padding-bottom: 8px;
    color: #06333d;
}

.card-category {
    font-size: 0.75rem;
    color: #789096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    font-weight: 500;
}

.card-back {
    transform: rotateY(180deg);
    background: white;
    color: #06333d;
    padding: 16px;
    text-align: left;
    align-items: flex-start;
    flex-direction: column;
}

.card-back-title {
    font-size: 1rem;
    font-weight: 500;
    color: #06333d;
    margin-bottom: 12px;
    text-align: left;
    border-bottom: 2px solid #ff405f;
    padding-bottom: 6px;
}

.card-advice {
    font-size: 0.8rem;
    line-height: 1.4;
    color: rgba(6, 51, 61, 0.8);
    flex: 1;
    overflow: hidden;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.cards-grid.cards-5 .card-advice {
    font-size: 0.75rem;
    line-height: 1.3;
}

.card-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: auto;
    padding-top: 8px;
}

.card-btn {
    font-family: Inconsolata, monospace;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #06333d;
    background: transparent;
    border: 1px solid #06333d;
    border-radius: 6px;
    padding: 5px 12px;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
}

.card-btn:hover {
    background: rgba(6, 51, 61, 0.06);
}

.card-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.card-btn:disabled:hover {
    background: transparent;
}

.cards-grid.cards-5 .card-btn {
    font-size: 0.7rem;
    padding: 4px 10px;
}

/* "Review Your Cards" button row at the bottom of the cards screen */
.cards-actions-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

/* "← Back to Cards" row at the top of the review screen */
.review-back-nav {
    padding: 24px 0 8px;
}

.journey-map {
    padding: 40px 0;
}

#p2-sub-review > .container,
#p2-sub-next > .container {
    padding-top: 40px;
}

.journey-bank-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 28px;
    margin: 24px 0;
}

.next-steps-section {
    padding: 40px 0;
}

.next-steps-section p {
    color: #06333d;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    max-width: 680px;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.next-steps-section p:has(> strong:only-child) {
    margin-bottom: 0;
}

.next-steps-section a {
    color: #ff405f;
}

.journey-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.journey-col {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
}

.journey-stage {
    padding: 14px 10px;
    min-height: 70px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.col-theme-1 .journey-stage { background: #06333d; }
.col-theme-2 .journey-stage { background: #ff405f; }
.col-theme-3 .journey-stage { background: #4472ec; }
.col-theme-4 .journey-stage { background: #e99cd1; }

.journey-stage h4 {
    font-family: 'Libre Franklin', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0;
    line-height: 1.3;
}

.col-theme-1 .journey-stage h4,
.col-theme-2 .journey-stage h4,
.col-theme-3 .journey-stage h4 { color: #f0f1ef; }
.col-theme-4 .journey-stage h4 { color: #06333d; }

.card-stack {
    flex: 1;
    min-height: 220px;
    padding: 12px;
    position: relative;
}

.col-theme-1 .card-stack { background: rgba(6,  51,  61,  0.06); }
.col-theme-2 .card-stack { background: rgba(255, 64,  95,  0.06); }
.col-theme-3 .card-stack { background: rgba(68,  114, 236, 0.06); }
.col-theme-4 .card-stack { background: rgba(233, 156, 209, 0.10); }

.banked-card {
    width: 100%;
    min-height: 44px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    background: white;
    border: 1px solid;
    color: #06333d;
    margin-bottom: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    padding: 8px 6px;
    line-height: 1.2;
    word-wrap: break-word;
    hyphens: auto;
}

.col-theme-1 .banked-card { border-color: #06333d; }
.col-theme-2 .banked-card { border-color: #ff405f; }
.col-theme-3 .banked-card { border-color: #4472ec; }
.col-theme-4 .banked-card { border-color: #e99cd1; }

.banked-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    z-index: 100;
}

.export-section {
    text-align: center;
    margin-top: 40px;
    padding-bottom: 40px;
}

.export-btn {
    font-family: Inconsolata, monospace;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #06333d;
    background-color: transparent;
    border: 1px solid #06333d;
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
    margin: 0 6px;
    transition: background 0.15s;
}

.export-btn:hover {
    background: rgba(6, 51, 61, 0.06);
}

.export-btn.secondary {
    color: #789096;
    border-color: #789096;
}

.export-btn.secondary:hover {
    color: #06333d;
    border-color: #06333d;
    background: rgba(6, 51, 61, 0.06);
}

.hidden {
    display: none !important;
}

h2 {
    color: #06333d;
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 8px;
    text-align: center;
}

.section-title {
    font-family: 'Lora', Georgia, serif;
    font-size: 2.25rem;
    font-weight: 400;
    color: #f0f1ef;
    text-align: center;
    margin-top: 0;
    margin-bottom: 24px;
}

.section-description {
    font-family: 'Libre Franklin', sans-serif;
    font-size: 0.9rem;
    color: #f0f1ef;
    margin-bottom: 24px;
    text-align: center;
}

@media (max-width: 768px) {
    .journey-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1100px) {
    .cards-grid,
    .cards-grid.cards-4,
    .cards-grid.cards-5 {
        justify-content: center;
        gap: 16px;
    }
    
    .method-card,
    .cards-grid.cards-4 .method-card,
    .cards-grid.cards-5 .method-card {
        width: 220px;
    }
}

@media (max-width: 768px) {
    .stage-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header h1 {
        font-size: 2.2rem;
    }
    
    .navigation,
    .cards-actions-nav {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .journey-columns {
        grid-template-columns: 1fr;
    }
}

/* ─── Part 2 page (method-cards.html) ─────────────────────────────────────── */

.part2-page {
    background: #f0f1ef;
    color: #06333d;
}

/* Re-apply correct text colour for shared classes that Part 1 forced to #f0f1ef */
.part2-page .section-description {
    color: #06333d;
}

.part2-page .header {
    padding-top: 48px;
    margin-bottom: 48px;
}

.part2-label {
    font-family: Inconsolata, monospace;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #789096;
    margin-bottom: 12px;
}

/* Lora headings for Part 2 sections + About screen */
.part2-page .header h2,
#stage-selector h2,
.cards-section h2,
.journey-map h2,
.next-steps-section h2,
#screen-about h2 {
    font-family: 'Lora', Georgia, serif;
    font-size: 2.25rem;
    font-weight: 400;
    color: #06333d;
    text-align: center;
    margin-bottom: 24px;
}

/* Coral accent underline — same treatment as Part 1 */
.part2-page .header h2::after,
.ux-explanation h2::after,
#stage-selector h2::after,
.journey-map h2::after,
.next-steps-section h2::after,
#screen-about h2::after {
    content: '';
    display: block;
    width: 3em;
    height: 2px;
    background: #ff405f;
    margin: 10px auto 0;
}

/* Cards screen heading: Libre Franklin, ~20% smaller, no underline */
.cards-section h2 {
    font-family: 'Libre Franklin', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.cards-section h2::after {
    display: none;
}

/* ─── Themed colour box (title + cards grid) ───────────────────────────────── */

.cards-theme-box {
    border-radius: 16px;
    padding: 32px 32px 44px;
    margin: 16px 0 28px;
}

.cards-theme-box .section-description {
    margin-bottom: 28px;
    font-weight: 600;
}

.cards-section.stage-theme-1 .cards-theme-box { background: #06333d; }
.cards-section.stage-theme-2 .cards-theme-box { background: #ff405f; }
.cards-section.stage-theme-3 .cards-theme-box { background: #4472ec; }
.cards-section.stage-theme-4 .cards-theme-box { background: #e99cd1; }

/* Heading inside box — white on dark/vivid themes, dark teal on light pink */
.cards-section.stage-theme-1 .cards-theme-box h2,
.cards-section.stage-theme-2 .cards-theme-box h2,
.cards-section.stage-theme-3 .cards-theme-box h2 { color: #f0f1ef; }
.cards-section.stage-theme-4 .cards-theme-box h2 { color: #06333d; }

/* Description inside box */
.cards-section.stage-theme-1 .cards-theme-box .section-description,
.cards-section.stage-theme-2 .cards-theme-box .section-description,
.cards-section.stage-theme-3 .cards-theme-box .section-description { color: #f0f1ef; }
.cards-section.stage-theme-4 .cards-theme-box .section-description { color: #06333d; }

/* ─── Canvas Tool Specific Styles ──────────────────────────────────────────── */

.canvas-section {
    padding-top: 40px;
}

.canvas-section h2 {
    font-family: 'Lora', Georgia, serif;
    font-size: 2.25rem;
    font-weight: 400;
    color: #f0f1ef;
    text-align: center;
    margin-bottom: 24px;
}

/* Progress bar lives inside the fixed toolbar */
.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(240, 241, 239, 0.55);
    overflow: hidden;
}

.progress-fill {
    display: none;
    height: 100%;
    transition: width 0.3s ease;
}

.question-section {
    padding: 40px 0;
    margin-bottom: 30px;
}

.question-section.hidden {
    display: none;
}

.question {
    margin-bottom: 24px;
}

.question-label {
    display: block;
    font-family: 'Libre Franklin', sans-serif;
    color: #f0f1ef;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.question-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(6,51,61,0.15);
    border-radius: 6px;
    background: white;
    color: #06333d;
    font-size: 0.9rem;
    font-family: 'Libre Franklin', sans-serif;
    transition: all 0.2s ease;
    min-height: 80px;
    resize: vertical;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.question-input:focus {
    outline: none;
    border-color: #ff405f;
    box-shadow: 0 0 0 3px rgba(255, 64, 95, 0.12);
}

.question-input::placeholder {
    color: rgba(6, 51, 61, 0.35);
}

.canvas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 48px;
}

.canvas-grid.three-section {
    grid-template-columns: 1fr 1fr 1fr;
}

.canvas-quadrant {
    background: #ffffff;
    border-radius: 6px;
    padding: 24px;
    min-height: 360px;
}

.quadrant-title {
    font-family: 'Libre Franklin', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #06333d;
    text-align: center;
    border-bottom: 2px solid #ff405f;
    padding-bottom: 8px;
}

.quadrant-content {
    font-family: 'Libre Franklin', sans-serif;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #06333d;
}

.quadrant-item {
    margin-bottom: 8px;
    padding-left: 12px;
    position: relative;
}

.quadrant-item::before {
    content: ">";
    color: #ff405f;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Coral accent underline on all Lora headings except the splash */
.canvas-explanation h2::after,
.section-title::after,
.canvas-section h2::after,
.reflection-section h2::after {
    content: '';
    display: block;
    width: 3em;
    height: 2px;
    background: #ff405f;
    margin: 10px auto 0;
}

/* Reflection Section */
.reflection-section {
    padding: 40px 0;
    text-align: center;
}

.reflection-section h2 {
    font-family: 'Lora', Georgia, serif;
    color: #f0f1ef;
    font-size: 2.25rem;
    font-weight: 400;
    margin-bottom: 24px;
}

.reflection-intro {
    font-family: 'Libre Franklin', sans-serif;
    color: #f0f1ef;
    font-size: 0.9rem;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.reflection-prompts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.reflection-prompt {
    background: #ffffff;
    border-radius: 6px;
    padding: 24px;
    text-align: left;
}

.reflection-prompt h3 {
    font-family: 'Libre Franklin', sans-serif;
    color: #06333d;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.reflection-prompt p {
    font-family: 'Libre Franklin', sans-serif;
    color: #06333d;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.reflection-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.reflection-btn {
    font-family: Inconsolata, monospace;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #f0f1ef;
    background-color: transparent;
    border: 1px solid rgba(240, 241, 239, 0.6);
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.reflection-btn:hover {
    background: rgba(240, 241, 239, 0.12);
}

.reflection-btn.primary {
    color: #ff405f;
    border-color: #ff405f;
}

.reflection-btn.primary:hover {
    background: rgba(255, 64, 95, 0.1);
}

/* Nav buttons adapted for dark Part 1 screens */
#screen-howto .nav-btn,
#screen-why .nav-btn,
#screen-feel .nav-btn,
#screen-canvas .nav-btn {
    color: rgba(240, 241, 239, 0.7);
    border-color: rgba(240, 241, 239, 0.7);
}

#screen-howto .nav-btn.primary,
#screen-why .nav-btn.primary,
#screen-feel .nav-btn.primary,
#screen-canvas .nav-btn.primary {
    color: #f0f1ef;
    border-color: rgba(240, 241, 239, 0.6);
}

#screen-howto .nav-btn:hover,
#screen-why .nav-btn:hover,
#screen-feel .nav-btn:hover,
#screen-canvas .nav-btn:hover {
    background: rgba(240, 241, 239, 0.12);
}

#screen-howto .nav-btn.primary:hover,
#screen-why .nav-btn.primary:hover,
#screen-feel .nav-btn.primary:hover,
#screen-canvas .nav-btn.primary:hover {
    background: rgba(240, 241, 239, 0.12);
}

/* Export buttons adapted for dark canvas screen */
#screen-canvas .export-btn {
    color: #f0f1ef;
    border-color: rgba(240, 241, 239, 0.6);
}

#screen-canvas .export-btn:hover {
    background: rgba(240, 241, 239, 0.12);
}

#screen-canvas .export-btn.secondary {
    color: rgba(240, 241, 239, 0.6);
    border-color: rgba(240, 241, 239, 0.4);
}

#screen-canvas .export-btn.secondary:hover {
    background: rgba(240, 241, 239, 0.12);
    color: #f0f1ef;
    border-color: rgba(240, 241, 239, 0.6);
}

/* Coral Continue button — global, works on both Part 1 and Part 2 */
.export-btn.coral {
    color: #ff405f;
    border-color: #ff405f;
}

.export-btn.coral:hover {
    background: rgba(255, 64, 95, 0.1);
}

/* ─── Part 2: How This Works screen ───────────────────────────────────────── */

#p2-screen-howto {
    background: #f0f1ef;
    min-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
}

#p2-screen-howto > * {
    max-width: 900px;
    width: 100%;
    flex-shrink: 0;
}

/* Text colours for light background */
#p2-screen-howto .canvas-explanation h2,
#p2-screen-howto .canvas-explanation > p,
#p2-screen-howto .canvas-outcome {
    color: #06333d;
}

/* Step boxes: white so they stand out from the #f0f1ef background */
#p2-screen-howto .canvas-step {
    background: #ffffff;
    color: #06333d;
}

#p2-screen-howto .step-icon {
    font-family: 'Lora', Georgia, serif;
    font-size: 2.25rem;
    font-weight: 400;
    color: #06333d;
}

#p2-screen-howto .canvas-step h3,
#p2-screen-howto .canvas-step p {
    color: #06333d;
}

/* Nav button */
#p2-screen-howto .nav-btn {
    color: #789096;
    border-color: #789096;
}

#p2-screen-howto .nav-btn.primary {
    color: #06333d;
    border-color: #06333d;
}

#p2-screen-howto .nav-btn:hover,
#p2-screen-howto .nav-btn.primary:hover {
    background: rgba(6, 51, 61, 0.08);
}

/* Canvas Tool Responsive */
@media (max-width: 768px) {
    .canvas-grid,
    .canvas-grid.three-section {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .reflection-prompts {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .reflection-actions {
        flex-direction: column;
        align-items: center;
    }
}
/* ─── About This Tool screen ────────────────────────────────────────────── */

#screen-about {
    padding: 40px 20px;
}

/* ─── How This Works: coloured boxes on canvas-step ─────────────────────── */

#screen-howto .canvas-step-why  { background: #eff5fc; }
#screen-howto .canvas-step-who  { background: #e99cd1; }
#screen-howto .canvas-step-feel { background: #f9f771; }

/* ─── Form screens: question box on dark background ─────────────────────── */

/* All three form screens keep the dark (#06333d) body background;
   the accent colour appears only on the form box itself. */
#screen-why .question-section  { background: #eff5fc; }
#screen-who .question-section  { background: #e99cd1; }
#screen-feel .question-section { background: #f9f771; }

#screen-why .question-section,
#screen-who .question-section,
#screen-feel .question-section {
    border-radius: 16px;
    padding: 40px;
    max-width: 720px;
    margin: 24px auto;
}

/* Why, Who and Feel screens: dark text on light-coloured boxes */
#screen-why .section-title,
#screen-why .section-description,
#screen-why .question-label,
#screen-who .section-title,
#screen-who .section-description,
#screen-who .question-label,
#screen-feel .section-title,
#screen-feel .section-description,
#screen-feel .question-label {
    color: #06333d;
}

#screen-why .nav-btn,
#screen-who .nav-btn,
#screen-feel .nav-btn {
    color: rgba(6, 51, 61, 0.7);
    border-color: rgba(6, 51, 61, 0.7);
}

#screen-why .nav-btn.primary,
#screen-who .nav-btn.primary,
#screen-feel .nav-btn.primary {
    color: #06333d;
    border-color: #06333d;
}

#screen-why .nav-btn:hover,
#screen-why .nav-btn.primary:hover,
#screen-who .nav-btn:hover,
#screen-who .nav-btn.primary:hover,
#screen-feel .nav-btn:hover,
#screen-feel .nav-btn.primary:hover {
    background: rgba(6, 51, 61, 0.08);
    color: #06333d;
    border-color: #06333d;
}

/* ─── Fund Canvas: coloured quadrant-title headers ───────────────────────── */

.canvas-quadrant.quad-why,
.canvas-quadrant.quad-who,
.canvas-quadrant.quad-feel {
    overflow: hidden;
}

.canvas-quadrant.quad-why .quadrant-title,
.canvas-quadrant.quad-who .quadrant-title,
.canvas-quadrant.quad-feel .quadrant-title {
    margin: -24px -24px 16px;
    padding: 16px 24px;
    border-bottom: none;
}

.canvas-quadrant.quad-why .quadrant-title { background: #eff5fc; color: #06333d; }
.canvas-quadrant.quad-who .quadrant-title { background: #e99cd1; color: #06333d; }
.canvas-quadrant.quad-feel .quadrant-title { background: #f9f771; color: #06333d; }

/* ─── Site Modal (replaces native alert()) ──────────────────────────────── */

.site-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 51, 61, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.site-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.site-modal {
    background: #f0f1ef;
    border-radius: 12px;
    padding: 36px 40px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 24px 60px rgba(6, 51, 61, 0.22);
    border-top: 4px solid #06333d;
    transform: translateY(10px);
    transition: transform 0.2s ease;
}

.site-modal-overlay.open .site-modal {
    transform: translateY(0);
}

.site-modal h3 {
    font-family: 'Libre Franklin', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #06333d;
    margin: 0 0 14px;
    line-height: 1.3;
}

#site-modal-body {
    font-family: 'Libre Franklin', sans-serif;
    font-size: 0.9rem;
    color: #06333d;
    line-height: 1.7;
    margin-bottom: 28px;
    max-height: 50vh;
    overflow-y: auto;
}

.site-modal-footer {
    display: flex;
    justify-content: flex-end;
}
