/* ==========================================================================
   Structural Tension Charting — Stylesheet
   Color palette: Navy #1e3a5f | Blue #2e7fc1 | Teal #3aaa8c | White #ffffff
   ========================================================================== */

:root {
    --stc-navy:       #1e3a5f;
    --stc-blue:       #2e7fc1;
    --stc-teal:       #3aaa8c;
    --stc-green:      #3aaa8c;
    --stc-yellow:     #e8a020;
    --stc-red:        #d94f4f;
    --stc-light-bg:   #f4f7fb;
    --stc-border:     #dde4ef;
    --stc-text:       #222831;
    --stc-muted:      #6b7a90;
    --stc-white:      #ffffff;
    --stc-radius:     10px;
    --stc-shadow:     0 2px 12px rgba(30,58,95,0.10);
    --stc-shadow-lg:  0 8px 32px rgba(30,58,95,0.18);
    --stc-transition: 0.22s ease;
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.stc-dashboard {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px;
    font-family: inherit;
}

.stc-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.stc-dashboard-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--stc-navy);
    margin: 0 0 4px;
}

.stc-dashboard-subtitle {
    font-size: 0.9rem;
    color: var(--stc-muted);
    margin: 0;
}

/* ============================================================
   CARDS GRID
   ============================================================ */
.stc-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    align-items: stretch;
}

.stc-cards-grid .stc-card {
    height: 100%;
}

.stc-card {
    background: var(--stc-white);
    border-radius: var(--stc-radius);
    box-shadow: var(--stc-shadow);
    border-top: 7.5px solid var(--stc-border);
    border-right: none;
    border-bottom: none;
    border-left: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px 16px;
    cursor: pointer;
    transition: transform var(--stc-transition), box-shadow var(--stc-transition);
    position: relative;
    overflow: hidden;
}
/* Card with banner image — remove top padding, image fills from top */
.stc-card.stc-card--has-banner {
    padding-top: 0;
}

.stc-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--stc-shadow-lg);
}

/* Status color on top border only — sides stay subtle */
.stc-card--green  { border-top-color: var(--stc-green); }
.stc-card--yellow { border-top-color: var(--stc-yellow); }
.stc-card--red    { border-top-color: var(--stc-red); }

/* Emoji icon (default) */
.stc-card-icon {
    font-size: 2.4rem;
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform var(--stc-transition);
    user-select: none;
}
.stc-card-icon:hover { transform: scale(1.15); }

/* Banner image — aspect ratio scales with card width so proportions stay consistent */
.stc-card-banner {
    width: calc(100% + 32px);
    margin: 0 -16px 0;
    aspect-ratio: 16 / 9;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}
.stc-card-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.3s ease;
}
.stc-card:hover .stc-card-banner img { transform: scale(1.03); }

/* Status gradient sits BELOW the banner, flowing upward from white card background
   into a hint of the status color — bridges image to card content */
.stc-card-banner-gradient {
    width: calc(100% + 32px);
    margin: 0 -16px 14px;
    height: 32px;
    background: linear-gradient(to bottom, rgba(221,228,239,0.2), transparent);
    pointer-events: none;
    flex-shrink: 0;
}
.stc-card--green  .stc-card-banner-gradient { background: linear-gradient(to bottom, rgba(58,170,140,0.25), transparent); }
.stc-card--yellow .stc-card-banner-gradient { background: linear-gradient(to bottom, rgba(232,160,32,0.25), transparent); }
.stc-card--red    .stc-card-banner-gradient { background: linear-gradient(to bottom, rgba(217,79,79,0.25), transparent); }

.stc-card-body {
    width: 100%;
    text-align: center;
    flex: 1;
}

.stc-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--stc-navy);
    margin-bottom: 6px;
    line-height: 1.35;
}

.stc-card-due {
    font-size: 0.78rem;
    color: var(--stc-muted);
    margin-bottom: 10px;
}

.stc-card-children {
    font-size: 0.75rem;
    color: var(--stc-blue);
    margin-top: 6px;
}

.stc-card-status {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    z-index: 2;
}
.stc-status--green  { background: var(--stc-green); }
.stc-status--yellow { background: var(--stc-yellow); }
.stc-status--red    { background: var(--stc-red); }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.stc-progress-wrap {
    background: #c8d0dc;
    border-radius: 99px;
    height: 8px;
    width: 100%;
    overflow: hidden;
    margin-bottom: 4px;
}

.stc-progress-bar {
    height: 100%;
    border-radius: 99px;
    transition: width 0.5s ease;
    background: var(--stc-blue);
}
.stc-progress--green  { background: var(--stc-green); }
.stc-progress--yellow { background: var(--stc-yellow); }
.stc-progress--red    { background: var(--stc-red); }

.stc-progress-label {
    font-size: 0.72rem;
    color: var(--stc-muted);
    text-align: right;
}

/* ============================================================
   SECTIONS (Completed / Trash)
   ============================================================ */
.stc-section {
    margin-top: 32px;
}

.stc-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--stc-light-bg);
    border-radius: var(--stc-radius);
    cursor: pointer;
    font-weight: 600;
    color: var(--stc-navy);
    user-select: none;
    border: 1px solid var(--stc-border);
    transition: background var(--stc-transition);
}
.stc-section-toggle:hover { background: #e4eaf4; }

.stc-toggle-icon {
    display: inline-block;
    transition: transform 0.2s ease;
    transform: rotate(0deg);
    font-style: normal;
    line-height: 1;
}
.stc-section-toggle.stc-toggle--open .stc-toggle-icon {
    transform: rotate(90deg);
}

/* --- Section header strip fills --- */
.stc-section--completed .stc-section-toggle {
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: #ffffff;
}
.stc-section--completed .stc-section-toggle:hover { background: #16304f; }

.stc-section--twg-backlog .stc-section-toggle {
    background: #2e7fc1;
    border-color: #2e7fc1;
    color: #ffffff;
}
.stc-section--twg-backlog .stc-section-toggle:hover { background: #2670a8; }

.stc-section--trash .stc-section-toggle {
    background: #606b78;
    border-color: #606b78;
    color: #ffffff;
}
.stc-section--trash .stc-section-toggle:hover { background: #555f6b; }
.stc-section--trash .stc-section-toggle .stc-section-icon { color: #d94f4f; }

.stc-section-body { margin-top: 10px; }

.stc-list { display: flex; flex-direction: column; gap: 8px; }

.stc-list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--stc-white);
    border-radius: 8px;
    border: 1px solid var(--stc-border);
    font-size: 0.9rem;
}

.stc-list-row--completed { opacity: 0.85; }
.stc-list-row--trash { border-color: #f5c6c6; }

.stc-list-icon { font-size: 1.3rem; }
.stc-list-title { flex: 1; color: var(--stc-navy); }
.stc-list-date { font-size: 0.78rem; color: var(--stc-muted); white-space: nowrap; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.stc-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--stc-muted);
}
.stc-empty-icon { width: 48px; height: 48px; margin: 0 auto 12px; color: var(--stc-muted); }
.stc-empty-icon svg { width: 100%; height: 100%; }

/* ============================================================
   MODAL
   ============================================================ */
.stc-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
}

.stc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 35, 60, 0.55);
    backdrop-filter: blur(2px);
    z-index: 999998;
}

.stc-modal-box {
    position: relative;
    z-index: 999999;
    background: var(--stc-white);
    border-radius: 14px;
    box-shadow: var(--stc-shadow-lg);
    width: 90%;
    max-width: 500px;
    max-height: calc(100vh - var(--stc-header-offset, 72px) - 20px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: stcSlideIn 0.22s ease;
    margin-top: var(--stc-header-offset, 72px);
    margin-bottom: 20px;
}

.stc-modal-box--large { max-width: 780px; }
.stc-modal-box--small { max-width: 380px; }

@media (max-width: 600px) {
    .stc-modal-box {
        width: 100%;
        max-width: 100%;
        border-radius: 0 0 14px 14px;
        max-height: calc(100vh - var(--stc-header-offset, 72px));
        margin-bottom: 0;
    }
}

@keyframes stcSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.stc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--stc-border);
    background: var(--stc-navy);
    color: var(--stc-white);
    flex-shrink: 0;
}

.stc-modal-header h3 { margin: 0; font-size: 1.05rem !important; font-weight: 900 !important; color: var(--stc-white) !important; -webkit-font-smoothing: antialiased; letter-spacing: 0.01em; }

.stc-modal-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.stc-modal-close {
    background: none;
    border: none;
    color: var(--stc-white);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background var(--stc-transition);
    line-height: 1;
}
.stc-modal-close:hover { background: rgba(255,255,255,0.15); }

.stc-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.stc-modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--stc-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

/* ============================================================
   CHART VIEW (inside modal)
   ============================================================ */
.stc-chart-body {
    background: var(--stc-light-bg);
    padding: 0;
}

.stc-chart-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 20px;
}

/* Goal field - top */
.stc-chart-goal {
    background: var(--stc-white);
    border: 2px solid var(--stc-blue);
    border-radius: 10px 10px 0 0;
    padding: 16px;
    position: relative;
}

.stc-chart-goal-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--stc-blue);
    margin-bottom: 6px;
}

.stc-chart-goal-date {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--stc-muted);
}

.stc-chart-goal-date input[type="date"] {
    border: 1px solid var(--stc-border);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.8rem;
    color: var(--stc-text);
    background: var(--stc-white);
}

/* Arrow / tension column — block arrow as SVG watermark */
.stc-tension-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f0f4f9;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 300' preserveAspectRatio='xMidYMin slice'%3E%3Cpolygon points='50,0 95,70 70,70 70,300 30,300 30,70 5,70' fill='%232e7fc1' opacity='0.12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 120px 100%;
    border-left: 2px solid var(--stc-blue);
    border-right: 2px solid var(--stc-blue);
    position: relative;
    padding: 24px 0 24px;
    min-height: 80px;
}

.stc-arrowhead {
    font-size: 1.4rem;
    color: var(--stc-blue);
    line-height: 1;
    margin: 4px 0;
    opacity: 0.6;
}

/* Action steps list */
.stc-steps-list {
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
}

.stc-step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--stc-white);
    border-bottom: 1px solid var(--stc-border);
    transition: background var(--stc-transition);
    cursor: default;
}

.stc-step-item:hover { background: #f0f5ff; }

.stc-step-item.stc-step--completed {
    opacity: 0.45;
    text-decoration: line-through;
    background: #f9fffe;
}

.stc-step-drag-handle {
    color: var(--stc-muted);
    cursor: grab;
    font-size: 1rem;
    padding: 0 4px;
    user-select: none;
    flex-shrink: 0;
}
.stc-step-drag-handle:active { cursor: grabbing; }

.stc-step-text {
    flex: 1;
    font-size: 0.9rem;
    color: var(--stc-text);
    border: none;
    outline: none;
    background: transparent;
    min-width: 0;
    font-family: inherit;
}

.stc-step-date {
    border: 1px solid var(--stc-border);
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 0.78rem;
    color: var(--stc-muted);
    background: var(--stc-light-bg);
    width: 120px;
    flex-shrink: 0;
    font-family: inherit;
}
.stc-step-date.stc-date--overdue { border-color: var(--stc-yellow); color: var(--stc-red); }
.stc-step-date.stc-date--red     { border-color: var(--stc-red);    color: var(--stc-red); }

.stc-step-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

/* Telescoped indicator on step */
.stc-step-item.stc-step--telescoped .stc-step-text {
    color: var(--stc-blue);
    font-style: italic;
}

/* Add step row */
.stc-step-add-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--stc-white);
    border-bottom: 1px solid var(--stc-border);
    width: 100%;
    box-sizing: border-box;
}

.stc-step-add-input {
    flex: 1;
    min-width: 200px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9rem;
    color: var(--stc-text);
    font-family: inherit;
    padding: 4px 0;
}
.stc-step-add-input::placeholder { color: var(--stc-muted); font-style: italic; }

.stc-step-add-date {
    border: 1px solid var(--stc-border);
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 0.78rem;
    color: var(--stc-muted);
    background: var(--stc-light-bg);
    width: 100px;
    flex-shrink: 0;
    font-family: inherit;
}

/* Current Reality field - bottom */
.stc-chart-cr {
    background: var(--stc-white);
    border: 2px solid var(--stc-teal);
    border-radius: 0 0 10px 10px;
    padding: 16px;
    transition: margin-top var(--stc-transition);
    position: relative;
}

.stc-chart-cr-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--stc-teal);
    margin-bottom: 6px;
}

.stc-chart-cr-date {
    font-size: 0.78rem;
    color: var(--stc-muted);
    margin-top: 8px;
}

/* Auto-expanding textareas */
.stc-textarea-auto {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--stc-text);
    background: transparent;
    font-family: inherit;
    overflow: hidden;
    min-height: 60px;
}

/* Save indicator */
.stc-save-indicator {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--stc-navy);
    color: var(--stc-white);
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 0.82rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 999999;
    pointer-events: none;
}
.stc-save-indicator.stc-save-indicator--visible { opacity: 1; }
.stc-save-indicator.stc-save-indicator--error { background: var(--stc-red); }

/* Chart progress in modal header area */
.stc-chart-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
    background: #f0f5fb;
    border-bottom: 1px solid var(--stc-border);
    font-size: 0.82rem;
    color: var(--stc-muted);
}

.stc-chart-meta .stc-progress-wrap {
    flex: 1;
    max-width: 200px;
}

/* Breadcrumb */
.stc-breadcrumb {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.75);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.stc-breadcrumb a {
    color: rgba(255,255,255,0.85);
    text-decoration: underline;
    cursor: pointer;
}
.stc-breadcrumb-sep { opacity: 0.5; }

/* ============================================================
   FORMS & INPUTS
   ============================================================ */
.stc-field-group { margin-bottom: 16px; }
.stc-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--stc-navy);
    margin-bottom: 5px;
}
.stc-req { color: var(--stc-red); }

.stc-input, .stc-textarea {
    width: 100%;
    border: 1px solid var(--stc-border);
    border-radius: 7px;
    padding: 9px 12px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--stc-text);
    background: var(--stc-white);
    box-sizing: border-box;
    transition: border-color var(--stc-transition);
}
.stc-input:focus, .stc-textarea:focus {
    outline: none;
    border-color: var(--stc-blue);
    box-shadow: 0 0 0 3px rgba(46,127,193,0.12);
}
.stc-textarea { resize: vertical; }

/* Icon picker */
.stc-icon-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.stc-icon-option {
    background: var(--stc-light-bg);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 1.4rem;
    cursor: pointer;
    transition: border-color var(--stc-transition), background var(--stc-transition);
    line-height: 1;
}
.stc-icon-option:hover { background: #e2eaf5; }
.stc-icon-option--selected {
    border-color: var(--stc-blue);
    background: #e2eaf5;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.stc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: 7px;
    padding: 9px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--stc-transition), opacity var(--stc-transition), transform var(--stc-transition);
    white-space: nowrap;
}
.stc-btn:hover { opacity: 0.88; }
.stc-btn:active { transform: scale(0.97); }
a.stc-btn { line-height: 1 !important; padding: 9px 18px !important; box-sizing: border-box !important; text-decoration: none !important; }
.stc-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.stc-btn-primary  { background: var(--stc-blue);  color: #fff; border: 1px solid transparent; }
.stc-btn-success  { background: var(--stc-teal);  color: #fff; }
.stc-btn-danger   { background: var(--stc-red);   color: #fff; }
.stc-btn-ghost    { background: transparent; color: var(--stc-navy); border: 1px solid var(--stc-border); }
.stc-btn-ghost--on-dark {
    background: none !important;
    border: none !important;
    color: #ffffff !important;
    opacity: 0.9;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.01em;
}
.stc-btn-ghost--on-dark:hover { opacity: 1; background: none !important; }
.stc-overflow-menu-btn.stc-btn-ghost--on-dark {
    font-size: 1.6rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    opacity: 1;
    line-height: 1;
    padding: 2px 8px;
}
.stc-btn-secondary { background: var(--stc-light-bg); color: var(--stc-navy); border: 1px solid var(--stc-border); }

.stc-btn-sm { padding: 5px 11px; font-size: 0.78rem; border-radius: 6px; }
.stc-btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 1rem;
    transition: background var(--stc-transition);
    line-height: 1;
    color: var(--stc-muted);
}
.stc-btn-icon:hover { background: var(--stc-light-bg); color: var(--stc-navy); }
.stc-btn-icon.stc-btn-icon--complete:hover { color: var(--stc-teal); }
.stc-btn-icon.stc-btn-icon--telescope:hover { color: var(--stc-blue); }
.stc-btn-icon.stc-btn-icon--delete:hover { color: var(--stc-red); }

/* ============================================================
   NOTICE / LOADING
   ============================================================ */
.stc-loading {
    text-align: center;
    padding: 40px;
    color: var(--stc-muted);
    font-size: 0.9rem;
}

.stc-notice {
    background: var(--stc-light-bg);
    border: 1px solid var(--stc-border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--stc-muted);
    font-size: 0.9rem;
}

/* ============================================================
   RED CHART PROMPT
   ============================================================ */
.stc-red-prompt {
    background: #fff8f8;
    border: 1px solid rgba(217,79,79,0.35);
    border-left: 3px solid var(--stc-red);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 12px;
}
.stc-red-prompt-text {
    font-size: 0.88rem;
    color: var(--stc-text);
    margin: 0 0 10px;
    line-height: 1.5;
}
.stc-red-prompt-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.stc-red-prompt-bulk {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-wrap: wrap;
}

/* ============================================================
   UI DRAG STATES
   ============================================================ */
.stc-step-item.ui-sortable-helper {
    box-shadow: var(--stc-shadow-lg);
    background: #f0f5ff;
    border-radius: 6px;
    opacity: 0.9;
}
.stc-step-item.ui-sortable-placeholder {
    background: #e8f0fb;
    border: 2px dashed var(--stc-blue);
    visibility: visible !important;
    border-radius: 6px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .stc-cards-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stc-modal-box { width: 96%; }
    .stc-step-date { width: 100px; }
    .stc-dashboard-title { font-size: 1.2rem; }
}

@media (max-width: 400px) {
    .stc-cards-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   v1.1 Additions
   ========================================================================== */

/* Full-card cursor */
.stc-card { cursor: pointer; }
.stc-card-body { cursor: pointer; }

/* Overdue due date on card */
.stc-card-due--overdue { color: var(--stc-red); font-weight: 600; }

/* Current Reality completed-step lines with undo */
.stc-cr-completed-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    border-top: 1px dashed var(--stc-border);
    margin-top: 4px;
}
.stc-cr-completed-text {
    flex: 1;
    font-size: 0.88rem;
    color: var(--stc-teal);
    font-style: italic;
}
.stc-cr-undo-link {
    font-size: 0.75rem;
    color: var(--stc-muted);
    text-decoration: underline;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
.stc-cr-undo-link:hover { color: var(--stc-blue); }

/* New goal wizard step transitions */
.stc-new-goal-step { display: none; }
.stc-new-goal-step:first-child { display: block; }

/* Wizard step-3 step rows */
.stc-new-step-row input { box-sizing: border-box; }

/* "Done" button style in chart header — borderless on dark */
.stc-modal-header .stc-btn-ghost {
    border: none !important;
    color: #ffffff !important;
    background: none !important;
    font-weight: 800 !important;
    font-size: 1rem !important;
    opacity: 1;
    -webkit-font-smoothing: antialiased;
}
.stc-modal-header .stc-btn-ghost:hover { background: none !important; opacity: 1; }
.stc-modal-header-actions .stc-btn-sm { font-size: 1rem !important; font-weight: 800 !important; padding: 6px 14px !important; }
.stc-modal-header .stc-overflow-menu-btn {
    font-size: 1.6rem !important;
    letter-spacing: 0.08em !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    padding: 2px 8px !important;
    opacity: 1 !important;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   v1.3 Additions
   ========================================================================== */

/* New goal modal: body matches chart editor background */
#stc-new-goal-body {
    background: var(--stc-light-bg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* New goal modal: tension column wrapper gets chart-view gap treatment */
#stc-new-goal-tension .stc-tension-column {
    width: 100%;
}

/* New goal modal: CR and tension sections hidden initially (JS slideDown) */
#stc-new-goal-tension,
#stc-new-goal-cr-wrap {
    display: none;
}
#stc-new-goal-cr-wrap .stc-chart-cr {
    border-radius: 0 0 10px 10px;
    margin-top: 0;
}
#stc-new-goal-tension .stc-tension-column {
    border-radius: 0;
}
#stc-new-goal-body .stc-chart-goal {
    border-radius: 10px 10px 0 0;
    margin-bottom: 0;
}
/* Once tension slides in, goal box gets flat bottom */
#stc-new-goal-tension:not([style*="display: none"]) ~ * .stc-chart-goal,
#stc-new-goal-body.stc-expanded .stc-chart-goal {
    border-radius: 10px 10px 0 0;
}

/* ==========================================================================
   Phase 2 + Font Size Increases (v2.0.0)
   ========================================================================== */

/* Dashboard header actions */
.stc-dashboard-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- Font size increases --- */
.stc-chart-goal-label,
.stc-chart-cr-label { font-size: 0.85rem; }

#stc-goal-text,
#stc-cr-text,
.stc-textarea-auto { font-size: 1.1rem; }

.stc-step-text,
.stc-step-add-input { font-size: 1.05rem; }

.stc-step-date,
.stc-step-add-date,
.stc-cr-completed-text,
#stc-meta-label { font-size: 0.9rem; }

/* Remove the old small arrowhead — arrow is now the SVG background */
.stc-arrowhead { display: none; }

/* --- Goal / CR guide panels --- */
.stc-guide-toggle,
.stc-ex-guide-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #0c447c !important;
    background: #e6f1fb !important;
    border: 1px solid #85b7eb !important;
    border-radius: 4px;
    padding: 2px 7px;
    cursor: pointer;
    margin-left: 0;
    vertical-align: middle;
    transition: background var(--stc-transition);
}
.stc-guide-toggle:hover,
.stc-ex-guide-btn:hover { background: #d0e6f7 !important; }
.stc-guide-toggle .stc-guide-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
    font-style: normal;
}
.stc-guide-toggle.stc-guide--open .stc-guide-arrow { transform: rotate(90deg); }

.stc-guide-panel {
    display: none;
    background: linear-gradient(135deg, rgba(46,127,193,0.05), rgba(58,170,140,0.05));
    border: 1px solid rgba(46,127,193,0.2);
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--stc-text);
}
.stc-guide-panel ul {
    margin: 0;
    padding-left: 16px;
}
.stc-guide-panel li {
    margin-bottom: 3px;
    line-height: 1.4;
    color: var(--stc-navy);
}

/* --- Icon upload --- */
/* Uploaded icon renders as full-width banner — see .stc-card-banner above */
.stc-icon-upload-section {
    margin-top: 14px;
    border-top: 1px solid var(--stc-border);
    padding-top: 12px;
    text-align: center;
}
.stc-icon-upload-divider {
    font-size: 0.78rem;
    color: var(--stc-muted);
    margin-bottom: 8px;
}
.stc-icon-upload-label { cursor: pointer; }
.stc-icon-upload-status {
    font-size: 0.8rem;
    margin-top: 8px;
    min-height: 18px;
    color: var(--stc-teal);
}
.stc-icon-upload-status.stc-error { color: var(--stc-red); }

/* --- Calendar settings modal --- */
.stc-calendar-section {
    border: 1px solid var(--stc-border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}
.stc-calendar-section h4 {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: var(--stc-navy);
}
.stc-calendar-connected {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--stc-teal);
    margin-bottom: 8px;
}
.stc-calendar-email { color: var(--stc-text); font-weight: 500; }
.stc-calendar-instructions {
    font-size: 0.82rem;
    color: var(--stc-muted);
    line-height: 1.5;
    margin-top: 8px;
}
.stc-webcal-url {
    font-size: 0.78rem;
    background: var(--stc-light-bg);
    border: 1px solid var(--stc-border);
    border-radius: 6px;
    padding: 8px 10px;
    word-break: break-all;
    margin: 8px 0;
    font-family: monospace;
    color: var(--stc-navy);
}

/* --- Calendar opt-in buttons in chart --- */
.stc-cal-btn {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--stc-border);
    background: var(--stc-light-bg);
    color: var(--stc-muted);
    cursor: pointer;
    transition: all var(--stc-transition);
}
.stc-cal-btn:hover { border-color: var(--stc-blue); color: var(--stc-blue); }
.stc-cal-btn.stc-cal-btn--added {
    border-color: var(--stc-teal);
    color: var(--stc-teal);
    background: rgba(58,170,140,0.08);
}

/* --- Exercise autosave indicator --- */
.stc-autosave-indicator {
    font-size: 0.8rem;
    color: #22a06b;
    margin-right: 8px;
    vertical-align: middle;
}

/* --- Migration welcome modal --- */
.stc-migration-welcome-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}
.stc-migration-welcome-heading {
    font-weight: 600;
    font-size: 1rem;
    color: var(--stc-navy);
    margin-bottom: 10px;
    text-align: center;
}
#stc-migration-welcome-modal .stc-modal-body p {
    font-size: 0.92rem;
    color: var(--stc-text);
    line-height: 1.6;
    margin-bottom: 10px;
}
.stc-migration-welcome-guide {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--stc-border);
    font-size: 0.88rem !important;
    color: var(--stc-muted) !important;
}
.stc-migration-welcome-guide a {
    color: var(--stc-teal);
    text-decoration: underline;
}

/* --- CMOT modal --- */
.stc-cmot-goal-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--stc-navy);
    background: var(--stc-light-bg);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
    border-left: 3px solid var(--stc-blue);
}
.stc-cmot-intro {
    font-size: 0.88rem;
    color: var(--stc-muted);
    margin: 0 0 16px;
}
.stc-cmot-label {
    font-size: 0.88rem;
    line-height: 1.4;
}
.stc-cmot-error {
    background: rgba(217,79,79,0.08);
    border: 1px solid var(--stc-red);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--stc-red);
    margin-top: 10px;
}

/* --- Red chart overdue UI --- */
.stc-overdue-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(217,79,79,0.06);
    border-bottom: 1px solid rgba(217,79,79,0.2);
    flex-wrap: wrap;
}
.stc-overdue-toolbar label {
    font-size: 0.82rem;
    color: var(--stc-red);
    font-weight: 600;
}
.stc-step-item.stc-step--overdue .stc-step-text { color: var(--stc-red); }
.stc-step-item.stc-step--overdue .stc-step-date { border-color: var(--stc-red); color: var(--stc-red); }


/* ==========================================================================
   Reflections Panel (v1.1.2)
   ========================================================================== */

.stc-reflections-toggle {
    border-color: var(--stc-teal);
    color: var(--stc-teal);
}
.stc-reflections-toggle:hover { background: rgba(58,170,140,0.08); }

.stc-reflections-panel {
    max-height: 400px;
    overflow-y: auto;
}

.stc-reflection-entry {
    border-bottom: 1px solid var(--stc-border);
    margin-bottom: 6px;
}
.stc-reflection-entry:last-child { border-bottom: none; margin-bottom: 0; }

.stc-reflection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--stc-navy);
    user-select: none;
}
.stc-reflection-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
    font-style: normal;
    font-size: 0.75rem;
}
.stc-reflection-arrow.stc-guide--open { transform: rotate(90deg); }

.stc-reflection-body { padding: 4px 0 10px; }

.stc-reflection-q {
    margin-bottom: 10px;
}
.stc-reflection-q-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--stc-muted);
    margin-bottom: 3px;
    line-height: 1.3;
}
.stc-reflection-q-answer {
    font-size: 0.88rem;
    color: var(--stc-text);
    line-height: 1.5;
    white-space: pre-wrap;
}

/* ==========================================================================
   v1.1.4 — Focal picker, arrow, step transparency, banner gradient
   ========================================================================== */

/* --- Focal point picker modal --- */
/* ── Focal picker — full image with mask crop window ─────────────────── */
.stc-focal-stage {
    position: relative;
    width: 100%;
    height: 340px;
    overflow: hidden;
    background: #111;
    border-radius: 8px;
    cursor: grab;
    user-select: none;
}
.stc-focal-stage.stc-dragging { cursor: grabbing; }
.stc-focal-stage img {
    position: absolute;
    max-width: none;
    pointer-events: none;
    transform-origin: top left;
}

/* Mask — four dark panels surrounding the crop window */
.stc-focal-mask {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    z-index: 2;
}
.stc-focal-mask-top,
.stc-focal-mask-bottom {
    background: rgba(0,0,0,0.5);
    flex-shrink: 0;
}
.stc-focal-mask-middle {
    display: flex;
    flex: 1;
}
.stc-focal-mask-left,
.stc-focal-mask-right {
    background: rgba(0,0,0,0.5);
    flex-shrink: 0;
}
.stc-focal-crop-window {
    flex: 1;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 0 0 1px rgba(46,127,193,0.8);
    box-sizing: border-box;
}

/* Zoom controls */
.stc-focal-zoom-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    background: var(--stc-light-bg);
    border: 1px solid var(--stc-border);
    border-radius: 8px;
    padding: 8px 12px;
}
.stc-focal-zoom-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--stc-navy);
    display: flex;
    align-items: center;
    opacity: 0.7;
    flex-shrink: 0;
}
.stc-focal-zoom-btn:hover { opacity: 1; }
.stc-focal-zoom-slider {
    flex: 1;
    accent-color: var(--stc-blue);
    height: 4px;
}
.stc-focal-zoom-pct {
    font-size: 0.8rem;
    color: var(--stc-muted);
    min-width: 36px;
    text-align: right;
    flex-shrink: 0;
}
.stc-focal-hint {
    font-size: .78rem;
    color: var(--stc-muted);
    margin-top: 6px;
    text-align: center;
}

/* Remove always-visible drag overlay — focal point set at upload only */
.stc-card-banner-edit { display: none !important; }
.stc-focal-crosshair  { display: none !important; }

/* Arrow sizing handled in base .stc-tension-column rule above */

/* --- Transparent step rows --- */
.stc-step-item {
    background: transparent !important;
    border-bottom: 1px solid rgba(46,127,193,0.15);
    border-radius: 0;
}
.stc-step-item:last-child { border-bottom: none; }
.stc-step-item:hover { background: rgba(255,255,255,0.5) !important; }
.stc-step-item.ui-sortable-helper { background: rgba(255,255,255,0.9) !important; box-shadow: var(--stc-shadow); }
.stc-step-item.ui-sortable-placeholder { background: rgba(46,127,193,0.06) !important; border: 1px dashed var(--stc-blue); }

/* Step add row also transparent */
.stc-step-add-row { background: transparent; border-top: 1px solid rgba(46,127,193,0.15); border-bottom: none; }


/* ==========================================================================
   v1.1.5 — Hamburger menu, collapsed add step, red prompt redesign
   ========================================================================== */

/* --- Step hamburger menu --- */
.stc-step-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.stc-step-menu-wrap {
    position: relative;
}
.stc-step-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--stc-muted);
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    transition: background var(--stc-transition), color var(--stc-transition);
}
.stc-step-menu-btn:hover { background: rgba(46,127,193,0.1); color: var(--stc-navy); }

.stc-step-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: var(--stc-white);
    border: 1px solid var(--stc-border);
    border-radius: 8px;
    box-shadow: var(--stc-shadow-lg);
    min-width: 180px;
    z-index: 100;
    overflow: hidden;
}
.stc-step-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 9px 14px;
    font-size: 0.88rem;
    font-family: inherit;
    color: var(--stc-text);
    cursor: pointer;
    transition: background var(--stc-transition);
    border-bottom: 1px solid var(--stc-border);
}
.stc-step-menu-item:last-child { border-bottom: none; }
.stc-step-menu-item:hover { background: var(--stc-light-bg); }
.stc-step-menu-item--danger { color: var(--stc-red); }
.stc-step-menu-item--danger:hover { background: #fff5f5; }

/* --- Collapsed add step --- */
.stc-step-add-wrap {
    padding: 10px 16px;
    width: 100%;
    box-sizing: border-box;
}
.stc-add-step-toggle {
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    border-style: dashed !important;
    opacity: 0.7;
    transition: opacity var(--stc-transition);
}
.stc-add-step-toggle:hover { opacity: 1; }
.stc-step-add-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0 0;
    background: transparent;
    border: none;
    width: 100%;
    box-sizing: border-box;
}


/* ==========================================================================
   Phase 3 — LearnDash Integration (v1.2.0)
   ========================================================================== */

/* --- Active TWG featured section --- */
.stc-twg-featured { margin-bottom: 8px; }
.stc-twg-featured-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--stc-blue);
    margin-bottom: 10px;
}
/* TWG featured — single card, same width as regular grid cards */
.stc-cards-grid--single {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
/* TWG active card uses normal status colors — no special blue */
.stc-card--twg-active { box-shadow: var(--stc-shadow); }

/* --- TWG backlog section --- */

/* --- Health goal badge --- */
.stc-card-health-badge {
    position: absolute;
    bottom: 10px;
    left: 12px;
    width: 26px;
    height: 26px;
    background: rgba(255,255,255,0.85);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.stc-health-badge--chart {
    display: inline-block;
    font-size: 0.82rem;
    background: rgba(58,170,140,0.1);
    border: 1px solid rgba(58,170,140,0.3);
    border-radius: 4px;
    padding: 2px 8px;
    color: var(--stc-teal);
    margin-bottom: 8px;
}

/* --- Phase navigation --- */
.stc-phase-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--stc-light-bg);
    border-bottom: 1px solid var(--stc-border);
    font-size: 0.88rem;
    color: var(--stc-navy);
}
.stc-phase-nav-btn {
    background: var(--stc-white);
    border: 1px solid var(--stc-border);
    border-radius: 4px;
    padding: 2px 10px;
    font-size: 1rem;
    cursor: pointer;
    color: var(--stc-blue);
    transition: background var(--stc-transition);
}
.stc-phase-nav-btn:hover { background: var(--stc-light-bg); }
.stc-phase-nav-btn--disabled {
    color: var(--stc-muted);
    border-color: var(--stc-border);
    cursor: default;
    display: inline-block;
    padding: 2px 10px;
    font-size: 1rem;
}
.stc-phase-nav-label { font-weight: 600; color: var(--stc-navy); }

/* --- Exercise shortcode styles --- */
.stc-exercise {
    background: var(--stc-white);
    border: 1px solid var(--stc-border);
    border-radius: var(--stc-radius);
    padding: 24px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: var(--stc-shadow);
}
.stc-exercise-intro { margin-bottom: 20px; }
.stc-exercise-intro p { font-size: 0.95rem; color: var(--stc-text); line-height: 1.6; }
.stc-exercise-guide {
    background: var(--stc-light-bg);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.85rem;
    margin-top: 10px;
    cursor: pointer;
}
.stc-exercise-guide ul { margin: 8px 0 4px 16px; }
.stc-exercise-guide li { margin-bottom: 4px; color: var(--stc-navy); }
.stc-exercise-notice {
    background: rgba(46,127,193,0.06);
    border-left: 3px solid var(--stc-blue);
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
    font-size: 0.88rem;
    color: var(--stc-text);
    margin-bottom: 16px;
}
.stc-exercise-goal-display {
    background: var(--stc-light-bg);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 20px;
}
.stc-exercise-goal-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--stc-blue);
    margin-bottom: 6px;
}
.stc-exercise-goal-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--stc-navy);
    line-height: 1.4;
}
.stc-exercise-goal-due {
    font-size: 0.82rem;
    color: var(--stc-muted);
    margin-top: 4px;
}
.stc-exercise-goal-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.stc-exercise-goal-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: var(--stc-blue);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 4px;
}
.stc-exercise-goal-row .stc-textarea { flex: 1; min-width: 200px; }
.stc-exercise-pick-label {
    font-size: 0.82rem;
    color: var(--stc-blue);
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    padding-top: 6px;
}
.stc-exercise-step-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}
.stc-exercise-step-row .stc-input:first-child { flex: 1; }
.stc-exercise-footer {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.stc-exercise-status { font-size: 0.88rem; }
.stc-exercise-complete {
    font-size: 1rem;
    color: var(--stc-teal);
    font-weight: 600;
    padding: 16px;
    text-align: center;
    background: rgba(58,170,140,0.08);
    border-radius: 8px;
}

/* Multi-goal counter */
.stc-multi-goal-counter {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--stc-muted);
    margin-bottom: 8px;
}

/* Conflict review */
.stc-conflict-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.stc-conflict-card {
    background: var(--stc-white);
    border: 1px solid var(--stc-border);
    border-radius: 10px;
    padding: 14px;
    position: relative;
}
.stc-conflict-card-header { margin-bottom: 8px; }
.stc-conflict-goal-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--stc-navy);
    line-height: 1.4;
}
.stc-conflict-card-meta {
    font-size: 0.78rem;
    color: var(--stc-muted);
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
}
.stc-conflict-cr { font-size: 0.82rem; color: var(--stc-muted); margin-bottom: 10px; }
.stc-conflict-cr p { margin: 6px 0 0; }

/* Phases exercise */
.stc-phases-goal-picker { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.stc-phases-goal-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--stc-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background var(--stc-transition);
}
.stc-phases-goal-option:hover { background: var(--stc-light-bg); }
.stc-phases-goal-option input { flex-shrink: 0; margin-top: 2px; }
.stc-phases-goal-option small { color: var(--stc-muted); display: block; font-size: 0.78rem; }
.stc-exercise-phase-row { margin-bottom: 16px; }


/* ==========================================================================
   Phase 3 — LearnDash Exercise Shortcodes (v1.2.0)
   ========================================================================== */

.stc-exercise {
    background: var(--stc-white);
    border: 1px solid var(--stc-border);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    font-family: inherit;
}
.stc-exercise-header { margin-bottom: 20px; }
.stc-exercise-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--stc-navy);
    margin: 0 0 8px;
}
.stc-exercise-intro {
    font-size: 0.9rem;
    color: var(--stc-muted);
    margin: 0;
    line-height: 1.5;
}
.stc-exercise-goal-display {
    background: var(--stc-light-bg);
    border-left: 3px solid var(--stc-blue);
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
    font-size: 0.95rem;
    color: var(--stc-navy);
    margin-bottom: 16px;
}
.stc-exercise-goal-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--stc-blue);
    display: block;
    margin-bottom: 4px;
}
.stc-exercise-notice {
    background: var(--stc-light-bg);
    border: 1px solid var(--stc-border);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 0.88rem;
}
.stc-exercise-notice--warn {
    background: #fff8f8;
    border-color: var(--stc-red);
    color: var(--stc-red);
}
.stc-exercise-label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--stc-navy);
    margin-bottom: 8px;
}
.stc-exercise-textarea {
    width: 100%;
    border: 1px solid var(--stc-border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color var(--stc-transition);
    box-sizing: border-box;
}
.stc-exercise-textarea:focus { border-color: var(--stc-blue); }
.stc-exercise-select {
    width: 100%;
    border: 1px solid var(--stc-border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--stc-white);
    outline: none;
}
.stc-exercise-footer {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.stc-exercise-status {
    font-size: 0.88rem;
}
.stc-btn-lg { padding: 10px 24px; font-size: 1rem; }

/* Day 4 goal rows */
.stc-exercise-goals-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.stc-exercise-goal-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--stc-light-bg);
    border-radius: 8px;
    padding: 10px;
}
.stc-exercise-goal-num {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--stc-blue);
    min-width: 20px;
    padding-top: 8px;
}
.stc-exercise-goal-input {
    flex: 1;
    border: 1px solid var(--stc-border);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
}
.stc-exercise-pick-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--stc-muted);
    cursor: pointer;
    padding-top: 6px;
}
.stc-exercise-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    cursor: pointer;
}
.stc-exercise-guide { margin-bottom: 12px; }

/* Day 6 step rows */
.stc-exercise-step-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}
.stc-exercise-step-desc {
    flex: 1;
    border: 1px solid var(--stc-border);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.9rem;
    font-family: inherit;
}
.stc-exercise-step-date {
    border: 1px solid var(--stc-border);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.82rem;
    font-family: inherit;
    width: 130px;
}

/* Multi goals */
.stc-exercise-multi-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
}
.stc-exercise-multi-input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--stc-border);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}
.stc-exercise-multi-status {
    font-size: 1.1rem;
    padding-top: 8px;
    min-width: 20px;
    flex-shrink: 0;
}

/* Conflict review */
.stc-conflict-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.stc-conflict-card {
    background: var(--stc-white);
    border: 1px solid var(--stc-border);
    border-radius: 10px;
    padding: 14px;
    transition: opacity 0.3s;
}
.stc-conflict-card-type {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--stc-blue);
    margin-bottom: 6px;
}
.stc-conflict-card-text {
    font-size: 0.9rem;
    color: var(--stc-navy);
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}
.stc-conflict-card-due,
.stc-conflict-card-steps {
    font-size: 0.78rem;
    color: var(--stc-muted);
    margin-bottom: 4px;
}
.stc-conflict-remove { margin-top: 10px; width: 100%; }

/* Phases count picker */
.stc-phases-count-row {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}
.stc-phases-count-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.stc-phases-count-option input { display: none; }
.stc-phases-count-option span {
    width: 36px;
    height: 36px;
    border: 2px solid var(--stc-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all var(--stc-transition);
}
.stc-phases-count-option input:checked + span {
    border-color: var(--stc-blue);
    background: var(--stc-blue);
    color: #fff;
}

/* Phase nav in chart header */
.stc-phase-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.stc-phase-nav-btn {
    background: none;
    border: 1px solid var(--stc-border);
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--stc-blue);
    transition: background var(--stc-transition);
}
.stc-phase-nav-btn:hover { background: var(--stc-light-bg); }
.stc-phase-nav-btn--disabled { color: var(--stc-border); cursor: default; }
.stc-phase-nav-btn--disabled:hover { background: none; }
.stc-phase-nav-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--stc-navy);
    white-space: nowrap;
}

/* TWG featured on dashboard */
.stc-twg-featured {
    margin-bottom: 0;
}
.stc-twg-featured-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--stc-blue);
    margin-bottom: 10px;
}
.stc-twg-separator {
    border-top: 2px dashed var(--stc-border);
    margin: 20px 0;
}
.stc-card--twg-backlog { border-top-color: var(--stc-border); opacity: 0.85; }
.stc-activate-twg {
    margin-top: auto !important;
    width: 100%;
    align-self: stretch;
    flex-shrink: 0;
}
.stc-card-due--twg-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--stc-muted);
    letter-spacing: 0.03em;
}

/* Phases exercise step rows */
.stc-exercise-phase-row {
    margin-bottom: 14px;
}

/* ==========================================================================
   v1.2.1 — Day 4 pick, Day 6 due dates, exercise additions
   ========================================================================== */

/* Day 4 Pick — goal selection buttons */
.stc-d4p-goals {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
    transition: opacity 0.3s;
}
.stc-d4p-goal-btn {
    background: var(--stc-white);
    border: 2px solid var(--stc-border);
    border-radius: 10px;
    padding: 14px 18px;
    text-align: left;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--stc-navy);
    cursor: pointer;
    transition: border-color var(--stc-transition), background var(--stc-transition);
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.stc-d4p-goal-btn:hover { border-color: var(--stc-blue); background: rgba(46,127,193,0.04); }
.stc-d4p-goal-btn--selected { border-color: var(--stc-blue); background: rgba(46,127,193,0.08); font-weight: 600; }

/* Day 6 due dates */
.stc-d6d-steps { display: flex; flex-direction: column; gap: 10px; }
.stc-d6d-step-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--stc-light-bg);
    border-radius: 8px;
    padding: 10px 14px;
}
.stc-d6d-step-desc {
    flex: 1;
    font-size: 0.9rem;
    color: var(--stc-text);
}

/* Exercise guide toggle */
.stc-exercise-guide-toggle-wrap { margin-bottom: 12px; }


/* ==========================================================================
   v1.2.3 — Exercise global fixes
   ========================================================================== */

/* Larger fonts throughout exercises */
.stc-exercise { font-size: 1rem; }
.stc-exercise-title { font-size: 1.3rem; }
.stc-exercise-intro { font-size: 0.95rem; }
.stc-exercise-goal-input,
.stc-exercise-multi-input,
.stc-exercise-textarea,
.stc-exercise-phase-input { font-size: 1rem; }
.stc-exercise-step-desc { font-size: 1rem; }
.stc-d4p-goal-btn { font-size: 1rem; }
.stc-d4p-confirm-text {
    font-size: 0.95rem;
    color: var(--stc-navy);
    font-weight: 600;
    background: var(--stc-light-bg);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    line-height: 1.5;
}
.stc-d4p-confirm-text a { color: var(--stc-blue); }

/* Fix blue dots — override any list-style on exercise goal numbers */
.stc-exercise-goal-num,
.stc-exercise-phase-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--stc-blue);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
    list-style: none;
    /* Kill any inherited bullet/dot styling */
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    cursor: default;
}
/* Remove list-style from parent containers */
.stc-exercise-goals-list,
.stc-exercise-phase-list { list-style: none; padding-left: 0; }

/* Exercise full width within LD content area */
.stc-exercise { max-width: 100%; box-sizing: border-box; }

/* Phase text fields full width */
.stc-exercise-phase-row textarea { width: 100%; box-sizing: border-box; }

/* Master goal reference in phase charts */
.stc-phase-master-ref {
    background: var(--stc-light-bg);
    border-left: 3px solid var(--stc-navy);
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
    margin-bottom: 14px;
}
.stc-phase-master-ref-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--stc-navy);
    margin-bottom: 4px;
}
.stc-phase-master-ref-text {
    font-size: 0.95rem;
    color: var(--stc-navy);
    line-height: 1.4;
}

/* CR display in Day 6 exercises */
.stc-exercise-cr-display {
    background: rgba(58,170,140,0.06);
    border: 1px solid rgba(58,170,140,0.3);
    border-radius: 8px;
    padding: 12px 14px;
    margin: 12px 0;
    font-size: 0.9rem;
    color: var(--stc-text);
    line-height: 1.5;
    white-space: pre-wrap;
}
.stc-exercise-cr-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--stc-teal);
    margin-bottom: 6px;
}

/* Goal due date emphasis in Due Dates exercise */
.stc-exercise-goal-due-ref {
    background: rgba(46,127,193,0.08);
    border: 1px solid var(--stc-blue);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.stc-exercise-goal-due-ref-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--stc-blue);
    text-transform: uppercase;
}
.stc-exercise-goal-due-ref-date {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--stc-navy);
}


/* ==========================================================================
   v1.2.3 — Exercise global fixes, phase chart, dashboard fixes
   ========================================================================== */

/* --- Exercise global font + spacing improvements --- */
.stc-exercise {
    font-size: 1rem;
}
.stc-exercise-title { font-size: 1.3rem; }
.stc-exercise-intro { font-size: 0.95rem; }
.stc-exercise-goal-input,
.stc-exercise-multi-input,
.stc-exercise-textarea,
.stc-exercise-step-desc,
.stc-exercise-phase-input {
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}
.stc-exercise-label { font-size: 0.92rem; }
.stc-exercise-goal-num {
    /* Override any browser bullet/circle styling */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--stc-blue);
    color: #fff;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
    padding-top: 2px;
}

/* --- Phase text fields full width --- */
.stc-exercise-phase-row textarea,
.stc-phases-step textarea,
#stc-phases-modal-inputs textarea {
    width: 100%;
    box-sizing: border-box;
}

/* --- Day 4 Pick confirmation emphasis --- */
.stc-d4p-confirm-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--stc-navy);
    background: var(--stc-light-bg);
    border-left: 3px solid var(--stc-blue);
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
    margin: 12px 0;
    line-height: 1.5;
}
.stc-d4p-confirm-text a { color: var(--stc-blue); }

/* --- Day 6 due dates goal reference --- */
.stc-d6d-goal-due-ref {
    font-size: 1rem;
    font-weight: 700;
    color: var(--stc-navy);
    background: var(--stc-light-bg);
    border: 2px solid var(--stc-blue);
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    text-align: center;
}

/* --- CR display in Day 6 exercises --- */
.stc-exercise-cr-display {
    background: rgba(58,170,140,0.06);
    border: 1px solid rgba(58,170,140,0.25);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.9rem;
    color: var(--stc-text);
    line-height: 1.6;
    margin: 12px 0;
    white-space: pre-wrap;
}
.stc-exercise-cr-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--stc-teal);
    margin-bottom: 6px;
}

/* --- Phase chart master goal reference --- */
.stc-phase-master-ref {
    background: var(--stc-light-bg);
    border-left: 3px solid var(--stc-blue);
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 0.88rem;
}
.stc-phase-master-ref-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--stc-blue);
    margin-bottom: 4px;
}
.stc-phase-master-ref-text {
    color: var(--stc-navy);
    font-weight: 500;
    line-height: 1.4;
}

/* --- Day 4 Refine checklist expanded by default --- */


/* ==========================================================================
   v1.2.4 — TWG horizontal strip
   ========================================================================== */

.stc-twg-strip {
    background: var(--stc-white);
    border-radius: var(--stc-radius);
    box-shadow: var(--stc-shadow);
    border-left: 7.5px solid var(--stc-green);
    padding: 10px 16px 12px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: box-shadow var(--stc-transition), transform var(--stc-transition);
}
.stc-twg-strip:hover {
    box-shadow: var(--stc-shadow-lg);
    transform: translateY(-1px);
}
.stc-twg-strip.stc-twg-strip--green  { border-left-color: var(--stc-green); }
.stc-twg-strip.stc-twg-strip--yellow { border-left-color: var(--stc-yellow); }
.stc-twg-strip.stc-twg-strip--red    { border-left-color: var(--stc-red); }

/* Default border neutral — JS always sets the correct color class after load */
.stc-twg-strip { border-left-color: var(--stc-border); }

/* Strip progress bar and status dot — higher specificity to override defaults */
.stc-twg-strip .stc-progress--green  { background: var(--stc-green); }
.stc-twg-strip .stc-progress--yellow { background: var(--stc-yellow); }
.stc-twg-strip .stc-progress--red    { background: var(--stc-red); }
.stc-twg-strip .stc-status--green    { background: var(--stc-green); }
.stc-twg-strip .stc-status--yellow   { background: var(--stc-yellow); }
.stc-twg-strip .stc-status--red      { background: var(--stc-red); }

.stc-twg-strip-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--stc-blue);
    margin-bottom: 8px;
}

.stc-twg-strip-inner {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Thumbnail — square, uses stored focal point */
.stc-twg-strip-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--stc-light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity var(--stc-transition);
}
.stc-twg-strip-thumb:hover { opacity: 0.85; }
.stc-twg-strip-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.stc-twg-strip-emoji {
    font-size: 2rem;
    line-height: 1;
}

/* Goal info — fills remaining space */
.stc-twg-strip-info {
    flex: 1;
    min-width: 0;
}
.stc-twg-strip-title {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--stc-navy);
    line-height: 1.3;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stc-twg-strip-meta {
    display: flex;
    gap: 14px;
    font-size: 0.8rem;
    color: var(--stc-muted);
    margin-bottom: 6px;
}
.stc-twg-strip-due { color: var(--stc-text); }
.stc-twg-strip-progress {
    max-width: 300px;
    margin: 0;
}

/* ==========================================================================
   v1.2.5 — TWG featured card (option B — constrained width)
   ========================================================================== */

.stc-twg-featured-card {
    display: block;
    max-width: 260px;
}
.stc-twg-featured-card .stc-card {
    width: 100%;
    max-width: 260px !important;
    box-sizing: border-box;
}
/* Prevent banner bleed from expanding the card beyond max-width */
.stc-twg-featured-card .stc-card-banner {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* ==========================================================================
   v1.2.11 — Lucide SVG icon set
   ========================================================================== */

/* SVG icons in card icon div */
.stc-card-icon svg {
    width: 2.4rem;
    height: 2.4rem;
    stroke: currentColor;
    stroke-width: 1.75;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* SVG icons in picker grid */
.stc-icon-option svg {
    width: 1.6rem;
    height: 1.6rem;
    stroke: currentColor;
    stroke-width: 1.75;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
    margin: 0 auto;
}

/* SVG icon in TWG strip */
.stc-twg-strip-emoji svg {
    width: 2rem;
    height: 2rem;
    stroke: var(--stc-navy);
    stroke-width: 1.75;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ==========================================================================
   v1.2.14 — Build A fixes
   ========================================================================== */

/* Emphasis intro text for health CR */
.stc-exercise-intro--emphasis {
    font-size: 1rem;
    font-weight: 600;
    color: var(--stc-navy);
    line-height: 1.5;
}

/* Phases exercise — fix textarea layout */
.stc-exercise-phase-row {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.stc-exercise-phase-input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid var(--stc-border);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}
/* Phase label above textarea */
.stc-exercise-phase-row .stc-exercise-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--stc-blue);
    margin: 0;
}

/* Health steps — goal due date emphasis */
.stc-hs-goal-due {
    font-size: 1rem;
    font-weight: 700;
    color: var(--stc-navy);
    margin-top: 6px;
}

/* ==========================================================================
   v1.2.15 — Build B fixes
   ========================================================================== */

/* Phase master inline edit */
.stc-phase-master-edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 0 0 6px;
    opacity: 0.5;
    transition: opacity var(--stc-transition);
    vertical-align: middle;
}
.stc-phase-master-edit-btn:hover { opacity: 1; }
.stc-phase-master-textarea {
    width: 100%;
    box-sizing: border-box;
    margin-top: 6px;
}

/* ==========================================================================
   v1.2.17 — Overflow menu, arrow fix, TWG convert
   ========================================================================== */

/* Arrow fix — new goal modal matches global fixed-pixel rule */
#stc-new-goal-tension .stc-tension-column {
    min-height: 120px;
}

/* Overflow menu */
.stc-overflow-menu-wrap {
    position: relative;
    display: inline-block;
}
.stc-overflow-menu-btn {
    font-size: 1.2rem;
    padding: 4px 10px;
    letter-spacing: 0.05em;
}
.stc-overflow-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--stc-white);
    border: 1px solid var(--stc-border);
    border-radius: 8px;
    box-shadow: var(--stc-shadow-lg);
    min-width: 220px;
    z-index: 200;
    overflow: hidden;
}
.stc-overflow-item {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--stc-navy);
    cursor: pointer;
    transition: background var(--stc-transition);
}
.stc-overflow-item:hover { background: var(--stc-light-bg); }
.stc-overflow-item--danger { color: var(--stc-red); }
.stc-overflow-item--danger:hover { background: #fff5f5; }
.stc-overflow-divider {
    height: 1px;
    background: var(--stc-border);
    margin: 4px 0;
}

/* =============================================================================
   Insights
   ============================================================================= */

/* --- Inline shortcode wrap (on lesson pages) --- */
.stc-insight-wrap {
    background: var(--stc-white);
    border: 1px solid var(--stc-border);
    border-radius: var(--stc-radius);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.stc-insight-question {
    background: #1e3a5f;
    padding: 10px 20px;
    border-bottom: none;
}

.stc-insight-question-text {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    line-height: 1.5;
}

.stc-insight-wrap .stc-insight-responses,
.stc-insight-wrap .stc-insight-new-wrap {
    padding: 0 20px;
}

.stc-insight-wrap .stc-insight-responses {
    padding-top: 16px;
}

.stc-insight-wrap .stc-insight-new-wrap {
    padding-bottom: 16px;
    padding-top: 8px;
}

/* --- Full insights dashboard page --- */
.stc-insights-page {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.stc-insights-header {
    background: #1e3a5f;
    border-radius: var(--stc-radius) var(--stc-radius) 0 0;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}

.stc-insights-header-inner {
    display: flex;
    align-items: center;
    gap: 14px;
}

.stc-insights-header-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

.stc-insights-title {
    font-size: 1.2rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 2px;
    -webkit-font-smoothing: antialiased;
}

.stc-insights-subtitle {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

.stc-insights-guide-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    color: #ffffff;
    text-decoration: none;
    border: none;
    background: none;
    padding: 5px 0;
    opacity: 0.9;
    white-space: nowrap;
    flex-shrink: 0;
}
.stc-insights-guide-link:hover { opacity: 1; text-decoration: none; color: #ffffff; }

.stc-insights-sort-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.stc-insights-list {
    border: 1px solid var(--stc-border);
    border-top: none;
    border-radius: 0 0 var(--stc-radius) var(--stc-radius);
    overflow: hidden;
}

.stc-insight-block {
    background: var(--stc-white);
    border-bottom: 1px solid var(--stc-border);
    padding: 20px 24px;
}
.stc-insight-block:last-child { border-bottom: none; }

.stc-insight-block-header {
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.stc-insight-day-badge {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffffff;
    background: #2e7fc1;
    border-radius: 4px;
    padding: 3px 8px;
    margin-top: 2px;
    white-space: nowrap;
}

/* Keep legacy day-label for inline shortcode */
.stc-insight-day-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--stc-blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.stc-insight-block-question {
    font-size: 0.97rem;
    font-weight: 600;
    color: var(--stc-navy);
    margin: 0;
    line-height: 1.5;
}

/* Individual response */
.stc-insight-response {
    background: var(--stc-light-bg);
    border: 1px solid var(--stc-border);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 10px;
}

.stc-insight-response-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.stc-insight-response-date {
    font-size: 0.88rem;
    color: var(--stc-muted);
    font-weight: 500;
}

.stc-insight-response-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stc-insight-edit-btn,
.stc-insight-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--stc-muted);
    padding: 3px;
    display: flex;
    align-items: center;
    border-radius: 4px;
    transition: color var(--stc-transition), background var(--stc-transition);
}
.stc-insight-edit-btn:hover  { color: var(--stc-blue); background: rgba(46,127,193,0.08); }
.stc-insight-delete-btn:hover { color: var(--stc-red); background: rgba(229,72,77,0.08); }

/* Read-only response text */
.stc-insight-response-text {
    font-size: 0.93rem;
    color: var(--stc-navy);
    line-height: 1.6;
    white-space: pre-line;
    word-break: break-word;
    text-align: left !important;
}

/* Ensure all STC elements are left-aligned — overrides wp-block-avatar.aligncenter */
.stc-dashboard *,
.stc-insights-page *,
.stc-insight-wrap *,
.stc-insight-block *,
.stc-insight-response *,
.stc-chart-modal *,
.stc-exercise * { text-align: left !important; }

/* Exceptions — things that should stay centered */
.stc-card-body,
.stc-card-title,
.stc-card-due,
.stc-card-steps,
.stc-progress-label { text-align: center !important; }

.stc-insight-expand-btn {
    background: none;
    border: none;
    color: var(--stc-blue);
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    text-decoration: underline;
}
.stc-insight-expand-btn:hover { color: var(--stc-navy); }

.stc-insight-textarea {
    width: 100%;
    border: 1px solid var(--stc-border);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--stc-navy);
    background: var(--stc-white);
    resize: vertical;
    line-height: 1.5;
    transition: border-color var(--stc-transition);
    box-sizing: border-box;
}
.stc-insight-textarea:focus {
    outline: none;
    border-color: var(--stc-blue);
}
.stc-insight-textarea.stc-input-error { border-color: var(--stc-red); }

.stc-insight-edit-wrap { margin-top: 8px; }

.stc-insight-response-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

.stc-insight-char-count {
    font-size: 0.75rem;
    color: var(--stc-muted);
}

.stc-insight-saved-indicator {
    font-size: 0.78rem;
    color: #22a06b;
}

/* New response form */
.stc-insight-new-wrap {
    margin-top: 12px;
}

.stc-insight-new-form {
    margin-top: 10px;
}

.stc-insight-new-form .stc-btn-primary {
    margin-top: 10px;
}

.stc-plugin-version-footer {
    text-align: center;
    font-size: 0.72rem;
    color: var(--stc-muted);
    margin-top: 16px;
    padding-top: 10px;
    border-top: 1px solid var(--stc-border);
    opacity: 0.7;
}

.stc-insight-login,
.stc-insight-empty {
    color: var(--stc-muted);
    font-size: 0.95rem;
    padding: 16px;
    background: var(--stc-light-bg);
    border-radius: var(--stc-radius);
    border: 1px solid var(--stc-border);
}

/* =============================================================================
   Mobile responsive fixes
   ============================================================================= */

@media (max-width: 600px) {

    /* Dashboard header — stack title and actions vertically */
    .stc-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .stc-dashboard-header-actions {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* TWG strip — shrink thumb, allow info to wrap */
    .stc-twg-strip-thumb {
        width: 48px;
        height: 48px;
    }

    .stc-twg-strip-inner {
        flex-wrap: wrap;
        gap: 8px;
    }

    .stc-twg-strip-info {
        flex: 1;
        min-width: 0;
    }

    .stc-twg-strip-meta {
        flex-wrap: wrap;
        gap: 4px 10px;
    }

    .stc-twg-strip-title {
        font-size: 0.92rem;
    }

    /* Status dot pushed to far right on mobile */
    .stc-twg-strip-status {
        margin-left: auto;
    }
}

@media (max-width: 600px) {

    /* Insights header — stack vertically */
    .stc-insights-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px 18px;
    }

    .stc-insights-header-inner {
        gap: 10px;
    }

    .stc-insights-header-icon {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }

    .stc-insights-title {
        font-size: 1rem;
    }

    .stc-insights-subtitle {
        font-size: 0.76rem;
    }

    /* Guide + sort buttons row — sits below, right-aligned */
    .stc-insights-header > div:last-child {
        width: 100%;
        justify-content: flex-end;
    }

    /* Insight block padding reduced */
    .stc-insight-block {
        padding: 14px 16px;
    }

}

/* =============================================================================
   CMOT Dashboard
   ============================================================================= */

.stc-cmot-response {
    background: var(--stc-light-bg);
    border: 1px solid var(--stc-border);
    border-radius: 8px;
    padding: 4px 14px;
    margin-bottom: 8px;
}

.stc-cmot-reflection-header {
    padding: 10px 0;
}

.stc-cmot-goal-tag {
    font-size: 0.76rem;
    color: var(--stc-muted);
    font-style: italic;
    flex: 1;
    margin: 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stc-cmot-qa-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stc-cmot-qa-item {
    padding-left: 10px;
    border-left: 3px solid var(--stc-blue);
}

.stc-cmot-question {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--stc-muted);
    margin: 0 0 4px;
    text-align: left !important;
}

.stc-cmot-answer {
    font-size: 0.93rem;
    color: var(--stc-navy);
    line-height: 1.6;
    margin: 0;
    text-align: left !important;
    white-space: pre-line;
}
