﻿/* =========================================================
   AI WITH EVERYONE
   Task Page
   Visual language aligned with category.css
   ========================================================= */

:root {
    --aiwe-task-text: #1f2937;
    --aiwe-task-text-secondary: #6b7280;
    --aiwe-task-border: #e5e7eb;
    --aiwe-task-border-hover: #c7d2fe;
    --aiwe-task-surface: #ffffff;
    --aiwe-task-surface-soft: #f8fafc;
    --aiwe-task-primary: #4f46e5;
    --aiwe-task-primary-hover: #4338ca;
    --aiwe-task-primary-soft: #eef2ff;
    --aiwe-task-success: #15803d;
    --aiwe-task-success-soft: #f0fdf4;
    --aiwe-task-warning: #a16207;
    --aiwe-task-warning-soft: #fffbeb;
    --aiwe-task-radius: 16px;
    --aiwe-task-radius-small: 12px;
    --aiwe-task-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    --aiwe-task-shadow-hover: 0 16px 36px rgba(79, 70, 229, 0.10);
}


/* =========================================================
   Page Layout
   ========================================================= */

.aiwe-task-page-header {
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fbfcff 100%
        );
    border-bottom: 1px solid var(--aiwe-task-border);
}

.aiwe-task-content-section {
    min-height: 58vh;
    background: #f8fafc;
}

.aiwe-task-shell {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}


/* =========================================================
   Back Link
   ========================================================= */

.aiwe-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--aiwe-task-text-secondary);
    font-size: 0.88rem;
    text-decoration: none !important;
    transition:
        color 0.18s ease,
        transform 0.18s ease;
}

.aiwe-back-link:hover {
    color: var(--aiwe-task-primary);
    text-decoration: none !important;
    transform: translateX(-2px);
}


/* =========================================================
   Hero
   ========================================================= */

.aiwe-task-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 20px;
}

.aiwe-task-hero-main,
.aiwe-task-progress-panel {
    background: var(--aiwe-task-surface);
    border: 1px solid var(--aiwe-task-border);
    border-radius: var(--aiwe-task-radius);
    box-shadow: var(--aiwe-task-shadow);
}

.aiwe-task-hero-main {
    position: relative;
    padding: 28px;
    overflow: hidden;
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #fafbff 58%,
            #f5f6ff 100%
        );
}

.aiwe-task-hero-main::after {
    content: "";
    position: absolute;
    width: 190px;
    height: 190px;
    right: -80px;
    bottom: -110px;
    background:
        radial-gradient(
            circle,
            rgba(99, 102, 241, 0.10) 0%,
            rgba(99, 102, 241, 0) 70%
        );
    pointer-events: none;
}

.aiwe-task-hero-top {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
}

.aiwe-task-number {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    color: var(--aiwe-task-primary);
    background-color: var(--aiwe-task-primary-soft);
    border: 1px solid #dfe3ff;
    border-radius: 999px;
    font-size: 0.77rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.aiwe-task-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.aiwe-task-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--aiwe-task-text-secondary);
    font-size: 0.82rem;
}

.aiwe-task-eyebrow {
    position: relative;
    z-index: 1;
    margin-bottom: 8px;
    color: #697386;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
}

.aiwe-task-page-title {
    position: relative;
    z-index: 1;
    margin: 0 0 12px 0;
    color: #111827;
    font-size: clamp(1.75rem, 3vw, 2.3rem);
    font-weight: 700;
    line-height: 1.3;
}

.aiwe-task-page-summary {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0;
    color: var(--aiwe-task-text-secondary);
    font-size: 0.98rem;
    line-height: 1.8;
}


/* =========================================================
   Favorite
   ========================================================= */

.aiwe-favorite-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 5px 10px;
    color: #6b7280;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.78rem;
    line-height: 1;
    cursor: pointer;
    transition:
        color 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.aiwe-favorite-button:hover {
    color: var(--aiwe-task-primary);
    background-color: #f8faff;
    border-color: #c7d2fe;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
}

.aiwe-favorite-button.is-favorite {
    color: #a16207;
    background-color: #fefce8;
    border-color: #fde68a;
}

.aiwe-favorite-button.is-favorite svg {
    fill: currentColor;
}


/* =========================================================
   Progress Panel
   ========================================================= */

.aiwe-task-progress-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px;
}

.aiwe-task-progress-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.aiwe-task-progress-kicker {
    margin-bottom: 4px;
    color: #8a94a3;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.aiwe-task-progress-text {
    color: #111827;
    font-size: 1rem;
    font-weight: 700;
}

.aiwe-task-progress-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--aiwe-task-primary);
    background-color: var(--aiwe-task-primary-soft);
    border-radius: 12px;
}

.aiwe-task-progress {
    height: 7px;
    background-color: #eef0f4;
    border-radius: 999px;
    overflow: hidden;
}

.aiwe-task-progress .progress-bar {
    background:
        linear-gradient(
            90deg,
            #6366f1 0%,
            #818cf8 100%
        );
    border-radius: 999px;
    transition: width 0.28s ease;
}

.aiwe-task-progress-note {
    margin-top: 14px;
    color: var(--aiwe-task-text-secondary);
    font-size: 0.8rem;
    line-height: 1.6;
}


/* =========================================================
   Stage
   ========================================================= */

.aiwe-stage {
    animation: aiwe-stage-enter 0.22s ease both;
}

@keyframes aiwe-stage-enter {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aiwe-stage-heading {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.aiwe-stage-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 28px;
    padding: 4px 10px;
    color: var(--aiwe-task-primary);
    background-color: var(--aiwe-task-primary-soft);
    border: 1px solid #dfe3ff;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.aiwe-stage-title {
    margin: 0 0 5px 0;
    color: #111827;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.4;
}

.aiwe-stage-description {
    margin: 0;
    color: var(--aiwe-task-text-secondary);
    font-size: 0.9rem;
    line-height: 1.65;
}

.aiwe-stage-label {
    color: #697386;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}


/* =========================================================
   Situation / Update Cards
   ========================================================= */

.aiwe-situation-card,
.aiwe-update-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 26px;
    background: var(--aiwe-task-surface);
    border: 1px solid var(--aiwe-task-border);
    border-radius: var(--aiwe-task-radius);
    box-shadow: var(--aiwe-task-shadow);
}

.aiwe-update-card {
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #fcfbff 55%,
            #f7f5ff 100%
        );
    border-color: #ddd9ff;
}

.aiwe-card-icon,
.aiwe-decision-icon,
.aiwe-section-icon,
.aiwe-result-heading-icon,
.aiwe-takeaway-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--aiwe-task-primary);
    background-color: var(--aiwe-task-primary-soft);
    border-radius: 13px;
}

.aiwe-card-icon svg,
.aiwe-decision-icon svg,
.aiwe-section-icon svg,
.aiwe-result-heading-icon svg,
.aiwe-takeaway-icon svg {
    width: 21px;
    height: 21px;
    stroke-width: 1.9;
}

.aiwe-card-icon-soft {
    background-color: #f3f4ff;
}

.aiwe-card-icon-update {
    color: #6d28d9;
    background-color: #f3e8ff;
}

.aiwe-situation-text {
    color: var(--aiwe-task-text);
    font-size: 1rem;
    line-height: 1.85;
}


/* =========================================================
   Decision
   ========================================================= */

.aiwe-decision-card {
    padding: 26px;
    background: var(--aiwe-task-surface);
    border: 1px solid var(--aiwe-task-border);
    border-radius: var(--aiwe-task-radius);
    box-shadow: var(--aiwe-task-shadow);
}

.aiwe-decision-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.aiwe-decision-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
}

.aiwe-decision-icon svg {
    width: 19px;
    height: 19px;
}

.aiwe-decision-question {
    margin: 0;
    color: #111827;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.55;
}

.aiwe-option-list {
    display: grid;
    gap: 12px;
}

/*
   task.js is the Source of Truth for generated option markup.
   The selectors below intentionally support buttons / Bootstrap .btn /
   common option-card class names without requiring JS changes.
*/

.aiwe-option-list > button,
.aiwe-option-list > .btn,
.aiwe-option-list .aiwe-option-button,
.aiwe-option-list .aiwe-option-card,
#decision1Options > button,
#decision2Options > button {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 16px 18px;
    color: var(--aiwe-task-text);
    text-align: left;
    line-height: 1.65;
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 13px;
    box-shadow: none;
    cursor: pointer;
    transition:
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.aiwe-option-list > button:hover,
.aiwe-option-list > .btn:hover,
.aiwe-option-list .aiwe-option-button:hover,
.aiwe-option-list .aiwe-option-card:hover,
#decision1Options > button:hover,
#decision2Options > button:hover {
    color: #111827;
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f8faff 100%
        );
    border-color: var(--aiwe-task-border-hover);
    box-shadow: 0 9px 22px rgba(79, 70, 229, 0.08);
    transform: translateY(-1px);
}

.aiwe-option-list .is-selected,
.aiwe-option-list .active,
.aiwe-option-list button[aria-pressed="true"] {
    color: #312e81;
    background-color: var(--aiwe-task-primary-soft);
    border-color: #a5b4fc;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}


/* =========================================================
   Insight
   ========================================================= */

.aiwe-insight-card {
    padding: 28px;
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #fbfcff 100%
        );
    border: 1px solid var(--aiwe-task-border);
    border-radius: var(--aiwe-task-radius);
    box-shadow: var(--aiwe-task-shadow);
}

.aiwe-insight-selected {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.aiwe-selected-title {
    margin: 0;
    color: #111827;
    font-size: 1.18rem;
    font-weight: 700;
    line-height: 1.55;
}

.aiwe-insight-text {
    margin: 0 0 22px 0;
    color: var(--aiwe-task-text);
    font-size: 0.96rem;
    line-height: 1.8;
}

.aiwe-detail-box {
    padding: 18px;
    background: var(--aiwe-task-success-soft);
    border: 1px solid #dcfce7;
    border-radius: var(--aiwe-task-radius-small);
}

.aiwe-detail-box-warning {
    background: var(--aiwe-task-warning-soft);
    border-color: #fef3c7;
}

.aiwe-detail-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
    color: #166534;
    font-size: 0.88rem;
    font-weight: 700;
}

.aiwe-detail-box-warning .aiwe-detail-title {
    color: var(--aiwe-task-warning);
}

.aiwe-detail-text {
    color: #4b5563;
    font-size: 0.88rem;
    line-height: 1.7;
}


/* =========================================================
   Actions
   ========================================================= */

.aiwe-primary-action,
.aiwe-secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 11px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    transition:
        color 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.aiwe-primary-action {
    width: 100%;
    color: #ffffff;
    background-color: #111827;
    border: 1px solid #111827;
}

.aiwe-primary-action:hover {
    color: #ffffff;
    background-color: #1f2937;
    border-color: #1f2937;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.13);
    transform: translateY(-1px);
}

.aiwe-primary-link {
    width: auto;
}

.aiwe-secondary-action {
    color: #4b5563;
    background: #ffffff;
    border: 1px solid #d1d5db;
}

.aiwe-secondary-action:hover {
    color: var(--aiwe-task-primary);
    background: #f8faff;
    border-color: var(--aiwe-task-border-hover);
}


/* =========================================================
   Result
   ========================================================= */

.aiwe-result-card,
.aiwe-section-card,
.aiwe-human-check,
.aiwe-takeaway-card {
    background: var(--aiwe-task-surface);
    border: 1px solid var(--aiwe-task-border);
    border-radius: var(--aiwe-task-radius);
    box-shadow: var(--aiwe-task-shadow);
}

.aiwe-result-card {
    padding: 28px;
}

.aiwe-result-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.aiwe-result-title {
    margin: 0;
    color: #111827;
    font-size: 1.2rem;
    font-weight: 700;
}

.aiwe-result-decision {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 14px;
}

.aiwe-result-index {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background-color: var(--aiwe-task-primary);
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 800;
}

.aiwe-result-index-secondary {
    background-color: #7c3aed;
}

.aiwe-result-caption {
    margin-bottom: 5px;
    color: #8a94a3;
    font-size: 0.75rem;
    font-weight: 600;
}

.aiwe-result-choice {
    margin-bottom: 7px;
    color: #111827;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.55;
}

.aiwe-result-insight {
    color: var(--aiwe-task-text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.aiwe-result-connector {
    display: flex;
    justify-content: flex-start;
    padding: 8px 0 8px 7px;
    color: #a5b4fc;
}


/* =========================================================
   Result Section Cards
   ========================================================= */

.aiwe-section-card,
.aiwe-human-check {
    padding: 24px;
}

.aiwe-section-card-warning {
    background: #fffdf8;
    border-color: #fef3c7;
}

.aiwe-mini-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #374151;
    font-size: 0.9rem;
    font-weight: 700;
}

.aiwe-section-card-warning .aiwe-mini-heading {
    color: var(--aiwe-task-warning);
}

.aiwe-section-text {
    color: var(--aiwe-task-text-secondary);
    font-size: 0.9rem;
    line-height: 1.75;
}

.aiwe-section-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.aiwe-section-title {
    margin: 0;
    color: #111827;
    font-size: 1.08rem;
    font-weight: 700;
}

.aiwe-section-icon-human {
    color: #166534;
    background-color: var(--aiwe-task-success-soft);
}


/* =========================================================
   AI Can Help List
   ========================================================= */

.aiwe-check-list {
    padding: 0;
    list-style: none;
}

.aiwe-check-list li {
    position: relative;
    padding: 10px 0 10px 30px;
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.65;
    border-top: 1px solid #f1f3f5;
}

.aiwe-check-list li:first-child {
    border-top: 0;
}

.aiwe-check-list li::before {
    content: "✓";
    position: absolute;
    left: 2px;
    top: 10px;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--aiwe-task-primary);
    background: var(--aiwe-task-primary-soft);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 800;
}


/* =========================================================
   Human Check
   ========================================================= */

.aiwe-human-check {
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f8fdf9 100%
        );
    border-color: #dcefe1;
}

.aiwe-human-check-intro {
    margin: -3px 0 18px 0;
    color: var(--aiwe-task-text-secondary);
    font-size: 0.88rem;
    line-height: 1.65;
}

.aiwe-human-check-list > * {
    margin-top: 10px;
}

.aiwe-human-check-list > *:first-child {
    margin-top: 0;
}

#humanCheckList .aiwe-check-item,
#humanCheckList li,
#humanCheckList .form-check,
#humanCheckList > div {
    color: #374151;
    line-height: 1.65;
}


/* =========================================================
   Takeaway
   ========================================================= */

.aiwe-takeaway-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f8f8ff 100%
        );
    border-color: #dddff8;
}

.aiwe-takeaway-icon {
    color: #7c3aed;
    background-color: #f3e8ff;
}

.aiwe-takeaway-text {
    color: #312e81;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.75;
}


/* =========================================================
   Result Actions
   ========================================================= */

.aiwe-result-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}


/* =========================================================
   Accessibility
   ========================================================= */

.aiwe-back-link:focus-visible,
.aiwe-favorite-button:focus-visible,
.aiwe-primary-action:focus-visible,
.aiwe-secondary-action:focus-visible,
.aiwe-option-list button:focus-visible {
    outline: 3px solid rgba(79, 70, 229, 0.16);
    outline-offset: 3px;
}


/* =========================================================
   Reduced Motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .aiwe-stage {
        animation: none;
    }

    .aiwe-back-link,
    .aiwe-favorite-button,
    .aiwe-primary-action,
    .aiwe-secondary-action,
    .aiwe-option-list > button,
    .aiwe-option-list > .btn,
    .aiwe-task-progress .progress-bar {
        transition: none;
    }

    .aiwe-back-link:hover,
    .aiwe-primary-action:hover,
    .aiwe-option-list > button:hover,
    .aiwe-option-list > .btn:hover {
        transform: none;
    }
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 991.98px) {

    .aiwe-task-hero {
        grid-template-columns: 1fr;
    }

    .aiwe-task-progress-panel {
        padding: 22px;
    }
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 767.98px) {

    .aiwe-task-hero-main,
    .aiwe-insight-card,
    .aiwe-result-card,
    .aiwe-decision-card,
    .aiwe-situation-card,
    .aiwe-update-card,
    .aiwe-section-card,
    .aiwe-human-check,
    .aiwe-takeaway-card {
        padding: 20px;
    }

    .aiwe-task-hero-top {
        align-items: flex-start;
    }

    .aiwe-stage-heading {
        gap: 11px;
        margin-bottom: 20px;
    }

    .aiwe-stage-title {
        font-size: 1.18rem;
    }

    .aiwe-situation-card,
    .aiwe-update-card {
        gap: 14px;
    }

    .aiwe-card-icon,
    .aiwe-section-icon,
    .aiwe-result-heading-icon,
    .aiwe-takeaway-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .aiwe-result-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .aiwe-result-actions .aiwe-primary-action,
    .aiwe-result-actions .aiwe-secondary-action {
        width: 100%;
    }
}


/* =========================================================
   Small Mobile
   ========================================================= */



/* =========================================================
   Trial Completion
   ========================================================= */

.aiwe-trial-completion-card {
    padding: 28px;
    text-align: center;
    background: #ffffff;
    border: 1px solid #dbe4ff;
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(79, 70, 229, 0.08);
}

.aiwe-trial-completion-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: #15803d;
    background: #f0fdf4;
    border-radius: 50%;
}

.aiwe-trial-completion-icon svg {
    width: 26px;
    height: 26px;
}

.aiwe-trial-completion-kicker {
    color: #4f46e5;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.aiwe-trial-completion-count {
    margin-top: 4px;
    color: #111827;
    font-size: 1.9rem;
    font-weight: 800;
}

.aiwe-trial-completion-title {
    margin: 8px 0 10px 0;
    color: #111827;
    font-size: 1.3rem;
    font-weight: 700;
}

.aiwe-trial-completion-text {
    max-width: 650px;
    margin: 0 auto;
    color: #6b7280;
    line-height: 1.75;
}

.aiwe-trial-capability-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.aiwe-trial-capability {
    padding: 10px 12px;
    color: #374151;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.83rem;
    font-weight: 600;
}

.aiwe-trial-completion-north-star {
    margin: 4px 0 20px 0;
    color: #312e81;
    font-weight: 700;
}

.aiwe-trial-completion-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.aiwe-trial-completion-coming-soon {
    margin-top: 14px;
    color: #6b7280;
    font-size: 0.83rem;
}

@media (max-width: 767.98px) {
    .aiwe-trial-completion-card {
        padding: 22px 18px;
    }

    .aiwe-trial-capability-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {

    .aiwe-task-hero-main {
        padding: 20px;
    }

    .aiwe-task-hero-top {
        display: block;
    }

    .aiwe-task-actions {
        justify-content: space-between;
        margin-top: 16px;
    }

    .aiwe-task-page-title {
        font-size: 1.65rem;
    }

    .aiwe-favorite-button span {
        display: none;
    }

    .aiwe-favorite-button {
        width: 36px;
        padding: 0;
    }

    .aiwe-stage-heading {
        display: block;
    }

    .aiwe-stage-step {
        margin-bottom: 10px;
    }

    .aiwe-situation-card,
    .aiwe-update-card,
    .aiwe-takeaway-card {
        display: block;
    }

    .aiwe-situation-card .aiwe-card-icon,
    .aiwe-update-card .aiwe-card-icon,
    .aiwe-takeaway-icon {
        margin-bottom: 14px;
    }

    .aiwe-decision-heading {
        align-items: flex-start;
    }
}


/* =========================================================
   Human Check - one checklist item per line
   ========================================================= */

.aiwe-human-check-list {
    display: grid;
    gap: 10px;
}

.aiwe-human-check-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    color: #374151;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid #e3eee6;
    border-radius: 11px;
    cursor: pointer;
    line-height: 1.7;
}

.aiwe-human-check-item:hover {
    background: #ffffff;
    border-color: #cfe3d4;
}

.aiwe-human-check-checkbox {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 5px 0 0 0;
    accent-color: var(--aiwe-task-success);
    cursor: pointer;
}

.aiwe-human-check-text {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    color: #374151;
    font-size: 0.92rem;
    line-height: 1.75;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.aiwe-human-check-item:has(.aiwe-human-check-checkbox:checked) {
    background: var(--aiwe-task-success-soft);
    border-color: #bbdfc4;
}

.aiwe-human-check-item:has(.aiwe-human-check-checkbox:checked)
.aiwe-human-check-text {
    color: #166534;
}


/* =========================================================
   Bootstrap 5.3 Color Modes
   ========================================================= */

[data-bs-theme="dark"] {
    --aiwe-task-text: #e5e7eb;
    --aiwe-task-text-secondary: #94a3b8;
    --aiwe-task-border: #334155;
    --aiwe-task-border-hover: #6366f1;
    --aiwe-task-surface: #111827;
    --aiwe-task-surface-soft: #172033;
    --aiwe-task-primary: #a5b4fc;
    --aiwe-task-primary-hover: #c7d2fe;
    --aiwe-task-primary-soft: rgba(99, 102, 241, 0.16);
    --aiwe-task-success: #86efac;
    --aiwe-task-success-soft: rgba(34, 197, 94, 0.12);
    --aiwe-task-warning: #fde68a;
    --aiwe-task-warning-soft: rgba(245, 158, 11, 0.12);
    --aiwe-task-shadow: 0 2px 8px rgba(0, 0, 0, 0.20);
    --aiwe-task-shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.30);
}

[data-bs-theme="dark"] .aiwe-task-page-header {
    background: linear-gradient(
        180deg,
        #111827 0%,
        #0f172a 100%
    );
}

[data-bs-theme="dark"] .aiwe-task-content-section {
    background: #0f172a;
}

[data-bs-theme="dark"] .aiwe-task-hero-main,
[data-bs-theme="dark"] .aiwe-insight-card,
[data-bs-theme="dark"] .aiwe-update-card {
    background: linear-gradient(
        135deg,
        #111827 0%,
        #151d2d 58%,
        #172033 100%
    );
    border-color: var(--aiwe-task-border);
}

[data-bs-theme="dark"] .aiwe-task-progress-panel,
[data-bs-theme="dark"] .aiwe-situation-card,
[data-bs-theme="dark"] .aiwe-decision-card,
[data-bs-theme="dark"] .aiwe-result-card,
[data-bs-theme="dark"] .aiwe-section-card,
[data-bs-theme="dark"] .aiwe-human-check,
[data-bs-theme="dark"] .aiwe-takeaway-card,
[data-bs-theme="dark"] .aiwe-trial-completion-card {
    background: var(--aiwe-task-surface);
    border-color: var(--aiwe-task-border);
    color: var(--aiwe-task-text);
}

[data-bs-theme="dark"] .aiwe-task-number,
[data-bs-theme="dark"] .aiwe-task-progress-icon,
[data-bs-theme="dark"] .aiwe-stage-step,
[data-bs-theme="dark"] .aiwe-card-icon,
[data-bs-theme="dark"] .aiwe-decision-icon,
[data-bs-theme="dark"] .aiwe-takeaway-icon {
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.16);
    border-color: rgba(129, 140, 248, 0.38);
}

[data-bs-theme="dark"] .aiwe-task-page-title,
[data-bs-theme="dark"] .aiwe-task-progress-text,
[data-bs-theme="dark"] .aiwe-stage-title,
[data-bs-theme="dark"] .aiwe-decision-question,
[data-bs-theme="dark"] .aiwe-selected-title,
[data-bs-theme="dark"] .aiwe-result-title,
[data-bs-theme="dark"] .aiwe-result-choice,
[data-bs-theme="dark"] .aiwe-section-title,
[data-bs-theme="dark"] .aiwe-trial-completion-count,
[data-bs-theme="dark"] .aiwe-trial-completion-title {
    color: #f8fafc;
}

[data-bs-theme="dark"] .aiwe-favorite-button {
    color: #cbd5e1;
    background: #111827;
    border-color: #334155;
}

[data-bs-theme="dark"] .aiwe-favorite-button:hover {
    color: #c7d2fe;
    background: #172033;
    border-color: #6366f1;
}

[data-bs-theme="dark"] .aiwe-favorite-button.is-favorite {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(250, 204, 21, 0.42);
}

[data-bs-theme="dark"] .aiwe-option-list > button,
[data-bs-theme="dark"] .aiwe-option-list > .btn,
[data-bs-theme="dark"] .aiwe-option-list .aiwe-option-button,
[data-bs-theme="dark"] .aiwe-option-list .aiwe-option-card,
[data-bs-theme="dark"] #decision1Options > button,
[data-bs-theme="dark"] #decision2Options > button {
    color: var(--aiwe-task-text);
    background: #111827;
    border-color: #334155;
}

[data-bs-theme="dark"] .aiwe-option-list > button:hover,
[data-bs-theme="dark"] .aiwe-option-list > .btn:hover,
[data-bs-theme="dark"] .aiwe-option-list .aiwe-option-button:hover,
[data-bs-theme="dark"] .aiwe-option-list .aiwe-option-card:hover,
[data-bs-theme="dark"] #decision1Options > button:hover,
[data-bs-theme="dark"] #decision2Options > button:hover {
    color: #f8fafc;
    background: linear-gradient(
        135deg,
        #172033 0%,
        #1e293b 100%
    );
}

[data-bs-theme="dark"] .aiwe-option-list .is-selected,
[data-bs-theme="dark"] .aiwe-option-list .active,
[data-bs-theme="dark"] .aiwe-option-list button[aria-pressed="true"] {
    color: #e0e7ff;
    background: rgba(99, 102, 241, 0.20);
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.12);
}

[data-bs-theme="dark"] .aiwe-detail-box {
    background: var(--aiwe-task-success-soft);
    border-color: rgba(74, 222, 128, 0.28);
}

[data-bs-theme="dark"] .aiwe-detail-box-warning,
[data-bs-theme="dark"] .aiwe-section-card-warning {
    background: var(--aiwe-task-warning-soft);
    border-color: rgba(250, 204, 21, 0.28);
}

[data-bs-theme="dark"] .aiwe-detail-title,
[data-bs-theme="dark"] .aiwe-section-icon-human {
    color: #86efac;
}

[data-bs-theme="dark"] .aiwe-detail-text,
[data-bs-theme="dark"] .aiwe-mini-heading,
[data-bs-theme="dark"] .aiwe-check-list li {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .aiwe-check-list li {
    border-color: #243044;
}

[data-bs-theme="dark"] .aiwe-primary-action {
    color: #ffffff;
    background: #6366f1;
    border-color: #6366f1;
}

[data-bs-theme="dark"] .aiwe-primary-action:hover {
    color: #ffffff;
    background: #4f46e5;
    border-color: #4f46e5;
}

[data-bs-theme="dark"] .aiwe-secondary-action {
    color: #cbd5e1;
    background: #111827;
    border-color: #475569;
}

[data-bs-theme="dark"] .aiwe-secondary-action:hover {
    color: #c7d2fe;
    background: #172033;
    border-color: #6366f1;
}

[data-bs-theme="dark"] .aiwe-human-check {
    background: linear-gradient(
        135deg,
        #111827 0%,
        #102018 100%
    );
    border-color: rgba(74, 222, 128, 0.24);
}

[data-bs-theme="dark"] .aiwe-human-check-item {
    color: #d1fae5;
    background: rgba(15, 23, 42, 0.58);
    border-color: rgba(74, 222, 128, 0.20);
}

[data-bs-theme="dark"] .aiwe-human-check-item:hover {
    background: #172033;
    border-color: rgba(74, 222, 128, 0.38);
}

[data-bs-theme="dark"] .aiwe-human-check-text {
    color: #d1fae5;
}

[data-bs-theme="dark"] .aiwe-human-check-item:has(.aiwe-human-check-checkbox:checked) {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(74, 222, 128, 0.38);
}

[data-bs-theme="dark"] .aiwe-human-check-item:has(.aiwe-human-check-checkbox:checked)
.aiwe-human-check-text {
    color: #bbf7d0;
}

[data-bs-theme="dark"] .aiwe-takeaway-card {
    background:
        linear-gradient(
            135deg,
            #171b25 0%,
            #191d2a 58%,
            #1b1c27 100%
        );
    border-color: rgba(232, 198, 106, 0.30);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

[data-bs-theme="dark"] .aiwe-takeaway-icon {
    color: #f1cf73;
    background-color: rgba(232, 198, 106, 0.12);
    border: 1px solid rgba(232, 198, 106, 0.26);
}

[data-bs-theme="dark"] .aiwe-takeaway-card .aiwe-stage-label {
    color: #c9b472;
}

[data-bs-theme="dark"] .aiwe-takeaway-text {
    color: #f3ead3;
}

[data-bs-theme="dark"] .aiwe-trial-completion-icon {
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
}

[data-bs-theme="dark"] .aiwe-trial-capability {
    color: #cbd5e1;
    background: #172033;
    border-color: #334155;
}
