/* =========================================================
   AVOIDANCE CARDS
========================================================= */
#avoidCards {
    grid-template-columns: repeat(3,1fr);
    max-width: 100%;
}

#avoidCards .tool-card {
    min-height: 90px;
    margin-bottom: 0;
    padding: 14px 10px;
    flex-direction: column;
    gap: 8px;
}

#avoidCards .tool-card span:first-child {
    font-size: 1.8rem;
    line-height: 1;
}

#avoidCards .tool-card span:last-child {
    font-size: .92rem;
    font-weight: 500;
}

/* =========================================================
   CARD MODIFIERS
========================================================= */

.avoid-card.selected,
.cycle-node.selected {
    border-color: var(--green-1);
    background: linear-gradient(135deg,rgba(52,211,153,.10),rgba(139,92,246,.10));
}

/* =========================================================
   FORM FIELDS
========================================================= */
textarea,
.ladder-input,
.commit-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    color: var(--text);
    background: rgba(6,11,15,.82);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color .2s var(--ease),box-shadow .2s var(--ease);
}

.tool-stage textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
textarea {
    display: block;
    min-height: 100px;
    padding: 14px 16px;
    resize: vertical;
    line-height: 1.55;
}

textarea:focus,
.ladder-input:focus,
.commit-input:focus {
    border-color: var(--green-1);
    box-shadow: 0 0 0 2px rgba(52,211,153,.10);
}

textarea::placeholder,
.ladder-input::placeholder,
.commit-input::placeholder {
    color: rgba(138,163,156,.65);
}

/* =========================================================
   STAGE 1
========================================================= */
#stage1 .field-label[for="customAvoidance"] {
    display: block;
    margin-top: 50px;
    margin-bottom: 7px;
}

#customAvoidance {
    margin-top: 0;
}

#customAvoidance + .tool-btn {
    margin-top: 14px;
}

/* =========================================================
   CYCLE
========================================================= */
.cycle-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 26px auto;
}

.cycle-node {
    width: 100%;
    max-width: 560px;
    min-height: auto;
    margin-bottom: 0;
    padding: 16px 20px;
    cursor: default;
    line-height: 1.5;
    text-align: left;
}

.cycle-node:hover {
    transform: none;
}

.cycle-node-label {
    width: 100%;
    margin-bottom: 8px;
    color: var(--green-1);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.3;
    text-align: left;
    text-transform: uppercase;
}

.cycle-node > div:not(.cycle-node-label) {
    width: 100%;
    text-align: left;
}

.cycle-arrow {
    padding: 7px 0;
    color: var(--purple-1);
    font-size: 1.3rem;
}

#feelingsInput {
    margin-top: 7px;
}

/* =========================================================
   STAGE BUTTONS
========================================================= */
.stage-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.stage-actions .tool-btn {
    flex: 0 1 auto;
}

/* =========================================================
   EXPOSURE LADDER
========================================================= */
.ladder-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 26px 0;
}

.ladder-step {
    display: grid;
    grid-template-columns: 46px 1fr 70px;
    align-items: center;
    gap: 12px;
}

.ladder-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--on-green);
    background: linear-gradient(135deg,var(--green-1),var(--green-2));
    font-weight: 700;
}

.ladder-input {
    min-height: 46px;
    padding: 11px 14px;
}

.ladder-difficulty {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 600;
    text-align: right;
}

/* =========================================================
   SUMMARY
========================================================= */

.summary-section {
    display: grid;
    grid-template-columns: 190px 1fr;
    align-items: center;
    gap: 24px;
    min-height: auto;
    margin-bottom: 16px;
    padding: 16px 18px;
    cursor: default;
    text-align: left;
}

.summary-section:hover {
    transform: none;
}

.summary-label,
.summary-first-step-label {
    margin: 0;
    color: var(--green-1);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.35;
    text-align: left;
    text-transform: uppercase;
}

.summary-value {
    min-width: 0;
    color: rgba(234,255,247,.88);
    line-height: 1.55;
    text-align: left;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.summary-ladder-item {
    display: flex;
    gap: 8px;
    padding: 4px 0;
}

.summary-step-num {
    flex: 0 0 auto;
    color: var(--purple-1);
    font-weight: 700;
}

.summary-first-step {
    margin: 26px 0;
    min-height: auto;
    padding: 22px;
    flex-direction: column;
    cursor: default;
    background: linear-gradient(135deg,rgba(52,211,153,.12),rgba(139,92,246,.12));
    border-color: rgba(52,211,153,.35);
}

.summary-first-step:hover {
    transform: none;
}

.summary-first-step-label {
    margin-bottom: 10px;
}

.summary-first-step-action {
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.5;
}


/* =========================================================
   SUMMARY — MOBILE
========================================================= */

@media (max-width: 768px) {

    .summary-section {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .summary-label {
        align-self: center;
    }
}
/* =========================================================
   COMMITMENT
========================================================= */
.commit-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    align-items: center;
    gap: 16px;
    margin: 14px 0;
}

.commit-row label {
    color: var(--text);
    font-size: .9rem;
    font-weight: 500;
}

.commit-input {
    min-height: 46px;
    padding: 10px 14px;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    #avoidCards {
        grid-template-columns: repeat(2,1fr);
    }

    .ladder-step {
        grid-template-columns: 42px 1fr;
    }

    .ladder-difficulty {
        display: none;
    }

    .commit-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    #avoidCards {
        gap: 10px;
    }

    #avoidCards .tool-card {
        min-height: 105px;
        padding: 14px 8px;
    }

    #avoidCards .tool-card span:first-child {
        font-size: 1.7rem;
    }

    #avoidCards .tool-card span:last-child {
        font-size: .82rem;
    }

    .stage-actions {
        flex-direction: column;
    }

    .stage-actions .tool-btn {
        width: 100%;
    }

    .cycle-node {
        padding: 15px 16px;
    }

    .cycle-node-label {
        margin-bottom: 9px;
    }

    #feelingsInput {
        margin-top: 24px;
    }
}/* =========================================================
   AVOIDANCE CARDS
========================================================= */
#avoidCards {
    grid-template-columns: repeat(3,1fr);
    max-width: 100%;
}

#avoidCards .tool-card {
    min-height: 90px;
    margin-bottom: 0;
    padding: 14px 10px;
    flex-direction: column;
    gap: 8px;
}

#avoidCards .tool-card span:first-child {
    font-size: 1.8rem;
    line-height: 1;
}

#avoidCards .tool-card span:last-child {
    font-size: .92rem;
    font-weight: 500;
}

/* =========================================================
   CARD MODIFIERS
========================================================= */

.avoid-card.selected,
.cycle-node.selected {
    border-color: var(--green-1);
    background: linear-gradient(135deg,rgba(52,211,153,.10),rgba(139,92,246,.10));
}

/* =========================================================
   FORM FIELDS
========================================================= */
textarea,
.ladder-input,
.commit-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    color: var(--text);
    background: rgba(6,11,15,.82);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color .2s var(--ease),box-shadow .2s var(--ease);
}

.tool-stage textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
textarea {
    display: block;
    min-height: 100px;
    padding: 14px 16px;
    resize: vertical;
    line-height: 1.55;
}

textarea:focus,
.ladder-input:focus,
.commit-input:focus {
    border-color: var(--green-1);
    box-shadow: 0 0 0 2px rgba(52,211,153,.10);
}

textarea::placeholder,
.ladder-input::placeholder,
.commit-input::placeholder {
    color: rgba(138,163,156,.65);
}

/* =========================================================
   STAGE 1
========================================================= */
#stage1 .field-label[for="customAvoidance"] {
    display: block;
    margin-top: 50px;
    margin-bottom: 7px;
}

#customAvoidance {
    margin-top: 0;
}

#customAvoidance + .tool-btn {
    margin-top: 14px;
}

/* =========================================================
   CYCLE
========================================================= */
.cycle-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 26px auto;
}

.cycle-node {
    width: 100%;
    max-width: 560px;
    min-height: auto;
    margin-bottom: 0;
    padding: 16px 20px;
    cursor: default;
    line-height: 1.5;
    text-align: left;
}

.cycle-node:hover {
    transform: none;
}

.cycle-node-label {
    width: 100%;
    margin-bottom: 8px;
    color: var(--green-1);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.3;
    text-align: left;
    text-transform: uppercase;
}

.cycle-node > div:not(.cycle-node-label) {
    width: 100%;
    text-align: left;
}

.cycle-arrow {
    padding: 7px 0;
    color: var(--purple-1);
    font-size: 1.3rem;
}

#feelingsInput {
    margin-top: 7px;
}

/* =========================================================
   STAGE BUTTONS
========================================================= */
.stage-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.stage-actions .tool-btn {
    flex: 0 1 auto;
}

/* =========================================================
   EXPOSURE LADDER
========================================================= */
.ladder-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 26px 0;
}

.ladder-step {
    display: grid;
    grid-template-columns: 46px 1fr 70px;
    align-items: center;
    gap: 12px;
}

.ladder-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--on-green);
    background: linear-gradient(135deg,var(--green-1),var(--green-2));
    font-weight: 700;
}

.ladder-input {
    min-height: 46px;
    padding: 11px 14px;
}

.ladder-difficulty {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 600;
    text-align: right;
}

/* =========================================================
   SUMMARY
========================================================= */

.summary-section {
    display: grid;
    grid-template-columns: 190px 1fr;
    align-items: center;
    gap: 24px;
    min-height: auto;
    margin-bottom: 16px;
    padding: 16px 18px;
    cursor: default;
    text-align: left;
}

.summary-section:hover {
    transform: none;
}

.summary-label,
.summary-first-step-label {
    margin: 0;
    color: var(--green-1);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.35;
    text-align: left;
    text-transform: uppercase;
}

.summary-value {
    min-width: 0;
    color: rgba(234,255,247,.88);
    line-height: 1.55;
    text-align: left;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.summary-ladder-item {
    display: flex;
    gap: 8px;
    padding: 4px 0;
}

.summary-step-num {
    flex: 0 0 auto;
    color: var(--purple-1);
    font-weight: 700;
}

.summary-first-step {
    margin: 26px 0;
    min-height: auto;
    padding: 22px;
    flex-direction: column;
    cursor: default;
    background: linear-gradient(135deg,rgba(52,211,153,.12),rgba(139,92,246,.12));
    border-color: rgba(52,211,153,.35);
}

.summary-first-step:hover {
    transform: none;
}

.summary-first-step-label {
    margin-bottom: 10px;
}

.summary-first-step-action {
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.5;
}

/* Hide the CTA until the tool is completed */
#ctaSection {
    display: none;
}

#ctaSection.is-active {
    display: block;
}

.cta-section {
    margin-top: 24px;
    padding: 24px;
    text-align: center;
}

.cta-section .tool-btn {
    display: inline-block;
    margin-top: 12px;
    text-decoration: none;
}

/* =========================================================
   SUMMARY — MOBILE
========================================================= */

@media (max-width: 768px) {

    .summary-section {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .summary-label {
        align-self: center;
    }
}
/* =========================================================
   COMMITMENT
========================================================= */
.commit-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    align-items: center;
    gap: 16px;
    margin: 14px 0;
}

.commit-row label {
    color: var(--text);
    font-size: .9rem;
    font-weight: 500;
}

.commit-input {
    min-height: 46px;
    padding: 10px 14px;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    #avoidCards {
        grid-template-columns: repeat(2,1fr);
    }

    .ladder-step {
        grid-template-columns: 42px 1fr;
    }

    .ladder-difficulty {
        display: none;
    }

    .commit-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    #avoidCards {
        gap: 10px;
    }

    #avoidCards .tool-card {
        min-height: 105px;
        padding: 14px 8px;
    }

    #avoidCards .tool-card span:first-child {
        font-size: 1.7rem;
    }

    #avoidCards .tool-card span:last-child {
        font-size: .82rem;
    }

    .stage-actions {
        flex-direction: column;
    }

    .stage-actions .tool-btn {
        width: 100%;
    }

    .cycle-node {
        padding: 15px 16px;
    }

    .cycle-node-label {
        margin-bottom: 9px;
    }

    #feelingsInput {
        margin-top: 24px;
    }
}