/* 🎨 IMPORT DESIGN SYSTEM - MUST BE FIRST! */
@import url('design-tokens.css');

/* 🔧 PREVENT HORIZONTAL SCROLL - CRITICAL FIX */
html {
    overflow-x: hidden;
    max-width: 100vw;
    
    /* Apply Inter font everywhere */
    font-family: var(--font-sans);
    
    /* Smooth font rendering (makes text look cleaner) */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

*, *::before, *::after {
    box-sizing: border-box;
    /* REMOVE max-width from here - it causes issues */
}

* {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-warm-800);
    overflow-x: hidden;
    background: var(--color-warm-100);
}

@media (max-width: 768px) {
    /* Prevent any element from causing horizontal scroll */
    body {
        overflow-x: hidden;
    }
    
    .main-content {
        flex-direction: column;
        padding: 8px;
        gap: 8px;
        margin-bottom: 80px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .panel {
        padding: 12px 10px;
        min-height: auto;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0;
    }
}

/* Modern header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-8);
    width: 100%;
    box-sizing: border-box;
    min-height: 70px;

    background: var(--color-warm-50);
    
    /* Subtle border */
    border-bottom: 1px solid var(--color-gray-200);
    
    /* Softer shadow */
    box-shadow: var(--shadow-sm);
    
    /* Stick to top */
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

/* LEFT SIDE - Brand */
.brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* RIGHT SIDE - User Profile */
.user-profile {
    display: flex;
    flex-direction: column; /* Stack email under icon */
    align-items: center;
    gap: 4px; 
    flex-shrink: 0;
    max-width: 140px; /* Prevent overflow */
}

.user-email {
    font-size: 10px;
    color: var(--color-warm-600);
    font-weight: 500;
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    order: 2;
}

.user-icon {
    width: 52px;
    height: 52px;
    background-color: var(--color-warm-50);
    border-radius: 50%;
    border: 2px solid #e9ecef;
    flex-shrink: 0;
    order: 1; 
}

/* DESKTOP - Scale everything up */
@media (min-width: 769px) {
    .header {
        padding: 20px 50px !important;
        min-height: 100px;
    }
    
    .brand-icon img {
        height: 85px !important;
        
    }
    
    .user-profile {
        gap: 6px;
        flex-direction: column; /* Stack email under icon */
        max-width: none;
    }
    
    .user-email {
        font-size: 12px;
        max-width: 150px;
        text-align: center; 
        order: 2; 
    }
    
    .user-icon {
        width: 68px;
        height: 68px;
        order: 1; /* Icon on right on desktop */    
    }
}

.main-content {
    display: flex;
    gap: 20px;
    padding: 20px; 
}

.panel {
    flex: 1;
    background: var(--glass-warm-strong);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-warm-200);
    min-height: 400px;
}

.feedback-item {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 8px 15px;
    padding: 16px 20px;
    margin-bottom: 12px;
    background: var(--color-warm-100);
    border-radius: 12px;
    border: 1px solid var(--color-warm-300);
}

.feedback-icon {
    grid-column: 1;
    grid-row: 1;
    font-size: 18px;
}

.feedback-message {
    grid-column: 2;
    grid-row: 1;
    font-weight: 500;
    color: var(--color-warm-700);
}

.feedback-meta {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

.feedback-date {
    grid-column: 3;
}

.feedback-sender {
    grid-column: 4; 
}

.send-feedback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.add-feedback-btn {
    width: 120px; 
    height: 120px; 
    background-color: var(--color-warm-100); 
    border: 2px dashed #dee2e6; 
    border-radius: 16px; 
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-top: 40px; 
    transition: all 0.2s ease; 
}

.plus-icon {
    font-size: 36px; 
    color: #6c757d; 
    font-weight: 300; 
}

h2.received-title {
    color: var(--color-warm-800);
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    font-size: 18px;
}

h2 {
    color: var(--color-warm-800);
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    font-size: var(--text-lg);
}

.add-feedback-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-2px);
}


@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        padding: 8px;
        gap: 8px;
        margin-bottom: 80px;
        width: 100vw;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .panel {
        padding: 12px 10px;
        min-height: auto;
        width: calc(100vw - 16px);
        max-width: 100%;
        box-sizing: border-box;
        margin: 0;
    }
    
    
    .floating-add-btn {
        bottom: 16px;
        right: 12px;
        width: 56px;
        height: 56px;
    }
    
    .floating-add-btn .plus-icon {
        font-size: 24px;
    }
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-icon img {
    height: 40px;
    width: auto;
    transition: transform 0.2s ease;
    display: block;
}

.brand-icon img:hover {
    transform: scale(1.1);
}

.floating-add-btn {
    position: fixed;
    background-color: var(--color-primary);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(20, 184, 166, 0.3);
    z-index: 1000;
    transition: all 0.2s ease;
}

.floating-add-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
}

.floating-add-btn .plus-icon {
    font-size: 28px;
    color: white;
    font-weight: 400;
}

/* CSS FOR FEEDBACK WIZARD */   /* CSS FOR FEEDBACK WIZARD */  /* CSS FOR FEEDBACK WIZARD */

.wizard-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background-image: url('/assets/login-background1-2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    /* Lighter overlay than before */
    background-color: rgba(0, 0, 0, 0.15);
    background-blend-mode: darken;
    
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.wizard-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(20, 184, 166, 0.15);
    z-index: 0;
    pointer-events: none;
}

.wizard-content {
    /* Glass effect like login box */
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(20px);

    border-radius: 16px;
    padding: 0;
    max-width: 640px;
    width: 100%;
    position: relative;
    z-index: 1;
    max-height: 90vh;
    overflow-y: auto;

    /* Softer shadow like login */
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-top: 3px solid var(--color-primary);
}

.wizard-content::before {
    content: '';
    display: block;
    width: 96px;
    height: 96px;
    margin: 20px auto 0;
    background: url('/assets/Logo-v2.svg') no-repeat center;
    background-size: contain;
    opacity: 0.9;
}

.wizard-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    font-size: 18px;
    background: rgba(95, 99, 104, 0.08);
    color: var(--color-warm-600);
    z-index: 10;
}

.wizard-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-error);
}

.wizard-progress {
    background: var(--color-warm-100);
    padding: 16px 24px 12px 24px;
    border-bottom: 1px solid var(--color-warm-300);
    position: relative;
}

.wizard-progress .progress-text {
    font-size: 13px;
    color: var(--color-warm-600);
    font-weight: 500;
    letter-spacing: 0.25px;
    text-transform: uppercase;
}

.wizard-progress::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg,
        var(--color-primary) 0%,
        var(--color-primary) var(--progress-width, 25%),
        var(--color-gray-200) var(--progress-width, 25%),
        var(--color-gray-200) 100%);
}

.wizard-step {
    display: none;
    padding: 24px;
}

.wizard-step.active {
    display: block;
}

/* Topic sub-step — focused single-question screen */
.topic-substep-inner {
    text-align: center;
    padding: 32px 0 16px;
}

.topic-substep-icon {
    font-size: 40px;
    margin-bottom: 16px;
    line-height: 1;
}

.topic-substep h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-warm-800);
    margin-bottom: 10px;
}

.topic-substep-hint {
    font-size: 14px;
    color: var(--color-warm-600);
    margin-bottom: 28px;
    line-height: 1.5;
}

.topic-substep-input {
    max-width: 420px;
    margin: 0 auto;
    display: block;
    font-size: 18px !important;
    padding: 16px 20px !important;
    text-align: center;
}

.wizard-step h3 {
    margin: 0 0 24px 0;
    color: var(--color-warm-800);
    font-size: 20px;
    font-weight: 600;
    line-height: 24px;
}

.wizard-step input,
.wizard-step textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-warm-300);
    border-radius: 8px;
    margin-bottom: 20px;
    font-family: inherit;
    font-size: 16px;
    color: var(--color-warm-900);
    background: var(--color-warm-50);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.wizard-step input:focus,
.wizard-step textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.wizard-step input::placeholder,
.wizard-step textarea::placeholder {
    color: var(--color-warm-500); 
}


.wizard-step label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-warm-700);
}


.wizard-buttons {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 24px 0 8px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Default style = ghost (back button) */
.wizard-buttons button {
    background: transparent;
    color: var(--color-warm-600);
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    min-height: 40px;
    transition: color var(--transition-fast);
}

.wizard-buttons button:hover {
    color: var(--color-warm-800);
}

/* Primary style = forward / submit buttons */
.wizard-buttons button:last-child,
#step1-next-btn,
#step2-next-btn,
#step3-next-btn,
#step4-next-btn,
#step5-next-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.25);
}

.wizard-buttons button:last-child:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.35);
    transform: translateY(-1px);
}

/* Disabled state */
.wizard-buttons button:disabled,
.wizard-buttons button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

/* Workflow Button Styles */
.workflow-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background-color: var(--color-warm-50);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.workflow-btn:hover {
    border-color: var(--color-primary);
    background-color: var(--color-warm-50);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

/* Icon Container */
.workflow-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.workflow-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Text Content */
.workflow-text {
    flex: 1;
}

.workflow-text h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-warm-900);
}

.workflow-text p {
    margin: 0;
    font-size: 13px;
    color: var(--color-warm-600);
}

/* Specific Button Colors */
.ask-feedback-btn:hover {
    border-color: #2196F3;
}

.give-feedback-btn:hover {
    border-color: #4CAF50;
}

.feedback-type-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.feedback-type-btn {
    padding: 16px 20px;
    background: var(--color-warm-50);
    border: 1px solid var(--color-warm-300);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    transition: all 0.2s ease;
    color: var(--color-warm-800);
    display: flex;
    align-items: center;
    gap: 12px;
}

.feedback-type-btn:hover {
    border-color: var(--color-primary);
    background-color: var(--color-warm-50);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.feedback-type-btn.selected {
    border-color: var(--color-primary);
    background-color: var(--color-primary-50);
    box-shadow: 0 2px 6px rgba(20, 184, 166, 0.15);
    color: var(--color-primary-dark);
}

@media (max-width: 768px) {
    .wizard-modal {
        padding: 16px;
        background-position: right center;
    }
    
    .wizard-content {
        max-width: 100%;
        border-radius: 16px; 
    }
    
    .wizard-progress {
        padding: 16px 20px 12px 20px;
        border-radius: 16px 16px 0 0;
    }
    
    .wizard-step {
        padding: 20px;
    }
    
    .wizard-buttons {
        padding: 20px 0 8px;
        max-width: 100%;
    }
}

/* Request cards — clean, flat, minimal */
.request-card {
    background: var(--color-warm-50);
    border-radius: var(--radius-xl);
    padding: 0;
    margin: var(--space-4) auto;
    max-width: 700px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-warm-200);
    position: relative;
    cursor: pointer;
    transition: box-shadow var(--transition-base), transform var(--transition-base);
    overflow: hidden;
    margin-left: 4px;
    margin-right: 4px;
}

.request-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-date {
    font-size: 12px;
    color: var(--color-warm-600);
    font-weight: 500;
}

/* Main card content area */
/* 🆕 NEW - Better spacing */
.card-content {
    padding: var(--space-6) var(--space-6);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-warm-800);
    margin-bottom: 16px;                 /* More breathing room */
    line-height: 1.2;                    /* Tighter leading */
    font-family: var(--font-sans);
    letter-spacing: -0.5px;              /* Slightly tighter (modern) */
}

/* Status badge styling */
/* 🆕 NEW - Modern badge styling */
.card-status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-4);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--color-warm-50);
    border-bottom: 1px solid var(--color-gray-200);
}

.card-header-left {
    display: flex;
    align-items: center;
}

.card-type-badge {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
}
.card-type-badge .icon-mask {
    width: 24px;
    height: 24px;
    background-image: none;
    transition: none;
}

/* 🆕 ENHANCED - Premium glass button */
.card-action-btn {
    padding: var(--space-2) var(--space-4);
    
    /* 🆕 Glass button with teal tint */
    background: rgba(20, 184, 166, 0.15);
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    
    color: var(--color-primary-dark);
    border: 1px solid var(--color-primary-light);
    border-radius: var(--radius-full);
    
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    font-family: var(--font-sans);
    
    cursor: pointer;
    transition: all var(--transition-fast);
    
    /* 🆕 Subtle shadow */
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.15);
}

.card-action-btn:hover {
    /* 🆕 More opaque on hover */
    background: rgba(20, 184, 166, 0.25);
    
    /* 🆕 Lift slightly */
    transform: translateY(-2px);
    
    /* 🆕 Bigger shadow */
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.25);
    
    border-color: var(--color-primary);
}

.card-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(20, 184, 166, 0.2);
}

.card-title-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.title-and-status {
    flex: 1;
    min-width: 0; /* Allows text to wrap properly */
}


/* 🆕 ENHANCED - Active status with gentle pulse */
.status-active {
    background: rgba(20, 184, 166, 0.1);
    color: var(--color-primary-dark);
    border: 1px solid var(--color-primary-light);
    
    /* 🆕 Add gentle pulsing animation */
    animation: pulse-gentle 2s ease-in-out infinite;
    
    /* 🆕 Add a subtle glow effect */
    box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.3);
    
    /* Smooth transitions */
    transition: all var(--transition-base);
}

/* 🆕 On hover, pause the animation */
.status-active:hover {
    animation-play-state: paused;
    background: rgba(20, 184, 166, 0.15);
}

/* Keep other status styles unchanged */
.status-completed {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #2196f3;
}

.status-overdue {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
}

/* Progress bar for multiple recipients */
.card-progress {
    margin-bottom: 16px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-label {
    font-size: 13px;
    color: var(--color-warm-600);
    font-weight: 500;
}

.progress-percentage {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
}

.progress-bar-container {
    height: 6px;
    background: var(--color-warm-300);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* Recipients info section */
.recipients-info {
    margin-bottom: 16px;
}

/* 🆕 Recipients visual display with person icons */
.recipients-visual {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.person-icons {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.person-icons svg {
    transition: all 0.3s ease;
}

/* 🆕 Hover effect - icons grow slightly */
.recipients-info:hover .person-icons svg {
    transform: scale(1.1);
}

.recipients-count {
    font-size: 14px;
    color: var(--color-warm-600);
    font-weight: 500;
    margin-left: 4px;
}

.recipients-summary {
    font-size: 13px;
    color: var(--color-warm-800);
    margin-bottom: 8px;
}

.recipient-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recipient-tag {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--color-warm-200);
    border-radius: 12px;
    font-size: 11px;
    color: var(--color-warm-600);
}

.recipient-tag.completed {
    background: var(--color-primary-50);
    color: var(--color-primary-dark);
}

.recipient-status-icon {
    font-size: 10px;
}

/* Deadline info with urgency colors */
.deadline-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    background: var(--color-gray-50);
    border-radius: var(--radius-md);
    margin-top: var(--space-4);
}

.deadline-text {
    font-size: var(--text-sm);
    color: var(--color-gray-700);
    font-weight: var(--font-medium);
}

.days-remaining {
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
}

.days-remaining.urgent {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-error-600);
}

.days-remaining.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning-600);
}

.days-remaining.safe {
    background: rgba(20, 184, 166, 0.1);
    color: var(--color-primary-dark);
}

.card-content > div:last-child {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-gray-200);
    font-size: var(--text-xs);
    color: var(--color-gray-600);
    text-align: center;
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-5);
    min-height: 100vh;
    
    background: transparent;
    
    /* 🆕 Prevent clipping cards on mobile */
    overflow-x: visible;  /* Allow shadows to show */
}

/* 🆕 Add padding on mobile to prevent clipping */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 16px 8px;
    }
}

/* 🆕 Optional: Subtle noise texture overlay (adds warmth) */
.dashboard-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(20, 184, 166, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(45, 212, 191, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* 🆕 Make sure content stays above the overlay */
.dashboard-container > * {
    position: relative;
    z-index: 1;
}


/* Minimal Stats Cards */
.stat-card {
    background: transparent;
    border: none;
    padding: var(--space-2) var(--space-3);
    text-align: center;
}

.stat-label {
    font-size: 11px;
    font-weight: var(--font-medium);
    color: var(--color-warm-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-2);
    line-height: 1.2;
}

.stat-number {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--color-warm-700);
    line-height: 1;
    white-space: nowrap;
}

/* 🆕 Gradient border effect using pseudo-element */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: var(--gradient-border);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

/* Desktop: No hover effects for minimal look */
@media (min-width: 769px) {
    .stat-card:hover {
        background: transparent;
        transform: none;
        box-shadow: none;
        border-color: transparent;
    }
    
    .stat-card:hover::before {
        opacity: 0;
    }
}

/* Mobile: Keep hover effects */
@media (max-width: 768px) {
    .stat-card:hover {
        background: var(--glass-white-strong);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }
}

/* 🆕 When stat updates, animate it */
.stat-number.updating {
    animation: count-up 0.5s var(--ease-bounce);
}


/* Two Column Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

.requests-section::before {
    display: none;
}

.requests-section h2 {
    color: var(--color-gray-900);
    font-size: var(--text-3xl);
    font-weight: var(--font-semibold);
    font-family: var(--font-sans);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-8);
    line-height: 1.2;
}

/* Remove bar */
.requests-section h2::after {
    display: none;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0 4px;  /* 🆕 ADDED - prevents clipping */
}

/* 🆕 ADDED - more padding on mobile */
@media (max-width: 768px) {
    .sidebar-section {
        padding: 0 8px;
    }
}

.activity-feed,
.todo-section {
    background: var(--color-warm-50);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--color-warm-300);
}

/* Mobile Responsive */
@media (max-width: 768px) {

    .stat-card {
        padding: 12px 8px;
    }

    .stat-label {
        font-size: 11px;
        margin-bottom: var(--space-1);
    }

    .stat-number {
        font-size: var(--text-xl);    /* Smaller number */
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-container {
        padding: 16px 8px;
    }
}

/* Activity Feed Styles - Add to your style.css */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-warm-200);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    font-size: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-text {
    font-size: 13px;
    color: var(--color-warm-800);
    line-height: 1.4;
    margin-bottom: 2px;
}

.activity-text strong {
    color: var(--color-warm-900);
    font-weight: 500;
}

.activity-date {
    font-size: 11px;
    color: var(--color-warm-600);
    font-weight: 400;
}

/* To-Do List Styles - Add to your style.css */
.todo-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-warm-200);
}

.todo-item:last-child {
    border-bottom: none;
}

.todo-item.urgent {
    background: #fef7e0;
    margin: 0 -20px;
    padding: 16px 20px;
    border-radius: 8px;
    border-bottom: none;
}

.todo-content {
    flex: 1;
    min-width: 0;
}

.todo-text {
    font-size: 13px;
    color: var(--color-warm-800);
    line-height: 1.4;
    margin-bottom: 4px;
}

.todo-text strong {
    color: var(--color-warm-900);
    font-weight: 500;
}

.todo-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.todo-requester {
    font-size: 11px;
    color: var(--color-warm-600);
}

.todo-due {
    font-size: 11px;
    color: var(--color-primary-dark);
    font-weight: 500;
}

.todo-item.urgent .todo-due {
    color: var(--color-error);
}

.todo-action {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.todo-action:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.todo-action.urgent {
    background: var(--color-error);
}

.todo-action.urgent:hover {
    background: var(--color-error-600);
}

/* Action Buttons Styles - Zen & Minimalist */
.action-buttons {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    justify-content: center; /* Centered on page */
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    background: var(--color-warm-50);
    border: 1px solid var(--color-warm-300);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    outline: 2px solid rgba(20, 184, 166, 0.3);
    outline-offset: -2px;
}

.primary-action {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

/* 🆕 NEW - Premium primary CTA with TEAL */
.primary-action-btn {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    padding: var(--space-6) var(--space-10);
    
    /* YOUR TEAL BRAND COLOR! */
    background: var(--color-primary);
    color: white;
    
    /* Remove that opacity - it was making it dull */
    opacity: 1;
    
    /* Subtle white border for definition */
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    
    cursor: pointer;
    
    /* Typography */
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    font-family: var(--font-sans);
    
    /* Premium shadow */
    box-shadow: var(--shadow-xl);
    
    /* Smooth transitions */
    transition: all var(--transition-base);
    
    /* Prevent text selection */
    user-select: none;
}

.primary-action-btn:hover {
    /* Lighter teal on hover */
    background: var(--color-primary-light);
    
    /* Lift up */
    transform: translateY(-3px);
    
    /* Bigger shadow with TEAL glow */
    box-shadow: 0 12px 32px rgba(20, 184, 166, 0.35);
    
    /* Border gets more visible */
    border-color: rgba(255, 255, 255, 0.3);
}

.primary-action-btn:active {
    /* Press down */
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.primary-action-btn .action-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.primary-action-btn .action-icon img {
    filter: brightness(0) invert(1);
}



.action-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 12px;
}

.action-icon img {
    width: 100%;
    height: 100%;
    /* Keep original icon colors */
}

.action-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-warm-700);
    text-align: center;
    line-height: 1.3;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .action-buttons {
        gap: 16px;
    }
    
    .action-btn {
        min-width: 120px;
        padding: 20px 16px;
    }
}

/* GIVE FEEDBACK PAGE GIVE FEEDBACK PAGE GIVE FEEDBACK PAGE GIVE FEEDBACK PAGE GIVE FEEDBACK PAGE GIVE FEEDBACK PAGE */

.feedback-body {
    background-color: var(--color-warm-100);
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Progress Bar */
.feedback-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 12px 20px 8px 20px; /* Reduced padding */
    border-bottom: 1px solid rgba(232, 234, 237, 0.3);
    z-index: 100;
}   

.progress-bar {
    height: 4px;
    background: rgba(232, 234, 237, 0.4);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 2px;
    width: 0%;
    transition: width 0.4s ease;
}

.progress-text {
    font-size: 11px;
    color: var(--color-warm-600);
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Main Container */
.feedback-container {
    padding-top: 56px;
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-screen {
    display: none;
    width: 100%;
    max-width: 600px;
    padding: 40px 20px;
    text-align: center;
}

.feedback-screen.active {
    display: block;
    animation: screenFadeIn 0.28s var(--ease-smooth) both;
}

.screen-content {
    background: var(--color-warm-50);
    border-radius: 16px;
    padding: 48px 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-warm-200);
}

/* Typography */
.feedback-screen h1 {
    font-size: 28px;
    font-weight: 400;
    color: var(--color-warm-900);
    margin-bottom: 16px;
    line-height: 1.3;
}

.subtitle {
    font-size: 16px;
    color: var(--color-warm-600);
    margin-bottom: 8px;
}

.time-estimate {
    font-size: 14px;
    color: var(--color-warm-500);
    margin-bottom: 32px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .screen-content {
        padding: 32px 24px;
        margin: 0 16px;
    }
    
    .feedback-screen h1 {
        font-size: 24px;
    }
}

/* Give Feedback Page - Screen 1 Styling */
.helper-text {
    font-size: 14px;
    color: var(--color-warm-500);
    margin-bottom: 32px;
}

.input-group {
    margin-bottom: 32px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-warm-800);
    margin-bottom: 8px;
    text-align: left;
}

/* Override browser autofill highlight on form fields. Chromium ignores
   `background-color` on autofilled inputs and paints them pale yellow —
   which looks wrong against the warm-cream palette in light mode and
   actively jarring against dark mode surfaces. The inset box-shadow hack
   is the standard workaround: paint a same-coloured shadow at full spread
   so the autofill yellow never shows. Disappears when the user types
   because the field loses its `:autofill` state. */
.feedback-input:-webkit-autofill,
.feedback-input:-webkit-autofill:hover,
.feedback-input:-webkit-autofill:focus,
.feedback-textarea:-webkit-autofill,
.feedback-textarea:-webkit-autofill:hover,
.feedback-textarea:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--color-warm-50) inset !important;
    -webkit-text-fill-color: var(--color-warm-800) !important;
    caret-color: var(--color-warm-800);
    transition: background-color 9999s ease-in-out 0s;
}

.feedback-input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid var(--color-warm-300);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    color: var(--color-warm-800);
    background: var(--color-warm-50);
    transition: all 0.2s ease;
    box-sizing: border-box;
    outline: none;
}

.feedback-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.feedback-input::placeholder {
    color: var(--color-warm-500);
}

select.feedback-input {
    font-family: inherit !important;
    font-size: 16px !important;
    color: var(--color-warm-900);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239aa0a6' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.button-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.secondary-btn {
    background: var(--color-warm-50);
    color: var(--color-warm-700);
    border: 1px solid var(--color-warm-300);
    padding: 14px 32px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
}

.secondary-btn:hover {
    background: var(--color-warm-100);
    border-color: var(--color-warm-400);
    color: var(--color-warm-800);
}

/* Continue Button */
.continue-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.3);
    min-width: 140px;
}

.continue-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.4);
}

.continue-btn:disabled,
.continue-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

/* Screen 2: Feedback Form Styling */
.feedback-form {
    text-align: left;
    margin-bottom: 32px;
}

.form-section {
    margin-bottom: 24px;
}

.form-section label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary-dark);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-description {
    font-size: 14px;
    color: var(--color-warm-600);
    margin-bottom: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.4;
    background: var(--color-warm-100);
    padding: 8px 12px;
    border-radius: 6px;
}

.feedback-textarea {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid var(--color-warm-300);
    border-radius: 8px;
    font-size: 16px;
    color: var(--color-warm-900);
    background: var(--color-warm-50);
    transition: all 0.2s ease;
    box-sizing: border-box;
    outline: none;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.feedback-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.feedback-textarea::placeholder {
    color: var(--color-warm-500);
    line-height: 1.4;
}

/* Screen 3: Thank You Page Styling */
.success-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0;
    animation: fadeInScale 0.6s ease forwards;
}

.thank-you-message {
    font-size: 14px;
    color: var(--color-warm-600);
    line-height: 1.5;
    margin-bottom: 32px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.next-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.next-steps .continue-btn {
    background: var(--color-primary);
}

.next-steps .continue-btn:hover {
    background: var(--color-primary-dark);
}

/* Success animation */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes screenFadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* Thank-you screen staggered entrance */
.thank-you-content .thank-you-logo-top   { animation: fadeInScale 0.5s ease-out 0s both; }
.thank-you-content h1                    { animation: screenFadeIn 0.4s ease-out 0.15s both; }
.thank-you-content .confirmation-message { animation: screenFadeIn 0.4s ease-out 0.3s both; }
.thank-you-content .next-steps           { animation: screenFadeIn 0.4s ease-out 0.45s both; }

/* Mobile adjustments for thank you page */
@media (max-width: 768px) {
    .next-steps {
        width: 100%;
    }
    
    .next-steps button {
        width: 100%;
    }
}

/* ════════════════════════════════════════════════════════════════
   Screen 3: Review — redesigned
   ════════════════════════════════════════════════════════════════ */

.gf-card.gf-review {
    text-align: left;
}

/* Hero */
.gf-review-hero {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--color-warm-200);
}
.gf-review-title {
    font-family: 'Lora', Georgia, serif;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--color-warm-800);
    margin: 0 0 8px;
}
.gf-review-title span {
    color: var(--color-primary-darker);
}
.gf-review-stats {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 8px;
    margin: 0;
    font-size: 13px;
    color: var(--color-warm-600);
}
.gf-review-stat strong {
    color: var(--color-warm-800);
    font-weight: 700;
    font-size: 14px;
    margin-right: 3px;
}
.gf-review-stat--muted strong { color: var(--color-warm-500); }
.gf-review-stat-sep { color: var(--color-warm-400); }

/* Per-question card */
.gf-review-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
}
.gf-review-card {
    border: 1px solid var(--color-warm-200);
    border-radius: 14px;
    background: var(--color-warm-50);
    padding: 18px 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.gf-review-card:hover {
    border-color: var(--color-warm-300);
    box-shadow: 0 2px 10px rgba(20, 184, 166, 0.06);
}
.gf-review-card--skipped {
    background: var(--color-warm-100);
    border-color: var(--color-warm-400);
    border-style: dashed;
}
.gf-review-card--empty {
    background: var(--color-warning-50);
    border-color: var(--color-warning-600);
    border-style: dashed;
}

.gf-review-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.gf-review-card-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--color-primary-50);
    color: var(--color-primary-darker);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-top: 2px;
}
.gf-review-card-q {
    flex: 1;
    font-family: var(--font-sans);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-warm-800);
}
.gf-review-card-edit {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: transparent;
    border: 1px solid var(--color-warm-300);
    border-radius: 999px;
    color: var(--color-warm-700);
    font-family: var(--font-sans);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: 1px;
}
.gf-review-card-edit:hover {
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
    background: var(--color-primary-50);
}

/* Answer body — soft teal-tinted card with left rule, Lora italic.
   Mirrors the question-screen .gf-tf-display so the giver's voice is
   visually contained and distinct from the bold sans question above. */
.gf-review-card-answer {
    margin: 0 0 0 38px; /* aligns with question text after the number badge */
    padding: 14px 18px;
    background: rgba(20, 184, 166, 0.06);
    border: 1px solid rgba(20, 184, 166, 0.18);
    border-left: 3px solid var(--color-primary-light);
    border-radius: 10px;
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 16px;
    line-height: 1.65;
    color: var(--color-warm-800);
    white-space: pre-wrap;
    word-break: break-word;
}

/* Soften the question label slightly so the contained answer reads as the
   primary content; the question becomes the prompt header. */
.gf-review-card-q {
    color: var(--color-warm-700);
}

/* Status chips for skipped / empty states */
.gf-review-card-status {
    display: inline-block;
    margin-left: 38px;
    padding: 3px 10px;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.gf-review-card-status--skipped {
    background: var(--color-warm-200);
    color: var(--color-warm-600);
}
.gf-review-card-status--empty {
    background: var(--color-warning-50);
    color: var(--color-warning-700);
}

/* Error line */
.gf-review-error {
    margin: 0 0 16px;
    padding: 10px 14px;
    background: var(--color-error-50);
    border: 1px solid var(--color-error-200);
    border-radius: 8px;
    color: var(--color-error-800);
    font-size: 13.5px;
}

/* Actions */
.gf-review-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

/* Mobile */
@media (max-width: 640px) {
    .gf-review-title { font-size: 22px; }
    .gf-review-card { padding: 14px 16px; }
    .gf-review-card-edit span { display: none; }
    .gf-review-card-edit {
        padding: 5px 8px;
    }
    .gf-review-card-answer { margin-left: 0; padding: 12px 14px; }
    .gf-review-card-status { margin-left: 0; }
    .gf-review-actions { flex-direction: column-reverse; align-items: stretch; }
    .gf-review-actions .secondary-btn,
    .gf-review-actions .continue-btn { width: 100%; }
}

/* Dark mode */
[data-theme="dark"] .gf-review-hero {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .gf-review-title span {
    color: #5EEAD4;
}
[data-theme="dark"] .gf-review-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .gf-review-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .gf-review-card--skipped,
[data-theme="dark"] .gf-review-card--empty {
    background: rgba(255, 255, 255, 0.02);
}
[data-theme="dark"] .gf-review-card--empty {
    border-color: rgba(245, 158, 11, 0.32);
}
[data-theme="dark"] .gf-review-card-num {
    background: rgba(20, 184, 166, 0.2);
    color: #5EEAD4;
}
[data-theme="dark"] .gf-review-card-q {
    color: rgba(255, 255, 255, 0.7);
}
[data-theme="dark"] .gf-review-card-answer {
    background: rgba(20, 184, 166, 0.12);
    border-color: rgba(45, 212, 191, 0.32);
    border-left-color: var(--color-primary-light);
    color: #F4F4F8;
}
[data-theme="dark"] .gf-review-card-edit {
    border-color: rgba(255, 255, 255, 0.16);
    color: #C4C4CB;
}
[data-theme="dark"] .gf-review-card-edit:hover {
    background: rgba(20, 184, 166, 0.18);
    border-color: rgba(45, 212, 191, 0.5);
    color: #5EEAD4;
}
[data-theme="dark"] .gf-review-card-status--skipped {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.65);
}
[data-theme="dark"] .gf-review-card-status--empty {
    background: rgba(245, 158, 11, 0.18);
    color: #FCD34D;
}
[data-theme="dark"] .gf-review-error {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.32);
    color: #FECACA;
}

/* Legacy (old review screen) — kept for fallback */
.review-container {
    text-align: left;
    margin-bottom: 32px;
}

.review-section {
    background: var(--color-warm-100);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--color-warm-200);
}

.review-section h3 {
    color: var(--color-warm-800);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--color-warm-200);
    padding-bottom: 8px;
}

.review-section-header {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary-dark);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.review-item {
    display: flex;
    margin-bottom: 8px;
    align-items: center;
}
.review-item--block {
    flex-direction: column;
    align-items: flex-start;
}
.review-item--block .review-value--instructions {
    margin-left: 0;
    margin-top: 6px;
    width: 100%;
}

.review-label {
    font-weight: 600;
    color: var(--color-warm-600);
    min-width: 60px;
    font-size: 14px;
}

.review-value {
    color: var(--color-warm-900);
    font-size: 14px;
    margin-left: 12px;
}

.review-feedback-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-warm-200);
}

.review-feedback-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.review-feedback-item h4 {
    color: var(--color-primary-dark);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.review-feedback-text {
    color: var(--color-warm-800);
    font-size: 14px;
    line-height: 1.5;
    background: var(--color-warm-50);
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid var(--color-warm-300);
    font-style: italic;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: break-word;
}

.review-feedback-text:empty::before {
    content: "Not provided";
    color: var(--color-warm-500);
    font-style: italic;
}

.review-feedback-skipped {
    font-size: 13px;
    color: var(--color-warm-500);
    font-style: italic;
    margin: 0;
}

/* Review Actions */
.review-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.review-title {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 32px;
    color: var(--color-warm-900);
}

.tertiary-btn {
    background: transparent;
    color: var(--color-error);
    border: 1px solid var(--color-error);
    padding: 14px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.tertiary-btn:hover {
    background: var(--color-error-50);
    color: var(--color-error-600);
}

.continue-btn.primary {
    background: var(--color-primary);
    min-width: 140px;
}

.continue-btn.primary:hover {
    background: var(--color-primary-dark);
}

/* Mobile adjustments for review screen */
@media (max-width: 768px) {
    .review-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .review-actions button {
        width: 100%;
        max-width: 280px;
    }
}

.add-giver-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--color-primary-50);
    border: 2px dashed var(--color-primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary-dark);
    width: 100%;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

.add-giver-btn:hover:not(:disabled) {
    background: var(--color-primary-50);
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
}

.add-giver-btn:disabled {
    background: var(--color-warm-100);
    border-color: var(--color-warm-300);
    color: #b0b4b9;
    cursor: not-allowed;
    font-weight: 400;
}

.plus-icon {
    font-size: 18px;
    font-weight: bold;
}

.feedback-giver-form {
    background: var(--color-warm-100);
    border: 1px solid var(--color-warm-200);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
    transition: padding 0.2s ease;
}

.feedback-giver-form.giver-collapsed {
    padding: 12px 16px;
    background: var(--color-warm-50);
    border-color: var(--color-gray-200);
}

/* Equal spacing between all fields inside an expanded giver card */
.feedback-giver-form .feedback-input,
.feedback-giver-form .feedback-textarea {
    margin-bottom: 16px;
}

/* Role wrapper div provides the outer gap; select inside gets no extra margin */
.feedback-giver-form .giver-field-row {
    margin-bottom: 16px;
}
.feedback-giver-form .giver-field-row .feedback-input {
    margin-bottom: 0;
}

/* Last textarea in the form needs no trailing gap */
.feedback-giver-form .feedback-textarea:last-of-type {
    margin-bottom: 0;
}

/* Collapsed pill row */
.giver-summary-row {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
}

.giver-summary-row:hover {
    background: rgba(35, 88, 122, 0.04);
}

.giver-avatar-mini {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(35, 88, 122, 0.10);
    color: #23587a;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.giver-summary-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.giver-summary-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.giver-summary-email {
    font-size: 12px;
    color: var(--color-gray-400);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.giver-summary-role {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    color: var(--color-primary-dark);
    background: var(--color-primary-50);
    border: 1px solid #99f6e4;
    border-radius: 4px;
    padding: 1px 6px;
    margin-top: 2px;
    width: fit-content;
}

.giver-edit-hint {
    font-size: 12px;
    color: var(--color-primary);
    font-weight: 500;
}

/* "Done ✓" button inside expanded form */
.giver-done-btn {
    background: none;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.giver-done-btn:hover {
    background: var(--color-primary);
    color: white;
}

.giver-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.giver-form-header h4 {
    margin: 0;
    color: var(--color-warm-900);
    font-size: 16px;
    font-weight: 500;
}

.remove-giver-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--color-warm-600);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-giver-btn:hover {
    background: var(--color-warm-200);
    color: var(--color-error-600);
}

.deadline-section {
    margin-bottom: 24px;
}

.reminders-section {
    background: var(--color-warm-100);
    border: 1px solid var(--color-warm-200);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.reminders-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-gray-400);
    margin: 0 0 12px;
}

.reminder-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.reminder-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
}

.reminder-toggle label {
    font-weight: 500;
    color: var(--color-warm-900);
    margin: 0;
}

.recommended-badge {
    background: var(--color-primary-50);
    color: var(--color-primary-dark);
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reminder-settings {
    transition: opacity 0.2s ease;
}

.reminder-settings.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.reminder-settings label {
    display: block;
    margin-bottom: 4px;
    margin-top: 16px;
    font-weight: 500;
    color: var(--color-warm-800);
}

.reminder-settings label:first-child {
    margin-top: 0;
}

.add-reminder-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--color-warm-100);
    border: 2px dashed var(--color-warm-300);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-warm-600);
    width: 100%;
    margin-top: 12px;
}

.add-reminder-btn:hover {
    background: var(--color-primary-50);
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
}

.reminder-form {
    background: var(--color-warm-100);
    border: 1px solid var(--color-warm-300);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
}

.reminder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.reminder-header h5 {
    margin: 0;
    color: var(--color-warm-900);
    font-size: 14px;
    font-weight: 600;
}

.reminder-header button {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--color-warm-600);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
}

.helper-text {
    color: var(--color-warm-600);
    font-size: 12px;
    font-style: italic;
    margin-top: 4px;
}

/* ════════════════════════════════════════════════════════════════════
   STEP 4 — SCHEDULE & NOTIFICATIONS (sd-* classes)
   ════════════════════════════════════════════════════════════════════ */

.sd-header {
    text-align: center;
    margin-bottom: 22px;
}

.sd-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg,
        rgba(20, 184, 166, 0.12) 0%,
        rgba(45, 212, 191, 0.18) 100%);
    color: var(--color-primary-dark);
    box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.2);
}

.sd-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-warm-800);
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}

.sd-header-sub {
    font-size: 13.5px;
    color: var(--color-warm-500);
    margin: 0;
    line-height: 1.5;
}

/* Card */
.sd-card {
    position: relative;
    background: linear-gradient(180deg,
        rgba(240, 253, 250, 0.4) 0%,
        rgba(250, 249, 247, 0.55) 100%);
    border: 1px solid var(--color-warm-200);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(20, 184, 166, 0.04);
    transition: border-color 200ms var(--ease-smooth),
                box-shadow 200ms var(--ease-smooth);
}

.sd-card:focus-within {
    border-color: rgba(20, 184, 166, 0.35);
    box-shadow: 0 4px 16px rgba(20, 184, 166, 0.08);
}

/* Progressive-focus: dims sections that haven't been reached yet on Step 4.
   pointer-events stays enabled so a user can scroll past or peek; we just
   visually de-emphasize. Active section gets full opacity. */
.sd-card--inactive {
    opacity: 0.4;
    transition: opacity 320ms var(--ease-smooth);
}

.sd-card--inactive .sd-card-header,
.sd-card--inactive .privacy-toggle-row,
.sd-card--inactive .sd-reminders {
    pointer-events: none;
}

/* "Looks good — continue ↓" link inside Step 4 sections.
   Acts as a manual escape hatch for users who didn't trigger auto-advance. */
.sd-continue-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 14px auto 0;
    padding: 8px 18px;
    background: transparent;
    border: 1px dashed var(--color-warm-300);
    border-radius: 999px;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 160ms var(--ease-smooth),
                border-color 160ms var(--ease-smooth),
                transform 160ms var(--ease-smooth);
}

.sd-continue-link:hover {
    background: rgba(20, 184, 166, 0.06);
    border-color: var(--color-primary);
    transform: translateY(1px);
}

/* Center the continue link within its parent section */
.sd-card .sd-continue-link {
    display: flex;
    width: fit-content;
}

.sd-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.sd-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--color-warm-50);
    border: 1px solid var(--color-warm-200);
    color: var(--color-warm-600);
}

.sd-card-icon--accent {
    background: linear-gradient(135deg,
        rgba(20, 184, 166, 0.12) 0%,
        rgba(45, 212, 191, 0.18) 100%);
    border-color: rgba(20, 184, 166, 0.18);
    color: var(--color-primary-dark);
}

.sd-card-titles {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sd-card-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-warm-800);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.sd-card-sub {
    font-size: 11.5px;
    color: var(--color-warm-500);
    line-height: 1.4;
    margin-top: 1px;
}

/* Quick presets row */
.sd-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.sd-preset {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 10px 6px;
    background: var(--color-warm-50);
    border: 1.5px solid var(--color-warm-200);
    border-radius: 10px;
    color: var(--color-warm-700);
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 180ms var(--ease-smooth);
}

.sd-preset:hover {
    border-color: rgba(20, 184, 166, 0.4);
    color: var(--color-primary-dark);
    background: rgba(240, 253, 250, 0.7);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(20, 184, 166, 0.08);
}

.sd-preset--active {
    background: linear-gradient(135deg,
        var(--color-primary) 0%,
        var(--color-primary-light) 100%);
    border-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.28);
}

.sd-preset--active:hover {
    color: white;
    background: linear-gradient(135deg,
        var(--color-primary-dark) 0%,
        var(--color-primary) 100%);
}

.sd-preset-num {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.sd-preset-unit {
    font-size: 10.5px;
    font-weight: 500;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    opacity: 0.85;
}

/* Custom date row — label + input centered together */
.sd-date-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 10px 12px;
    background: var(--color-warm-50);
    border: 1px solid var(--color-warm-200);
    border-radius: 10px;
    transition: border-color 180ms var(--ease-smooth),
                box-shadow 180ms var(--ease-smooth);
}

.sd-date-row:focus-within {
    border-color: rgba(20, 184, 166, 0.45);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.sd-date-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--color-warm-700);
    margin: 0;
}

.sd-date-input {
    /* Sized to its content (no flex:1) so the label + input stay grouped and
       centered by the row, instead of the input sprawling to the right edge.
       min-width holds the full MM/DD/YYYY value without truncating. */
    min-width: 148px;
    padding: 7px 12px;
    border: 1px solid var(--color-warm-200);
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.2;
    font-family: var(--font-sans);
    color: var(--color-warm-800);
    background: var(--color-warm-50);
    outline: none;
    transition: border-color 180ms var(--ease-smooth);
}

/* iOS/WebKit paints the date value through these pseudo-elements, which
   otherwise ignore the input's font-size and render it oversized (and clipped).
   Pin them so the value matches the surrounding field scale. */
.sd-date-input::-webkit-date-and-time-value {
    font-size: 13.5px;
    text-align: left;
    margin: 0;
}
.sd-date-input::-webkit-datetime-edit {
    font-size: 13.5px;
    padding: 0;
}

.sd-date-input:focus {
    border-color: var(--color-primary);
    background: var(--color-warm-50);
}

/* Smart summary line */
.sd-deadline-summary {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(20, 184, 166, 0.07);
    border: 1px solid rgba(20, 184, 166, 0.18);
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--color-warm-700);
    animation: sd-summary-in 240ms var(--ease-smooth);
}

@keyframes sd-summary-in {
    from { opacity: 0; transform: translateY(-2px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sd-deadline-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--color-warm-50);
    color: var(--color-primary);
    box-shadow: 0 1px 2px rgba(20, 184, 166, 0.15);
}

.sd-deadline-summary strong {
    color: var(--color-warm-800);
    font-weight: 600;
}

/* Reminder schedule */
.sd-reminders {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--color-warm-300);
}

.sd-reminders-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-warm-500);
    margin: 0 0 10px;
}

/* ── Process-flow timeline ─────────────────────────────────── */
.sd-flow {
    margin-bottom: 16px;
    padding: 14px 14px 16px;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.7) 0%,
        rgba(240, 253, 250, 0.5) 100%);
    border: 1px solid var(--color-warm-200);
    border-radius: 12px;
}

.sd-flow-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-warm-500);
    margin: 0 0 12px;
    text-align: center;
}

/* Track: a relative-positioned canvas. Steps inside are absolutely positioned
   so the distance between reminder and deadline can be proportional to the
   actual time gap (set inline as `left: X%`). */
.sd-flow-track {
    position: relative;
    height: 90px;
    padding: 8px 4px 6px;
}

/* Single dashed connector line spanning from the start-icon center to the
   end-icon center. Sits behind icons (z-index 0). */
.sd-flow-track::before {
    content: "";
    position: absolute;
    top: 25px;            /* vertical center of icon: 8px padding + 18px (half of 36) - 1px stroke */
    left: 18px;           /* half-width of start icon */
    right: 18px;          /* half-width of end icon */
    height: 2px;
    background-image: linear-gradient(
        to right,
        var(--color-primary) 0%,
        var(--color-primary) 60%,
        transparent 60%,
        transparent 100%
    );
    background-size: 8px 2px;
    background-repeat: repeat-x;
    opacity: 0.45;
    z-index: 0;
}

.sd-flow-step {
    position: absolute;
    top: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Anchors: start hugs the left edge, end hugs the right. Width is locked to the
   icon (36px) so the icon center sits exactly under the dashed line endpoint.
   Labels are wider than the 36px column — align them to the inner edge so
   they overflow toward the center of the timeline instead of past the
   container's left/right edges. */
.sd-flow-step--start,
.sd-flow-step--end {
    width: 36px;
}
.sd-flow-step--start {
    left: 0;
    align-items: flex-start;
    text-align: left;
}
.sd-flow-step--end {
    right: 0;
    align-items: flex-end;
    text-align: right;
}

.sd-flow-step--reminder {
    transform: translateX(-50%);
    transition: left 280ms var(--ease-smooth);
}

.sd-flow-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-warm-50);
    border: 2px solid var(--color-primary);
    color: var(--color-primary-dark);
    box-shadow: 0 2px 6px rgba(20, 184, 166, 0.15);
    transition: transform 180ms var(--ease-bounce);
}

.sd-flow-step:hover .sd-flow-icon {
    transform: scale(1.08);
}

.sd-flow-step--start .sd-flow-icon {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    border-color: var(--color-primary);
}

.sd-flow-step--end .sd-flow-icon {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    color: white;
    border-color: var(--color-primary-dark);
}

.sd-flow-step--reminder .sd-flow-icon {
    background: rgba(20, 184, 166, 0.12);
    border-color: rgba(20, 184, 166, 0.55);
}

.sd-flow-step--warn .sd-flow-icon {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.6);
    color: var(--color-warning-700);
}

.sd-flow-step-label {
    margin-top: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-warm-700);
    line-height: 1.3;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.sd-flow-step-date {
    margin-top: 1px;
    font-size: 10.5px;
    color: var(--color-warm-500);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
/* Reminder fire-date under its timeline marker (B2) — slightly smaller and
   teal-tinted to tie to the reminder icon; centered under the dot. */
.sd-flow-step-date--rem {
    font-size: 9.5px;
    margin-top: 5px;
    color: var(--color-primary-dark);
}

.sd-flow-step--start .sd-flow-step-label,
.sd-flow-step--end .sd-flow-step-label {
    color: var(--color-primary-dark);
}

/* ── Reminder editor cards ─────────────────────────────────── */
.sd-reminder-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: var(--color-warm-50);
    border: 1px solid var(--color-warm-200);
    border-radius: 12px;
    margin-bottom: 8px;
    transition: border-color 180ms var(--ease-smooth),
                box-shadow 180ms var(--ease-smooth);
}

.sd-reminder-card:hover {
    border-color: rgba(20, 184, 166, 0.3);
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.06);
}

.sd-reminder-card:focus-within {
    border-color: rgba(20, 184, 166, 0.5);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.sd-reminder-card--warn {
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(254, 243, 199, 0.35);
}

.sd-reminder-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    margin-top: 1px;
    border-radius: 50%;
    background: rgba(20, 184, 166, 0.12);
    color: var(--color-primary-dark);
}

.sd-reminder-card--warn .sd-reminder-card-icon {
    background: rgba(245, 158, 11, 0.18);
    color: var(--color-warning-700);
}

.sd-reminder-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sd-reminder-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-warm-500);
}

.sd-reminder-card-warn-pill {
    padding: 2px 8px;
    background: rgba(245, 158, 11, 0.18);
    color: var(--color-warning-700);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sd-reminder-card-control {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13.5px;
    color: var(--color-warm-800);
    font-weight: 500;
}

.sd-reminder-card-prefix,
.sd-reminder-card-suffix {
    color: var(--color-warm-700);
}

/* +/- stepper — flush cells, divided by hairline borders, no detached look. */
.sd-stepper {
    display: inline-flex;
    align-items: stretch;
    height: 34px;
    flex-shrink: 0;
    background: var(--color-warm-50);
    border: 1.5px solid var(--color-warm-300);
    border-radius: 9px;
    overflow: hidden;
    transition: border-color 180ms var(--ease-smooth),
                box-shadow 180ms var(--ease-smooth);
}

.sd-stepper:hover {
    border-color: rgba(20, 184, 166, 0.4);
}

.sd-stepper:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.sd-stepper-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 100%;
    padding: 0;
    border: 0;
    background: var(--color-warm-100);
    color: var(--color-warm-700);
    cursor: pointer;
    transition: background 150ms var(--ease-smooth),
                color 150ms var(--ease-smooth);
}

.sd-stepper-btn:first-child {
    border-right: 1px solid var(--color-warm-200);
}

.sd-stepper-btn:last-child {
    border-left: 1px solid var(--color-warm-200);
}

.sd-stepper-btn:hover:not(:disabled) {
    background: rgba(20, 184, 166, 0.12);
    color: var(--color-primary-dark);
}

.sd-stepper-btn:active:not(:disabled) {
    background: rgba(20, 184, 166, 0.2);
}

.sd-stepper-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.sd-stepper-btn svg {
    flex-shrink: 0;
}

.sd-stepper-input {
    width: 44px;
    height: 100%;
    border: 0;
    padding: 0 4px;
    background: var(--color-warm-50);
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-warm-800);
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
    outline: none;
    -moz-appearance: textfield;
}

.sd-stepper-input::-webkit-outer-spin-button,
.sd-stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Small "Nd" badge on the reminder bell in the schedule overview. */
.sd-flow-icon {
    overflow: visible;
}

.sd-flow-badge {
    position: absolute;
    bottom: -4px;
    right: -8px;
    min-width: 22px;
    height: 16px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-dark);
    color: white;
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    border-radius: 8px;
    border: 1.5px solid white;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.sd-flow-step--warn .sd-flow-badge {
    background: var(--color-warning-700);
}

.sd-reminder-card-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--color-warm-600);
    line-height: 1.4;
}

.sd-reminder-card-meta svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

.sd-reminder-card-meta strong {
    color: var(--color-warm-800);
    font-weight: 600;
}

.sd-reminder-card-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--color-warm-500);
    cursor: pointer;
    transition: all 150ms var(--ease-smooth);
}

.sd-reminder-card-remove:hover {
    background: rgba(239, 68, 68, 0.12);
    color: var(--color-error-600);
}


.sd-reminder-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding: 7px 14px;
    background: var(--color-warm-50);
    border: 1.5px dashed var(--color-warm-300);
    border-radius: 999px;
    color: var(--color-warm-600);
    font-size: 12.5px;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 180ms var(--ease-smooth);
}

.sd-reminder-add:hover:not(:disabled) {
    border-color: var(--color-primary);
    background: rgba(240, 253, 250, 0.6);
    color: var(--color-primary-dark);
    border-style: solid;
}

.sd-reminder-add:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--color-warm-50);
}

.sd-add-hint {
    margin: 8px 0 0;
    font-size: 11.5px;
    color: var(--color-warm-500);
    font-style: italic;
    text-align: center;
    line-height: 1.45;
}

/* Mobile */
@media (max-width: 768px) {
    .sd-header {
        margin-bottom: 18px;
    }

    .sd-header-icon {
        width: 38px;
        height: 38px;
    }

    .sd-header h3 {
        font-size: 18px;
    }

    .sd-header-sub {
        font-size: 12.5px;
    }

    .sd-card {
        padding: 14px 14px;
        border-radius: 12px;
    }

    .sd-presets {
        gap: 6px;
    }

    .sd-preset {
        padding: 9px 4px;
    }

    .sd-preset-num {
        font-size: 16px;
    }

    .sd-preset-unit {
        font-size: 10px;
    }

    .sd-date-row {
        padding: 9px 10px;
        gap: 8px;
    }

    .sd-date-input {
        min-width: 136px;
    }

    .sd-deadline-summary {
        font-size: 11.5px;
        padding: 9px 10px;
    }

    .sd-reminder-card {
        padding: 11px 12px;
        gap: 10px;
        border-radius: 11px;
    }

    .sd-reminder-card-icon {
        width: 28px;
        height: 28px;
    }

    .sd-reminder-card-control {
        font-size: 13px;
        gap: 6px;
    }

    .sd-reminder-card-meta {
        font-size: 11px;
    }

    .sd-flow {
        padding: 12px 8px 14px;
    }

    .sd-flow-track {
        height: 80px;
    }

    .sd-flow-track::before {
        top: 23px;        /* 8px padding + 16px (half 32) - 1px stroke */
        left: 16px;       /* half-width of start icon (32px on mobile) */
        right: 16px;      /* half-width of end icon */
    }

    .sd-flow-step--start,
    .sd-flow-step--end {
        width: 32px;      /* match smaller mobile icon */
    }

    .sd-flow-icon {
        width: 32px;
        height: 32px;
    }

    .sd-flow-step-label {
        font-size: 10.5px;
    }

    .sd-flow-step-date {
        font-size: 10px;
    }

    .sd-flow-badge {
        min-width: 20px;
        height: 14px;
        font-size: 8.5px;
        bottom: -3px;
        right: -7px;
        padding: 0 4px;
    }

    .sd-stepper {
        height: 32px;
    }

    .sd-stepper-btn {
        width: 30px;
    }

    .sd-stepper-input {
        width: 38px;
        font-size: 13.5px;
    }
}

.requester-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 16px;
    line-height: 1.2;
}

.enhanced-giver {
    background: var(--color-warm-100);
    border: 2px solid var(--color-warm-300);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.enhanced-giver h5 {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 12px;
}

.review-instructions {
    text-align: center;
    font-size: 16px;
    color: var(--color-warm-600);
    margin-bottom: 24px;
    font-weight: 400;
}

#modal-title {
    text-align: center;
    margin-bottom: 24px;
}

.modal-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.modal-status.completed {
    background: #e3f2fd;
    color: #1565c0;
}

.modal-status.active {
    background: #e8f5e9;
    color: #2e7d32;
}

/* 🚪 Logout Button */
.logout-btn {
    margin-top: 8px;
    padding: 6px 16px;
    background: var(--color-error);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: var(--color-error-600);
    transform: translateY(-1px);
}

/* 🆕 Dashboard Loading State */
.dashboard-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.dashboard-loading.hidden {
    display: none;
}

.loading-ring {
    width: 44px;
    height: 44px;
    border: 3px solid var(--color-warm-200);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    margin: 0 auto var(--space-4);
}

.loading-ring--sm {
    width: 28px;
    height: 28px;
    border-width: 2px;
    margin: var(--space-10) auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.dashboard-loading p {
    color: var(--color-warm-600);
    font-size: 16px;
    margin: 0;
}

/* Hide dashboard content while loading */
.dashboard-stats.loading,
.primary-action.loading,
.dashboard-grid.loading {
    opacity: 0.3;
    pointer-events: none;
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-16) var(--space-8);
    text-align: center;
    background: var(--glass-white-weak);
    backdrop-filter: blur(var(--blur-sm));
    -webkit-backdrop-filter: blur(var(--blur-sm));
    border: 1px dashed var(--color-warm-300);
    border-radius: var(--radius-2xl);
}

.empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: var(--space-5);
    border-radius: var(--radius-full);
    background: var(--color-primary-50);
    color: var(--color-primary);
    /* For legacy emoji icons that still use this class elsewhere */
    font-size: 32px;
    line-height: 1;
}

.empty-state-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--color-warm-800);
    letter-spacing: -0.01em;
    margin-bottom: var(--space-2);
}

.empty-state-text {
    font-size: var(--text-sm);
    color: var(--color-warm-600);
    line-height: var(--leading-relaxed);
    max-width: 420px;
    margin: 0 auto var(--space-6);
}

.empty-state-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: white;
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 60%, var(--color-primary-dark) 100%);
    border: none;
    border-radius: var(--radius-full);
    box-shadow: 0 6px 18px rgba(20, 184, 166, 0.28);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.empty-state-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(20, 184, 166, 0.34);
}

.empty-state-cta:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.22);
}

.empty-state-cta:focus-visible {
    outline: 2px solid var(--color-primary-dark);
    outline-offset: 3px;
}

@media (max-width: 768px) {
    .empty-state {
        padding: var(--space-12) var(--space-5);
    }

    .empty-state-icon {
        width: 60px;
        height: 60px;
        margin-bottom: var(--space-4);
    }
}

/* Screen loading (give-feedback welcome) */
.screen-loading {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 🆕 Feedback Journey Card Styles */

.feedback-journey-card {
    /* Warm glass effect */
    background: var(--glass-warm) !important;
    backdrop-filter: blur(var(--blur-md)) !important;
    -webkit-backdrop-filter: blur(var(--blur-md)) !important;
    
    /* Smooth transitions */
    transition: all var(--transition-base);
}

/* 🆕 Updated journey recipient hover effects */
.journey-recipient {
    cursor: default; /* Not clickable, just informational */
}

/* Footer styling */
.journey-footer {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .feedback-journey-card {
        padding: 16px !important;
    }
    
    .journey-recipient {
        padding: 10px 12px !important;
    }
    
    .journey-footer {
        padding: 12px !important;
    }
}

/* 🆕 Mark Complete Button */
.mark-complete-btn {
    background: rgba(16, 185, 129, 0.15) !important;
    color: var(--color-success-600) !important;
    border: 1px solid var(--color-success) !important;
    font-weight: 600 !important;
}

.mark-complete-btn:hover {
    background: rgba(16, 185, 129, 0.25) !important;
    border-color: var(--color-success-600) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25) !important;
}

/* Update card actions to flex properly */
.card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 🆕 ELEGANT DASHBOARD HEADER */

.dashboard-header {
    text-align: center;
    margin-bottom: var(--space-10);
    padding: var(--space-6) 0;
}

.header-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: var(--space-2);
    opacity: 0.8;
}

.header-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 300;
    color: var(--color-gray-900);
    letter-spacing: -0.5px;
    margin: 0;
    position: relative;
    display: inline-block;
}

/* Subtle underline accent */
.header-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--color-primary), 
        transparent);
    opacity: 0.6;
}

/* Remove old "before" pseudo-element from requests-section */
.requests-section::before {
    display: none;
}

/* Update the old h2 just in case it still exists */
.requests-section h2 {
    display: none;
}

/* ===================================
   NEW: Compact Info Bar
   =================================== */

.info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--color-warm-50);
    border-radius: 12px;
    border: 1px solid var(--color-gray-200);
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.info-bar-left,
.info-bar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.info-segment {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-icon {
    font-size: 16px;
}

.info-label {
    font-weight: 600;
    color: var(--color-gray-700);
    font-size: 14px;
}

.info-text {
    color: var(--color-gray-500);
    font-size: 14px;
}

.info-count {
    font-weight: 600;
    color: var(--color-primary);
    font-size: 14px;
}

.info-link {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.info-link:hover {
    color: #0F9B8E;
}

/* Compact Request Feedback button */
.primary-action-btn-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-success) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.primary-action-btn-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

/* ===================================
   UPDATED: Full Width Requests Section
   =================================== */

.requests-section-full {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.requests-section-full h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 24px;
    text-align: center;
}

.requests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px;
}

/* Responsive: Stack on smaller screens */
@media (max-width: 768px) {
    .info-bar {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .info-bar-left,
    .info-bar-right {
        flex-direction: column;
        gap: 12px;
    }
    
    .requests-grid {
        grid-template-columns: 1fr;
    }
}

/* Enhanced Thank You Page */
.thank-you-content {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(255, 255, 255, 0.98) 100%);
    backdrop-filter: blur(20px);
}

/* Custom message box */
/* The requester's personal note reads as a quote line, not another box —
   the thank-you screen keeps a single boxed element (the invite CTA). */
.custom-message-box {
    padding: 0;
    margin: 24px auto;
    max-width: 480px;
    animation: slideIn 0.5s ease-out;
}

.custom-thank-you {
    font-size: 19px;
    color: var(--color-warm-900);
    line-height: 1.6;
    font-style: italic;
    text-align: center;
}

.custom-thank-you strong {
    color: var(--color-primary-dark);
    font-weight: 600;
    font-style: normal;
}

/* Confirmation message */
.confirmation-message {
    font-size: 16px;
    color: var(--color-warm-600);
    margin: 24px 0 32px 0;
}

.confirmation-message span {
    color: var(--color-warm-900);
    font-weight: 600;
}

/* Plain clause inside the confirmation line (e.g. ", with your name attached") */
.confirmation-message .cm-plain {
    color: inherit;
    font-weight: inherit;
}

/* Quiet, borderless note (anonymous / identifiable states). Token colors so
   dark mode adapts — the old hardcoded light box glared on the dark theme. */
.gf-anon-notice {
    padding: 0 8px;
    margin: -16px auto 28px;
    max-width: 460px;
    font-size: 14px;
    color: var(--color-warm-600);
    line-height: 1.6;
    text-align: left;
    animation: screenFadeIn 0.4s ease-out 0.35s both;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.gf-anon-notice p {
    margin: 0;
    flex: 1;
}
.gf-anon-notice-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 3px;  /* optical center with the first line of text */
    color: var(--color-primary-dark, #0d9488);
}

/* Branded button with logo */
.branded-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%) !important;
}

.btn-logo {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.branded-btn:hover .btn-logo {
    transform: rotate(360deg);
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Lotus flower at top */
.thank-you-logo-top {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
    animation: fadeInScale 0.6s ease forwards;
}

/* Full logo at bottom */
.thank-you-logo-bottom {
    width: 120px;
    margin-top: 32px;
    opacity: 0.6;
}

/* Thank you page button */
.thank-you-content .continue-btn {
    background: var(--color-primary);
}

/* Giver → requester loop: framed self-invite CTA on the thank-you screen.
   Calm, not salesy — a teal-tinted card that capitalizes on the moment the
   giver just experienced the product. Mirrors the .gf-anon-notice aesthetic. */
.gf-invite-cta {
    margin-top: 8px;
    padding: 24px 24px 26px;
    border-radius: 14px;
    background: rgba(20, 184, 166, 0.06);
    border: 1.5px solid rgba(20, 184, 166, 0.2);
    text-align: center;
    animation: screenFadeIn 0.4s ease-out 0.45s both;
}

.gf-invite-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary-dark, #0f766e);
    margin-bottom: 8px;
}

.gf-invite-headline {
    font-size: 19px;
    font-weight: 600;
    color: var(--color-warm-900);
    margin: 0 0 8px 0;
    line-height: 1.35;
}

.gf-invite-body {
    font-size: 14.5px;
    color: var(--color-warm-600);
    line-height: 1.6;
    margin: 0 auto 20px;
    max-width: 460px;
}

/* Dark mode */
[data-theme="dark"] .gf-invite-cta {
    background: rgba(20, 184, 166, 0.10);
    border-color: rgba(20, 184, 166, 0.28);
}
[data-theme="dark"] .gf-invite-eyebrow {
    color: #5EEAD4;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   🆕 WISE-INSPIRED LAYOUT - Sidebar + Main Area
   ============================================ */

/* Main wrapper for sidebar + dashboard */
.app-layout {
    display: block;
    min-height: 100vh;
    background: var(--color-warm-100);
}

.app-sidebar {
    width: 220px;
    background: var(--color-warm-100);
    backdrop-filter: none;
    border-right: none;  
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    position: fixed;              
    top: 0;
    left: 0;                      
    height: 100vh;
    overflow-y: auto;             
    z-index: 100;                 
}

/* Logo section at top */
.sidebar-logo {
    margin-bottom: var(--space-8);
    padding-top: var(--space-3);
    padding-bottom: var(--space-5);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sidebar-logo img {
    width: 100px;
    height: auto;
}

/* Logo is a link home (results.html) — hug the image so the click target
   matches the mark, in both the sidebar and the mobile header. */
.sidebar-logo-link,
.mobile-logo-link {
    display: inline-flex;
    align-items: center;
}
.mobile-logo-link {
    order: 1;   /* left side of .mobile-header (menu button is order: 2) */
}

/* Navigation Items Container */
.sidebar-nav {
    flex: 1;                    /* Takes up available space (pushes footer to bottom) */
    display: flex;
    flex-direction: column;
    gap: var(--space-2);        /* Spacing between nav items */
}

/* Individual Navigation Buttons */
.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);        /* Space between icon and text */
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    color: var(--color-warm-700);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    text-decoration: none;
    transition: all var(--transition-fast);  /* Smooth hover effect */
    cursor: pointer;
    border: none;               /* Remove default button border */
    background: transparent;
    width: 100%;
}

/* Hover effect - subtle highlight */
.nav-item:hover {
    background: var(--color-warm-200);
    color: var(--color-primary);
}

/* Active state - shows which page you're on */
.nav-item.active {
    background: var(--color-warm-50);
    color: var(--color-primary);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}

.nav-item-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--color-primary);
    opacity: 0.45;
    transition: opacity 0.15s;
    display: block;
}

.nav-item:hover .nav-item-icon {
    opacity: 0.75;
}

.nav-item.active .nav-item-icon {
    opacity: 1;
}

/* User Profile in Sidebar Footer */
.sidebar-footer {
    padding-top: var(--space-4);
    border-top: 1px solid var(--glass-border);
    margin-top: auto;           /* Pushes to bottom of sidebar */
}

/* Subtle brand signature below user profile */
.sidebar-brand {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--glass-border);
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-warm-500);
    text-align: center;
}

/* About (info) icon button shares the brand row; the row owns the divider and
   spacing so the brand text no longer carries its own. order:3 keeps it last in
   the mobile footer's flex column. */
.sidebar-brand-row {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    order: 3;
}
.sidebar-brand-row .sidebar-brand {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.sidebar-about-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--color-warm-500);
    text-decoration: none;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}
.sidebar-about-btn:hover {
    color: var(--color-primary-dark);
    background: var(--color-warm-100);
}
[data-theme="dark"] .sidebar-about-btn:hover { color: var(--color-primary-light); }

.user-profile-sidebar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.user-profile-sidebar:hover {
    background: var(--color-warm-100);
}

/* Sidebar user menu (logout dropdown) */
.sidebar-footer {
    position: relative;
}

.sidebar-user-menu {
    position: absolute;
    bottom: calc(100% + 4px);
    left: var(--space-3);
    right: var(--space-3);
    background: var(--color-warm-50);
    border: 1px solid var(--color-warm-200);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    overflow: hidden;
    display: none;
    z-index: 200;
}

.sidebar-user-menu.open {
    display: block;
}

.sidebar-logout-btn {
    width: 100%;
    padding: 10px var(--space-3);
    background: none;
    border: none;
    text-align: left;
    font-size: var(--text-sm);
    color: var(--color-warm-700);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.sidebar-logout-btn:hover {
    background: var(--color-warm-50);
    color: var(--color-warm-900);
}

/* User Avatar Circle */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);  /* Makes it circular (9999px radius) */
    background: linear-gradient(135deg, var(--color-primary) 0%, #0ea5e9 60%, #6366f1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
}

.user-info {
    flex: 1;
    min-width: 0;              /* Allows text-overflow to work */
}

.user-name {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-warm-800);
    white-space: nowrap;        /* Prevents text wrapping */
    overflow: hidden;           /* Hides overflow text */
    text-overflow: ellipsis;    /* Adds "..." if text is too long */
}

.user-email-sidebar {
    font-size: var(--text-xs);
    color: var(--color-warm-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Dashboard Area (right side) */
.dashboard-main {
    margin-left: 220px;           /* Pushes content to the right of sidebar */
    padding: var(--space-8);
    overflow-y: auto;
    background: transparent;
    min-height: 100vh;
    position: relative;
}

/* ── Zen backdrop: warm wash + teal blooms + ensō watermarks + rice-paper noise ── */
.dashboard-main::before {
    content: '';
    position: fixed;
    top: 0;
    left: 220px;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    background-color: var(--color-warm-100);
    background-image:
        /* Top-right ensō (brush circle) — large, partially off-canvas */
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 300'><path d='M150 38 A112 112 0 1 1 62 208' fill='none' stroke='%230D9488' stroke-width='16' stroke-linecap='round' opacity='0.32'/></svg>"),
        /* Bottom-left ensō — smaller, partially off-canvas */
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 300'><path d='M150 38 A112 112 0 1 1 62 208' fill='none' stroke='%236366F1' stroke-width='14' stroke-linecap='round' opacity='0.22'/></svg>"),
        /* Teal bloom, upper-right */
        radial-gradient(circle at 78% 18%, rgba(20, 184, 166, 0.08) 0%, transparent 55%),
        /* Indigo bloom, lower-left */
        radial-gradient(circle at 18% 88%, rgba(99, 102, 241, 0.05) 0%, transparent 60%),
        /* Rice-paper noise */
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.35 0'/></filter><rect width='240' height='240' filter='url(%23n)' opacity='0.55'/></svg>");
    background-position:
        calc(100% + 140px) -90px,
        -100px calc(100% + 130px),
        center,
        center,
        0 0;
    background-size:
        620px 620px,
        480px 480px,
        100% 100%,
        100% 100%,
        240px 240px;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat;
}

.dashboard-main > * {
    position: relative;
    z-index: 1;
}

/* ── Dark mode: invert the Zen backdrop ──
   Same composition (ensō circles + brand blooms + rice-paper noise) but
   palette-flipped so the brand identity reads against a near-black base.
   - Base color: deep slate-teal (subtle brand inflection, not pure black)
   - Ensō strokes: light teal + periwinkle (visible on dark)
   - Blooms: boosted opacity since low-alpha glows wash out on dark
   - Noise: SVG color matrix flipped from black→white for visible texture
*/
[data-theme="dark"] .dashboard-main::before {
    background-color: #0D1518;
    background-image:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 300'><path d='M150 38 A112 112 0 1 1 62 208' fill='none' stroke='%2399E6DA' stroke-width='16' stroke-linecap='round' opacity='0.28'/></svg>"),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 300'><path d='M150 38 A112 112 0 1 1 62 208' fill='none' stroke='%23A5B4FC' stroke-width='14' stroke-linecap='round' opacity='0.22'/></svg>"),
        radial-gradient(circle at 78% 18%, rgba(20, 184, 166, 0.18) 0%, transparent 55%),
        radial-gradient(circle at 18% 88%, rgba(99, 102, 241, 0.14) 0%, transparent 60%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.18 0'/></filter><rect width='240' height='240' filter='url(%23n)' opacity='0.55'/></svg>");
}

@media (max-width: 768px) {
    /* Mobile: a right-side drawer that slides in from the same corner as the
       hamburger button (top-right). Full height beneath the fixed header, ~80%
       wide so the page peeks behind it, parked off-screen to the right and
       animated with transform for a smooth slide. */
    .app-sidebar {
        position: fixed;
        top: 72px;                  /* sits just below the fixed mobile header */
        bottom: 0;
        right: 0;
        left: auto;
        width: 80%;
        max-width: 320px;
        height: auto;               /* top + bottom define the full height */
        overflow-y: auto;
        z-index: 1000;
        transform: translateX(100%);/* parked off-screen to the right */
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: var(--shadow-2xl);
        padding: var(--space-4);
        padding-bottom: var(--space-5);
        background: var(--color-warm-50);
        border-radius: var(--radius-xl) 0 0 var(--radius-xl);  /* round the page-facing edge */
    }

    /* Account + Log out pinned to the bottom of the full-height drawer.
       (Mobile had no logout at all before — the whole footer was hidden.) The
       desktop click-to-reveal dropdown is shown inline here instead. */
    .app-sidebar .sidebar-footer {
        display: flex;
        flex-direction: column;
        gap: var(--space-1);
        margin-top: auto;          /* sit at the very bottom of the drawer */
    }
    .app-sidebar .user-profile-sidebar {
        order: 1;                  /* identity on top */
    }
    .app-sidebar .sidebar-user-menu {
        order: 2;                  /* actions below it, always visible (no toggle) */
        position: static;
        display: block;
        background: transparent;
        border: none;
        box-shadow: none;
        border-radius: 0;
    }
    .app-sidebar .sidebar-brand {
        display: none;             /* redundant with the header logo — and avoids another hairline */
    }

    /* The brand lives in the mobile header, so hide the sidebar's logo box
       entirely. Otherwise its empty (image-hidden) container's bottom border
       shows as a faint line above the first menu item. */
    .app-sidebar .sidebar-logo {
        display: none;
    }

    .sidebar-nav {
        gap: var(--space-1);
    }

    .app-sidebar.mobile-open {
        transform: translateX(0);
        background: var(--color-warm-50);
        box-shadow: -8px 0 24px rgba(0, 0, 0, 0.18);  /* shadow falls toward the page (left) */
    }
    .app-sidebar.mobile-open .nav-item {
        background: var(--color-warm-50);
        color: var(--color-warm-700);
    }

    .app-sidebar.mobile-open .nav-item.active {
        background: transparent;
        color: var(--color-gray-900);
        border: 2px solid var(--color-gray-900);
        padding: calc(var(--space-3) - 2px) calc(var(--space-4) - 2px);
    }

    .app-sidebar.mobile-open .nav-item:hover:not(.active) {
        background: var(--color-warm-100);
        color: var(--color-primary);
    }
    
    /* CRITICAL: Remove left margin on mobile! */
    .dashboard-main {
        margin-left: 0;             /* No margin - full width on mobile */
        padding: 0;
        padding-top: 76px;           /* Clears the ~60px fixed .mobile-header + breathing room */
    }

    .dashboard-main::before {
        left: 0;
    }
    
    /* Stats — single row on mobile */
    .dashboard-stats {
        display: flex;
        justify-content: space-evenly;
        align-items: center;
        gap: 0;
        padding: 8px 0;
        margin-bottom: 24px;
    }

    .stat-card {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 2px 2px;
    }

    .stat-label {
        font-size: 10px;
        letter-spacing: 0.3px;
        text-align: center;
        line-height: 1.2;
    }

    .stat-number {
        font-size: 13px;
        text-align: center;
    }
    
    .btn-request-feedback {
        padding: 14px 24px;
        font-size: 15px;
        border-radius: 24px;
        box-shadow: 0 3px 10px rgba(20, 184, 166, 0.25);
        margin-bottom: 10px;
    }

    .btn-request-feedback img {
        width: 20px;  /* Smaller icon */
        height: 20px;
    }
}

/* ============================================
   🆕 DASHBOARD CONTENT REDESIGN (WISE-STYLE)
   ============================================ */

/* Page Header (the "Home" title at top) */
.page-header {
    margin-bottom: var(--space-8);
}

.ap-page-header--with-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

@media (max-width: 768px) {
    .ap-page-header--with-action {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Development Planner header — button below subtitle, left-aligned desktop */
.ap-page-header--centered {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    padding-bottom: var(--space-2);
}

/* Keep the button compact — override the mobile full-width rule */
.ap-page-header--centered .ap-btn-gradient,
.ap-page-header--centered .ap-btn-gradient--sm,
.ap-page-header--centered .pg-btn-add-primary {
    width: auto !important;
    padding: 10px 22px;
}

@media (max-width: 768px) {
    .ap-page-header--centered {
        align-items: center;
        text-align: center;
    }
}

.page-title {
    font-size: var(--text-3xl);      /* Big and bold! */
    font-weight: var(--font-semibold);
    font-family: var(--font-display);
    color: var(--color-warm-800);
    margin: 0;
}

@media (max-width: 768px) {
    .page-header {
        margin-top: 16px;
        margin-bottom: 24px;
        text-align: center;
    }

    .page-title {
        font-size: 28px;
        font-weight: 600;
    }

    .hero-actions {
        justify-content: center;
    }
}

/* Hero Action Section - The Star of the Show! */
.hero-actions {
    margin-bottom: var(--space-8);
    display: flex;
    gap: var(--space-4);
}

.btn-request-feedback {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0ea5e9 60%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: filter var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.3);
}

.btn-request-feedback:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(20, 184, 166, 0.4);
}

.btn-request-feedback:active {
    filter: none;
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(20, 184, 166, 0.25);
}

/* Icon styling */
.btn-request-feedback img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);  /* Makes the SVG white */
}

.btn-icon {
    font-size: 22px;
}

.btn-text {
    font-size: var(--text-base);
}

/* Stats Cards - Cleaner, Minimal Design */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    padding: var(--space-3) 0;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    opacity: 0.75;
}

/* ── Hero stat layout (results.html) ───────────────────
   Overrides the 4-col grid above with a hero card + supporting list.
   Add modifier .dashboard-stats--hero to opt in. */
.dashboard-stats--hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: var(--space-6);
    align-items: center;
    padding: var(--space-4) 0 var(--space-6);
    margin-bottom: var(--space-6);
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    opacity: 1;
}

.stat-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-2) 0 var(--space-2) var(--space-6);
    background: transparent;
    border: none;
    box-shadow: none;
}

.stat-hero-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-warm-600);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: var(--space-2);
}

.stat-hero-number {
    font-family: var(--font-display);
    font-size: clamp(2.75rem, 2rem + 2.5vw, 4rem);
    font-weight: var(--font-semibold);
    line-height: 1;
    color: var(--color-warm-800);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-4);
}

.stat-hero-sub {
    display: inline-flex;
    align-items: baseline;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--color-primary-50);
    border-radius: var(--radius-full);
    align-self: flex-start;
}

.stat-hero-sub-num {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-primary-dark);
    letter-spacing: -0.01em;
}

.stat-hero-sub-text {
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-warm-700);
}

/* Left-side supporting list — flat rows, no card chrome */
.stat-list {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    padding: var(--space-2) var(--space-6) var(--space-2) 0;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.stat-list-item {
    flex: 0 0 auto;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-3) 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-list-item:last-child {
    border-bottom: none;
}

.stat-list-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-warm-600);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.stat-list-number {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--color-warm-800);
    line-height: 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

/* Loading state — fades placeholders gently */
.dashboard-stats--hero.loading {
    opacity: 0.55;
}

/* Animate hero number when it updates (reuses existing count-up keyframe) */
.stat-hero-number.updating {
    animation: count-up 0.5s var(--ease-bounce);
}

/* Mobile: list-style stats (iOS-Settings inspired).
   Label sits on the left, number aligns right. Hero is differentiated
   only by its larger number + the participation pill underneath — no
   card chrome, just thin hairline separators. Reads top-to-bottom
   naturally on a phone. */
@media (max-width: 768px) {
    .dashboard-stats--hero {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: var(--space-2) var(--space-1) 0;
        margin-bottom: var(--space-5);
        border: none;
    }

    /* Hero row: 2-col grid so label+number share a baseline,
       and the participation pill tucks below the label on row 2.
       On mobile the list now comes first; the last list item draws
       the divider before the hero, so the hero itself has no top
       or bottom border. */
    .stat-hero {
        display: grid;
        grid-template-columns: 1fr auto;
        column-gap: 14px;
        row-gap: 6px;
        padding: 14px 0 4px;
        border-right: none;
        border-bottom: none;
    }
    .stat-hero-label {
        grid-column: 1;
        grid-row: 1;
        align-self: center;
        font-size: 11px;
        letter-spacing: 0.6px;
        margin: 0;
    }
    .stat-hero-number {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: center;
        font-size: 38px;
        line-height: 1;
        margin: 0;
    }
    .stat-hero-sub {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
        margin: 0;
        padding: 3px 9px;
        font-size: 11px;
    }
    .stat-hero-sub-num  { font-size: 12px; }
    .stat-hero-sub-text { font-size: 10px; }

    /* Supporting stats: same row pattern, smaller numbers, hairline divider.
       List comes first on mobile; its trailing border serves as the divider
       before the hero, so we keep the :last-child border. */
    .stat-list {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0;
        border-right: none;
    }
    .stat-list-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 14px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .stat-list-label {
        font-size: 11px;
        letter-spacing: 0.6px;
        line-height: 1.3;
    }
    .stat-list-number {
        font-size: 22px;
        line-height: 1;
    }
}

/* Dark-mode hairlines */
@media (max-width: 768px) {
    [data-theme="dark"] .stat-list-item {
        border-bottom-color: rgba(255, 255, 255, 0.06);
    }
}
[data-theme="dark"] .stat-list {
    border-right-color: rgba(255, 255, 255, 0.06);
}

/* ── Request tabs (results.html) ────────────────────────
   Active / Drafts / Completed pill-tabs above the request list. Persists
   selection via sessionStorage. Active tab uses --color-primary-50 (already
   redefined for dark theme in design-tokens.css) so light/dark just work. */
.rq-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: var(--space-4);
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;  /* hide on Firefox */
}
.rq-tabs::-webkit-scrollbar { display: none; }  /* hide on WebKit */

.rq-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-warm-600);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.rq-tab:hover {
    background: rgba(0, 0, 0, 0.03);
    color: var(--color-warm-800);
}
.rq-tab:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.rq-tab--active {
    background: var(--color-primary-50);
    color: var(--color-primary-dark);
    border-color: rgba(13, 148, 136, 0.12);
}
.rq-tab--active:hover {
    background: var(--color-primary-50);
    color: var(--color-primary-dark);
}

.rq-tab-label {
    font-weight: inherit;
}

/* Count chip: inherits color but uses an opaque-ish bg to read as a tag.
   Lives inside the tab pill, so we keep it small + subdued. */
.rq-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.05);
    color: inherit;
    font-size: 11px;
    font-weight: var(--font-semibold);
    letter-spacing: 0.2px;
}
.rq-tab--active .rq-tab-count {
    background: rgba(13, 148, 136, 0.14);
}

/* Red attention dot — completed requests with unread perspectives. */
.rq-tab-dot {
    position: absolute;
    top: 4px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-error);
    box-shadow: 0 0 0 2px var(--color-surface, #fff);
}
.rq-tab-dot[hidden] { display: none; }
[data-theme="dark"] .rq-tab-dot {
    box-shadow: 0 0 0 2px var(--color-bg-elevated, #1f2421);
}

/* Per-tab empty state — quieter than the full-page empty state since the
   tabs themselves already give context for what's missing. */
.empty-state--tab {
    padding: var(--space-10) var(--space-6);
    background: transparent;
    border: 1px dashed rgba(0, 0, 0, 0.10);
}
.empty-state--tab .empty-state-title {
    font-size: var(--text-lg);
    margin-bottom: 6px;
}
.empty-state--tab .empty-state-text {
    margin: 0 auto;
}

/* Dark mode — lighter hover bg, lighter dashed border, retuned active pill */
[data-theme="dark"] .rq-tab:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-warm-800);
}
[data-theme="dark"] .rq-tab--active {
    background: rgba(20, 184, 166, 0.10);
    color: #5eead4;
    border-color: rgba(20, 184, 166, 0.22);
}
[data-theme="dark"] .rq-tab--active:hover {
    background: rgba(20, 184, 166, 0.14);
}
[data-theme="dark"] .rq-tab-count {
    background: rgba(255, 255, 255, 0.07);
}
[data-theme="dark"] .rq-tab--active .rq-tab-count {
    background: rgba(20, 184, 166, 0.20);
}
[data-theme="dark"] .empty-state--tab {
    border-color: rgba(255, 255, 255, 0.10);
}

/* Mobile — tighter pills + smaller text so the tabs fit on one line without
   overflow scrolling kicking in. Count chip shrinks too. Centered on the
   line (desktop stays left-aligned). */
@media (max-width: 768px) {
    .rq-tabs {
        gap: 4px;
        margin-bottom: var(--space-3);
        justify-content: center;
    }
    .rq-tab {
        padding: 7px 12px;
        font-size: 13px;
        gap: 6px;
    }
    .rq-tab-count {
        min-width: 20px;
        height: 18px;
        padding: 0 6px;
        font-size: 10px;
    }
    .empty-state--tab {
        padding: var(--space-8) var(--space-4);
    }
}

/* Phones — four tabs (Active · Past Due · Drafts · Completed) on one line at
   360px. Everything compresses: type, padding, gaps, count chips, dot. */
@media (max-width: 480px) {
    .rq-tabs { gap: 3px; }
    .rq-tab {
        padding: 6px 8px;
        font-size: 11.5px;
        gap: 4px;
    }
    .rq-tab-count {
        min-width: 16px;
        height: 15px;
        padding: 0 4px;
        font-size: 9px;
    }
    .rq-tab-dot {
        width: 7px;
        height: 7px;
        top: 3px;
        right: 4px;
    }
}

/* ── Basic dashboard stats (results.html) ───────────────
   Three peer stats in a single row: Active · Perspectives · Participation.
   No hero, no state branching — calm, glanceable, identical on every visit.
   Subtle hairline divider above and below frames the block without making
   it feel like a card. Works in light + dark, desktop + mobile. */
.dashboard-stats--basic {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    padding: var(--space-5) 0;
    margin-bottom: var(--space-6);
    border-top:    1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    opacity: 1;
}

.basic-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    padding: 0 var(--space-4) 0 0;
    min-width: 0;  /* lets long labels wrap rather than overflow */
}
.basic-stat + .basic-stat {
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    padding-left: var(--space-4);
}

.basic-stat-label {
    font-size: 11px;
    font-weight: var(--font-semibold);
    color: var(--color-warm-600);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    line-height: 1.3;
    /* Grid stretches the three stats to equal height; letting the label absorb
       the slack pins every number to a shared baseline even when one label
       wraps to two lines (e.g. "Perspectives received" on narrow screens). */
    flex: 1;
}

.basic-stat-number {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 1.2rem + 1vw, 2.2rem);
    font-weight: var(--font-semibold);
    color: var(--color-warm-800);
    line-height: 1;
    letter-spacing: -0.02em;
}

/* Dark mode — lighter hairlines so the dividers don't disappear */
[data-theme="dark"] .dashboard-stats--basic {
    border-top-color:    rgba(255, 255, 255, 0.08);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .basic-stat + .basic-stat {
    border-left-color: rgba(255, 255, 255, 0.08);
}

/* Mobile — same 3-col layout, tighter padding + smaller numbers so all three
   fit on a 360px viewport without truncating the label. Stats centered
   (label + number) on mobile only — desktop stays left-aligned. */
@media (max-width: 768px) {
    .dashboard-stats--basic {
        gap: var(--space-2);
        padding: var(--space-4) 0;
        margin-bottom: var(--space-4);
        /* The legacy mobile .dashboard-stats rule sets align-items: center,
           which stops the grid stretching the three stats to equal height —
           and the label's flex: 1 needs that stretch to keep the numbers on
           a shared baseline when a label wraps to two lines. */
        align-items: stretch;
    }
    .basic-stat {
        align-items: center;
        text-align: center;
        gap: 6px;
        padding: 0 var(--space-2);
    }
    .basic-stat + .basic-stat {
        padding-left: var(--space-2);
    }
    .basic-stat-label {
        font-size: 10px;
        letter-spacing: 0.5px;
    }
    .basic-stat-number {
        font-size: 22px;
    }
}


/* Latest Activity Section */
.latest-activity {
    margin-bottom: var(--space-8);
}

.section-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-warm-800);
    margin-bottom: var(--space-4);
}

.activity-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-5);
    background: var(--glass-white);
    backdrop-filter: blur(var(--blur-md));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
}

.activity-icon {
    font-size: 24px;
    flex-shrink: 0;                             /* Icon won't shrink if text is long */
}

.activity-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.activity-text {
    font-size: var(--text-sm);
    color: var(--color-warm-700);
}

/* Requests Section */
.requests-section {
    margin-bottom: var(--space-12);
}

.section-header {
    display: flex;
    justify-content: space-between;            /* Title on left, count on right */
    align-items: center;
    margin-bottom: var(--space-5);
}

.section-count {
    font-size: var(--text-sm);
    color: var(--color-warm-600);
    font-weight: var(--font-medium);
}

/* Requests List - Vertical Stack (not grid anymore) */
.requests-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);                       /* Space between cards */
}

.request-card-compact {
    background: var(--glass-warm-strong);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    box-shadow: var(--shadow-xs);
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
}

.request-card-compact:hover {
    background: var(--glass-white-strong);
    border-color: rgba(20, 184, 166, 0.35);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glass-sm);
}

/* Card Header - Title and Status on one line */
.request-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
}

.card-anon-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    color: var(--color-info-800);
    background: var(--color-info-100);
    border: 1px solid #BFDBFE;
    border-radius: 99px;
    padding: 2px 7px;
    vertical-align: middle;
    margin-left: 6px;
    white-space: nowrap;
}

/* Mobile-only anon badge (sibling of h3, mirrors status badge position) */
.card-anon-badge--mobile {
    display: none;
}

.request-title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-warm-800);
    flex: 1;                                    /* Takes up available space */
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Status Badge Base */
.status-badge {
    display: inline-block;
    min-width: 90px;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    font-family: var(--font-sans);
    text-align: center;
}


/* ✅ COMPLETED - Green */
.status-badge.completed {
    background: var(--color-success-100);
    color: var(--color-success-800);
    border: 1px solid #6EE7B7;
}

/* ◎ ACTIVE - Sky blue (matches button gradient) */
.status-badge.active {
    background: #E0F2FE;
    color: #0369A1;
    border: 1px solid #BAE6FD;
}

/* ⏰ DUE SOON - Amber */
.status-badge.due-soon {
    background: var(--color-warning-100);
    color: var(--color-warning-800);
    border: 1px solid var(--color-warning-200);
}

/* ⚠ OVERDUE - Rose */
.status-badge.overdue {
    background: #FFE4E6;
    color: #9F1239;
    border: 1px solid #FECDD3;
}

/* 🚫 CANCELLED/EXPIRED - Muted gray */
.status-badge.cancelled,
.status-badge.expired,
.status-badge.pending {
    background: var(--color-gray-100);
    color: var(--color-gray-600);
    border: 1px solid var(--color-gray-200);
}

/* Expandable Details Section (hidden by default) */
.request-details {
    max-height: 0;                              /* Collapsed state */
    overflow: hidden;                           /* Hides content when collapsed */
    transition: max-height 0.3s ease-out;       /* Smooth expand/collapse animation */
    margin-top: 0;
}

.request-details.expanded {
    max-height: none;                           /* No artificial cap — grows to content height */
    overflow-y: auto;
    margin-top: var(--space-4);
}

.request-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--glass-border);
}

.meta-item {
    font-size: var(--text-sm);
    color: var(--color-warm-600);
}

.meta-label {
    font-weight: var(--font-medium);
    color: var(--color-warm-700);
}

/* Expand/Collapse Arrow Icon */
.expand-icon {
    font-size: 18px;
    color: var(--color-warm-600);
    transition: transform var(--transition-fast);
    padding: 8px;
    margin: -8px;
    border-radius: 50%;
}

.expand-icon:hover {
    background: var(--color-warm-200);
}

.request-card-compact.expanded .expand-icon {
    transform: rotate(180deg);                  /* Flips arrow when expanded */
}


/* ============================================
   🆕 MOBILE MENU BUTTON - BEAUTIFUL VERSION
   ============================================ */

.mobile-menu-btn {
    display: none;              /* Hidden on desktop */
    position: relative;
    width: 44px;                /* Apple touch minimum; matches the slim header */
    height: 44px;
    background: var(--color-warm-50);
    border: 2px solid var(--color-warm-200);
    border-radius: var(--radius-xl);
    cursor: pointer;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast);
    color: var(--color-warm-700);
    flex-shrink: 0;
    font-size: 0;               /* hide any text content */
}

/* CSS-drawn hamburger bars */
.mobile-menu-btn::before {
    content: '';
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -6px);
    box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor;
    transition: box-shadow 0.15s, transform 0.15s, opacity 0.15s;
}

.mobile-menu-btn:hover {
    border-color: var(--color-primary);  /* CHANGED: Border changes on hover */
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.25);
    transform: translateY(-2px);  /* CHANGED: Lift effect instead of scale */
}

.mobile-menu-btn:active {
    transform: translateY(0);   /* CHANGED: Push down when clicked */
}

/* When sidebar is open, button turns teal */
.mobile-menu-btn.open {
    background: var(--color-primary);  /* NEW: Teal background when open */
    border-color: var(--color-primary);
    color: white;               /* NEW: White icon when open */
}

/* REMOVED all the span styles - we're using text icons now! */

/* Mobile overlay backdrop - KEEP THIS AS IS */
.mobile-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);  /* dim the page behind the open drawer */
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-sidebar-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .mobile-sidebar-overlay {
        display: block;
    }
}   

/* Enhanced Feedback Journey */
.feedback-journey {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.journey-title {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-warm-800);
    letter-spacing: 0;
    margin-bottom: var(--space-3);
}

.view-feedback-btn {
    display: inline-block;
    margin-top: var(--space-4);
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-success) 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(20, 184, 166, 0.2);
}

.view-feedback-btn:hover {
    opacity: 0.9;
    box-shadow: 0 4px 8px rgba(20, 184, 166, 0.3);
}

.no-feedback-yet {
    margin-top: var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-warm-400);
    font-style: italic;
}

.recipient-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    margin-bottom: var(--space-2);
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.recipient-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(4px);
}

/* Status indicator dot */
.recipient-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.recipient-status-dot.completed {
    background: #34a853;
    box-shadow: 0 0 0 3px rgba(52, 168, 83, 0.2);
}

.recipient-status-dot.pending {
    background: #fbbc04;
    box-shadow: 0 0 0 3px rgba(251, 188, 4, 0.2);
}

.recipient-info {
    flex: 1;
    min-width: 0;
}

.recipient-name {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-warm-800);
}

.recipient-status-text {
    font-size: var(--text-xs);
    color: var(--color-warm-600);
    margin-top: 2px;
}

/* =============================================
   CARD INNER WRAPPER — CSS Grid layout
   Desktop: badge | title ... status
            badge | progress bar
            badge | bottom row
   Mobile:  badge  status-badge
            title (full width)
            progress bar (full width)
            bottom row (full width)
   ============================================= */

.card-inner-wrapper {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 10px;
    row-gap: 6px;
    align-items: center;
}

/* Desktop grid assignments:
   Col 1: type badge (row 1) — aligns with title
   Col 2: title (row 1), progress (row 2), bottom row (row 3)
   Status badge: absolute top-right corner of the card */
.card-type-badge       { grid-column: 1; grid-row: 1; align-self: center; }
.card-status-badge     { position: absolute; top: 13px; right: 14px; }
.request-title         { grid-column: 2; grid-row: 1; margin: 0; font-size: 13px; font-weight: var(--font-semibold); color: var(--color-warm-800); line-height: 1.35; padding-right: 70px; }
.card-progress-bar-wrap { grid-column: 1 / 3; grid-row: 2; position: relative; }
.card-bottom-row       { grid-column: 1 / 3; grid-row: 3; display: flex; justify-content: space-between; align-items: center; }

/* Progress bar — desktop: thin with label below */
.card-progress-bar {
    height: 4px;
    background: var(--color-gray-100);
    border-radius: 999px;
    position: relative;
    overflow: hidden;
}

.card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary) 0%, #0ea5e9 60%, #6366f1 100%);
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Rate label inside bar — mobile only */
.card-rate-inline {
    display: none;
}

.card-rate-inline strong {
    color: white;
    font-weight: 700;
}

/* Person icons row */
.person-icons-grid {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.person-icons-grid svg {
    display: block;
    flex-shrink: 0;
}

.card-icons-overflow {
    font-size: 10px;
    color: var(--color-gray-500);
    font-weight: 600;
    white-space: nowrap;
    margin-left: 2px;
}

/* Rate text below bar — desktop only */
.card-rate-text {
    font-size: 9px;
    color: var(--color-gray-400);
    letter-spacing: 0.5px;
}

.card-rate-text strong {
    color: #000;
    font-weight: 600;
}

/* ---- Mobile overrides ---- */
@media (max-width: 768px) {
    /* 3-row grid: [emoji + title] / [progress] / [icons]
       Status badge stays absolute top-right of the card */
    .card-inner-wrapper {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto auto;
        column-gap: 8px;
        row-gap: 4px;
    }

    /* Row 1 col 1: type badge — sits beside the title */
    .card-type-badge {
        grid-column: 1;
        grid-row: 1;
        width: 26px;
        height: 26px;
        font-size: 13px;
        border-radius: 7px;
        align-self: center;
    }
    .card-type-badge .icon-mask {
        width: 14px;
        height: 14px;
    }

    /* Status badge: absolute top-right corner, same as desktop */
    .card-status-badge {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 7px !important;
        padding: 2px 7px !important;
        min-width: unset !important;
    }

    /* Anon badge: hide inline version, show absolute top-left version */
    .card-anon-badge {
        display: none;
    }

    .card-anon-badge--mobile {
        display: inline-flex;
        position: absolute;
        top: 10px;
        left: 10px;
        font-size: 7px !important;
        padding: 2px 7px !important;
        margin-left: 0;
    }

    /* Row 1 col 2: title — no right padding needed, badge is above this row */
    .request-title {
        grid-column: 2;
        grid-row: 1;
        font-size: 12px !important;
        line-height: 1.35 !important;
        padding-right: 0;
    }

    /* Row 2: progress bar full width */
    .card-progress-bar-wrap {
        grid-column: 1 / 3;
        grid-row: 2;
        margin-top: 5px;
    }


    /* Row 3: bottom row full width */
    .card-bottom-row {
        grid-column: 1 / 3;
        grid-row: 3;
    }

    /* Mobile: taller bar with label inside */
    .card-progress-bar {
        height: 13px;
        border-radius: 4px;
    }

    .card-rate-inline {
        display: block;
        position: absolute;
        left: 7px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 6.5px;
        color: rgba(255, 255, 255, 0.75);
        letter-spacing: 0.3px;
        pointer-events: none;
        white-space: nowrap;
    }

    .card-rate-text {
        display: none;
    }

    .request-card-compact {
        padding: 38px 12px 10px;
        margin-bottom: 10px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }
}

/* Better expand icon */
.expand-icon {
    font-size: 20px;
    color: var(--color-gray-400);
    transition: transform 0.3s ease;
}

.request-card-compact.expanded .expand-icon {
    transform: rotate(90deg);
}

/* Progress bar shimmer effect */
@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

* Reminder info styling */
.recipient-reminder-info {
    font-size: 11px;
    color: var(--color-gray-500);
    margin-top: 4px;
    line-height: 1.4;
}

/* Mobile responsive meta items */
@media (max-width: 768px) {
    .request-meta {
        flex-direction: column;
        gap: var(--space-2);
    }
    
    .meta-item {
        width: 100%;
    }
}

/* Timeline responsive display */
.timeline-desktop {
    display: block;
}

.timeline-mobile {
    display: none;
}

/* Switch to vertical timeline on mobile */
@media (max-width: 600px) {
    .timeline-desktop {
        display: none;
    }

    .timeline-mobile {
        display: block;
    }
}

/* ============================================================================
   Giver journey timeline — icon milestones, theme-aware, animated on change
   ============================================================================ */
.rq-journey {
    --jrny-accent: var(--color-primary-dark);
    --jrny-accent-soft: rgba(13, 148, 136, 0.16);
    --jrny-reminder: #3B82F6;                       /* blue — all reminders, scheduled + the manual extra nudge */
    --jrny-reminder-soft: rgba(59, 130, 246, 0.16);
    --jrny-today: #E11D48;                           /* rose — the "you are here" today marker */
    --jrny-today-soft: rgba(225, 29, 72, 0.14);
    --jrny-final: #047857;                           /* deep green — perspectives shared label/border */
    --jrny-final-grad: linear-gradient(135deg, #0D9488 0%, #059669 100%); /* brand teal → success green */
    --jrny-final-soft: rgba(5, 150, 105, 0.20);
    --jrny-missed: var(--color-warm-600);            /* muted grey — original deadline that lapsed before extension (#6B6662) */
    --jrny-missed-soft: rgba(107, 102, 98, 0.18);
    --jrny-idle: var(--color-warm-500);
    --jrny-node-bg: var(--color-warm-50);
    --jrny-on-accent: #ffffff;
    --jrny-label: var(--color-warm-700);
    --jrny-label-idle: var(--color-warm-500);
    --jrny-date: var(--color-warm-500);
    --jrny-line: var(--color-warm-300);
}
[data-theme="dark"] .rq-journey {
    --jrny-accent: var(--color-primary-light);
    --jrny-accent-soft: rgba(45, 212, 191, 0.22);
    --jrny-reminder: #60A5FA;
    --jrny-reminder-soft: rgba(96, 165, 250, 0.24);
    --jrny-today: #FB7185;
    --jrny-today-soft: rgba(251, 113, 133, 0.20);
    --jrny-final: #34D399;
    --jrny-final-grad: linear-gradient(135deg, #2DD4BF 0%, #34D399 100%);
    --jrny-final-soft: rgba(52, 211, 153, 0.26);
    --jrny-missed: var(--color-warm-600);            /* flips to a visible muted grey on dark surfaces (#9595A0) */
    --jrny-missed-soft: rgba(149, 149, 160, 0.20);
    --jrny-idle: var(--color-warm-500);
    --jrny-node-bg: var(--color-warm-200);
    --jrny-on-accent: #062521;
    --jrny-label: var(--color-warm-700);
    --jrny-label-idle: var(--color-warm-600);
    --jrny-date: var(--color-warm-500);
    --jrny-line: var(--color-warm-400);
}

/* Shared node chip */
.jrny-node {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--jrny-node-bg);
    border: 2px solid var(--jrny-line);
    color: var(--jrny-idle);
    transition: background .35s ease, border-color .35s ease, color .35s ease, box-shadow .35s ease;
}
.jrny-ico { width: 15px; height: 15px; display: block; }
.jrny-label { font-family: var(--font-sans); font-weight: 600; color: var(--jrny-label-idle); line-height: 1.3; }
.jrny-date { font-family: var(--font-sans); color: var(--jrny-date); line-height: 1.3; }

/* Done */
.is-done .jrny-node {
    background: var(--jrny-accent);
    border-color: var(--jrny-accent);
    color: var(--jrny-on-accent);
    box-shadow: 0 0 0 4px var(--jrny-accent-soft);
}
.is-done .jrny-label { color: var(--jrny-accent); }

/* Reminders — calm blue, clearly off the amber "Anonymous" pill and harmonious
   with the teal brand. Covers both the scheduled reminders and the manual
   post-deadline "extra" nudge, which keeps only its ringing-bell icon. */
.jrny-t-reminder.is-done .jrny-node {
    background: var(--jrny-reminder);
    border-color: var(--jrny-reminder);
    color: var(--jrny-on-accent);
    box-shadow: 0 0 0 4px var(--jrny-reminder-soft);
}
.jrny-t-reminder.is-done .jrny-label { color: var(--jrny-reminder); }

/* Original deadline that lapsed before the deadline was extended. Rendered in a
   muted grey (not the celebratory teal of the achieved milestones) with the date
   struck through — mirroring the card's "Originally May 27 → …" superseded-
   deadline styling — so it reads, calmly, as "this passed / was replaced". Only
   the passed (done) original deadline gets this; an early extension's still-
   future original keeps the neutral pending look. */
.jrny-t-missed.is-done .jrny-node {
    background: var(--jrny-missed);
    border-color: var(--jrny-missed);
    color: var(--jrny-on-accent);
    box-shadow: 0 0 0 4px var(--jrny-missed-soft);
}
.jrny-t-missed.is-done .jrny-label { color: var(--jrny-missed); }
.jrny-t-missed.is-done .jrny-date {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    opacity: 0.85;
}
.jrny--v .jrny-t-missed.is-done .jrny-node { box-shadow: 0 0 0 3px var(--jrny-missed-soft); }

/* Perspectives shared — the destination of the journey. Emphasised with the
   brand teal→green gradient, a larger glow ring, a slight scale-up and a
   heavier label, so it clearly reads as the final, celebratory step rather
   than blending into the flat teal milestones. */
.jrny-t-final.is-done .jrny-node {
    background: var(--jrny-final-grad);
    border-color: transparent;
    color: var(--jrny-on-accent);
    box-shadow: 0 0 0 5px var(--jrny-final-soft);
}
.jrny-t-final.is-done .jrny-label { color: var(--jrny-final); font-weight: 700; }
.jrny--h .jrny-t-final.is-done .jrny-node { transform: scale(1.1); }
/* Match the smaller mobile rings */
.jrny--v .jrny-t-reminder.is-done .jrny-node { box-shadow: 0 0 0 3px var(--jrny-reminder-soft); }
.jrny--v .jrny-t-final.is-done .jrny-node { box-shadow: 0 0 0 3px var(--jrny-final-soft); }

/* Next milestone (first not-yet-done step). Kept deliberately "pending" — a
   dashed neutral ring + the breathing pulse (see .jrny-play in the animations
   block) — rather than the solid accent. An upcoming step must never borrow a
   completed node's fill/colour, or it reads as already sent. Filled = happened;
   dashed hollow = scheduled, not yet. */
.is-next .jrny-node {
    color: var(--jrny-idle);
    border-color: var(--jrny-line);
    border-style: dashed;
}

/* Partial milestone — the anonymous cohort's aggregate "shared" node when SOME
   but not all givers have responded. Reads as in-progress (solid green outline +
   soft fill) so it's clearly past "not started" yet short of the full done fill. */
.jrny .is-partial .jrny-node {
    color: var(--jrny-final);
    border-color: var(--jrny-final);
    border-style: solid;
    background: var(--jrny-final-soft);
}
.jrny .is-partial .jrny-label { color: var(--jrny-final); font-weight: 700; }

/* ── Today marker ───────────────────────────────────────────────────────────
   A small rose "you are here" bead pinned to today's position on the time
   axis (desktop) or a slim divider row between milestones (mobile). When today
   lands exactly on a milestone, the milestone itself takes the treatment
   instead: a rose halo ring plus a "Today" tag beside its date. */
.jrny-today {
    position: absolute;
    top: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transform: translateX(-50%);
    pointer-events: none;
}
.jrny-today-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--jrny-today);
    box-shadow: 0 0 0 3px var(--jrny-today-soft);
    flex-shrink: 0;
}
.jrny-today-tag {
    font-family: var(--font-sans);
    font-size: 8.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--jrny-today);
    white-space: nowrap;
    line-height: 1;
}
.jrny-today-date {
    font-family: var(--font-sans);
    font-size: 10px;
    color: var(--jrny-date);
    white-space: nowrap;
    line-height: 1;
}
.jrny .is-today .jrny-node::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--jrny-today);
    opacity: 0.55;
}
/* Mobile divider row + slightly larger tag beside a row's date */
.jrny--v .jrny-today-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
}
.jrny--v .jrny-today-row .jrny-rail { width: 26px; }
.jrny--v .jrny-today-meta {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
}
.jrny--v .jrny-today-tag { font-size: 9.5px; }
.jrny--v .jrny-today-date { font-size: 11.5px; }

/* Horizontal (desktop) — nodes absolutely placed on a shared time axis, so the
   gaps reflect real elapsed time and a given date lands at the same x for every
   giver. The track has side margins equal to half a step's width so the first
   and last labels never clip the card edge. */
.jrny--h { width: 100%; }
.jrny--h .jrny-track {
    position: relative;
    height: 90px;
    margin: 0 38px;
}
.jrny--h .jrny-step {
    position: absolute;
    top: 0;
    width: 76px;
    margin-left: -38px;          /* centre the step on its left:% point */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
}
.jrny--h .jrny-label { font-size: 10.5px; }
.jrny--h .jrny-date  { font-size: 10px; }
.jrny--h .jrny-conn {
    position: absolute;
    top: 15px;                   /* aligns with the 32px node's vertical centre */
    height: 0;
    border-top: 2px dotted var(--jrny-line);
    transition: border-color .35s ease;
}
.jrny--h .jrny-conn.is-done { border-top-color: var(--jrny-accent); }

/* Vertical (mobile) — smaller nodes/rings so the icons feel in proportion */
.jrny--v { display: flex; flex-direction: column; }
.jrny--v .jrny-row { display: flex; gap: 12px; }
.jrny--v .jrny-node { width: 26px; height: 26px; border-width: 1.5px; }
.jrny--v .jrny-ico { width: 12.5px; height: 12.5px; }
.jrny--v .is-done .jrny-node { box-shadow: 0 0 0 3px var(--jrny-accent-soft); }
.jrny--v .jrny-rail { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.jrny--v .jrny-conn-v {
    width: 0;
    flex: 1;
    min-height: 18px;
    margin: 3px 0;
    border-left: 2px dotted var(--jrny-line);
    transition: border-color .35s ease;
}
.jrny--v .jrny-conn-v.is-done { border-left-color: var(--jrny-accent); }
.jrny--v .jrny-rowmeta { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 7px; min-height: 26px; padding-bottom: 14px; }
.jrny--v .jrny-row:last-child .jrny-rowmeta { padding-bottom: 0; }
.jrny--v .jrny-label { font-size: 13px; }
.jrny--v .jrny-date  { font-size: 11.5px; }

/* ── Animations ── */
/* Entrance — replays each time the card is expanded (the journey lives inside
   the collapsible body, so .jrny-play is toggled with `expanded`). */
.rq-journey.jrny-play .jrny-step,
.rq-journey.jrny-play .jrny-row {
    animation: jrny-in .5s cubic-bezier(.22, 1, .36, 1) both;
    animation-delay: calc(var(--i, 0) * 60ms);
}
@keyframes jrny-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

/* Breathing ripple on the next milestone (only while the card is open) */
.rq-journey.jrny-play .is-next .jrny-node {
    animation: jrny-pulse 2.4s ease-in-out infinite;
}
@keyframes jrny-pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--jrny-accent-soft); }
    50%      { box-shadow: 0 0 0 7px transparent; }
}

/* Gentle breathe on the rose halo of a milestone that lands on today */
.rq-journey.jrny-play .is-today .jrny-node::before {
    animation: jrny-today-breathe 2.6s ease-in-out infinite;
}
@keyframes jrny-today-breathe {
    0%, 100% { transform: scale(1); opacity: 0.55; }
    50%      { transform: scale(1.14); opacity: 0.3; }
}

/* Celebratory pop + ring burst for steps that newly completed since last view */
.rq-journey.jrny-play .is-changed .jrny-node {
    animation: jrny-pop .7s cubic-bezier(.34, 1.56, .64, 1) both;
    animation-delay: calc(var(--i, 0) * 60ms + .18s);
}
.rq-journey.jrny-play .is-changed .jrny-node::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid var(--jrny-accent);
    opacity: 0;
    animation: jrny-ring .85s ease-out both;
    animation-delay: calc(var(--i, 0) * 60ms + .18s);
}
.rq-journey.jrny-play .jrny-t-reminder.is-changed .jrny-node::after { border-color: var(--jrny-reminder); }
.rq-journey.jrny-play .jrny-t-final.is-changed .jrny-node::after { border-color: var(--jrny-final); }
@keyframes jrny-pop {
    0%   { transform: scale(.45); }
    55%  { transform: scale(1.16); }
    100% { transform: scale(1); }
}
@keyframes jrny-ring {
    0%   { opacity: .7; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.9); }
}

@media (prefers-reduced-motion: reduce) {
    .rq-journey.jrny-play .jrny-step,
    .rq-journey.jrny-play .jrny-row,
    .is-next .jrny-node,
    .rq-journey.jrny-play .is-changed .jrny-node,
    .rq-journey.jrny-play .is-today .jrny-node::before {
        animation: none !important;
    }
    .rq-journey.jrny-play .is-changed .jrny-node::after { display: none; }
}

/* Optional: Add smooth transitions to timeline circles */
.feedback-journey [style*="border-radius: 50%"] {
    transition: all 0.3s ease;
}

/* Feedback journey section styling (keep existing, just ensure these are present) */
.feedback-journey {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--glass-border);
}

.journey-title {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-warm-800);
    letter-spacing: 0;
    margin-bottom: var(--space-3);
}

/* Close button inside sidebar (mobile only) */
.sidebar-close-btn {
    display: none;
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;  /* Reduced from 36px */
    height: 32px;  /* Reduced from 36px */
    border: none;
    background: transparent;  /* Transparent background */
    border-radius: 50%;
    color: var(--color-gray-500);  /* Lighter gray */
    font-size: 24px;  /* Icon size */
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;  /* Remove any padding */
}

.sidebar-close-btn:hover {
    background: var(--color-gray-100);  /* Subtle hover background */
    color: var(--color-gray-700);  /* Darker on hover */
    transform: rotate(90deg);  /* Subtle rotation animation */
}

@media (max-width: 768px) {
    .sidebar-close-btn {
        display: flex;
        position: absolute;
        top: 16px;
        right: 16px;
        width: 32px;
        height: 32px;
        align-items: center;
        justify-content: center;
    }
    
}

.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Button inside mobile header should not have conflicting positioning */
.mobile-header .mobile-menu-btn {
    position: relative;
    top: auto;
    left: auto;
    order: 2;
    margin-left: auto;
}

.mobile-logo {
    /* 40px keeps the fixed header ~60px tall — app-bar scale, not hero scale. */
    height: 40px;
    width: auto;
}

@media (max-width: 768px) {
    /* Mobile header - fixed at top */
    .mobile-header {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1001;
        padding: 10px 16px;
        background: var(--color-warm-100);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    /* Menu button inside header */
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Hide sidebar logo on mobile */
    .app-sidebar .sidebar-logo img {
        display: none;
    }


    
    .mobile-sidebar-overlay {
        display: block;
    }
}

@media (max-width: 768px) {
    /* Bulletin board header */
    .requests-section > div:first-child {
        padding: 0 8px;  /* Add horizontal padding */
        margin-bottom: 16px;  /* Reduce space before cards */
    }
    
    /* (Removed legacy `.requests-section svg { width:40px }` — it was for an old
       bulletin-board header icon that no longer exists and only inflated the
       request-card icons on ≤768px. Card icons now keep their authored sizes.) */

    /* "My Feedback Board" title */
    .requests-section h2,
    div[style*="font-size: 28px"] {
        font-size: 24px !important;  /* Smaller title */
    }
    
    /* Request count text */
    #requests-count {
        font-size: 12px !important;
        opacity: 0.7;
    }
}


@media (max-width: 768px) {
    /* Smooth entrance animation for cards */
    .request-card-compact {
        animation: slideInUp 0.3s ease-out backwards;
    }
    
    .request-card-compact:nth-child(1) { animation-delay: 0.1s; }
    .request-card-compact:nth-child(2) { animation-delay: 0.2s; }
    .request-card-compact:nth-child(3) { animation-delay: 0.3s; }
    
    /* Stats cards micro-animation */
    .stat-number {
        transition: transform 0.2s ease;
    }
    
    .stat-card:active .stat-number {
        transform: scale(1.1);
    }
    
    /* Button press feedback */
    .btn-request-feedback:active {
        transform: scale(0.98);
        box-shadow: 0 2px 6px rgba(66, 133, 244, 0.2);
    }
}

/* Question filter buttons */
.filter-btn {
    padding: 6px 12px;
    background: var(--color-gray-100);
    border: 1px solid var(--color-gray-200);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--color-gray-500);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: var(--color-gray-200);
    color: var(--color-gray-700);
}

.filter-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

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


@media (min-width: 1800px) {
    .wizard-content {
        max-width: 550px !important;
    }
}

/* ============================================
   WIZARD STEP SUBTITLE
   ============================================ */
.wizard-step-subtitle {
    color: var(--color-warm-600);
    font-size: 14px;
    margin: -12px 0 20px;
    line-height: 1.5;
}

/* ============================================
   STEP 1 — FOCUS AREA SECTION
   ============================================ */
.focus-area-section {
    background: #F9F7F4;
    border-radius: 18px;
    padding: 20px 16px 18px;
    margin-bottom: 24px;
    border: 1px solid rgba(0,0,0,0.06);
}


.focus-area-section .step1-section-label {
    margin-bottom: 4px;
    font-size: 20px;
    text-align: center;
}

.focus-area-hint {
    font-size: 11px;
    color: var(--color-warm-400);
    text-align: center;
    margin: 0 0 14px;
    font-style: italic;
}

/* ── Grid ── */
.feedback-type-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    transition: opacity 0.25s ease;
}

.feedback-type-cards.grid-dimmed { opacity: 0.28; pointer-events: none; }

/* ── Cards ── */
.feedback-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 6px;
    aspect-ratio: 1 / 1;
    background: var(--color-warm-50);
    border: 1px solid rgba(0,0,0,0.09);
    border-radius: 14px;
    cursor: pointer;
    text-align: center;
    width: 100%;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.feedback-type-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.08), 0 8px 22px rgba(0,0,0,0.06);
    border-color: rgba(0,0,0,0.14);
}

.feedback-type-card:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition-duration: 0.07s;
}

.feedback-type-card.previewing {
    border-color: rgba(13, 148, 136, 0.5);
    background: rgba(13, 148, 136, 0.03);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1), 0 3px 10px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}

.feedback-type-card.selected {
    border-color: var(--color-primary-dark);
    background: rgba(13, 148, 136, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 0 0 1.5px var(--color-primary-dark), 0 4px 14px rgba(13,148,136,0.15);
}

[data-theme="dark"] .feedback-type-card.previewing {
    background: rgba(20, 184, 166, 0.12);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.22), 0 3px 10px rgba(0,0,0,0.4);
}

[data-theme="dark"] .feedback-type-card.selected {
    background: rgba(20, 184, 166, 0.16);
    box-shadow: 0 0 0 1.5px var(--color-primary), 0 4px 14px rgba(20, 184, 166, 0.3);
}

[data-theme="dark"] .feedback-type-card.selected .type-card-label,
[data-theme="dark"] .feedback-type-card.previewing .type-card-label {
    color: var(--color-primary-light);
}

/* ── Card icon (SVG) ── */
.type-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

/* ── Icon mask — SVG as CSS mask, gradient fill ── */
.icon-mask {
    display: block;
    width: 28px;
    height: 28px;
    background-image: linear-gradient(135deg, var(--color-primary) 0%, #0ea5e9 60%, #6366f1 100%);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    transition: transform 0.18s ease, filter 0.18s ease;
}

/* ── Hover: scale + darken ── */
.feedback-type-card:hover .icon-mask { transform: scale(1.1); filter: brightness(0.82); }

/* ── Focus area icons — swap paths here as SVGs are created ── */
.icon-general    { mask-image: url('/assets/general-icon.svg'); -webkit-mask-image: url('/assets/general-icon.svg'); }
.icon-career     { mask-image: url('/assets/career-icon.svg'); -webkit-mask-image: url('/assets/career-icon.svg'); }
.icon-new-role   { mask-image: url('/assets/new-role-icon.svg'); -webkit-mask-image: url('/assets/new-role-icon.svg'); }
.icon-project    { mask-image: url('/assets/project-icon.svg'); -webkit-mask-image: url('/assets/project-icon.svg'); }
.icon-event      { mask-image: url('/assets/event-icon.svg'); -webkit-mask-image: url('/assets/event-icon.svg'); }
.icon-leadership { mask-image: url('/assets/leadership-icon.svg'); -webkit-mask-image: url('/assets/leadership-icon.svg'); }
.icon-people     { mask-image: url('/assets/people-management-icon.svg'); -webkit-mask-image: url('/assets/people-management-icon.svg'); }
.icon-collab     { mask-image: url('/assets/collaboration-icon.svg'); -webkit-mask-image: url('/assets/collaboration-icon.svg'); }
.icon-one-on-one { mask-image: url('/assets/one-on-one-icon.svg'); -webkit-mask-image: url('/assets/one-on-one-icon.svg'); }
.icon-client     { mask-image: url('/assets/client-icon.svg'); -webkit-mask-image: url('/assets/client-icon.svg'); }
.icon-skill      { mask-image: url('/assets/skill-behavior-icon.svg'); -webkit-mask-image: url('/assets/skill-behavior-icon.svg'); }
.icon-custom     { mask-image: url('/assets/custom-icon.svg'); -webkit-mask-image: url('/assets/custom-icon.svg'); }

/* ── Card label ── */
.type-card-label {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--color-warm-800);
    line-height: 1.25;
    text-align: center;
    width: 100%;
}

.feedback-type-card.selected .type-card-label,
.feedback-type-card.previewing .type-card-label {
    color: var(--color-primary-dark);
}

.feedback-type-card.selected .icon-mask,
.feedback-type-card.previewing .icon-mask {
    transform: scale(1.1);
    filter: brightness(0.82);
}

/* ── Backdrop ── */
.fa-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 8, 6, 0.38);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 200;
}
.fa-backdrop-t     { transition: opacity 0.22s ease; }
.fa-backdrop-hidden  { opacity: 0; }
.fa-backdrop-visible { opacity: 1; }

/* ── Expanded panel — visual shell only, no overflow ── */
.fa-expanded {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
    z-index: 201;
    background: var(--color-warm-50);
    border-radius: 24px;
    width: min(92vw, 480px);
    max-height: 88vh;
    overflow: hidden;          /* shell clips content, no scrollbar here */
    box-shadow: 0 8px 48px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}

/* ── Inner scroll body — scrollbar lives here, well inside the shell ── */
.fae-scroll-body {
    overflow-y: auto;
    overscroll-behavior: contain;
    flex: 1;
    padding: 10px 28px 28px 22px; /* top-bar already gives top space; extra right keeps text clear of scrollbar */
    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.15) transparent;
}

.fae-scroll-body::-webkit-scrollbar {
    width: 5px;
}
.fae-scroll-body::-webkit-scrollbar-track {
    background: transparent;
    margin-bottom: 20px;
}
.fae-scroll-body::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.14);
    border-radius: 10px;
}
.fae-scroll-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.25);
}

.fa-exp-t      { transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1), opacity 0.18s ease; }
.fa-exp-hidden { transform: translate(-50%, -50%) scale(0.94); opacity: 0; }
.fa-exp-visible{ transform: translate(-50%, -50%) scale(1);    opacity: 1; }

/* No drag handle needed (not a bottom sheet) */
.fa-expanded::before { display: none; }

/* ── Non-scrolling top bar — scrollbar starts below this ── */
.fae-top-bar {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 14px 16px 0;
}

/* ── Close button ── */
.fae-close {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: #F5F4F2;
    border: none;
    font-size: 12px;
    color: #78716C;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.fae-close:hover { background: #EAE8E4; color: #1C1917; }

/* ── Hero row ── */
.fae-hero {
    display: grid;
    grid-template-columns: 40px 1fr;
    grid-template-rows: 40px;
    align-items: center;
    gap: 14px;
}

.fae-emoji {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary-dark);
}

.fae-emoji .icon-mask {
    width: 40px;
    height: 40px;
}

.fae-title {
    flex: 1;
    min-width: 0;
    font-family: var(--font-display);
    font-size: 38px;
    font-weight: 700;
    color: #1C1917;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0;
}

.fae-confirmed {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-primary-dark);
    letter-spacing: 0.03em;
}

/* ── Divider ── */
.fae-rule {
    height: 1px;
    background: rgba(0,0,0,0.07);
    margin: 18px 0 16px;
    border: none;
    display: block;
}

/* ── Description ── */
.fae-desc {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 13.5px;
    color: #3D3835;
    line-height: 1.75;
    margin: 0 0 18px;
}

/* ── Question preview ── */
.fae-questions {
    background: #F9F7F4;
    border-radius: 14px;
    padding: 15px 17px 13px;
    margin-bottom: 18px;
    border: 1px solid rgba(0,0,0,0.05);
}

.fae-questions-label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: #A8A29E;
    margin: 0 0 11px;
}

.fae-question-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.fae-question-list li {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 12.5px;
    color: #44403C;
    line-height: 1.55;
    padding-left: 13px;
    position: relative;
}

.fae-question-list li::before {
    content: '';
    position: absolute;
    left: 0; top: 8px;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: #C8C4BF;
}

.fae-library-note {
    font-size: 11px;
    color: #A8A29E;
    font-style: italic;
    margin: 0;
    border-top: 1px solid rgba(0,0,0,0.07);
    padding-top: 10px;
    line-height: 1.5;
}

/* ── Actions ── */
.fae-actions {
    display: flex;
    gap: 10px;
}

.fae-btn-ghost {
    flex: 1;
    padding: 13px 14px;
    background: transparent;
    border: 1.5px solid rgba(0,0,0,0.14);
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 500;
    color: #44403C;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: border-color 0.15s, background 0.15s;
}
.fae-btn-ghost:hover { border-color: rgba(0,0,0,0.28); background: #F9F7F4; }

.fae-btn-primary {
    flex: 2;
    padding: 13px 14px;
    background: #1C1917;
    border: none;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    color: #FFFFFF;
    cursor: pointer;
    letter-spacing: 0.015em;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}
.fae-btn-primary:hover {
    background: #292524;
    box-shadow: 0 4px 18px rgba(0,0,0,0.28);
    transform: translateY(-1px);
}
.fae-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 6px rgba(0,0,0,0.18);
}
.fae-btn-primary:disabled {
    background: #A8A29E;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* ── Desktop overrides ── */
@media (min-width: 700px) {
    .focus-area-section { padding: 24px 22px 22px; }

    .feedback-type-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    /* Bump icon size so it doesn't get visually overwhelmed by 2-3 line
       labels (e.g. "Career & Career Transitions"). Card aspect-ratio + gap
       are unchanged — only the icon and inner gap grow. */
    .feedback-type-card { gap: 12px; padding: 12px 10px; }
    .type-card-icon { width: 46px; height: 46px; }
    .icon-mask      { width: 46px; height: 46px; }
    .type-card-label { font-size: 14px; line-height: 1.25; }

    .fae-title { font-size: 42px; }
    .fae-desc  { font-size: 14px; }
}

/* ============================================
   STEP 3 — QUESTION BUILDER
   ============================================ */
.q-list {
    margin-bottom: 4px;
}

.q-preloaded-hint {
    font-size: 12px;
    color: var(--color-warm-500);
    font-style: italic;
    margin-bottom: 8px;
}

.q-template-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 10px;
    margin-bottom: 10px;
    background: rgba(20, 184, 166, 0.08);
    border: 1px solid rgba(20, 184, 166, 0.28);
    border-radius: 999px;
    font-size: 12px;
    color: var(--color-primary-darker);
    max-width: 100%;
}

.q-template-pill-icon {
    display: inline-flex;
    color: var(--color-primary-darker);
    flex-shrink: 0;
}

.q-template-pill-label {
    font-weight: 500;
    color: var(--color-warm-600);
    white-space: nowrap;
}

.q-template-pill-name {
    font-weight: 700;
    color: var(--color-primary-darker);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}

.q-card {
    background: var(--color-warm-100);
    border: 1px solid var(--color-warm-200);
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.q-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.q-card-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 11px 12px 11px 8px;
}

/* Up/Down arrows */
.q-card-arrows {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-shrink: 0;
    padding-top: 2px;
}

.q-arrow-btn {
    background: var(--color-warm-50);
    border: 1px solid var(--color-warm-300);
    border-radius: 4px;
    width: 22px;
    height: 22px;
    font-size: 11px;
    cursor: pointer;
    color: var(--color-warm-600);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.15s;
    line-height: 1;
}

.q-arrow-btn:hover:not(:disabled) {
    background: rgba(20, 184, 166, 0.08);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.q-arrow-btn:disabled {
    opacity: 0.28;
    cursor: not-allowed;
}

/* Question text + badge */
.q-card-content {
    flex: 1;
    min-width: 0;
}

.q-card-text {
    display: block;
    font-size: 13px;
    color: var(--color-warm-800);
    line-height: 1.45;
    margin-bottom: 6px;
    word-break: break-word;
}

/* Type badge */
.q-type-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.q-type-textarea {
    background: var(--color-info-50);
    color: var(--color-info-700);
}

.q-type-rating {
    background: #FFF7ED;
    color: #C2410C;
}

.q-type-multiple_choice {
    background: #F5F3FF;
    color: #7C3AED;
}

.q-type-sbi {
    background: #FFF3E0;
    color: #E65100;
}

/* Left-border accent by question type */
.q-card--sbi              { border-left: 3px solid #FFD699; }

/* Edit / Delete buttons */
.q-card-actions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    align-items: flex-start;
    padding-top: 1px;
}

.q-edit-btn {
    background: none;
    border: none;
    color: var(--color-warm-500);
    cursor: pointer;
    padding: 4px 5px;
    border-radius: 4px;
    transition: all 0.15s;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.q-edit-btn:hover {
    background: rgba(20, 184, 166, 0.08);
    color: var(--color-primary-dark);
}

.q-delete-btn {
    background: none;
    border: none;
    color: var(--color-warm-500);
    cursor: pointer;
    padding: 4px 5px;
    border-radius: 4px;
    line-height: 1;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.q-delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-error);
}

/* Inline edit panel */
.q-edit-panel {
    border-top: 2px solid var(--color-primary);
    padding: 14px 14px 16px;
    background: #f8fffe;
}

.q-edit-panel label,
.q-custom-form label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-warm-600);
    margin-bottom: 5px;
    margin-top: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.q-edit-panel label:first-child,
.q-custom-form label:first-of-type {
    margin-top: 0;
}

.q-edit-textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--color-warm-300);
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    color: var(--color-warm-900);
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.q-edit-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.q-edit-select {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--color-warm-300);
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    color: var(--color-warm-900);
    background: var(--color-warm-50);
    box-sizing: border-box;
    cursor: pointer;
}

.q-edit-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.q-edit-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 14px;
}

/* ─── Anchor picker (custom + edit forms) ────────────────────── */
.q-anchor-picker {
    margin-top: 14px;
}

.q-anchor-picker > label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-warm-700);
    margin-bottom: 8px;
}

.q-anchor-optional {
    font-weight: 400;
    color: var(--color-warm-400);
}

.q-anchor-opts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.q-anchor-opt {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-warm-600);
    background: var(--color-warm-100);
    border: 1.5px solid var(--color-warm-300);
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 20px;
}

.q-anchor-opt:hover {
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
    background: var(--color-primary-50);
}

.q-anchor-opt--active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    font-weight: 600;
}

.q-anchor-opt--active:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: white;
}

/* Live preview strip */
.q-anchor-preview {
    display: flex;
    gap: 4px;
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--color-warm-100);
    border: 1px solid var(--color-warm-200);
    border-radius: 10px;
}

.q-anchor-preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 4px;
    min-width: 0;
}

.q-anchor-preview-num {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1.5px solid var(--color-warm-300);
    background: var(--color-warm-50);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-warm-600);
    flex-shrink: 0;
}

.q-anchor-preview-label {
    font-size: 9px;
    font-weight: 500;
    color: var(--color-warm-500);
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
    hyphens: auto;
    padding: 0 1px;
}

/* N/A toggle in wizard forms */
.q-allow-na-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 10px;
    background: var(--color-warm-100);
    border: 1px solid var(--color-warm-200);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--color-warm-700);
    user-select: none;
}

.q-allow-na-row input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--color-primary);
    flex-shrink: 0;
    cursor: pointer;
}

.q-allow-na-row:hover {
    border-color: var(--color-warm-300);
    background: var(--color-warm-200);
}

.q-edit-cancel-btn {
    background: var(--color-warm-50);
    border: 1px solid var(--color-warm-300);
    color: var(--color-warm-700);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.q-edit-cancel-btn:hover {
    background: var(--color-warm-100);
}

.q-edit-save-btn {
    background: var(--color-primary);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(20, 184, 166, 0.22);
}

.q-edit-save-btn:hover:not(:disabled) {
    background: var(--color-primary-dark);
}

.q-edit-save-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

/* Multiple-choice choice builder */
.q-choice-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.q-choice-row .feedback-input {
    flex: 1;
    margin-bottom: 0;
}

.q-choice-remove-btn {
    flex-shrink: 0;
    background: none;
    border: 1px solid var(--color-error-600);
    color: var(--color-error-600);
    border-radius: 4px;
    width: 28px;
    height: 28px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.q-choice-remove-btn:hover {
    background: var(--color-error-50);
}

.q-choice-add-btn {
    background: none;
    border: 1px dashed var(--color-warm-600);
    color: var(--color-warm-600);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 13px;
    cursor: pointer;
    margin-top: 2px;
    margin-bottom: 10px;
}

.q-choice-add-btn:hover {
    border-color: #1a73e8;
    color: #1a73e8;
}

/* Action row: Write Own + Library */
.q-action-row {
    display: flex;
    gap: 8px;
    margin: 4px 0 8px;
}

.q-action-row .add-giver-btn {
    flex: 1;
    margin-bottom: 0;
}

.q-library-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 16px;
    background: rgba(20, 184, 166, 0.06);
    border: 1.5px solid var(--color-primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--color-primary-dark);
    font-weight: 500;
    transition: all 0.2s ease;
}

.q-library-btn:hover {
    background: rgba(20, 184, 166, 0.12);
}

/* Custom question form */
.q-custom-form {
    background: var(--color-warm-50);
    border: 1.5px solid var(--color-primary);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.1);
}

.q-custom-form h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-warm-800);
    margin: 0 0 14px;
}

/* Library panel */
.q-library {
    background: var(--color-warm-50);
    border: 1px solid var(--color-warm-200);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 8px;
}

.q-library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.q-library-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-warm-800);
}

.q-library-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--color-warm-500);
    padding: 0 4px;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.15s;
}

.q-library-close:hover {
    background: var(--color-warm-200);
    color: var(--color-warm-600);
}

.q-library-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.q-library-list {
    max-height: 240px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.q-library-item {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 14px !important;
    font-size: 13px;
    gap: 10px;
}

/* Mobile adjustments */
@media (max-width: 768px) {

    .q-action-row--cards {
        grid-template-columns: 1fr;
    }

    .q-library-list {
        max-height: 180px;
    }

    .feedback-type-card {
        padding: 12px 6px 10px;
        min-height: 82px;
    }
}

/* ── Psychology-informed improvements ─────────────────────────────── */

/* Context box shown to feedback givers on Screen 2 */
.request-context-box {
    background: var(--color-success-50);
    border: 1px solid #BBF7D0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
}
.context-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--color-success-800);
    margin: 0 0 6px;
}
.context-text {
    font-size: 13px;
    color: var(--color-gray-800);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .request-context-box {
        padding: 10px 12px;
        margin-bottom: 14px;
    }
    .context-label {
        font-size: 11px;
        margin-bottom: 4px;
    }
    .context-text {
        font-size: 12px;
        line-height: 1.5;
    }
}

/* Coaching tip banner on Screen 2 */
.coaching-tip-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--color-warning-50);
    border: 1px solid var(--color-warning-200);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 24px;
}
.coaching-tip-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}
.coaching-tip-text {
    font-size: 13px;
    color: #78350F;
    line-height: 1.55;
    margin: 0;
}

/* Thank-you sub-headline */
.thank-you-subtext {
    font-size: 15px;
    color: var(--color-gray-500);
    line-height: 1.6;
    margin: 8px auto 24px;
    text-align: center;
    max-width: 380px;
    width: 100%;
}

/* Pre-reflection interstitial in results modal */
.pre-reflection-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 24px 24px;
}
.pre-reflection-icon {
    font-size: 48px;
    margin-bottom: 16px;
}
.pre-reflection-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-gray-900);
    margin: 0 0 12px;
}
.pre-reflection-text {
    font-size: 15px;
    color: var(--color-gray-700);
    line-height: 1.65;
    max-width: 400px;
    margin: 0 0 20px;
}
.pre-reflection-list {
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    max-width: 380px;
    width: 100%;
}
.pre-reflection-list li {
    font-size: 14px;
    color: var(--color-gray-600);
    padding: 10px 14px;
    background: var(--color-gray-50);
    border-radius: 8px;
    border-left: 3px solid var(--color-primary);
    line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════════
   STEP 3 ENHANCEMENTS — Builder header, library, preview
   ══════════════════════════════════════════════════════════════════ */

/* Builder header: title + preview button side by side */
.q-builder-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 8px;
    margin-bottom: 16px;
}
.q-builder-header h3 { margin-bottom: 4px; }

/* Override the global negative-margin rule inside the builder header */
.q-builder-header .wizard-step-subtitle {
    margin: 0;
}

/* "Preview Form" trigger button */
.q-preview-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: var(--color-warm-50);
    border: 1.5px solid var(--color-primary);
    border-radius: 20px;
    color: var(--color-primary-dark);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
    margin-top: 2px;
}
.q-preview-btn:hover {
    background: rgba(20, 184, 166, 0.08);
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.2);
}

.q-header-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.q-save-template-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--color-warm-50);
    border: 1.5px solid var(--color-warm-300, #d6d3cf);
    border-radius: 20px;
    color: var(--color-warm-700, #52524c);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    margin-top: 2px;
}
.q-save-template-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}
.q-save-template-btn:hover:not(:disabled) {
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
    background: rgba(20, 184, 166, 0.05);
}
.q-save-template-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ── Saved-template picker on Step 1 ──────────────────────── */
.tpl-picker {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed var(--color-warm-300, #d6d3cf);
}
.tpl-picker-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
}
.tpl-picker-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-warm-700, #52524c);
}
.tpl-picker-count {
    font-size: 11px;
    color: var(--color-warm-500, #94928b);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.tpl-picker-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tpl-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--color-warm-50);
    border: 1px solid var(--color-warm-300, #d6d3cf);
    border-radius: 999px;
    color: var(--color-warm-800);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.tpl-chip:hover {
    border-color: var(--color-primary);
    background: rgba(20, 184, 166, 0.06);
}
.tpl-chip-count {
    font-size: 11px;
    color: var(--color-warm-500, #94928b);
    background: var(--color-warm-100, #f5f3f0);
    border-radius: 999px;
    padding: 1px 7px;
}

/* ── Focus-area header (title centered, loader below) ─────── */
.focus-area-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}
.focus-area-header > div:first-child {
    text-align: center;
    width: 100%;
}

/* ── Collapsible template loader ───────────── */
.tpl-loader {
    position: relative;
    flex-shrink: 0;
}
.tpl-loader-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: rgba(20, 184, 166, 0.06);
    border: 1px solid rgba(20, 184, 166, 0.28);
    border-radius: 999px;
    color: var(--color-warm-800, #2E2C2A);
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
    white-space: nowrap;
}
.tpl-loader-toggle:hover {
    background: rgba(20, 184, 166, 0.11);
    border-color: rgba(20, 184, 166, 0.45);
}
.tpl-loader-toggle--open {
    background: rgba(20, 184, 166, 0.11);
    border-color: rgba(20, 184, 166, 0.5);
}
.tpl-loader-icon {
    width: 13px;
    height: 13px;
    color: var(--color-primary-darker);
    flex-shrink: 0;
}
.tpl-loader-label {
    line-height: 1;
}
.tpl-loader-count {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--color-primary-darker);
    background: rgba(20, 184, 166, 0.18);
    border-radius: 999px;
    padding: 2px 7px;
    min-width: 18px;
    text-align: center;
    line-height: 1.3;
}
.tpl-loader-chev {
    width: 11px;
    height: 11px;
    color: var(--color-warm-600, #6b6a64);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.tpl-loader-toggle--open .tpl-loader-chev {
    transform: rotate(180deg);
}
.tpl-loader-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    min-width: 240px;
    max-width: min(380px, 92vw);
    padding: 10px;
    background: var(--color-warm-50);
    border: 1px solid rgba(17, 24, 39, 0.1);
    border-radius: 12px;
    box-shadow: 0 12px 32px -8px rgba(17, 24, 39, 0.18);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

/* ── Save-as-Template modal ───────────── */
.tpl-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.42);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.tpl-modal {
    background: var(--color-warm-50);
    border-radius: 16px;
    box-shadow:
        0 1px 2px rgba(46, 44, 42, 0.06),
        0 24px 60px -16px rgba(17, 24, 39, 0.28);
    width: 100%;
    max-width: 440px;
    padding: 22px 22px 20px;
    font-family: var(--font-sans);
}

.tpl-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.tpl-modal-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(20, 184, 166, 0.12);
    color: var(--color-primary-darker);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tpl-modal-title {
    margin: 0 0 2px 0;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--color-warm-800);
    line-height: 1.25;
}

.tpl-modal-sub {
    margin: 0;
    font-size: 12.5px;
    color: var(--color-warm-600);
    line-height: 1.45;
}

.tpl-modal-label {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-warm-600);
    margin-bottom: 6px;
}

.tpl-modal-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid rgba(17, 24, 39, 0.14);
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--color-warm-800);
    background: var(--color-warm-50);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tpl-modal-input:focus {
    outline: none;
    border-color: rgba(20, 184, 166, 0.6);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.tpl-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

.tpl-modal-cancel,
.tpl-modal-save,
.tpl-modal-save-new {
    padding: 8px 16px;
    border-radius: 9px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, filter 0.15s ease;
}

.tpl-modal-cancel {
    background: var(--color-warm-50);
    color: var(--color-warm-700);
    border-color: rgba(17, 24, 39, 0.12);
}

.tpl-modal-cancel:hover:not(:disabled) {
    background: var(--color-gray-50);
    border-color: rgba(17, 24, 39, 0.2);
}

.tpl-modal-save {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-darker) 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px -3px rgba(15, 118, 110, 0.35);
}

.tpl-modal-save:hover:not(:disabled) {
    filter: brightness(1.05);
}

.tpl-modal-save-new {
    background: var(--color-warm-50);
    color: var(--color-warm-700);
    border-color: rgba(20, 184, 166, 0.45);
}

.tpl-modal-save-new:hover:not(:disabled) {
    background: rgba(20, 184, 166, 0.06);
    border-color: rgba(20, 184, 166, 0.7);
}

.tpl-modal-cancel:disabled,
.tpl-modal-save:disabled,
.tpl-modal-save-new:disabled,
.tpl-modal-delete:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Destructive variant — used by the draft "Delete this draft?" modal */
.tpl-modal-icon--danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--color-error-700);
}

.tpl-modal-delete {
    padding: 8px 16px;
    border-radius: 9px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--color-error) 0%, var(--color-error-700) 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 12px -3px rgba(185, 28, 28, 0.4);
    transition: filter 0.15s ease;
}

.tpl-modal-delete:hover:not(:disabled) {
    filter: brightness(1.05);
}

/* ── Leave / unsaved-progress modal ───────────────────────────────────────── */
.leave-modal-note {
    margin-top: 12px;
    font-family: var(--font-sans);
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--color-warm-600);
}
.leave-modal-error {
    margin-top: 10px;
    font-family: var(--font-sans);
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--color-error-700);
}
/* "Discard & leave" — a quiet ghost button pushed to the far left, away from the
   safe actions, so it can't be hit on the way to "Save draft & leave". */
.leave-modal-discard {
    margin-right: auto;
    padding: 8px 14px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--color-error-700);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.leave-modal-discard:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.08);
}
.leave-modal-discard:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
@media (max-width: 600px) {
    /* Stack the three actions; primary (last in DOM) ends up on top. */
    .leave-modal-actions { flex-direction: column-reverse; }
    .leave-modal-actions > button { width: 100%; }
    .leave-modal-discard { margin-right: 0; }
}

@media (max-width: 600px) {
    .tpl-modal {
        padding: 18px 16px 16px;
        border-radius: 14px;
    }
    .tpl-modal-title { font-size: 16px; }
    .tpl-modal-sub { font-size: 12px; }
    .tpl-modal-input { font-size: 13.5px; }
}

@media (max-width: 768px) {
    .q-builder-header {
        flex-direction: column;
        align-items: flex-start;
        margin-top: 10px;
        gap: 10px;
    }
    .q-builder-header .q-preview-btn {
        margin-top: 0;
        margin-bottom: 0;
    }
}

/* "Write Your Own" button (replaces dashed add-giver-btn for step 3) */
/* Add-question cards (Write Your Own + SBI) */
.q-add-section {
    border: 1.5px dashed var(--color-warm-300);
    border-radius: 12px;
    padding: 14px;
    margin: 12px 0 4px;
    background: var(--color-warm-50);
}

.q-add-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-warm-400);
    margin-bottom: 10px;
}

.q-action-row--cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0;
}

.q-action-row--cards .q-add-card {
    flex: 0 1 220px;
    min-width: 160px;
}

.q-add-card {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
    background: var(--color-warm-50);
    border: 1.5px solid var(--color-warm-200);
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    width: 100%;
    min-width: 0;
}
.q-add-card:hover {
    background: var(--color-warm-50);
    border-color: var(--color-warm-400);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.q-add-card-icon {
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-warm-700);
}
.q-add-card--library .q-add-card-icon {
    color: var(--color-primary-dark);
}
.q-add-card-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.q-add-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-warm-800);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}
.q-add-card-badge {
    font-size: 10px;
    font-weight: 600;
    background: #FFF3E0;
    color: #E65100;
    border: 1px solid #FFB74D;
    border-radius: 10px;
    padding: 1px 7px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.q-add-card-desc {
    font-size: 12px;
    color: var(--color-warm-600);
    line-height: 1.4;
}

.q-add-card--sbi {
    background: #FFFAF5;
    border-color: #FFD699;
}
.q-add-card--sbi:hover {
    background: #FFF3E0;
    border-color: #FFB74D;
}
.q-add-card--sbi .q-add-card-title {
    color: #7f4800;
}
.q-add-card--sbi .q-add-card-desc {
    color: #8a5a00;
}

/* Mobile: stack cards equal width, show long descriptions */
@media (max-width: 768px) {
    .q-action-row--cards {
        flex-direction: column;
    }
    .q-action-row--cards .q-add-card {
        flex: 1 1 100%;
        min-width: 0;
        width: 100%;
    }
    .q-add-card-desc--desktop { display: none; }
    .q-add-card-desc--mobile  { display: inline; }
}

/* Desktop: side-by-side cards, show short descriptions */
@media (min-width: 769px) {
    .q-add-card-desc--mobile  { display: none; }
    .q-add-card-desc--desktop { display: inline; }
}

/* Library card: teal-tinted to signal it opens a richer panel */
.q-add-card--library {
    background: rgba(20, 184, 166, 0.06);
    border-color: rgba(20, 184, 166, 0.35);
}
.q-add-card--library:hover {
    background: rgba(20, 184, 166, 0.12);
    border-color: var(--color-primary);
}
.q-add-card--library .q-add-card-title {
    color: var(--color-primary-dark);
}
.q-add-card--library .q-add-card-desc {
    color: var(--color-primary);
}

/* SBI card display in builder */
.q-sbi-skill-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.q-sbi-skill-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-warm-800);
}
.q-sbi-parts {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 2px;
}
.q-sbi-part {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 12px;
    color: var(--color-warm-600);
    line-height: 1.4;
}
.q-sbi-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    margin-top: 1px;
}
.q-sbi-s-label { background: #FFD699; color: #7f4800; }
.q-sbi-b-label { background: #FFD699; color: #7f4800; }
.q-sbi-i-label { background: #FFD699; color: #7f4800; }

/* Library — remove old padding so header/filters/list can control their own */
.q-library {
    padding: 0 !important;
    overflow: hidden;
}
.q-library-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-warm-200);
    background: var(--color-warm-50);
}

/* Search bar */
.q-library-search {
    position: relative;
    padding: 10px 14px 6px;
    border-bottom: 1px solid #eee;
}
.q-search-input {
    font-size: 14px !important;
    padding: 8px 36px 8px 12px !important;
    height: auto !important;
    border-radius: 8px !important;
}
.q-search-clear {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: var(--color-warm-500);
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    margin-top: 2px;
}
.q-search-clear:hover { color: var(--color-warm-600); }

/* Filter rows */
.q-library-filters {
    padding: 8px 14px;
    border-bottom: 1px solid #eee;
    margin-bottom: 0 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.q-library-filters--secondary {
    background: #f4f5f7;
    padding-top: 8px;
    padding-bottom: 8px;
    border-top: 2px solid #e0e4ea;
    border-bottom: 1px solid var(--color-warm-200);
}

/* Filter section label (e.g. "Topic" / "Format") */
.q-filter-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-gray-400);
    margin-right: 2px;
    flex-shrink: 0;
}

/* Smaller pills for the format row */
.filter-btn--sm {
    padding: 3px 10px;
    font-size: 11px;
    border-radius: 10px;
}


/* Library list: add top padding now that header/filters control spacing */
.q-library-list {
    padding: 8px 10px 10px;
}

/* Library item — clean card style */
.q-library-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 10px 12px !important;
    background: var(--color-warm-50) !important;
    border: 1px solid var(--color-warm-300) !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    text-align: left !important;
    transition: all 0.18s ease !important;
    font-size: 13px !important;
}
.q-library-item:hover:not(:disabled) {
    border-color: var(--color-primary) !important;
    background: rgba(20, 184, 166, 0.04) !important;
    transform: translateX(2px) !important;
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.12) !important;
}
.q-library-item--added {
    background: var(--color-success-50) !important;
    border-color: #86efac !important;
    cursor: default !important;
    opacity: 0.8 !important;
}
.q-library-item:disabled {
    pointer-events: none !important;
}

/* "+" circle icon on unselected items — SVG plus, not a text glyph, so it
   sits dead-center in the circle (Max round-3: the + looked off-center) */
.q-library-add-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(20, 184, 166, 0.1);
    border: 1.5px solid var(--color-primary);
    color: var(--color-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    transition: all 0.18s;
}
.q-library-add-icon svg { display: block; }
.q-library-item:hover:not(:disabled) .q-library-add-icon {
    background: var(--color-primary);
    color: white;
}

/* "✓ Added" green pill on selected items */
.q-library-added-check {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 12px;
    color: #166534;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

/* Topic tag badge on library items */
.q-topic-tag {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
    white-space: nowrap;
}

/* Intent tag — uniform soft navy outline (pairs with the mint topic tag).
   The per-intent rainbow was retired in favour of one calm colour family. */
.q-intent-tag,
.q-intent-tag--strength,
.q-intent-tag--develop_area,
.q-intent-tag--take_action,
.q-intent-tag--blind_spot,
.q-intent-tag--concrete_example {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    background: #dbeafe;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

/* LOOKING FOR filter row — only the SELECTED pill picks up the navy
   outline. Idle pills + hover keep the neutral default from .filter-btn. */
.q-library-filters--intent {
    margin-bottom: 4px !important;
}
.filter-btn--intent.active {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

/* ── "Back to Question Builder" bottom button ── */
.q-back-builder-btn {
    width: 100%;
    padding: 10px 24px;
    background: var(--color-warm-50);
    border: 1.5px solid var(--color-primary);
    border-radius: 20px;
    color: var(--color-primary-dark);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.q-back-builder-btn:hover {
    background: rgba(20, 184, 166, 0.08);
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.2);
}

/* ── Form Preview panel ── */
.q-preview-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-warm-300);
}
.q-preview-header h3 { margin: 0 0 6px; font-size: 18px; }
.q-preview-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.3);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Context box inside preview */
.q-preview-context {
    background: var(--color-success-50);
    border: 1px solid #BBF7D0;
    border-left: 4px solid var(--color-success);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
}
.q-preview-context-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--color-success-800);
    margin: 0 0 5px;
}
.q-preview-context-text {
    font-size: 13px;
    color: var(--color-gray-800);
    line-height: 1.55;
    margin: 0;
}

/* Coaching tip inside preview */
.q-preview-tip {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: var(--color-warning-50);
    border: 1px solid var(--color-warning-200);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #78350F;
    line-height: 1.5;
}
.q-preview-tip span { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.q-preview-tip p { margin: 0; }

/* Override form-section label inside preview */
.q-preview-questions .form-section label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--color-primary-dark) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

/* Rating row in preview */
.q-preview-rating {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 8px;
}
.q-preview-rating-opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: default;
}
.q-preview-rating-opt span {
    font-size: 12px;
    color: var(--color-gray-500);
}

/* ── Insights page ─────────────────────────────────────────────────────────── */

.insights-section {
    background: var(--color-warm-50);
    border: 1px solid var(--color-gray-200);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.insights-section-header {
    margin-bottom: 20px;
}

.insights-section-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-gray-900);
    margin: 0 0 4px;
}

.insights-section-desc {
    font-size: 13px;
    color: var(--color-gray-500);
    margin: 0;
}

.insights-empty {
    font-size: 14px;
    color: var(--color-gray-400);
    font-style: italic;
    padding: 8px 0;
    margin: 0;
}

/* Shared bar components */
.insight-bar-track {
    height: 8px;
    background: var(--color-gray-100);
    border-radius: 999px;
    overflow: hidden;
    flex: 1;
    min-width: 60px;
}

.insight-bar-track--wide {
    min-width: 120px;
}

.insight-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Response rate rows */
.insight-rate-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-gray-100);
}

.insight-rate-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.insight-rate-meta {
    flex: 1;
    min-width: 0;
}

.insight-rate-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.insight-rate-sub {
    display: block;
    font-size: 12px;
    color: var(--color-gray-400);
    margin-top: 2px;
}

.insight-rate-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    width: 220px;
}

.insight-rate-pct {
    font-size: 13px;
    font-weight: 700;
    width: 36px;
    text-align: right;
    flex-shrink: 0;
}

/* Rating average rows */
.insight-rating-row {
    padding: 16px 0;
    border-bottom: 1px solid var(--color-gray-100);
}

.insight-rating-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.insight-rating-question {
    font-size: 14px;
    color: var(--color-gray-700);
    line-height: 1.5;
    margin-bottom: 10px;
}

.insight-rating-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.insight-rating-score {
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
    min-width: 42px;
}

.insight-rating-denom {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-gray-400);
}

.insight-rating-count {
    font-size: 12px;
    color: var(--color-gray-400);
    flex-shrink: 0;
}

.insight-rating-anchor-label {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.85;
    flex-shrink: 0;
    white-space: nowrap;
}

.insight-rating-bars-label {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.85;
    margin-top: 5px;
    line-height: 1.4;
}

.insight-rating-na {
    font-size: 11px;
    font-weight: 500;
    color: var(--color-gray-400);
    background: rgba(156, 163, 175, 0.12);
    border-radius: 4px;
    padding: 1px 5px;
    flex-shrink: 0;
}

/* Open-ended feedback cards */
.insight-feedback-card {
    padding: 16px;
    background: var(--color-gray-50);
    border-radius: 10px;
    border-left: 3px solid var(--color-primary);
    margin-bottom: 12px;
}

.insight-feedback-card:last-child {
    margin-bottom: 0;
}

.insight-feedback-question {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-gray-500);
    margin: 0 0 8px;
}

.insight-feedback-answer {
    font-size: 14px;
    color: var(--color-gray-900);
    line-height: 1.65;
    margin: 0 0 10px;
}

.insight-feedback-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--color-gray-400);
}

.insight-meta-dot {
    color: var(--color-gray-300);
}

/* Strengths & Growth Areas */
.insights-sg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.insights-sg-card {
    background: var(--color-gray-50);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--color-gray-200);
    border-top-width: 3px;
}

.insights-sg-card--strengths {
    border-top-color: var(--color-success);
}

.insights-sg-card--growth {
    border-top-color: #0EA5E9;
}

.insights-sg-card-heading {
    margin-bottom: 16px;
}

.insights-sg-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 999px;
}

.insights-sg-badge--strengths {
    background: rgba(16, 185, 129, 0.12);
    color: var(--color-success-600);
}

.insights-sg-badge--growth {
    background: rgba(14, 165, 233, 0.12);
    color: #0284C7;
}

.insights-sg-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-gray-200);
}

.insights-sg-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.insights-sg-item-text {
    font-size: 13px;
    color: var(--color-gray-700);
    line-height: 1.5;
    margin-bottom: 8px;
}

.insights-sg-item-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.insights-sg-bar {
    min-width: 60px;
    flex: 1;
}

.insights-sg-score {
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}

.insights-sg-label {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.85;
    flex-shrink: 0;
    white-space: nowrap;
}

.insights-sg-count {
    font-size: 11px;
    color: var(--color-gray-400);
    margin-top: 4px;
}

/* Written Feedback by Question */
.insight-feedback-group {
    margin-bottom: 28px;
}

.insight-feedback-group:last-child {
    margin-bottom: 0;
}

.insight-feedback-group-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.insight-feedback-group-q {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-gray-900);
    line-height: 1.4;
    flex: 1;
}

.insight-feedback-group-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-gray-500);
    background: var(--color-gray-100);
    border-radius: 999px;
    padding: 2px 9px;
    flex-shrink: 0;
    white-space: nowrap;
}

.insight-feedback-group-answers {
    padding-left: 0;
}

.insight-feedback-more {
    font-size: 12px;
    color: var(--color-gray-400);
    font-style: italic;
    margin: 8px 0 0;
    padding: 0;
}

/* Multiple Choice distributions */
.insight-mc-group {
    margin-bottom: 28px;
}
.insight-mc-group:last-child {
    margin-bottom: 0;
}
.insight-mc-rows {
    margin-top: 10px;
}
.insight-mc-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 7px 0;
    border-bottom: 1px solid var(--color-gray-50);
}
.insight-mc-row:last-child {
    border-bottom: none;
}
.insight-mc-label {
    font-size: 13px;
    color: var(--color-gray-700);
    width: 210px;
    flex-shrink: 0;
}
.insight-mc-bar-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.insight-mc-track {
    flex: 1;
    min-width: 60px;
}
.insight-mc-fill {
    background: var(--color-primary-dark);
    min-width: 2px;
}
.insight-mc-pct {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-gray-700);
    width: 36px;
    text-align: right;
    flex-shrink: 0;
}
.insight-mc-count {
    font-size: 12px;
    color: var(--color-gray-400);
    width: 20px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .insight-rate-right {
        width: 140px;
    }

    .insight-rating-bar-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .insight-bar-track--wide {
        min-width: 80px;
    }

    .insights-sg-grid {
        grid-template-columns: 1fr;
    }

    .insight-mc-row {
        flex-wrap: wrap;
        gap: 6px;
    }

    .insight-mc-label {
        width: 100%;
    }

    .insight-mc-bar-wrap {
        width: 100%;
    }
}

/* ── Toast Notifications ────────────────────────────────────────────────── */

#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    width: max-content;
    max-width: calc(100vw - 32px);
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    max-width: 340px;
    min-width: 220px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.4;
    pointer-events: all;
    animation: toast-in 0.25s ease;
}

.toast-success {
    background: #ECFDF5;
    border-left: 4px solid var(--color-success);
    color: var(--color-success-800);
}

.toast-error {
    background: var(--color-error-50);
    border-left: 4px solid var(--color-error);
    color: var(--color-error-800);
}

.toast-info {
    background: var(--color-primary-50);
    border-left: 4px solid var(--color-primary);
    color: #134E4A;
}

.toast-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-message {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.45;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
    margin-top: -1px;
}

.toast-close:hover {
    opacity: 1;
}

.toast-fade-out {
    animation: toast-out 0.28s ease forwards;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-12px); }
}

/* ── Report Download ─────────────────────────────────────────────────────── */

.detail-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}

.detail-title-row h1 {
    margin: 0;
}

.download-report-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-sans);
    color: var(--color-primary);
    background: var(--color-warm-50);
    border: 1.5px solid var(--color-primary);
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.download-report-btn:hover {
    background: var(--color-primary);
    color: white;
}

.download-report-icon {
    font-size: 16px;
    line-height: 1;
}

@media (max-width: 768px) {
    .detail-title-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Multiple choice preview — visual list (avoids <template> inside <select> parsing quirk) */
.q-preview-choices-list {
    border: 1px solid var(--color-gray-300);
    border-radius: 6px;
    overflow: hidden;
    background: var(--color-warm-50);
    font-size: 14px;
}

.q-preview-choice-item {
    padding: 9px 12px;
    color: var(--color-gray-700);
    border-bottom: 1px solid var(--color-gray-100);
}

.q-preview-choice-item:last-child {
    border-bottom: none;
}

/* ============================================
   NEW WIZARD — FOCUS AREA + METHODOLOGY
   ============================================ */

/* Subject input reveal block */

/* Disabled / unavailable type card */
.feedback-type-card.type-card-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.type-card-unavailable {
    font-size: 11px;
    color: var(--color-gray-400);
    margin-top: 4px;
    font-style: italic;
}

/* ============================================
   STEP 2 — GIVER INSTRUCTIONS (modern card)
   ============================================ */
.giver-instructions-section {
    position: relative;
    margin-bottom: 0;
    padding: 16px 18px 14px;
    background: linear-gradient(180deg,
        rgba(240, 253, 250, 0.55) 0%,
        rgba(250, 249, 247, 0.6) 100%);
    border: 1px solid var(--color-warm-200);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(20, 184, 166, 0.04);
    transition: border-color 200ms var(--ease-smooth),
                box-shadow 200ms var(--ease-smooth),
                background 200ms var(--ease-smooth);
}

.giver-instructions-section::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg,
        var(--color-primary) 0%,
        var(--color-primary-light) 100%);
    opacity: 0.85;
}

.giver-instructions-section:focus-within {
    border-color: rgba(20, 184, 166, 0.45);
    box-shadow: 0 4px 16px rgba(20, 184, 166, 0.1),
                0 0 0 3px rgba(20, 184, 166, 0.08);
    background: linear-gradient(180deg,
        rgba(240, 253, 250, 0.8) 0%,
        rgba(255, 255, 255, 0.85) 100%);
}

/* Header row: icon + titles on left, auto-generate button on right */
.gi-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.gi-header-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.gi-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg,
        rgba(20, 184, 166, 0.12) 0%,
        rgba(45, 212, 191, 0.18) 100%);
    color: var(--color-primary-dark);
    box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.18);
}

.gi-titles {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gi-title {
    font-size: 13px;
    font-weight: 700;
    color: #000;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.gi-sub {
    font-size: 11.5px;
    font-weight: 400;
    color: var(--color-warm-500);
    line-height: 1.4;
    margin-top: 1px;
}

/* "Auto-generate" pill — modern, subtle teal with sparkle */
.auto-generate-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(20, 184, 166, 0.3);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--color-primary-dark);
    font-family: var(--font-sans);
    cursor: pointer;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 180ms var(--ease-smooth);
}

.auto-generate-btn:hover {
    background: linear-gradient(135deg,
        rgba(20, 184, 166, 0.1) 0%,
        rgba(45, 212, 191, 0.14) 100%);
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(20, 184, 166, 0.18);
}

.auto-generate-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(20, 184, 166, 0.15);
}

.auto-generate-icon {
    flex-shrink: 0;
    transition: transform 280ms var(--ease-bounce);
}

.auto-generate-btn:hover .auto-generate-icon {
    transform: rotate(20deg) scale(1.1);
}

/* Textarea — seamless within the card, clean focus state */
.gi-textarea-wrap {
    position: relative;
}

.gi-textarea {
    display: block;
    width: 100%;
    min-height: 72px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.55;
    color: #000;
    background: rgba(255, 255, 255, 0.85);
    font-family: var(--font-sans);
    resize: none;
    overflow: hidden;
    outline: none;
    box-sizing: border-box;
    /* Modern browsers: textarea grows with content automatically.
       Older browsers fall back to the JS auto-grow in x-effect. */
    field-sizing: content;
    transition: border-color 180ms var(--ease-smooth),
                background 180ms var(--ease-smooth),
                box-shadow 180ms var(--ease-smooth);
}

.gi-textarea::placeholder {
    color: var(--color-warm-500);
    line-height: 1.5;
}

.gi-textarea:hover {
    background: rgba(255, 255, 255, 0.95);
}

.gi-textarea:focus {
    background: var(--color-warm-50);
    border-color: rgba(20, 184, 166, 0.35);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* Footer row — appears once user has typed something */
.gi-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    padding: 0 2px;
    font-size: 11px;
    line-height: 1.3;
    animation: gi-footer-in 220ms var(--ease-smooth);
}

@keyframes gi-footer-in {
    from { opacity: 0; transform: translateY(-2px); }
    to   { opacity: 1; transform: translateY(0); }
}

.gi-footer-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--color-primary-dark);
    font-weight: 600;
}

.gi-footer-status svg {
    flex-shrink: 0;
    color: var(--color-primary);
}

.gi-footer-count {
    color: var(--color-warm-500);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

/* Mobile */
@media (max-width: 768px) {
    .giver-instructions-section {
        padding: 14px 14px 12px;
        border-radius: 12px;
    }

    .giver-instructions-section::before {
        top: 12px;
        bottom: 12px;
    }

    .gi-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 8px;
    }

    .gi-icon {
        width: 26px;
        height: 26px;
    }

    .gi-title {
        font-size: 12.5px;
    }

    .gi-sub {
        font-size: 11px;
    }

    .auto-generate-btn {
        align-self: flex-start;
        padding: 5px 11px;
        font-size: 11px;
        gap: 5px;
    }

    .gi-textarea {
        font-size: 13.5px;
        padding: 10px 12px;
        min-height: 56px;
        line-height: 1.5;
    }

    .gi-footer {
        font-size: 10.5px;
    }
}

.section-divider {
    height: 1px;
    background: var(--color-warm-200);
    margin: 16px 0;
}

/* ============================================
   STEP 3 — INFO BOXES (anonymous / grouping)
   ============================================ */
.wizard-info-box {
    margin: -8px 0 20px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-gray-700);
}

.wizard-info-box p {
    margin: 0 0 6px;
}

.wizard-info-box p:last-child {
    margin-bottom: 0;
}

.wizard-info-box--anon {
    background: var(--color-info-50);
    border: 1px solid #BFDBFE;
}

.wizard-info-box--group {
    background: var(--color-success-50);
    border: 1px solid #BBF7D0;
}

.wizard-info-box-warning {
    color: var(--color-warning-800);
    font-size: 13px;
}

.giver-toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: var(--color-gray-800);
    color: var(--color-gray-50);
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    z-index: 9999;
    max-width: 320px;
    line-height: 1.5;
}

/* ============================================
   STEP 4 — ROLE GROUPING TOGGLE
   ============================================ */
.role-grouping-toggle {
    margin-bottom: 20px;
    padding: 14px 16px;
    background: var(--color-warm-100);
    border: 1px solid var(--color-warm-200);
    border-radius: 10px;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 14px;
    user-select: none;
}

.toggle-track {
    position: relative;
    width: 42px;
    height: 24px;
    background: var(--color-gray-300);
    border-radius: 12px;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.toggle-track--on {
    background: var(--color-primary);
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--color-warm-50);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.toggle-thumb--on {
    transform: translateX(18px);
}

.toggle-text-group {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.toggle-label-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-warm-800);
}

.toggle-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    background: rgba(20, 184, 166, 0.1);
    color: var(--color-primary);
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    vertical-align: middle;
}

.toggle-hint-text {
    font-size: 11px;
    color: var(--color-gray-400);
}

/* ============================================
   STEP 6 — REVIEW: INSTRUCTIONS VALUE
   ============================================ */
.review-value--instructions {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: var(--color-gray-700);
    background: var(--color-warm-100);
    border-radius: 6px;
    padding: 8px 10px;
    line-height: 1.5;
    border: 1px solid var(--color-warm-200);
    white-space: pre-wrap;
}

/* ============================================
   STEP 5 REVIEW — REDESIGNED (rv-* classes)
   ============================================ */

/* Header */
.rv-header {
    text-align: center;
    margin-bottom: 24px;
}
.rv-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: linear-gradient(135deg,
        rgba(20, 184, 166, 0.14) 0%,
        rgba(45, 212, 191, 0.2) 100%);
    color: var(--color-primary-dark);
    box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.22),
                0 4px 14px rgba(20, 184, 166, 0.1);
}

.rv-header-icon svg {
    flex-shrink: 0;
}
.rv-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-warm-800);
    margin: 0 0 6px;
}
.rv-header-sub {
    font-size: 14px;
    color: var(--color-warm-500);
    margin: 0;
}

/* Stats row */
.rv-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: var(--color-warm-50);
    border: 1px solid var(--color-warm-200);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.rv-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 3px;
}
.rv-stat-num {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary-dark);
    line-height: 1;
}
.rv-stat-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--color-warm-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.rv-stat-divider {
    width: 1px;
    height: 32px;
    background: var(--color-warm-200);
    margin: 0 8px;
    flex-shrink: 0;
}

/* Cards container */
.rv-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}

/* Individual card */
.rv-card {
    background: var(--color-warm-50);
    border: 1px solid var(--color-warm-200);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: var(--shadow-xs);
}

/* Card header row */
.rv-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-warm-200);
}
.rv-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg,
        rgba(20, 184, 166, 0.12) 0%,
        rgba(45, 212, 191, 0.18) 100%);
    color: var(--color-primary-dark);
    box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.18);
}

.rv-card-icon svg {
    flex-shrink: 0;
}

/* Soft secondary count chip (e.g. "2 reminders" on the schedule card) */
.rv-card-count--soft {
    background: rgba(20, 184, 166, 0.1);
    color: var(--color-primary-dark);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}
.rv-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-warm-700);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex: 1;
}
.rv-card-count {
    background: var(--color-primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 99px;
    padding: 1px 8px;
    line-height: 18px;
}

/* Field rows inside a card */
.rv-field {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 5px 0;
    border-bottom: 1px solid var(--color-warm-100);
}
.rv-field:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.rv-field--block {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}
.rv-field-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-warm-500);
    min-width: 90px;
    flex-shrink: 0;
}
.rv-field-value {
    font-size: 14px;
    color: var(--color-warm-800);
    font-weight: 500;
}

/* Focus area badge */
.rv-focus-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    background: var(--color-primary-50);
    color: var(--color-primary-dark);
    border: 1px solid rgba(20, 184, 166, 0.25);
    border-radius: 99px;
    padding: 2px 10px;
    line-height: 20px;
}

/* Anonymity badge — green dot for On, warm-grey dot for Off.
   Uses the same flex row as other rv-field values; the hint text wraps
   under on narrow screens. */
.rv-anon-badge {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 14px;
    color: var(--color-warm-800);
    font-weight: 500;
}
.rv-anon-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.rv-anon-badge--on .rv-anon-badge-dot {
    background: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}
.rv-anon-badge--off .rv-anon-badge-dot {
    background: var(--color-warm-400);
}
.rv-anon-badge-hint {
    font-size: 13px;
    font-weight: 400;
    color: var(--color-warm-500);
}

/* Instructions box */
.rv-instructions-box {
    width: 100%;
    font-size: 13px;
    color: var(--color-warm-700);
    background: var(--color-warm-100);
    border: 1px solid var(--color-warm-200);
    border-radius: 8px;
    padding: 10px 12px;
    line-height: 1.6;
    white-space: pre-wrap; /* keep the line breaks the requester typed (B5) */
    white-space: pre-wrap;
}

/* "Edit" pill in the Questions card header — sends user back to Step 2 */
.rv-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: var(--color-warm-50);
    border: 1px solid var(--color-warm-300);
    border-radius: 999px;
    color: var(--color-warm-700);
    font-family: var(--font-sans);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
}
.rv-edit-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
    background: rgba(20, 184, 166, 0.06);
}
.rv-edit-btn svg { flex-shrink: 0; }
[data-theme="dark"] .rv-edit-btn {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.16);
    color: #C4C4CB;
}
[data-theme="dark"] .rv-edit-btn:hover {
    background: rgba(20, 184, 166, 0.18);
    border-color: rgba(45, 212, 191, 0.5);
    color: #5EEAD4;
}

/* Questions list — read-only, numbered */
.rv-questions-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rv-question-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 12px;
    background: var(--color-warm-100);
    border: 1px solid var(--color-warm-200);
    border-radius: 8px;
}
.rv-question-num {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    color: var(--color-primary);
    min-width: 18px;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.rv-question-text {
    flex: 1;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--color-warm-800);
}
[data-theme="dark"] .rv-question-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .rv-question-num {
    color: #5EEAD4;
}

/* Givers list */
.rv-givers-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rv-giver {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--color-warm-100);
}
.rv-giver:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.rv-giver-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary-dark));
    color: white;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rv-giver-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}
.rv-giver-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-warm-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rv-giver-email {
    font-size: 12px;
    color: var(--color-warm-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rv-giver-role {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-warm-500);
    background: var(--color-warm-100);
    border: 1px solid var(--color-warm-300);
    border-radius: 99px;
    padding: 2px 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.giver-summary-role-missing {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-warning-700);
    background: var(--color-warning-100);
    border: 1px solid var(--color-warning-200);
    border-radius: 99px;
    padding: 2px 8px;
    white-space: nowrap;
}

.giver-summary-dup {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-error-700);
    background: var(--color-error-100);
    border: 1px solid #FCA5A5;
    border-radius: 99px;
    padding: 2px 8px;
    white-space: nowrap;
}

.rv-group-section {
    margin-bottom: 12px;
}

.rv-group-section:last-child {
    margin-bottom: 0;
}

.rv-group-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    /* Was gray-400 — too faint to tell the groups apart in either theme.
       Branded teal reads as a clear section divider against both the cream
       and dark surfaces. */
    color: var(--color-primary-darker);
    margin-bottom: 6px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--color-primary-50);
}
[data-theme="dark"] .rv-group-label {
    color: var(--color-primary-light);
    border-bottom-color: var(--color-gray-200);
}

/* Schedule card — embedded timeline tweaks */
.rv-flow {
    margin: 4px 0 0;
    padding: 14px 10px 16px;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.6) 0%,
        rgba(240, 253, 250, 0.4) 100%);
}

.rv-flow-hint {
    margin: 10px 0 0;
    font-size: 11.5px;
    color: var(--color-warm-500);
    font-style: italic;
    text-align: center;
    line-height: 1.45;
}

/* Send button */
.rv-send-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0ea5e9 60%, #6366f1 100%) !important;
    color: white !important;
    font-weight: 600 !important;
    border-color: transparent !important;
    padding: 10px 28px !important;
}
.rv-send-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, #0284c7 60%, #4f46e5 100%) !important;
    border-color: transparent !important;
}
.rv-send-btn:hover:not(:disabled) .rv-send-icon {
    transform: translate(2px, -2px);
}
.rv-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.rv-send-icon {
    flex-shrink: 0;
    transition: transform 220ms var(--ease-bounce);
}

@media (max-width: 480px) {
    .rv-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding: 0;
        gap: 0;
    }
    .rv-stat-divider {
        display: none;
    }
    .rv-stat {
        padding: 14px 12px;
    }
    /* Vertical divider between the two columns */
    .rv-stats .rv-stat:nth-child(1),
    .rv-stats .rv-stat:nth-child(5) {
        border-right: 1px solid var(--color-warm-200);
    }
    /* Horizontal divider between the two rows */
    .rv-stats .rv-stat:nth-child(1),
    .rv-stats .rv-stat:nth-child(3) {
        border-bottom: 1px solid var(--color-warm-200);
    }
    .rv-stat-num {
        font-size: 16px;
    }
    .rv-card {
        padding: 14px 16px;
    }
}

/* ============================================
   TEAL HIGHLIGHT SPANS — {{subjectPerson}} / {{subjectTopic}} / {{future_period}}
   ============================================ */
.wiz-hl-person,
.wiz-hl-topic {
    color: var(--color-primary-dark);
    font-weight: 600;
    background: rgba(13, 148, 136, 0.08);
    border-radius: 3px;
    padding: 0 3px;
}

/* future_period uses a distinct indigo tint to differentiate from subject/topic */
.wiz-hl-future {
    color: #4f46e5;
    font-weight: 600;
    background: rgba(79, 70, 229, 0.08);
    border-radius: 3px;
    padding: 0 3px;
}

/* Prominent Preview Form button (pulsing outline when Overall+Feedforward active) */
.q-preview-btn--prominent {
    background: var(--color-primary) !important;
    color: #fff !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
    animation: preview-pulse 2.2s ease-in-out infinite;
}

@keyframes preview-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18); }
    50%       { box-shadow: 0 0 0 6px rgba(13, 148, 136, 0.08); }
}

/* ============================================
   STEP 1 — REQUEST TITLE
   ============================================ */
.step1-label-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}

.step1-label-row label {
    margin-bottom: 2px !important;
}

.step1-section-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-warm-800);
    margin-bottom: 10px;
}

.subject-hint {
    font-size: 11px;
    color: var(--color-warm-400);
    font-style: italic;
    line-height: 1.4;
}

@media (min-width: 769px) {
    .step1-label-row {
        flex-direction: row;
        align-items: baseline;
        gap: 10px;
    }

    .step1-label-row label {
        margin-bottom: 0;
        white-space: nowrap;
    }
}

/* Step 1 consistent section spacing */
.fp-step-body .step1-reveal {
    margin-bottom: 28px;
}

.step1-reveal > label,
.step1-reveal label:first-child {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-warm-800);
    margin-bottom: 8px;
}

.request-title-section {
    margin-bottom: 4px;
}

.request-title-section label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-warm-800);
    margin-bottom: 8px;
}

/* ============================================
   STEP 1 — "WHO IS THIS FOR?" TOGGLE
   ============================================ */
.feedback-for-section {
    margin: 0 0 28px;
}

.feedback-for-section label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-warm-800);
    margin-bottom: 8px;
}

.feedback-for-toggle {
    display: flex;
    border: 1.5px solid var(--color-warm-200);
    border-radius: 10px;
    overflow: hidden;
    width: fit-content;
}

.feedback-for-toggle button {
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-warm-600);
    background: var(--color-warm-50);
    border: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    border-radius: 0;
    outline: none;
}

.feedback-for-toggle button:first-child {
    border-right: 1.5px solid var(--color-warm-200);
}

.feedback-for-toggle button.active {
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
}

/* ============================================
   STEP 1 — SUBJECT PERSON DETAILS
   ============================================ */
.subject-person-form {
    margin-top: 0;
    margin-bottom: 28px;
    padding: 18px;
    background: var(--color-warm-100);
    border: 1px solid var(--color-warm-200);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.subject-person-form label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-warm-800);
    margin-bottom: 6px;
}

.subject-person-notify {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-top: 4px;
}

.subject-person-notify input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
    flex-shrink: 0;
    cursor: pointer;
}

.subject-person-notify label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-warm-700);
    cursor: pointer;
    margin-bottom: 0;
    line-height: 1.4;
}

.subject-person-notify .notify-hint {
    font-size: 12px;
    color: var(--color-gray-400);
    margin-top: 2px;
    font-weight: 400;
}

/* ============================================
   STEP 3 — ZEN TIP (Performance Development)
   ============================================ */
.wizard-zen-tip {
    display: flex;
    gap: 12px;
    background: linear-gradient(135deg, rgba(13,148,136,0.07) 0%, rgba(16,185,129,0.05) 100%);
    border: 1px solid rgba(13, 148, 136, 0.25);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.wizard-zen-tip-icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1.2;
}

.wizard-zen-tip-body {
    flex: 1;
    min-width: 0;
}

.wizard-zen-tip-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-primary-darker);
    margin-bottom: 4px;
}

.wizard-zen-tip-text {
    font-size: 12px;
    color: var(--color-gray-700);
    line-height: 1.5;
    margin: 0;
}


/* ═══════════════════════════════════════════════════════════════
   FULL-PAGE WIZARD  (new-request.html)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Page shell ─────────────────────────────────────────────── */
.fp-page {
    background: var(--color-warm-100);
    min-height: 100vh;
}

.fp-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ─── Main content area ──────────────────────────────────────── */
.fp-main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 0 0;
}

/* ─── The card ───────────────────────────────────────────────── */
.fp-card {
    background: var(--surface-card);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    width: 100%;
    overflow: hidden;
}

/* ─── Process banner ────────────────────────────────────────── */
.fp-process-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 32px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0ea5e9 60%, #6366f1 100%);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.fp-process-banner-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.3px;
}

.fp-process-cancel-btn {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.fp-process-cancel-btn:hover {
    background: rgba(255,255,255,0.25);
    color: #ffffff;
}

.fp-process-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.fp-process-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255,255,255,0.22);
    border: 1px solid rgba(255,255,255,0.45);
    border-radius: 20px;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.fp-btn-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}
.fp-process-save-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.35);
}
.fp-process-save-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.draft-toast {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 1000;
    background: var(--color-warm-800, #333);
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    font-weight: 500;
    font-size: 14px;
}

@media (min-width: 769px) {
    .fp-main {
        padding-top: 0;
    }
}

/* ─── Progress section ───────────────────────────────────────── */
.fp-progress-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0ea5e9 100%);
    border-bottom: none;
    /* Caps the inner content at ~1400px centered on wide monitors, so the
       title (left) and action buttons (right) sit closer to the centre
       instead of hugging the page edges. Below 1544px the padding stays at
       72px each side — enough to clear the floating .zen-theme-toggle. */
    padding: 14px max(72px, calc((100% - 1400px) / 2));
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;
}

/* Mobile: 2-row layout.
   Row 1 = step dots (full width, right-inset so the floating .zen-theme-toggle
   doesn't cover step 5).
   Row 2 = title + Save Draft + Cancel as a single tight, centered group.
   The empty 1fr tracks on each side equally distribute leftover space so
   the auto-sized title and actions are pushed together in the middle. */
@media (max-width: 768px) {
    .fp-progress-section {
        display: grid;
        grid-template-columns: 1fr auto auto 1fr;
        grid-template-rows: auto auto;
        row-gap: 18px; /* pushes row 2 (title + Save + Cancel) down evenly */
        align-items: center;
        padding: 12px 14px 14px;
    }

    .fp-step-dots {
        grid-column: 1 / -1;
        grid-row: 1;
        width: 100%;
        padding-right: 48px; /* clears the floating theme toggle */
    }

    .fp-process-banner-title {
        grid-column: 2;
        grid-row: 2;
        align-self: center;
        font-size: 12px;
        line-height: 1;
        padding: 0;
        margin-right: 12px; /* spacing to the action buttons */
        white-space: nowrap;
    }

    .fp-process-actions {
        grid-column: 3;
        grid-row: 2;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }

    .fp-process-save-btn,
    .fp-process-cancel-btn {
        display: inline-flex;
        align-items: center;
        font-size: 12px;
        line-height: 1;
        padding: 6px 10px;
        height: 26px;
    }
}


.fp-progress-track {
    height: 4px;
    background: var(--color-warm-200);
    border-radius: 2px;
    margin-bottom: 16px;
    overflow: hidden;
}

.fp-progress-fill {
    height: 100%;
    width: var(--fp-progress, 17%);
    background: var(--color-primary);
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* ─── Step dot indicators ────────────────────────────────────── */
.fp-step-dots {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex: 1;
}

.fp-dot-segment {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 160px;
}

.fp-dot-segment:last-child {
    flex: 0;
}

.fp-dot-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Dot column is a <button> — strip default chrome and add clickable affordances. */
button.fp-dot-col {
    background: transparent;
    border: 0;
    padding: 4px 6px;
    margin: -4px -6px;
    border-radius: 12px;
    font-family: inherit;
    color: inherit;
    cursor: default;
    transition: background 180ms var(--ease-smooth);
}

button.fp-dot-col:disabled {
    cursor: default;
}

button.fp-dot-col.fp-dot-col--clickable {
    cursor: pointer;
}

button.fp-dot-col.fp-dot-col--clickable:hover {
    background: rgba(255, 255, 255, 0.14);
}

button.fp-dot-col.fp-dot-col--clickable:hover .fp-dot {
    transform: scale(1.12);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3),
                0 4px 14px rgba(0, 0, 0, 0.18);
}

button.fp-dot-col.fp-dot-col--clickable:hover .fp-dot--done {
    background: rgba(255, 255, 255, 0.5);
    border-color: #ffffff;
    color: #ffffff;
}

button.fp-dot-col.fp-dot-col--clickable:hover .fp-dot--visited {
    background: #ffffff;
    border-color: #ffffff;
    color: var(--color-primary-darker);
}

button.fp-dot-col.fp-dot-col--clickable:hover .fp-dot-label {
    color: #ffffff;
    font-weight: 700;
}

button.fp-dot-col:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.fp-dot-label {
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
    text-align: center;
    letter-spacing: 0.2px;
}

.fp-dot-label--active {
    color: #ffffff;
    font-weight: 700;
}

/* Dots sit on the gradient banner which is identical in light/dark modes,
   so the dot colours are hardcoded warm neutrals rather than tokens.
   This avoids the cool-grey inversion (#6E6E78 / #C4C4CB) that read as
   blue-purple when the theme flipped. */
.fp-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    background: #FDFCFB;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #6B6662;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.fp-dot--active {
    border-color: #ffffff;
    background: #FDFCFB;
    color: #0F766E; /* darker, greener teal — won't read as blue */
    box-shadow: 0 0 0 3px rgba(255,255,255,0.5), 0 4px 14px rgba(0,0,0,0.2);
    transform: scale(1.15);
}

.fp-dot--done {
    border-color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.25);
    color: #FFFFFF;
    opacity: 1;
}

/* Visited but not yet complete — clickable, but no ✓ checkmark.
   Sits visually between "locked" (plain white) and "done" (filled). */
.fp-dot--visited {
    border-color: rgba(255,255,255,0.55);
    background: rgba(255,255,255,0.85);
    color: #4A4643;
}

.fp-dot-line {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,0.25);
    transition: background 0.25s ease;
}

.fp-dot-line--done {
    background: rgba(255,255,255,0.6);
    opacity: 1;
}

/* ─── Error banner ───────────────────────────────────────────── */
.fp-error-banner {
    background: var(--color-error-50);
    border-left: 3px solid var(--color-error);
    color: var(--color-error-700);
    font-size: 13px;
    padding: 10px 24px;
    margin: 0;
}

/* ─── Development Check-in commitment banner ─────────────────── */
/* Sticky context that sits above the wizard steps. Soft teal rail
   echoes the in-app commitment cards on Growth so the requester
   recognizes the link visually. */
.ci-banner {
    max-width: 720px;
    margin: 16px auto 8px;
    padding: 14px 18px 12px 22px;
    background: linear-gradient(180deg, rgba(20, 184, 166, 0.05) 0%, rgba(99, 102, 241, 0.04) 100%);
    border-radius: 10px;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.04);
    position: relative;
}
.ci-banner-rail {
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(180deg, #14b8a6 0%, #6366f1 100%);
}
.ci-banner-body { padding-left: 4px; }
.ci-banner-eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #0f766e;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ci-banner-eyebrow-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
    display: inline-block;
    animation: ci-banner-pulse 2.4s ease-in-out infinite;
}
@keyframes ci-banner-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18); }
    50%      { box-shadow: 0 0 0 5px rgba(20, 184, 166, 0.08); }
}
.ci-banner-title {
    margin: 2px 0 0;
    font-family: 'Lora', Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-gray-900, #0f172a);
    line-height: 1.3;
}
.ci-banner-intention {
    margin: 6px 0 0;
    font-style: italic;
    font-size: 13.5px;
    color: var(--color-gray-600, #475569);
    line-height: 1.5;
}
.ci-banner-skills {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px 6px;
}
.ci-banner-skill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.12);
    color: #0f766e;
    font-size: 11.5px;
    font-weight: 500;
}

/* ─── Step body (steps 1, 2, 4, 5, 6) ───────────────────────── */
.fp-step-body {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 40px;
}

/* ─── Step 3: two-column layout ─────────────────────────────── */
.fp-step3-layout {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
}

.fp-library-col {
    display: none !important;
}

.fp-builder-col {
    grid-column: 1;
    grid-row: 1;
    padding: 24px 28px;
}


/* ─── Step 2 builder: desktop refinements ────────────────────── */
@media (min-width: 769px) {
    /* No outer padding — nav bar spans card edge-to-edge */
    .wizard-step--builder {
        padding: 0;
    }

    /* Constrain content width and center it */
    .fp-builder-col {
        max-width: 720px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding-top: 12px;
    }

    .fp-builder-col .giver-instructions-section .gi-textarea {
        min-height: 60px;
    }

    /* Your Questions: visual separator + title/button on same row */
    .fp-builder-col .q-builder-header {
        margin-top: 10px;
        padding-top: 12px;
        border-top: 1px solid var(--color-warm-200);
        position: relative;
        flex-direction: row;
        align-items: center;
    }
    .fp-builder-col .q-builder-header .q-preview-btn {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 0;
    }
}

/* Library column internals */
.fp-library-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 20px 16px 8px;
    flex-shrink: 0;
}

.fp-library-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-warm-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.fp-library-hint {
    font-size: 11px;
    color: var(--color-warm-500);
}

/* Desktop library — topic filter row */
.fp-library-col .q-library-filters {
    padding: 5px 10px;
    gap: 4px;
    flex-shrink: 0;
}

/* Desktop library — format filter row */
.fp-library-col .q-library-filters--secondary {
    padding: 5px 10px;
    background: #eef0f4;
    border-top: 2px solid #d6dae2;
}

/* Desktop library — topic filter buttons: compact */
.fp-library-col .filter-btn {
    font-size: 10px;
    padding: 4px 8px;
}

/* Desktop library — format filter buttons: pill shape + indigo accent */
.fp-library-col .filter-btn--sm {
    font-size: 10px;
    padding: 3px 9px;
    border-radius: 20px;
}
.fp-library-col .filter-btn--sm.active {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
}
.fp-library-col .filter-btn--sm:hover:not(.active) {
    background: #e0e7ff;
    border-color: #c7d2fe;
    color: #4338ca;
}

.fp-library-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 8px 12px;
}

/* ─── Library hide/show toggle buttons ──────────────────────── */
.fp-library-hide-btn {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-warm-500);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.15s;
    white-space: nowrap;
}

.fp-library-hide-btn:hover {
    background: var(--color-warm-200);
    color: var(--color-warm-700);
}

.fp-show-lib-btn {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
    background: rgba(20, 184, 166, 0.08);
    border: 1px solid rgba(20, 184, 166, 0.3);
    border-radius: 6px;
    cursor: pointer;
    padding: 6px 10px;
    transition: all 0.15s;
    white-space: nowrap;
}

.fp-show-lib-btn:hover {
    background: rgba(20, 184, 166, 0.15);
}

/* Library-hidden layout: collapse left column */
.fp-step3-layout--lib-hidden {
    grid-template-columns: 1fr;
}

/* ─── Reorder arrow buttons ──────────────────────────────────── */
.q-reorder-arrows {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
    margin-right: 6px;
}

/* ─── Builder empty state ────────────────────────────────────── */
.fp-builder-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 40px 16px;
    color: var(--color-warm-500);
    text-align: center;
}

.fp-builder-empty-icon {
    font-size: 24px;
    color: var(--color-primary);
    opacity: 0.4;
}

.fp-builder-empty p {
    font-size: 13px;
    line-height: 1.5;
    max-width: 200px;
    margin: 0;
}

/* ─── Success screen ─────────────────────────────────────────── */
.fp-success {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.fp-success-card {
    background: var(--color-warm-50);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    padding: 48px 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
}

.fp-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(20, 184, 166, 0.35);
}

.fp-success-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-warm-800);
    margin: 0 0 8px;
}

.fp-success-subtitle {
    font-size: 15px;
    color: var(--color-warm-600);
    margin: 0 0 28px;
}

.fp-success-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    background: var(--color-warm-100);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 24px;
}

.fp-success-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.fp-success-stat-num {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
}

.fp-success-stat-label {
    font-size: 11px;
    color: var(--color-warm-500);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.fp-success-stat-divider {
    width: 1px;
    height: 32px;
    background: var(--color-warm-300);
}

.fp-success-redirect-hint {
    font-size: 12px;
    color: var(--color-warm-500);
    margin: 0 0 20px;
}

.fp-success-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 24px;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.fp-success-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(20, 184, 166, 0.4);
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .fp-main {
        padding: 0;
    }


    .fp-step-body {
        padding: 24px 20px;
    }

    .fp-builder-col {
        padding: 20px;
    }

    /* Cap segment width so 22px dots + connectors sit comfortably in the
       centre instead of stretching edge-to-edge. Without this the last dot
       crowds the floating .zen-theme-toggle on narrow screens. */
    .fp-dot-segment {
        max-width: 80px;
    }

    .fp-dot {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }


    .fp-success-card {
        padding: 36px 24px;
    }
}

/* ─── Desktop/mobile visibility helpers ─────────────────────── */
.fp-mobile-only { display: none !important; }
.fp-desktop-only { display: block; }

@media (max-width: 768px) {
    .fp-mobile-only { display: block !important; }
    .fp-desktop-only { display: none !important; }
}

@media (min-width: 769px) {
    .fp-show-lib-btn {
        display: inline-flex;
    }
}

/* ─── Reorder arrow button styles ────────────────────────────── */
.q-reorder-arrows .q-arrow-btn {
    width: 26px;
    height: 20px;
    font-size: 12px;
    background: var(--color-warm-100);
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    color: var(--color-gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.15s;
    line-height: 1;
}

.q-reorder-arrows .q-arrow-btn:hover:not(:disabled) {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.q-reorder-arrows .q-arrow-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

/* ─── Browse Library button (mobile action row) ──────────────── */
.fp-browse-lib-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    padding: 12px 14px;
    background: rgba(20, 184, 166, 0.06);
    border: 1.5px solid rgba(20, 184, 166, 0.4);
    border-radius: 10px;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fp-browse-lib-btn:hover {
    background: rgba(20, 184, 166, 0.12);
    border-color: var(--color-primary);
}

/* ─── Preview overlay (one-question-at-a-time) ───────────────────
   Matches the actual give-feedback experience: same mesh-gradient bg
   in light mode, same dark gradient in dark mode. */
.fp-preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(ellipse 70% 60% at 0% 0%,
            rgba(45, 212, 191, 0.22) 0%,
            transparent 60%),
        radial-gradient(ellipse 70% 60% at 100% 0%,
            rgba(14, 165, 233, 0.18) 0%,
            transparent 60%),
        radial-gradient(ellipse 80% 50% at 50% 100%,
            rgba(20, 184, 166, 0.12) 0%,
            transparent 65%),
        linear-gradient(180deg, #FDFCFB 0%, #FAF9F7 100%);
    background-attachment: fixed;
    overflow-y: auto;
}

.fp-preview-overlay::before {
    content: '';
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 0;
    pointer-events: none;
}

[data-theme="dark"] .fp-preview-overlay {
    background:
        radial-gradient(ellipse 70% 60% at 0% 0%,
            rgba(20, 184, 166, 0.16) 0%,
            transparent 60%),
        radial-gradient(ellipse 70% 60% at 100% 0%,
            rgba(14, 165, 233, 0.14) 0%,
            transparent 60%),
        radial-gradient(ellipse 80% 50% at 50% 100%,
            rgba(20, 184, 166, 0.1) 0%,
            transparent 65%),
        linear-gradient(180deg, #1A1A1F 0%, #222228 100%);
}

.fp-preview-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 1;
    flex-shrink: 0;
}

[data-theme="dark"] .fp-preview-banner {
    background: rgba(30, 30, 36, 0.85);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.fp-preview-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-warm-600);
}

[data-theme="dark"] .fp-preview-label {
    color: rgba(255, 255, 255, 0.7);
}

.fp-preview-exit {
    background: none;
    border: 1.5px solid var(--color-warm-300);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-warm-600);
    cursor: pointer;
    transition: all 0.15s;
}

.fp-preview-exit:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

[data-theme="dark"] .fp-preview-exit {
    border-color: rgba(255, 255, 255, 0.18);
    color: #C4C4CB;
}
[data-theme="dark"] .fp-preview-exit:hover {
    border-color: rgba(45, 212, 191, 0.6);
    color: #5EEAD4;
    background: rgba(20, 184, 166, 0.12);
}

/* Preview card surface — matches the gf-card flip in dark mode */
[data-theme="dark"] .fp-preview-card.gf-card {
    background: rgba(44, 44, 53, 0.96);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.55),
        0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Disabled textarea inside the preview — light card with dark text in
   dark mode so it matches the giver experience (textarea on screen). */
[data-theme="dark"] .fp-preview-card .gf-tf-textarea {
    color: rgba(255, 255, 255, 0.55); /* placeholder-grey since it's disabled */
}
[data-theme="dark"] .fp-preview-card .gf-tf-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
[data-theme="dark"] .fp-preview-card .gf-question-counter {
    color: #5EEAD4;
}
[data-theme="dark"] .fp-preview-card .gf-question-label {
    color: #E8E8EC;
}
[data-theme="dark"] .fp-preview-card .gf-tf-hint {
    color: rgba(255, 255, 255, 0.5);
}

.fp-preview-body {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 24px 60px;
    position: relative;
    z-index: 1;
}

.fp-preview-card {
    width: 100%;
    max-width: 740px;
}

@media (max-width: 768px) {
    .fp-preview-overlay {
        background-attachment: scroll;
        background-position: right center;
    }

    .fp-preview-banner {
        padding: 10px 16px;
    }

    .fp-preview-body {
        padding: 0 0 48px;
    }

    .fp-preview-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
    }
}

/* ─── Mobile library full-screen overlay ────────────────────── */
.fp-mobile-lib {
    position: fixed;
    inset: 0;
    background: var(--color-warm-50);
    z-index: 300;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fp-mobile-lib-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--color-warm-50);
    border-bottom: 1px solid var(--color-warm-200);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Done sits on the LEFT (column 1); title is centered (column 2);
   the right column is a spacer (.zen-theme-toggle floats over it). */
.fp-mobile-lib-done {
    order: -1;
    grid-column: 1;
}

.fp-mobile-lib-header::after {
    content: '';
    display: block;
    grid-column: 3;
    width: 60px; /* mirrors done-button width so title stays optically centered */
}

.fp-mobile-lib-title {
    grid-column: 2;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-warm-800);
    text-align: center;
}

/* Mirrors .tpl-modal-save — teal gradient, square-rounded, soft shadow. */
.fp-mobile-lib-done {
    padding: 8px 16px;
    border-radius: 9px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-darker) 100%);
    box-shadow: 0 4px 12px -3px rgba(15, 118, 110, 0.35);
    border: none;
    outline: none;
    cursor: pointer;
    min-width: 60px;
    transition: filter 0.15s ease;
}

.fp-mobile-lib-done:hover {
    filter: brightness(1.05);
}
.fp-mobile-lib-done:focus-visible {
    outline: 2px solid rgba(45, 212, 191, 0.6);
    outline-offset: 2px;
}

.fp-mobile-lib-filters {
    padding: 8px 12px 4px;
    flex-shrink: 0;
}

.fp-mobile-lib-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px 24px;
    -webkit-overflow-scrolling: touch;
}

/* Slightly larger tap targets in mobile library */
.fp-mobile-lib-item {
    padding: 14px 12px !important;
    margin-bottom: 6px;
}

/* "Added" state in mobile — indicates tap again to remove */
.q-library-added-check--tap {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
    padding: 4px 8px;
    background: rgba(20, 184, 166, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(20, 184, 166, 0.3);
}

/* Desktop: library becomes a right-side slide-in drawer that scales with the
   viewport — wide enough to lay questions out in 2 columns, capped so it
   never dominates ultra-wide monitors. */
@media (min-width: 769px) {
    .fp-mobile-lib {
        inset: 0 0 0 auto;
        width: clamp(560px, 60vw, 880px);
        background: #fafafa;
        box-shadow: -4px 0 32px rgba(0, 0, 0, 0.15);
    }

    /* Drawer header: panel style on desktop */
    .fp-mobile-lib-header {
        padding: 18px 20px;
        border-bottom: 2px solid var(--color-warm-200);
        background: var(--color-warm-50);
    }

    .fp-mobile-lib-title {
        font-size: 13px;
        font-weight: 700;
        color: var(--color-warm-600);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Done button: smaller, link-style on desktop */
    .fp-mobile-lib-done {
        font-size: 12px;
        padding: 7px 14px;
    }

    /* Tighter list items on desktop (less tap-target needed) */
    .fp-mobile-lib-item {
        padding: 10px 12px !important;
        margin-bottom: 0;
    }

    /* Question list lays out as an auto-fitting grid: 2 columns at typical
       drawer widths, 3 on the widest monitors. Each item is still a
       row-flex button internally, so no markup changes are needed. */
    .fp-mobile-lib-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 6px;
        align-content: start;
    }

    /* Empty-state message spans the full row so it doesn't shrink into one column */
    .fp-mobile-lib-list > p {
        grid-column: 1 / -1;
    }

    /* Filters: compact on desktop */
    .fp-mobile-lib-filters {
        padding: 6px 12px 3px;
    }

    /* Slide-in/out transitions (desktop only) — drawer enters from the right */
    .fp-lib-slide         { transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1); }
    .fp-lib-slide-start   { transform: translateX(100%); }
    .fp-lib-slide-end     { transform: translateX(0); }
    .fp-lib-slide-out     { transition: transform 0.25s ease-in; }
    .fp-lib-slide-out-start { transform: translateX(0); }
    .fp-lib-slide-out-end { transform: translateX(100%); }

    /* Backdrop fade (desktop only) */
    .fp-backdrop-enter       { transition: opacity 0.3s ease; }
    .fp-backdrop-enter-start { opacity: 0; }
    .fp-backdrop-enter-end   { opacity: 1; }
    .fp-backdrop-leave       { transition: opacity 0.25s ease; }
    .fp-backdrop-leave-start { opacity: 1; }
    .fp-backdrop-leave-end   { opacity: 0; }
}

/* ─── Library drawer backdrop (desktop only) ─────────────────── */
.fp-lib-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 299;
}

@media (max-width: 768px) {
    .fp-lib-backdrop { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   GIVE FEEDBACK — full-page redesign  (give-feedback.html)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Page shell ─────────────────────────────────────────────── */
/* Soft brand-coloured mesh on a warm off-white base.
   Three low-opacity radial highlights — top-left teal, top-right sky,
   bottom-centre teal — give the page depth without competing with the
   .gf-card content. CSS-only, no image asset, looks crisp at any DPI. */
.gf-page {
    background:
        radial-gradient(ellipse 70% 60% at 0% 0%,
            rgba(45, 212, 191, 0.22) 0%,
            transparent 60%),
        radial-gradient(ellipse 70% 60% at 100% 0%,
            rgba(14, 165, 233, 0.18) 0%,
            transparent 60%),
        radial-gradient(ellipse 80% 50% at 50% 100%,
            rgba(20, 184, 166, 0.12) 0%,
            transparent 65%),
        linear-gradient(180deg, #FDFCFB 0%, #FAF9F7 100%);
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    overflow-x: hidden;
}

.gf-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* Pseudo-element kept (used to add a teal wash over the photo) but now
   transparent — the mesh background carries all the colour. */
.gf-layout::before {
    content: '';
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 0;
    pointer-events: none;
}

/* Stack above the overlay */
.gf-progress-section,
.gf-container {
    position: relative;
    z-index: 1;
}

/* ─── Footer ────────────────────────────────────────────────── */
.gf-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px;
    flex-shrink: 0;
}

.gf-footer-logo {
    height: 60px;
    width: auto;
}

.gf-footer-brand-name {
    margin-top: 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-warm-700);
    letter-spacing: -0.01em;
}

.gf-footer-copy {
    margin-top: 4px;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.4);
    text-align: center;
}

.gf-footer-legal {
    margin-top: 10px;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.4);
    text-align: center;
}

.gf-footer-legal a {
    color: inherit;
    text-decoration: none;
}

.gf-footer-legal a:hover {
    color: var(--color-warm-700);
    text-decoration: underline;
}

/* ─── Give-feedback button gradient overrides ───────────────── */
.gf-layout .continue-btn {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0ea5e9 60%, #6366f1 100%);
    box-shadow: 0 4px 14px rgba(20, 184, 166, 0.35);
}

.gf-layout .continue-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, #0284c7 60%, #4f46e5 100%);
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.45);
    transform: translateY(-2px);
}

/* ─── Progress section ───────────────────────────────────────── */
.gf-progress-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0ea5e9 60%, #6366f1 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: none;
    padding: 16px 32px 14px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* ─── Step dots ──────────────────────────────────────────────── */
.gf-step-dots {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    max-width: 480px;
    margin: 0 auto;
}

.gf-dot-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* Step dots double as navigation when the target screen is reachable */
.gf-dot-segment--link {
    cursor: pointer;
}
.gf-dot-segment--link:hover .gf-dot-label {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.gf-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.gf-dot--active {
    border-color: white;
    background: var(--color-warm-50);
    color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25);
}

.gf-dot--done {
    border-color: white;
    background: var(--color-warm-50);
    color: #4f46e5;
    opacity: 0.75;
}

.gf-dot-label {
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.gf-dot-label--active {
    color: white;
    font-weight: 600;
}

.gf-dot-line {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.35);
    margin-top: 13px; /* align with dot vertical center */
    margin-bottom: 28px;
    transition: background 0.25s ease;
    min-width: 32px;
    max-width: 80px;
}

.gf-dot-line--done {
    background: var(--color-warm-50);
    opacity: 0.75;
}

/* ─── Screen container ───────────────────────────────────────── */
.gf-container {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 24px 60px;
}

.gf-screen {
    display: none;
    width: 100%;
    max-width: 740px;
}

.gf-screen.active {
    display: block;
    animation: screenFadeIn 0.28s var(--ease-smooth) both;
}

/* ─── The card (glassmorphism) ───────────────────────────────── */
.gf-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 16px;
    padding: 48px 56px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 24px rgba(20, 184, 166, 0.12),
                0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
}

/* ─── Rating group — large tap-friendly tiles ────────────────── */
.gf-rating-wrap {
    margin-top: 12px;
}

.gf-rating-group {
    display: flex;
    gap: 6px;
    align-items: flex-start;
}

.gf-rating-opt {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.gf-rating-opt input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.gf-rating-num {
    width: 100%;
    height: 48px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    background: var(--color-warm-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 600;
    color: var(--color-gray-500);
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.gf-rating-opt:hover .gf-rating-num {
    border-color: var(--color-primary);
    background: rgba(20, 184, 166, 0.06);
    color: var(--color-primary-dark);
}

.gf-rating-opt--selected .gf-rating-num {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.3);
}

.gf-rating-label {
    display: block;
    margin-top: 6px;
    font-size: 10px;
    font-weight: 500;
    color: var(--color-warm-500);
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
    hyphens: auto;
    padding: 0 1px;
    max-width: 100%;
    transition: color 0.15s ease;
}

.gf-rating-opt:hover .gf-rating-label {
    color: var(--color-primary-dark);
}

.gf-rating-opt--selected .gf-rating-label {
    color: var(--color-primary-dark);
    font-weight: 600;
}

/* 6-point scale: prevent long labels like "Occasionally" from widowing */
.gf-rating-group--6pt .gf-rating-label {
    word-break: break-all;
    hyphens: auto;
}

@media (max-width: 480px) {
    .gf-rating-group--6pt .gf-rating-label {
        font-size: 8px;
    }
}

/* ─── BARS vertical layout ───────────────────────────────────── */
.gf-bars-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.gf-bars-opt {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    background: var(--color-warm-100);
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 52px;
}

.gf-bars-opt input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.gf-bars-num {
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e2e8f0;
    color: var(--color-gray-500);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.gf-bars-label {
    font-size: 14px;
    color: var(--color-gray-700);
    line-height: 1.4;
    transition: color 0.15s ease;
}

.gf-bars-opt:hover {
    border-color: var(--color-primary);
    background: rgba(20, 184, 166, 0.04);
}

.gf-bars-opt:hover .gf-bars-num {
    background: rgba(20, 184, 166, 0.15);
    color: var(--color-primary-dark);
}

.gf-bars-opt:hover .gf-bars-label {
    color: var(--color-primary-dark);
}

.gf-bars-opt--selected {
    border-color: var(--color-primary);
    background: rgba(20, 184, 166, 0.06);
}

.gf-bars-opt--selected .gf-bars-num {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 2px 6px rgba(20, 184, 166, 0.35);
}

.gf-bars-opt--selected .gf-bars-label {
    color: var(--color-primary-dark);
    font-weight: 500;
}

/* Dim BARS options when N/A selected */
.gf-bars-group--na .gf-bars-num,
.gf-bars-group--na .gf-bars-label {
    opacity: 0.35;
}

/* Dim the scale when N/A is selected */
.gf-rating-group--na .gf-rating-num {
    opacity: 0.35;
}
.gf-rating-group--na .gf-rating-label {
    opacity: 0.35;
}

/* N/A option row */
.gf-rating-na {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 12px;
    cursor: pointer;
    width: fit-content;
}

.gf-rating-na input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.gf-rating-na-box {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1.5px solid var(--color-warm-300);
    background: var(--color-warm-50);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.gf-rating-na:hover .gf-rating-na-box {
    border-color: var(--color-warm-500);
}

.gf-rating-na-box--checked {
    background: var(--color-warm-600);
    border-color: var(--color-warm-600);
}

.gf-rating-na-check {
    font-size: 11px;
    color: white;
    line-height: 1;
    font-weight: 700;
}

.gf-rating-na-text {
    font-size: 12px;
    color: var(--color-warm-500);
    font-weight: 500;
    user-select: none;
}

.gf-rating-na:hover .gf-rating-na-text {
    color: var(--color-warm-700);
}

/* Preview mode — non-interactive */
.gf-rating-na--preview {
    cursor: default;
    opacity: 0.6;
}
.gf-rating-na--preview:hover .gf-rating-na-text {
    color: var(--color-warm-500);
}

/* ─── Request detail: rating + multiple choice display ──────── */
.rd-rating-num {
    font-size: 2em;
    font-weight: 700;
    color: var(--color-primary-darker);
    line-height: 1;
    margin-right: 8px;
    vertical-align: middle;
}

.rd-rating-of {
    font-size: 0.9em;
    color: var(--color-gray-500);
    vertical-align: middle;
}

.rd-rating-anchor-label {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.8em;
    font-weight: 600;
    color: var(--color-primary-dark);
    background: var(--color-primary-50);
    border: 1px solid rgba(20, 184, 166, 0.2);
    border-radius: 99px;
    padding: 1px 9px;
    vertical-align: middle;
}

.rd-rating-na {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--color-warm-500);
    margin-right: 6px;
    vertical-align: middle;
}

.rd-mc-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.rd-mc-opt {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid var(--color-gray-300);
    color: var(--color-gray-500);
    background: var(--color-gray-50);
}

.rd-mc-opt--chosen {
    border-color: var(--color-primary-darker);
    background: #CCFBF1;
    color: var(--color-primary-darker);
    font-weight: 600;
}

/* ─── Pledge checkbox (still used inside .gf-intro-pledge) ────── */
.gf-pledge-checkbox {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* ─── Modal shell (used by Anatomy modal) ────────────────────── */
.gf-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.gf-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: rgba(0, 0, 0, 0.45);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 14px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.gf-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* ─── Anatomy modal ──────────────────────────────────────────── */
.gf-anatomy-modal {
    position: relative;
    background: var(--color-warm-50);
    border-radius: 16px;
    width: 100%;
    max-width: 760px;
    /* dvh (with vh fallback) so the mobile URL bar can't clip the footer
       button — 48px matches the overlay's 24px vertical padding. */
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.gf-anatomy-scroll {
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    padding: 36px 40px 32px;
}

.gf-anatomy-header {
    margin-bottom: 24px;
}

.gf-anatomy-title {
    font-family: 'Lora', Georgia, serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--color-gray-900);
    margin: 0 0 10px;
    line-height: 1.25;
    letter-spacing: -0.4px;
}

.gf-anatomy-sub {
    font-size: 15px;
    color: var(--color-gray-600);
    line-height: 1.6;
    margin: 0;
    max-width: 56ch;
}

/* Legend — colored chips that match the diagram rows */
.gf-anatomy-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    padding: 14px;
    background: #FAFAFA;
    border-radius: 10px;
}

.gf-anatomy-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px 4px 4px;
    border-radius: 99px;
    line-height: 1.4;
    color: var(--color-gray-800);
}

.gf-anatomy-chip-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-warm-50);
    font-size: 11px;
    font-weight: 700;
}

/* Color tokens — one per ingredient */
.gf-anatomy-chip--moment   { background: var(--color-info-100); }
.gf-anatomy-chip--moment   .gf-anatomy-chip-num { color: var(--color-info-700); }
.gf-anatomy-chip--behavior { background: #EDE9FE; }
.gf-anatomy-chip--behavior .gf-anatomy-chip-num { color: #6D28D9; }
.gf-anatomy-chip--impact   { background: var(--color-warning-100); }
.gf-anatomy-chip--impact   .gf-anatomy-chip-num { color: var(--color-warning-700); }
.gf-anatomy-chip--forward  { background: var(--color-success-100); }
.gf-anatomy-chip--forward  .gf-anatomy-chip-num { color: var(--color-success-700); }

/* Examples */
.gf-anatomy-example {
    margin-bottom: 28px;
}

.gf-anatomy-example-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--color-gray-500);
    margin-bottom: 10px;
}

.gf-anatomy-diagram {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-gray-200);
}

.gf-anatomy-row {
    display: flex;
    align-items: stretch;
    gap: 14px;
    padding: 14px 18px;
    border-left: 5px solid transparent;
    border-bottom: 1px solid var(--color-gray-100);
    background: var(--color-warm-50);
}

.gf-anatomy-row:last-child {
    border-bottom: none;
}

.gf-anatomy-row-text {
    flex: 1;
    font-family: 'Lora', Georgia, serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-gray-800);
}

.gf-anatomy-row-tag {
    flex-shrink: 0;
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--color-gray-500);
    background: var(--color-gray-50);
    padding: 4px 10px 4px 4px;
    border-radius: 99px;
    white-space: nowrap;
}

.gf-anatomy-tag-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-warm-50);
    font-size: 10px;
    font-weight: 700;
}

/* Ingredient color accents — left border + tag color */
.gf-anatomy-row--moment   { border-left-color: #3B82F6; }
.gf-anatomy-row--moment   .gf-anatomy-row-tag { background: var(--color-info-100); color: var(--color-info-700); }
.gf-anatomy-row--moment   .gf-anatomy-tag-num { color: var(--color-info-700); }

.gf-anatomy-row--behavior { border-left-color: #8B5CF6; }
.gf-anatomy-row--behavior .gf-anatomy-row-tag { background: #EDE9FE; color: #6D28D9; }
.gf-anatomy-row--behavior .gf-anatomy-tag-num { color: #6D28D9; }

.gf-anatomy-row--impact   { border-left-color: var(--color-warning); }
.gf-anatomy-row--impact   .gf-anatomy-row-tag { background: var(--color-warning-100); color: var(--color-warning-700); }
.gf-anatomy-row--impact   .gf-anatomy-tag-num { color: var(--color-warning-700); }

.gf-anatomy-row--forward  { border-left-color: var(--color-success); }
.gf-anatomy-row--forward  .gf-anatomy-row-tag { background: var(--color-success-100); color: var(--color-success-700); }
.gf-anatomy-row--forward  .gf-anatomy-tag-num { color: var(--color-success-700); }

.gf-anatomy-takeaway {
    margin: 14px 4px 0;
    font-size: 14px;
    color: var(--color-gray-600);
    line-height: 1.65;
}

.gf-anatomy-takeaway strong {
    color: var(--color-gray-800);
}

/* Before / after compare */
.gf-anatomy-compare {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    gap: 14px;
    margin: 28px 0;
}

.gf-anatomy-compare-card {
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid;
}

.gf-anatomy-compare-card p {
    margin: 0 0 8px;
    font-family: 'Lora', Georgia, serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-gray-800);
}

.gf-anatomy-compare-card p:last-child {
    margin-bottom: 0;
}

.gf-anatomy-compare-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.gf-anatomy-compare-card--bad {
    background: var(--color-error-50);
    border-color: var(--color-error-200);
}

.gf-anatomy-compare-card--bad .gf-anatomy-compare-label {
    color: var(--color-error-700);
}

.gf-anatomy-compare-card--good {
    background: var(--color-primary-50);
    border-color: #99F6E4;
}

.gf-anatomy-compare-card--good .gf-anatomy-compare-label {
    color: var(--color-primary-darker);
}

.gf-anatomy-compare-note {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
    font-size: 12px !important;
    color: var(--color-gray-500) !important;
    line-height: 1.55 !important;
    font-style: normal !important;
}

.gf-anatomy-compare-arrow {
    align-self: center;
    font-size: 22px;
    color: var(--color-gray-400);
    user-select: none;
}

/* Pitfalls */
.gf-anatomy-pitfalls {
    background: #FAFAFA;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 8px 0 24px;
}

.gf-anatomy-pitfalls-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-gray-900);
    margin: 0 0 12px;
}

.gf-anatomy-pitfalls-list {
    margin: 0;
    padding-left: 20px;
    list-style: disc;
    color: var(--color-gray-600);
    font-size: 14px;
    line-height: 1.7;
}

.gf-anatomy-pitfalls-list li + li {
    margin-top: 8px;
}

.gf-anatomy-pitfalls-list strong {
    color: var(--color-gray-800);
    font-weight: 600;
}

.gf-anatomy-footer {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.gf-anatomy-done {
    min-width: 220px;
}

/* Mobile: stack the row tag below the text, collapse compare to a column */
@media (max-width: 640px) {
    .gf-anatomy-scroll {
        padding: 28px 22px 24px;
    }
    .gf-anatomy-title {
        font-size: 24px;
    }
    .gf-anatomy-legend {
        justify-content: center;
    }
    .gf-anatomy-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 14px 16px;
    }
    .gf-anatomy-row-tag {
        align-self: flex-start;
    }
    .gf-anatomy-compare {
        grid-template-columns: 1fr;
    }
    .gf-anatomy-compare-arrow {
        transform: rotate(90deg);
        margin: 4px 0;
    }
}

/* ─── Button group spacing in gf cards ──────────────────────── */
.gf-card .button-group,
.gf-card .review-actions {
    margin-top: 32px;
    justify-content: space-between;
}

/* ─── Per-question progress (Screen 2) ──────────────────────── */
.gf-time-estimate {
    font-size: 13px;
    color: var(--color-warm-400);
    text-align: center;
    margin: 0 0 16px;
}

.gf-time-estimate--prominent {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-warning-800);
    background: var(--color-warning-50);
    border: 1px solid var(--color-warning-200);
    border-radius: 99px;
    display: inline-block;
    padding: 6px 16px;
    margin: 10px auto 20px;
}

/* ─── Intro screen (redesign): flat typography over stacked containers ─── */
.gf-intro {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.gf-intro-greeting {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text-dark);
    margin: 0;
    line-height: 1.3;
}

.gf-intro-lead {
    font-family: 'Lora', Georgia, serif;
    font-size: 22px;
    font-weight: 500;
    color: var(--color-primary-dark, var(--color-primary-darker));
    margin: -8px 0 0;
    line-height: 1.4;
    letter-spacing: -0.2px;
}

.gf-intro-context {
    margin: 4px 0;
    padding: 0 0 0 16px;
    border-left: 3px solid var(--color-gray-200);
    font-family: 'Lora', Georgia, serif;
    font-size: 16px;
    font-style: italic;
    color: var(--color-gray-600);
    line-height: 1.65;
}

/* Check-in variant: the commitment card above already owns the rail + serif
   voice, so the instructions calm down to a plain sans paragraph — one less
   font, one less line, one less italic block on the screen (Max round-3). */
.gf-intro-context--quiet {
    border-left: none;
    padding: 0;
    font-family: inherit;
    font-style: normal;
    font-size: 14px;
    max-width: 56ch;
}
@media (min-width: 640px) {
    .gf-intro-context--quiet {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
}

/* Development check-in: commitment context card surfaced on the public
   give-feedback page. Soft teal rail mirrors the in-app commitment cards
   on Growth so the giver visually recognizes "this is about their
   commitment", not generic feedback. */
.gf-commitment-card {
    margin: 8px 0 4px;
    padding: 16px 18px 14px;
    border-left: 3px solid #14b8a6;
    background: rgba(20, 184, 166, 0.05);
    border-radius: 6px;
}
.gf-commitment-eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0f766e;
    font-weight: 600;
}
.gf-commitment-title {
    margin: 0;
    font-family: 'Lora', Georgia, serif;
    font-size: 19px;
    font-weight: 600;
    color: var(--color-gray-900, #0f172a);
    line-height: 1.35;
}
.gf-commitment-intention {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--color-gray-700, #334155);
    line-height: 1.55;
}
.gf-commitment-intention-label {
    color: var(--color-gray-500, #64748b);
    margin-right: 4px;
}
.gf-commitment-intention-quote {
    font-style: italic;
}
.gf-commitment-skills {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    align-items: center;
}
.gf-commitment-skills-label {
    font-size: 12px;
    color: var(--color-gray-500, #64748b);
    margin-right: 2px;
}
.gf-commitment-skill-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.12);
    color: #0f766e;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.gf-intro-context p {
    margin: 0;
    white-space: pre-wrap; /* preserve the line breaks the requester typed */
}

/* Linkified URLs inside the requester's context / instructions */
.gf-context-link {
    color: var(--color-primary-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-all;
}
.gf-context-link:hover {
    color: var(--color-primary);
}
[data-theme="dark"] .gf-context-link {
    color: #5EEAD4;
}

.gf-intro-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
}

/* Question-count + time facts as quiet rounded chips — cleaner than the old
   dot-separated gray run-on, and they read as scannable badges. */
.gf-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--color-primary-50);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--color-primary-darker);
    line-height: 1.4;
    white-space: nowrap;
}
.gf-meta-chip-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    opacity: 0.85;
}

/* "You are one of N people asked" — its own quiet line under the chips. */
.gf-intro-cohort {
    margin: 0;
    font-size: 13px;
    color: var(--color-gray-500);
    line-height: 1.55;
}

.gf-intro-meta-dot {
    color: var(--color-gray-300);
}
.gf-intro-meta-icon {
    width: 13px;
    height: 13px;
    vertical-align: -2px;
    margin-right: 2px;
}
.gf-intro-anon-status {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--color-gray-500);
    margin: 8px 0 0;
    line-height: 1.55;
    max-width: 60ch;
}
.gf-intro-anon-status-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 4px;
}

/* Identifiable-by-group exception — a single, stronger callout that merges the
   cohort line with the "not anonymous" heads-up so a giver can't skim past it. */
.gf-intro-callout {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 60ch;
    margin: 10px 0 2px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--color-warning-50);
    border: 1px solid var(--color-warning-200);
}
.gf-intro-callout-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--color-warning-800);
}
.gf-intro-callout-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.gf-intro-callout-lead {
    margin: 0;
    font-size: 13px;
    color: var(--color-warning-800);
}
.gf-intro-callout-main {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-gray-800);
}
[data-theme="dark"] .gf-intro-callout {
    background: rgba(234, 179, 8, 0.14);
    border-color: rgba(234, 179, 8, 0.34);
}
[data-theme="dark"] .gf-intro-callout-icon,
[data-theme="dark"] .gf-intro-callout-lead {
    color: #FCD34D;
}
[data-theme="dark"] .gf-intro-callout-main {
    color: rgba(255, 255, 255, 0.82);
}

.gf-intro-anon {
    font-size: 13px;
    color: var(--color-gray-500);
    margin: -4px 0 0;
    line-height: 1.55;
}

.gf-intro-tip {
    margin-top: 4px;
}

.gf-intro-tip-body {
    font-size: 14.5px;
    color: var(--color-gray-700);
    line-height: 1.7;
    margin: 0 0 12px;
}

.gf-intro-tip-quote {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    color: var(--color-gray-800);
}

.gf-intro-anatomy-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 6px 0;
    color: var(--color-primary-dark, var(--color-primary-darker));
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: rgba(15, 118, 110, 0.3);
    transition: text-decoration-color 0.15s ease;
}

.gf-intro-anatomy-link:hover {
    text-decoration-color: var(--color-primary-dark, var(--color-primary-darker));
}

.gf-intro-anatomy-arrow {
    transition: transform 0.15s ease;
}

.gf-intro-anatomy-link:hover .gf-intro-anatomy-arrow {
    transform: translateX(3px);
}

.gf-intro-pledge {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--color-gray-50);
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text-dark);
    line-height: 1.5;
    margin-top: 4px;
}

.gf-intro-cta {
    margin-top: 8px;
    align-self: center;
    min-width: 220px;
}

/* Desktop: center the welcome content. On mobile it stays left-aligned for
   easier reading at narrow widths. */
@media (min-width: 640px) {
    .gf-intro-lead,
    .gf-intro-cohort {
        text-align: center;
    }
    .gf-intro-meta {
        justify-content: center;
    }
    .gf-intro-anon-status {
        justify-content: center;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    .gf-intro-callout {
        align-self: center;
    }
    .gf-intro-anatomy-link {
        align-self: center;
    }
}

[data-theme="dark"] .gf-meta-chip {
    background: var(--color-primary-50);
    border-color: var(--color-gray-300);
    color: var(--color-primary-light);
}

.gf-question-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.gf-question-counter {
    font-size: 17px;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
/* Larger on desktop where there's room — mobile keeps the compact size. */
@media (min-width: 769px) {
    .gf-question-counter {
        font-size: 22px;
    }
}

.gf-time-remaining {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-warm-600);
    margin-top: -4px;
}

.gf-question-progress-track {
    height: 4px;
    background: rgba(20, 184, 166, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.gf-question-progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 2px;
    transition: width 0.35s ease;
}

.gf-single-question {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gf-question-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-dark);
    line-height: 1.4;
}

/* ─── Skip "no useful answer" affordance (3.5) ───────────────── */
.gf-skip-row {
    display: flex;
    justify-content: center;
    margin: 18px 0 4px;
}

.gf-skip-link {
    background: none;
    border: none;
    color: var(--color-gray-500);
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    padding: 6px 8px;
    font-family: inherit;
    transition: color 0.15s ease;
}

.gf-skip-link:hover {
    color: var(--color-primary-dark, var(--color-primary-darker));
}

.gf-skipped-notice {
    background: var(--color-gray-50);
    border: 1px dashed var(--color-gray-300);
    border-radius: 10px;
    padding: 18px 20px;
    margin: 8px 0 4px;
    text-align: center;
}

.gf-skipped-notice-title {
    font-size: 15px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.gf-skipped-notice-body {
    font-size: 13px;
    color: var(--color-gray-500);
    line-height: 1.55;
    margin: 0 0 12px;
}

.gf-skip-undo-btn {
    background: var(--color-warm-50);
    border: 1px solid var(--color-primary, var(--color-primary));
    color: var(--color-primary-dark, var(--color-primary-darker));
    font-size: 13px;
    font-weight: 600;
    border-radius: 99px;
    padding: 6px 16px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease;
}

.gf-skip-undo-btn:hover {
    background: var(--color-primary-50);
}

/* ─── Review-screen nudge for too-short answers (3.10) ─────── */
.review-nudge {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
    background: var(--color-warning-100);
    border: 1px solid var(--color-warning-600);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--color-warning-800);
    line-height: 1.5;
}

.review-nudge-text {
    flex: 1;
    min-width: 200px;
}

.review-nudge-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.review-nudge-action {
    background: var(--color-warm-50);
    border: 1px solid var(--color-warning);
    color: var(--color-warning-800);
    border-radius: 99px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease;
}

.review-nudge-action:hover {
    background: var(--color-warning-100);
}

.review-nudge-action--secondary {
    border-color: var(--color-gray-300);
    color: var(--color-gray-500);
}

.review-nudge-action--secondary:hover {
    background: var(--color-gray-100);
}

.review-nudge-dismiss {
    background: none;
    border: none;
    color: var(--color-warning-800);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.6;
    transition: opacity 0.15s ease;
    font-family: inherit;
}

.review-nudge-dismiss:hover {
    opacity: 1;
}

/* Dark mode already read well (Max pilot feedback) — keep the pre-contrast-bump
   values there; the stronger amber above is a light-mode-only fix. */
[data-theme="dark"] .review-nudge {
    background: var(--color-warning-50);
    border-color: var(--color-warning-200);
}

/* ─── Manual save / continue-later (3.8) ────────────────────── */
.gf-resume-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: 10px;
    padding: 12px 14px;
    margin: 16px 0 4px;
    font-size: 14px;
    color: var(--color-success-800);
    line-height: 1.55;
}

.gf-resume-notice-icon {
    font-size: 16px;
    line-height: 1.4;
    flex-shrink: 0;
}

.gf-save-later-row {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--color-gray-200);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.gf-save-later-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--color-warm-50);
    border: 1px solid var(--color-gray-300);
    color: var(--color-gray-700);
    border-radius: 99px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.gf-save-later-btn:hover:not(:disabled) {
    border-color: var(--color-primary, var(--color-primary));
    color: var(--color-primary-dark, var(--color-primary-darker));
    background: var(--color-primary-50);
}

.gf-save-later-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.gf-save-later-icon {
    flex-shrink: 0;
}

[data-theme="dark"] .gf-save-later-row {
    border-top-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .gf-save-later-btn {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.16);
    color: #C4C4CB;
}
[data-theme="dark"] .gf-save-later-btn:hover:not(:disabled) {
    background: rgba(20, 184, 166, 0.16);
    border-color: rgba(45, 212, 191, 0.5);
    color: #5EEAD4;
}

/* ─── Instructions toggle (replaces always-visible context box) ─── */
.gf-instructions-toggle-wrap {
    margin-bottom: 20px;
}

/* Top action row: instructions toggle (left) + Save / finish later (right). */
.gf-top-actions {
    margin-bottom: 20px;
}
.gf-top-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
/* No margin-left:auto here — space-between keeps them at opposite ends when
   they fit on one line, and flex-wrap drops Save to its own (left-aligned)
   line when they don't, rather than floating it right. */

/* On narrow phones (e.g. Galaxy S8 ~360px) the two pills wrapped. Shrink them
   ~20% so they fit on one row. */
@media (max-width: 768px) {
    .gf-top-actions-bar .gf-instructions-toggle,
    .gf-top-actions-bar .gf-save-later-btn {
        font-size: 10.5px;
        padding: 6px 13px;
        gap: 5px;
    }
    .gf-top-actions-bar .gf-instructions-toggle {
        padding-left: 10px;
    }
    .gf-top-actions-bar .gf-instructions-toggle-icon,
    .gf-top-actions-bar .gf-save-later-icon {
        width: 11px;
        height: 11px;
    }
    .gf-top-actions-bar .gf-instructions-toggle-chev {
        width: 9px;
        height: 9px;
    }
}

.gf-instructions-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px 6px 11px;
    background: var(--color-warm-50);
    border: 1px solid var(--color-warm-300);
    border-radius: 999px;
    color: var(--color-warm-700);
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
}
.gf-instructions-toggle:hover {
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
    background: var(--color-primary-50);
}
.gf-instructions-toggle-icon { flex-shrink: 0; }
.gf-instructions-toggle-chev {
    flex-shrink: 0;
    transition: transform 0.2s ease;
    opacity: 0.7;
}
.gf-instructions-toggle-chev--up { transform: rotate(180deg); }
.gf-instructions-panel {
    margin-top: 10px;
    padding: 12px 16px;
    background: var(--color-primary-50);
    border: 1px solid rgba(20, 184, 166, 0.2);
    border-radius: 10px;
    font-family: 'Lora', Georgia, serif;
    font-size: 14.5px;
    font-style: italic;
    color: var(--color-primary); /* match the teal of the "QUESTION 1 OF 4" counter */
    line-height: 1.6;
}
.gf-instructions-panel p { margin: 0; white-space: pre-wrap; }

[data-theme="dark"] .gf-instructions-toggle {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.16);
    color: #C4C4CB;
}
[data-theme="dark"] .gf-instructions-toggle:hover {
    background: rgba(20, 184, 166, 0.16);
    border-color: rgba(45, 212, 191, 0.5);
    color: #5EEAD4;
}
[data-theme="dark"] .gf-instructions-panel {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: #5EEAD4; /* match the dark-mode counter teal */
}

/* ─── Mobile responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    /* background-attachment: fixed breaks on iOS Safari — use scroll */
    .gf-page {
        background-attachment: scroll;
        background-position: right center;
    }

    .gf-progress-section {
        padding: 12px 16px 10px;
    }

    .gf-container {
        padding: 0 0 48px;
    }

    /* Edge-to-edge card on mobile — glass effect preserved */
    .gf-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        padding: 28px 20px 36px;
        box-shadow: 0 4px 16px rgba(20, 184, 166, 0.08);
    }

    .gf-dot {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }

    .gf-dot-label {
        font-size: 9px;
    }

    .gf-dot-line {
        min-width: 16px;
        margin-top: 10px;
    }

    .gf-rating-num {
        height: 44px;
        font-size: 16px;
    }

    .gf-rating-label {
        font-size: 9px;
        margin-top: 4px;
    }

    .gf-card .continue-btn,
    .gf-card .secondary-btn {
        padding: 10px 24px;
        font-size: 13px;
    }

    .gf-card .feedback-textarea {
        overflow: hidden;
        resize: none;
    }
}

/* ─── Request title on welcome screen ───────────────────────── */
.gf-request-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary-dark);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    opacity: 0.8;
    margin-top: 6px;
    margin-bottom: 2px;
}

/* ─── Textarea wrapper + character count ────────────────────── */
.gf-textarea-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ─── Typeform-style open-ended textarea ───────────────────────
   Serif italic so the user's voice reads as personal/reflective and
   contrasts with the sans-serif question label above. */
.gf-tf-textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--color-warm-300);
    border-radius: 0;
    outline: none;
    resize: none;
    overflow: hidden;

    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 21px;
    font-weight: 400;
    line-height: 1.65;
    color: var(--color-warm-800);

    padding: 10px 0 14px;
    min-height: 80px;

    transition: border-color 150ms ease;
}

.gf-tf-textarea:focus {
    border-color: var(--color-primary);
    outline: none;
}

.gf-tf-textarea::placeholder {
    color: var(--color-warm-700);
    opacity: 0.35;
    font-style: italic;
}

/* View mode: rendered preview of the user's typed answer.
   Same Lora-italic typography as the textarea — same voice — but inside
   a soft "card" so it reads as a finished reflection. Click to re-edit. */
.gf-tf-display {
    display: block;
    width: 100%;
    text-align: left;
    background: rgba(20, 184, 166, 0.05);
    border: 1px solid rgba(20, 184, 166, 0.18);
    border-left: 3px solid var(--color-primary-light);
    border-radius: 10px;
    padding: 16px 20px;
    cursor: text;

    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.65;
    color: var(--color-warm-800);

    white-space: pre-wrap;
    word-break: break-word;
    transition: background 180ms var(--ease-smooth),
                border-color 180ms var(--ease-smooth),
                box-shadow 180ms var(--ease-smooth);
}
.gf-tf-display:hover {
    background: rgba(20, 184, 166, 0.09);
    border-color: rgba(20, 184, 166, 0.35);
    box-shadow: 0 2px 10px rgba(20, 184, 166, 0.12);
}
.gf-tf-display:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

[data-theme="dark"] .gf-tf-display {
    background: rgba(20, 184, 166, 0.12);
    border-color: rgba(45, 212, 191, 0.32);
    border-left-color: var(--color-primary-light);
    color: #E8E8EC;
}
[data-theme="dark"] .gf-tf-display:hover {
    background: rgba(20, 184, 166, 0.18);
    border-color: rgba(45, 212, 191, 0.5);
}

/* Keyboard hint — fades in on focus */
.gf-tf-hint {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--color-warm-500);
    margin-top: 10px;
    opacity: 0;
    transition: opacity 200ms ease;
    pointer-events: none;
    user-select: none;
}

.gf-textarea-wrap:focus-within .gf-tf-hint {
    opacity: 1;
}


@media (max-width: 768px) {
    .gf-tf-textarea,
    .gf-tf-display {
        font-size: 17px;
    }
    .gf-tf-display {
        padding: 14px 16px;
    }
}

.gf-char-count {
    font-size: 12px;
    color: var(--color-primary-dark);
    opacity: 0.65;
    text-align: right;
}

/* ─── SBI bundle (give-feedback + preview) ───────────────────── */
.gf-sbi-bundle {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.gf-sbi-skill-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #FFF3E0;
    border: 1px solid #FFB74D;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    color: #7f4800;
}
.gf-sbi-part {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gf-sbi-part-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.gf-sbi-part-header .gf-question-label {
    margin: 0;
    flex: 1;
}
.gf-sbi-part-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    color: #7f4800;
    flex-shrink: 0;
    margin-top: 1px;
}
.gf-sbi-s { background: #FFD699; }
.gf-sbi-b { background: #FFD699; }
.gf-sbi-i { background: #FFD699; }
.gf-sbi-part-word {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-gray-500);
    align-self: center;
    white-space: nowrap;
    flex-shrink: 0;
}
.gf-sbi-behavior-hint {
    background: #F1F8E9;
    border-left: 3px solid #8BC34A;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 13px;
    color: #33691E;
}

/* SBI intro for givers (collapsible) */
.gf-sbi-intro {
    border: 1px solid #FFD699;
    border-radius: 8px;
    overflow: hidden;
}
.gf-sbi-intro-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #FFF8F0;
    cursor: pointer;
    user-select: none;
}
.gf-sbi-intro-badge {
    background: #E65100;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.gf-sbi-intro-label {
    font-size: 13px;
    font-weight: 600;
    color: #5f4020;
    flex: 1;
}
.gf-sbi-intro-chevron {
    font-size: 10px;
    color: var(--color-warm-500);
    transition: transform 0.2s;
}
.gf-sbi-intro-header--open .gf-sbi-intro-chevron {
    transform: rotate(180deg);
}
.gf-sbi-intro-body {
    padding: 12px 14px;
    background: var(--color-warm-50);
    border-top: 1px solid #FFD699;
    font-size: 13px;
    color: var(--color-warm-800);
    line-height: 1.6;
}
.gf-sbi-intro-body p { margin: 0 0 8px; }
.gf-sbi-intro-body ul { margin: 0 0 8px; padding-left: 18px; }
.gf-sbi-intro-body li { margin-bottom: 4px; }

/* ─── Already-submitted screen icon ─────────────────────────── */
.gf-already-submitted-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 16px rgba(20, 184, 166, 0.3);
}

.page-title {
    font-weight: 500;
}

.person-icons-grid {
    flex-shrink: 1;
    min-width: 0;
    max-width: 180px;
}

@media (max-width: 768px) {
    .person-icons-grid svg {
        width: 13px !important;
        height: 13px !important;
    }
}


/* ═══════════════════════════════════════════════════════
   ACTION PLANNER  (.ap- prefix)
   ═══════════════════════════════════════════════════════ */

.ap-page-subtitle {
    margin-top: var(--space-1);
    font-size: var(--text-sm);
    color: var(--color-warm-600);
}

/* ── Intro banner ──────────────────────────────────────── */
.ap-intro-banner {
    max-width: 860px; /* match .ap-content so the right edge lines up with the commitment cards */
    margin: var(--space-6) 0 var(--space-8);
    background: rgba(20, 184, 166, 0.05);
    border: 1px solid rgba(20, 184, 166, 0.22);
    border-radius: var(--radius-xl);
    padding: var(--space-5) var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    position: relative;
}

.ap-intro-banner-close {
    position: absolute;
    top: var(--space-3);
    right: var(--space-4);
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: var(--color-warm-400);
    font-size: 18px;
    cursor: pointer;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast), background var(--transition-fast);
    line-height: 1;
}

.ap-intro-banner-close:hover {
    color: var(--color-warm-700);
    background: rgba(0,0,0,0.05);
}

.ap-intro-banner-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding-right: var(--space-6);
}

.ap-intro-banner-eyebrow {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-warm-800);
    margin: 0;
}

.ap-intro-banner-text {
    font-size: var(--text-sm);
    color: var(--color-warm-700);
    line-height: var(--leading-relaxed);
    margin: 0;
}

/* "Why it works" expander — collapsed by default */
.ap-intro-banner-more {
    align-self: flex-start;
    background: none;
    border: none;
    padding: 0;
    margin-top: 2px;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-primary-dark);
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: color var(--transition-fast);
}
.ap-intro-banner-more:hover {
    color: var(--color-primary);
}
.ap-intro-banner-detail {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-top: var(--space-1);
}

.ap-intro-banner-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    padding-top: var(--space-1);
}

.ap-intro-banner-link {
    font-size: var(--text-xs);
    color: var(--color-primary-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(20, 184, 166, 0.4);
    transition: text-decoration-color var(--transition-fast);
}

.ap-intro-banner-link:hover {
    text-decoration-color: var(--color-primary);
}

.ap-intro-banner-dismiss {
    align-self: flex-start;
    background: none;
    border: none;
    padding: 0;
    font-size: var(--text-xs);
    color: var(--color-warm-400);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--transition-fast);
}

.ap-intro-banner-footer {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.ap-intro-banner-skip {
    background: var(--color-warm-50);
    border: 1px solid var(--color-warm-300);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-warm-500);
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: all var(--transition-fast);
}

.ap-intro-banner-skip:hover {
    border-color: var(--color-warm-400);
    color: var(--color-warm-700);
}

.ap-intro-banner-dismiss:hover {
    color: var(--color-warm-600);
}

/* ── Typing cursor ─────────────────────────────────────── */
.ap-typing-cursor {
    display: inline-block;
    width: 2px;
    height: 0.8em;
    background: rgba(80, 60, 40, 0.28);
    border-radius: 2px;
    margin-left: 2px;
    vertical-align: middle;
    box-shadow: 0 0 6px rgba(80, 60, 40, 0.12);
    animation: ap-cursor-blink 0.6s ease-in-out infinite;
}

@keyframes ap-cursor-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.1; }
}

/* ── Always-visible "Insights" handle on the right edge ──
   Click to open the inspector panel. Hidden when the panel is open. */
.ap-insights-handle {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 250;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px 10px 12px;
    background: var(--surface-raised);
    border: 1px solid var(--border-default);
    border-right: none;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    color: var(--color-primary-dark);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
}
.ap-insights-handle:hover {
    background: var(--color-primary-50);
    transform: translateY(-50%) translateX(-2px);
    box-shadow: var(--shadow-lg);
}
[data-theme="dark"] .ap-insights-handle { color: var(--color-primary-light); }

.ap-insights-handle-label { white-space: nowrap; }

@media (max-width: 768px) {
    /* Mobile: take the button OUT of fixed positioning and let it sit
       inline as its own row right after the page hero. Centered — the mobile
       hero is centered, so a right-hung pill read as orphaned. Static-in-flow
       still guarantees it can't overlap any text. */
    .ap-insights-handle {
        position: static;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        transform: none;
        display: flex;
        margin: 0 auto 16px;       /* centered under the centered hero */
        padding: 8px 14px;
        font-size: 12px;
        border-radius: var(--radius-full);
        border: 1px solid var(--border-default);
        gap: 6px;
    }
    .ap-insights-handle:hover {
        transform: translateY(-1px);
    }
}

/* ── Slide-in drawer (right side) — Insights inspector panel ── */
/* z-index 1100 keeps the drawer above .mobile-header (1001). The floating
   .zen-theme-toggle is z 9999 and would sit on top of the drawer's close X,
   so openGemsDrawer() adds body.ap-drawer-open to hide it while open. */
body.ap-drawer-open .zen-theme-toggle { display: none; }

.ap-gems-drawer-overlay {
    position: fixed;
    inset: 0;
    background: var(--surface-overlay);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 1100;
    display: flex;
    justify-content: flex-end;
}

.ap-gems-drawer {
    width: min(420px, 100vw);
    height: 100%;
    background: var(--surface-raised);
    border-left: 1px solid var(--border-default);
    box-shadow: var(--shadow-2xl);
    display: flex;
    flex-direction: column;
    transform: translateX(0);
    transition: transform 220ms var(--ease-smooth);
}

/* Alpine.js x-transition classes for slide-in/out animation */
.ap-gems-drawer-enter { transition: transform 220ms var(--ease-smooth); }
.ap-gems-drawer-enter-start { transform: translateX(100%); }
.ap-gems-drawer-enter-end { transform: translateX(0); }
.ap-gems-drawer-leave { transition: transform 180ms var(--ease-smooth); }
.ap-gems-drawer-leave-start { transform: translateX(0); }
.ap-gems-drawer-leave-end { transform: translateX(100%); }

.ap-gems-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 22px 24px 4px;
    gap: 12px;
}

.ap-gems-drawer-eyebrow {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--color-primary-dark);
    margin: 0 0 4px 0;
}
[data-theme="dark"] .ap-gems-drawer-eyebrow { color: var(--color-primary-light); }

.ap-gems-drawer-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.ap-gems-drawer-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.ap-gems-drawer-close:hover {
    background: var(--hover-overlay);
    color: var(--text-primary);
}

.ap-gems-drawer-sub {
    padding: 12px 20px 0;
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Tabs inside the drawer (Gems / Themes / Gaps) */
.ap-gems-drawer-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 20px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.ap-gems-drawer-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 4px;
    margin-bottom: -1px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}
.ap-gems-drawer-tab + .ap-gems-drawer-tab { margin-left: 8px; }
.ap-gems-drawer-tab:hover { color: var(--text-primary); }
.ap-gems-drawer-tab--active {
    color: var(--color-primary-dark);
    font-weight: 600;
    border-bottom-color: var(--color-primary);
}
[data-theme="dark"] .ap-gems-drawer-tab--active { color: var(--color-primary-light); }

.ap-gems-drawer-tab-count {
    font-size: 10px;
    font-weight: 700;
    background: var(--surface-sunken);
    color: var(--text-secondary);
    padding: 1px 7px;
    border-radius: var(--radius-full);
    line-height: 1.5;
}
.ap-gems-drawer-tab--active .ap-gems-drawer-tab-count {
    background: var(--color-primary-50);
    color: var(--color-primary-dark);
}
[data-theme="dark"] .ap-gems-drawer-tab--active .ap-gems-drawer-tab-count {
    color: var(--color-primary-light);
}
.ap-gems-drawer-tab-soon {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: var(--color-info-50);
    color: var(--color-info-800);
    border: 1px solid var(--color-info-100);
    padding: 1px 6px;
    border-radius: var(--radius-full);
    line-height: 1.5;
}

/* Panels — only the active one shows; lives inside drawer's scroll area */
.ap-gems-drawer-panel {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.ap-gems-drawer-list {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Empty state inside Gems panel */
.ap-gems-drawer-empty {
    padding: 40px 24px;
    text-align: center;
    color: var(--text-secondary);
}
.ap-gems-drawer-empty p { margin: 0 0 6px; font-size: 14px; }
.ap-gems-drawer-empty-sub {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}
.ap-gems-drawer-empty-link {
    display: inline-block;
    margin-top: 14px;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 13px;
}
.ap-gems-drawer-empty-link:hover { color: var(--color-primary-dark); }
[data-theme="dark"] .ap-gems-drawer-empty-link:hover { color: var(--color-primary-light); }

/* "Coming after pilot" cards for Themes / Gaps panels */
.ap-gems-drawer-soon {
    margin: 24px 20px;
    padding: 28px 22px;
    background: var(--surface-elevated);
    border: 1px dashed var(--border-default);
    border-radius: var(--radius-lg);
    text-align: center;
}
.ap-gems-drawer-soon-icon {
    color: var(--color-primary);
    opacity: 0.7;
    margin-bottom: 12px;
    display: inline-flex;
}
.ap-gems-drawer-soon-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}
.ap-gems-drawer-soon-body {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0 auto 14px;
    max-width: 320px;
}
.ap-gems-drawer-soon-pill {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--color-primary-dark);
    background: var(--color-primary-50);
    border: 1px solid var(--color-primary);
    padding: 3px 10px;
    border-radius: var(--radius-full);
}
[data-theme="dark"] .ap-gems-drawer-soon-pill { color: var(--color-primary-light); }

.ap-gems-drawer-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow-xs);
}

.ap-gems-drawer-quote {
    margin: 0;
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.55;
}

.ap-gems-drawer-meta {
    font-size: 12px;
    color: var(--text-muted);
}
.ap-gems-drawer-sep { opacity: 0.5; margin: 0 4px; }

.ap-gems-drawer-note {
    font-size: 13px;
    color: var(--text-primary);
    background: var(--color-primary-50);
    border-left: 2px solid var(--color-primary);
    padding: 8px 12px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.ap-gems-drawer-note-label {
    display: block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--color-primary-dark);
    margin-bottom: 3px;
}
[data-theme="dark"] .ap-gems-drawer-note-label { color: var(--color-primary-light); }

.ap-gems-drawer-actions {
    display: flex;
    justify-content: flex-end;
}

.ap-gems-drawer-use {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.ap-gems-drawer-use:hover {
    background: var(--color-primary);
    color: var(--text-on-brand);
}
[data-theme="dark"] .ap-gems-drawer-use { color: var(--color-primary-light); border-color: var(--color-primary-light); }
[data-theme="dark"] .ap-gems-drawer-use:hover { color: var(--text-on-brand); }

@media (max-width: 768px) {
    .ap-gems-drawer { width: 100vw; }
}

/* ── Loading ───────────────────────────────────────────── */
.ap-loading {
    display: flex;
    justify-content: flex-start;
    padding: var(--space-8) 0;
}

/* ── Empty state ───────────────────────────────────────── */
.ap-empty-state {
    max-width: 560px;
    margin: var(--space-12) 0 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
}


.ap-empty-heading {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--color-warm-800);
    margin: 0;
}

.ap-empty-text {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.15rem;
    font-style: italic;
    color: var(--color-warm-600);
    line-height: var(--leading-relaxed);
    margin: 0;
}

/* ── Gradient CTA button ───────────────────────────────── */
.ap-btn-gradient {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0ea5e9 60%, #6366f1 100%);
    color: white;
    font-size: 16px;
    font-weight: var(--font-semibold);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(20, 184, 166, 0.35);
    transition: box-shadow 0.25s ease, transform 0.2s ease, filter 0.2s ease;
    letter-spacing: 0.01em;
    white-space: nowrap;
    width: fit-content;
}

.ap-btn-gradient:hover {
    filter: brightness(1.08);
    box-shadow: 0 6px 24px rgba(20, 184, 166, 0.45);
    transform: translateY(-1px);
}

.ap-btn-gradient:active {
    transform: translateY(0);
    box-shadow: 0 3px 12px rgba(20, 184, 166, 0.3);
}

/* ── Content area (plans list view) ────────────────────── */
.ap-content {
    max-width: 860px; /* G6: give commitment cards more horizontal room */
}

/* ── Wizard summary box ────────────────────────────────── */
.ap-wizard-summary {
    max-width: 680px;
    margin: var(--space-4) 0 0;
    background: var(--color-primary-50, var(--color-primary-50));
    border: 1px solid var(--color-primary-light, #99e6da);
    border-radius: var(--radius-xl);
    padding: var(--space-4) var(--space-6);
    overflow: hidden;
}

.ap-wizard-summary--inset {
    margin: 0 0 var(--space-5);
}

.ap-wizard-summary-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-primary-dark);
    margin: 0 0 var(--space-3);
    opacity: 0.7;
}

.ap-wizard-summary-entries {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.ap-wizard-summary-row {
    display: flex;
    gap: var(--space-3);
    font-size: 0.875rem;
    line-height: 1.4;
}

.ap-wizard-summary-key {
    flex-shrink: 0;
    min-width: 90px;
    font-weight: 600;
    color: var(--color-primary-dark);
    font-size: 0.8rem;
    padding-top: 1px;
}

.ap-wizard-summary-val {
    color: var(--color-warm-800);
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* ── Wizard card ───────────────────────────────────────── */
.ap-wizard-wrap {
    max-width: 680px;
    margin: var(--space-6) 0 0;
    background: var(--color-warm-50);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-md);
    padding: var(--space-8) var(--space-12);
}

/* ── Wizard header row (progress + cancel) ─────────────── */
.ap-wizard-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.ap-wizard-header .ap-progress-bar-wrap {
    flex: 1;
    margin-bottom: 0;
}

.ap-wizard-cancel {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--color-warm-400);
    font-size: 20px;
    cursor: pointer;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.ap-wizard-cancel:hover {
    color: var(--color-warm-700);
    background: var(--color-warm-100);
}

/* ── New Recipe button (plans header) ──────────────────── */
.ap-btn-new {
    display: inline-flex;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    background: var(--color-primary);
    color: white;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: background var(--transition-fast);
    white-space: nowrap;
}

.ap-btn-new:hover {
    background: var(--color-primary-dark);
}

/* ── Skill banner (steps 2–5) ──────────────────────────── */
.ap-skill-banner {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: rgba(20, 184, 166, 0.08);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-5);
}

.ap-skill-banner-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-primary-dark);
    white-space: nowrap;
}

.ap-skill-banner-value {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-warm-700);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Don't show again (step 2) ─────────────────────────── */
.ap-dont-show-again {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--color-warm-500);
    cursor: pointer;
    user-select: none;
    margin-right: auto;
}

.ap-dont-show-again input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: var(--color-primary);
    flex-shrink: 0;
}

/* ── Progress ──────────────────────────────────────────── */
.ap-progress-bar-wrap {
    margin-bottom: var(--space-8);
}

.ap-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--space-2);
}

.ap-step-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-primary);
}

.ap-step-counter {
    font-size: var(--text-xs);
    color: var(--color-warm-500);
}

.ap-progress-track {
    height: 3px;
    background: var(--color-warm-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.ap-progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    transition: width 400ms var(--ease-smooth);
}

/* ── Step layout ───────────────────────────────────────── */
.ap-step {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.ap-step-icon {
    font-size: 2rem;
    line-height: 1;
}

.ap-step-heading {
    /* Display serif, matching the commitment-card titles elsewhere on Growth —
       the bare sans here read as a font from outside the app (Max round-3) */
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--color-warm-800);
    line-height: var(--leading-tight);
    margin: 0;
}

.ap-step-subtitle {
    font-size: var(--text-sm);
    color: var(--color-warm-600);
    line-height: var(--leading-relaxed);
    margin: calc(var(--space-2) * -1) 0 0;
}

.ap-step-subtitle strong {
    color: var(--color-warm-900);
    font-weight: var(--font-semibold);
}

.ap-step-optional {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-warm-400);
}

.ap-step-bridge {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-primary);
    line-height: var(--leading-relaxed);
    margin: var(--space-1) 0 var(--space-4);
}

.ap-error-msg {
    color: var(--color-error);
    font-size: var(--text-sm);
    margin: 0 0 var(--space-2);
}

/* ── Visualization prompt ──────────────────────────────── */
.ap-visualization-prompt {
    font-size: var(--text-sm);
    color: var(--color-warm-500);
    font-style: italic;
    line-height: var(--leading-relaxed);
    padding: var(--space-3) 0;
    border-top: 1px solid var(--color-warm-200);
    border-bottom: 1px solid var(--color-warm-200);
    margin: 0;
}

/* ── Specificity nudge ─────────────────────────────────── */
.ap-specificity-nudge {
    font-size: var(--text-xs);
    color: var(--color-warm-500);
    font-style: italic;
    line-height: var(--leading-relaxed);
    margin: var(--space-1) 0 0;
}

/* ── Example chips ─────────────────────────────────────── */
.ap-examples-wrap {
    margin-top: var(--space-2);
}

.ap-examples-toggle {
    background: var(--color-primary-50);
    border: 1px solid rgba(20, 184, 166, 0.22);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-primary-dark);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--transition-fast);
}

.ap-examples-toggle:hover {
    color: var(--color-primary);
}

.ap-example-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.ap-example-chip {
    padding: var(--space-1) var(--space-3);
    background: var(--color-warm-100);
    border: 1px solid var(--color-warm-200);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    color: var(--color-warm-700);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
}

.ap-example-chip:hover {
    background: rgba(20, 184, 166, 0.08);
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
}

/* ── Check-and-rewrite review section ─────────────────── */
.ap-review-section {
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-warm-200);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.ap-review-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-warm-400);
}

.ap-review-recipe {
    font-size: var(--text-sm);
    color: var(--color-warm-700);
    line-height: var(--leading-relaxed);
    padding: var(--space-3) var(--space-4);
    background: var(--color-warm-100);
    border-radius: var(--radius-lg);
}

.ap-review-connector {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-primary);
    margin-right: 4px;
}

.ap-self-check {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.ap-self-check-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    cursor: pointer;
}

.ap-self-check-item span {
    font-size: var(--text-sm);
    color: var(--color-warm-600);
    line-height: var(--leading-relaxed);
}

.ap-self-check-input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--color-primary);
}

/* ── Refine recipe button ──────────────────────────────── */
.ap-btn-refine {
    display: inline-flex;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    background: transparent;
    color: var(--color-warm-500);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    border: 1px solid var(--color-warm-300);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ap-btn-refine:hover {
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
    background: rgba(20, 184, 166, 0.04);
}

/* ── Fields ────────────────────────────────────────────── */
.ap-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.ap-label {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-warm-700);
}

.ap-label-connector {
    color: var(--color-primary);
    font-weight: var(--font-semibold);
}

/* ── Recipe intro callout (step 1) ────────────────────── */
.ap-recipe-intro {
    background: var(--color-warm-100);
    border-left: 3px solid var(--color-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-5);
}

.ap-recipe-intro p {
    font-size: var(--text-sm);
    color: var(--color-warm-700);
    line-height: var(--leading-relaxed);
    margin: 0 0 var(--space-2);
}

.ap-recipe-intro p:last-child {
    margin-bottom: 0;
}

.ap-recipe-intro strong {
    color: var(--color-warm-900);
    font-weight: var(--font-semibold);
}

/* ── Recipe example pair ───────────────────────────────── */
.ap-recipe-example {
    margin-bottom: var(--space-5);
}

.ap-recipe-example-eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-warm-400);
    margin: 0 0 var(--space-2);
}

.ap-recipe-example-pair {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

@media (max-width: 480px) {
    .ap-recipe-example-pair {
        flex-direction: column;
    }
    .ap-recipe-example-arrow {
        transform: rotate(90deg);
        align-self: center;
    }
}

.ap-recipe-example-card {
    flex: 1;
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.ap-recipe-example-card--if {
    background: var(--color-warm-50);
    border: 1.5px solid var(--color-warm-200);
}

.ap-recipe-example-card--will {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, #0891b2 100%);
}

.ap-recipe-example-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.6;
}

.ap-recipe-example-card--if .ap-recipe-example-label {
    color: var(--color-primary);
}

/* Situation / Reaction eyebrow on the example cards (G1). */
.ap-recipe-example-title {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-warm-500);
}
.ap-recipe-example-card--will .ap-recipe-example-title {
    color: rgba(255, 255, 255, 0.7);
}

/* Demarcation between the worked example and the user's own input (G1/G3) —
   "Front of card" / "Back of card". */
.ap-input-demarcation {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: var(--space-4) 0 var(--space-2);
    padding-top: var(--space-3);
    border-top: 1px dashed var(--color-warm-200);
}
.ap-input-demarcation-eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-primary-dark);
}
.ap-input-demarcation-hint {
    font-size: var(--text-sm);
    color: var(--color-warm-500);
}
[data-theme="dark"] .ap-input-demarcation {
    border-top-color: rgba(255, 255, 255, 0.12);
}

.ap-recipe-example-card--will .ap-recipe-example-label {
    color: rgba(255,255,255,0.85);
}

.ap-recipe-example-text {
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--color-warm-600);
    margin: 0;
    font-style: italic;
}

.ap-recipe-example-card--will .ap-recipe-example-text {
    color: rgba(255,255,255,0.85);
}

.ap-recipe-example-arrow {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 24px;
    font-size: 0;
    color: transparent;
}
.ap-recipe-example-arrow::before {
    content: '';
    position: absolute;
    left: 0;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px 0 0 2px;
}
.ap-recipe-example-arrow::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 13px solid var(--color-primary);
}

/* ── Recipe input cards ─────────────────────────────────── */
.ap-recipe-input-card {
    border-radius: var(--radius-xl);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.ap-recipe-input-card--if {
    background: var(--color-warm-50);
    border: 1.5px solid var(--color-warm-200);
}

.ap-recipe-input-card--will {
    background: var(--color-warm-50);
    border: 2px solid var(--color-primary);
    padding: 0;
    overflow: hidden;
    gap: 0;
}

.ap-recipe-input-card--readonly {
    opacity: 0.75;
    margin-bottom: var(--space-1);
}

.ap-recipe-input-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.65;
}

.ap-recipe-input-card--if .ap-recipe-input-label {
    color: var(--color-primary);
}

.ap-recipe-input-card--will .ap-recipe-input-label {
    color: rgba(255,255,255,0.85);
}

.ap-recipe-input-field {
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    font-family: inherit;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--color-warm-800);
    padding: 0;
    width: 100%;
}

.ap-recipe-input-field::placeholder {
    color: var(--color-warm-400);
}

.ap-recipe-input-field--will {
    color: white;
}

.ap-recipe-input-field--will::placeholder {
    color: rgba(255,255,255,0.45);
}

.ap-recipe-input-field--readonly {
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--color-warm-600);
    margin: 0;
}

.ap-card-connector-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    width: 20px;
    font-size: 0;
    color: transparent;
}
.ap-card-connector-arrow::before {
    content: '';
    display: block;
    width: 3px;
    height: 16px;
    background: var(--color-primary);
    border-radius: 2px 2px 0 0;
}
.ap-card-connector-arrow::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 12px solid var(--color-primary);
}

.ap-recipe-input-readonly-text {
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--color-warm-700);
    margin: 0;
}

.ap-specificity-nudge--card {
    color: var(--color-warm-400);
    margin-top: 0;
}

.ap-btn-back-of-card {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    margin-bottom: var(--space-4);
    padding: var(--space-2) 0;
    background: none;
    color: var(--color-primary-dark);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
}

.ap-btn-back-of-card:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ap-btn-back-of-card:not(:disabled):hover {
    opacity: 0.88;
}

/* ── Card context recap (steps 2 & 3) ─────────────────── */
.ap-card-context {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    background: var(--color-warm-100);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-4);
}

.ap-card-context + .ap-card-context {
    margin-top: calc(var(--space-4) * -1 + var(--space-2));
}

.ap-card-context-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-primary);
}

.ap-card-context-text {
    font-size: var(--text-sm);
    color: var(--color-warm-700);
    line-height: var(--leading-relaxed);
    font-style: italic;
}

.ap-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1.5px solid var(--color-warm-300);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    font-family: var(--font-sans);
    color: var(--color-warm-800);
    background: var(--color-warm-50);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-sizing: border-box;
}

.ap-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
    background: var(--color-warm-50);
}

.ap-input--sm {
    font-size: var(--text-sm);
    padding: var(--space-2) var(--space-3);
}

/* ── Interstitial (Step 2) ──────────────────────────────── */
.ap-step--interstitial {
    gap: var(--space-6);
}

.ap-interstitial-icon {
    font-size: 2.5rem;
}

.ap-interstitial-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    background: var(--color-warm-100);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
}

.ap-interstitial-text {
    font-size: var(--text-sm);
    color: var(--color-warm-700);
    line-height: var(--leading-relaxed);
    margin: 0;
}

.ap-interstitial-text--muted {
    color: var(--color-warm-500);
}

.ap-stat-highlight {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    font-weight: var(--font-semibold);
    padding: 1px 8px;
    border-radius: var(--radius-full);
    font-size: 0.8em;
}

.ap-interstitial-quote {
    padding: var(--space-4) var(--space-5);
    border-left: 3px solid var(--color-primary);
    background: var(--color-warm-50);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    font-size: var(--text-sm);
    color: var(--color-warm-700);
    line-height: var(--leading-relaxed);
}

/* ── Mad Libs (Step 3) ──────────────────────────────────── */
.ap-madlibs {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ap-madlibs-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.ap-madlibs-divider {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    color: var(--color-warm-500);
    font-size: var(--text-sm);
    font-style: italic;
}

.ap-madlibs-divider::before,
.ap-madlibs-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-warm-200);
}

/* ── Recipe preview (Step 3) ────────────────────────────── */
.ap-recipe-preview {
    padding: var(--space-4) var(--space-5);
    background: rgba(20, 184, 166, 0.06);
    border: 1.5px solid rgba(20, 184, 166, 0.25);
    border-radius: var(--radius-xl);
}

.ap-recipe-preview-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-2);
}

.ap-recipe-preview-text {
    font-size: var(--text-sm);
    color: var(--color-warm-700);
    line-height: var(--leading-relaxed);
    margin: 0;
}

.ap-recipe-preview-text em {
    font-style: normal;
    color: var(--color-primary-dark);
    font-weight: var(--font-medium);
}

/* ── Page-level Growth Resources section ────────────────── */
.ap-user-resources-section {
    max-width: 680px;
    margin: var(--space-12) 0 var(--space-10);
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-warm-200);
}

.ap-user-resources-header {
    margin-bottom: var(--space-5);
}

.ap-user-resources-subtitle {
    font-size: var(--text-sm);
    color: var(--color-warm-500);
    margin: var(--space-1) 0 0;
}

.ap-user-resources-add {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: var(--space-2);
    align-items: center;
    margin-bottom: var(--space-5);
}

.ap-btn-add-resource {
    padding: var(--space-2) var(--space-4);
    background: var(--color-primary);
    color: white;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition-fast);
}

.ap-btn-add-resource:hover:not(:disabled) {
    background: var(--color-primary-dark);
}

.ap-btn-add-resource:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ap-user-resources-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.ap-user-resource-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    transition: background var(--transition-fast);
}

.ap-user-resource-row:hover {
    background: var(--color-warm-100);
}

.ap-user-resource-title {
    font-size: var(--text-sm);
    color: var(--color-warm-700);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-user-resource-link {
    color: var(--color-primary-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ap-user-resource-delete {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--color-warm-400);
    font-size: 16px;
    cursor: pointer;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast), background var(--transition-fast);
    margin-left: var(--space-3);
}

.ap-user-resource-delete:hover {
    color: var(--color-error);
    background: var(--color-error-50);
}

.ap-user-resources-empty {
    font-size: var(--text-sm);
    color: var(--color-warm-400);
    font-style: italic;
    padding: var(--space-2) 0;
}

@media (max-width: 640px) {
    .ap-user-resources-add {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
    }
    .ap-user-resources-add input:last-of-type {
        grid-column: 1;
    }
}

/* ── Nav buttons ────────────────────────────────────────── */
.ap-nav-btns {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding-top: var(--space-2);
    flex-wrap: wrap;
}

.ap-nav-btns--right {
    justify-content: flex-end;
}

.ap-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    background: var(--color-primary);
    color: white;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: background var(--transition-fast);
    margin-left: auto;
}

.ap-btn-primary:hover:not(:disabled) {
    background: var(--color-primary-dark);
}

.ap-btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ap-btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    background: transparent;
    color: var(--color-warm-600);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ap-btn-ghost:hover {
    background: var(--color-warm-100);
    color: var(--color-warm-800);
}

.ap-btn-arrow {
    font-size: 1rem;
}

/* ── Summary (post-save) ────────────────────────────────── */
.ap-summary-wrap {
    max-width: 680px;
    margin: var(--space-6) 0 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.ap-summary-success {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-success);
}

.ap-summary-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--color-success);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
}

.ap-summary-card {
    background: var(--color-warm-50);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-md);
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.ap-summary-skill {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-warm-200);
}

.ap-summary-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-warm-500);
}

.ap-summary-value {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-warm-800);
}

.ap-summary-recipe {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.ap-summary-connector {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-primary);
    display: block;
}

.ap-summary-recipe-text {
    font-size: var(--text-sm);
    color: var(--color-warm-700);
    line-height: var(--leading-relaxed);
    display: block;
    margin-bottom: var(--space-2);
}

.ap-summary-shield {
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-warm-200);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.ap-summary-resources {
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-warm-200);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.ap-summary-resource-item {
    font-size: var(--text-sm);
    color: var(--color-warm-700);
}

.ap-summary-resource-item a {
    color: var(--color-primary-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ap-summary-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

/* ── Existing plans list ────────────────────────────────── */
.ap-plans-section {
    max-width: 580px;
    margin: var(--space-6) 0 0;
}

.ap-plans-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-warm-200);
}

.ap-plans-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-warm-800);
    margin: 0;
}

.ap-plans-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding-bottom: var(--space-10);
}
@media (max-width: 768px) {
    .ap-plans-list {
        /* Room to scroll the last card clear of the fixed 56px
           .ap-fab-new-commitment in the bottom-right corner. */
        padding-bottom: 96px;
    }
}

/* ── Card animations ────────────────────────────────────── */
@keyframes ap-card-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes ap-arrow-flow {
    0%, 100% { opacity: 0.35; transform: translateX(0); }
    50%       { opacity: 1;    transform: translateX(5px); }
}

/* ── Skill group card ────────────────────────────────────── */
.ap-skill-group {
    background: var(--color-warm-50);
    border: 1px solid var(--color-warm-200);
    border-left: 3px solid var(--color-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    animation: ap-card-in 0.4s ease both;
    transition: box-shadow 0.2s ease, border-left-color 0.2s ease;
}

.ap-skill-group:hover {
    box-shadow: 0 4px 20px rgba(20, 184, 166, 0.12);
    border-left-color: var(--color-primary-dark);
}

/* ── Group header (clickable toggle) ────────────────────── */
.ap-skill-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-6);
    cursor: pointer;
    user-select: none;
    transition: background var(--transition-fast);
}

.ap-skill-group-header:hover {
    background: var(--color-warm-50);
}

.ap-skill-group--expanded .ap-skill-group-header {
    border-bottom: 1px solid var(--color-warm-100);
}

.ap-skill-group-summary {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    min-width: 0;
}

.ap-skill-group-counts {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.ap-group-count {
    font-size: var(--text-xs);
    color: var(--color-warm-400);
}

.ap-group-count-sep {
    font-size: var(--text-xs);
    color: var(--color-warm-300);
}

.ap-skill-group-right {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.ap-skill-group-chevron {
    font-size: 18px;
    color: var(--color-warm-400);
    line-height: 1;
    transition: transform 0.2s ease, color 0.15s ease;
    display: inline-block;
}

.ap-skill-group-chevron--open {
    transform: rotate(90deg);
    color: var(--color-primary);
}

/* ── Expanded body ───────────────────────────────────────── */
.ap-skill-group-body {
    display: flex;
    flex-direction: column;
}

/* ── Card footer (add recipe) ────────────────────────────── */
.ap-card-footer {
    padding: var(--space-3) var(--space-6) var(--space-4);
    border-top: 1px solid var(--color-warm-100);
}

/* ── Per-card resources ──────────────────────────────────── */
.ap-card-resources {
    border-top: 1px solid var(--color-warm-100);
    padding: var(--space-4) var(--space-6) var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    background: var(--color-warm-50);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.ap-card-resources-header {
    display: flex;
    align-items: center;
}

.ap-card-resources-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-warm-400);
}

.ap-card-resources-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ap-card-resources-add {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: var(--space-2);
    align-items: center;
}

@media (max-width: 640px) {
    .ap-card-resources-add {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
    }
    .ap-card-resources-add input:nth-child(2) {
        grid-column: 1;
    }
}

/* ── Obstacle plan: click-to-reveal ──────────────────────── */
.ap-shield-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.ap-shield-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: var(--text-xs);
    color: var(--color-warm-400);
    transition: color var(--transition-fast);
}

.ap-shield-toggle:hover {
    color: var(--color-warm-600);
}

.ap-shield-toggle-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-warm-300);
    flex-shrink: 0;
    transition: background var(--transition-fast);
}

.ap-shield-toggle:hover .ap-shield-toggle-dot {
    background: var(--color-warm-500);
}

.ap-shield-toggle-chevron {
    font-size: 14px;
    transition: transform 0.2s ease;
    display: inline-block;
    line-height: 1;
}

.ap-shield-toggle-chevron.open {
    transform: rotate(90deg);
}

.ap-shield-reveal {
    font-size: var(--text-xs);
    color: var(--color-warm-500);
    line-height: var(--leading-relaxed);
    padding: var(--space-2) var(--space-3);
    background: var(--color-warm-100);
    border-radius: var(--radius-md);
}

.ap-skill-group-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.ap-btn-add-ifthen {
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-primary);
    background: rgba(20, 184, 166, 0.08);
    border: 1px solid rgba(20, 184, 166, 0.25);
    border-radius: 20px;
    padding: 3px 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}

.ap-btn-add-ifthen:hover {
    background: rgba(20, 184, 166, 0.15);
    border-color: var(--color-primary);
}

/* ── If-then item ────────────────────────────────────────── */
.ap-ifthen-item {
    padding: var(--space-4) var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.ap-ifthen-item--divider {
    border-top: 1px solid var(--color-warm-100);
}


.ap-ifthen-top {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.ap-ifthen-top .ap-plan-recipe {
    flex: 1;
}

/* ── Group-level confirm delete ──────────────────────────── */
.ap-plan-confirm-delete--group {
    padding: var(--space-3) var(--space-6);
    background: var(--color-error-50);
    border-top: 1px solid var(--color-error-200);
}

.ap-plan-skill-block {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: var(--space-2);
}

@media (max-width: 640px) {
    .ap-plan-skill-block {
        flex-direction: column;
        gap: 2px;
    }
}

.ap-plan-skill-label {
    font-size: 10px;
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
}

.ap-plan-skill {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--color-warm-800);
    background: var(--color-warm-100);
    padding: 2px 10px 2px 8px;
    border-radius: var(--radius-md);
    line-height: 1.5;
}

.ap-plan-delete-btn {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--color-warm-400);
    font-size: 18px;
    cursor: pointer;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.ap-plan-delete-btn:hover {
    color: var(--color-error);
    background: var(--color-error-50);
}

/* ── Recipe hero block — timeline layout ─────────────────── */
.ap-plan-recipe {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Each row (IF / I WILL) */
.ap-recipe-step {
    display: flex;
    align-items: stretch;
    gap: var(--space-3);
}

/* Left rail column */
.ap-recipe-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20px;
    flex-shrink: 0;
    padding-top: 5px; /* align dot with badge cap-height */
}

/* IF dot — solid filled */
.ap-recipe-rail-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-primary);
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
    position: relative;
    z-index: 1;
}

/* I WILL dot — hollow ring, signals arrival */
.ap-recipe-rail-dot--will {
    background: var(--color-warm-50);
    border: 2.5px solid var(--color-primary);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
    width: 11px;
    height: 11px;
}

/* Connector line between IF and I WILL */
.ap-recipe-rail-line {
    flex: 1;
    width: 2px;
    background: linear-gradient(
        to bottom,
        rgba(20, 184, 166, 0.55) 0%,
        rgba(20, 184, 166, 0.15) 100%
    );
    border-radius: 1px;
    margin-top: 4px;
    min-height: 18px;
    position: relative;
    overflow: hidden;
}

/* Travelling dot animation on hover */
@keyframes ap-flow-dot {
    0%   { top: -8px; opacity: 0; }
    15%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.ap-ifthen-item:hover .ap-recipe-rail-line::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
    animation: ap-flow-dot 1.1s ease-in-out infinite;
}

/* Right content column */
.ap-recipe-step-content {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    padding-bottom: var(--space-4);
    min-width: 0;
}

.ap-recipe-step--will .ap-recipe-step-content {
    padding-bottom: 0;
}

/* Badges */
.ap-recipe-badge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-primary-dark);
    background: rgba(20, 184, 166, 0.09);
    padding: 2px 8px;
    border-radius: 20px;
    line-height: 1.7;
}

/* I WILL badge — solid, signals the committed action */
.ap-recipe-badge--will {
    background: var(--color-primary);
    color: white;
}

.ap-recipe-text {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--color-warm-800);
    line-height: 1.5;
    flex: 1;
    min-width: 0;
    padding-top: 2px; /* align with badge baseline */
}

/* ── Shield block ────────────────────────────────────────── */
.ap-plan-shield {
    background: var(--color-warning-50);
    border: 1px solid var(--color-warning-200);
    border-left: 2px solid var(--color-warning);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.ap-shield-label {
    font-size: 10px;
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-warning-700);
    margin: 0 0 var(--space-1);
}

.ap-shield-body {
    font-size: var(--text-sm);
    color: var(--color-warm-700);
    line-height: var(--leading-relaxed);
    margin: 0;
}

.ap-shield-connector {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-warning-600);
    margin-right: 2px;
}

.ap-shield-sep {
    color: var(--color-warning-600);
    margin: 0 4px;
}

/* ── Confirm delete ──────────────────────────────────────── */
.ap-plan-confirm-delete {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--color-warm-600);
}

.ap-plan-confirm-yes {
    padding: 2px 10px;
    border: none;
    background: var(--color-error);
    color: white;
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    cursor: pointer;
}

.ap-plan-confirm-no {
    padding: 2px 10px;
    border: 1px solid var(--color-warm-300);
    background: transparent;
    color: var(--color-warm-600);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    cursor: pointer;
}

/* ── Calendar row & form ─────────────────────────────────── */
.ap-calendar-row {
    display: flex;
    align-items: center;
}

.ap-btn-calendar {
    font-size: var(--text-xs);
    color: var(--color-warm-400);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s;
}

.ap-btn-calendar:hover {
    color: var(--color-primary);
}

.ap-calendar-form {
    background: var(--color-warm-50, #faf8f6);
    border: 1px solid var(--color-warm-200);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.ap-calendar-fields {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.ap-calendar-actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.ap-input--sm {
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-sm);
    height: 34px;
}

.ap-btn-primary.ap-btn--sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    align-self: flex-start;
}

@media (max-width: 640px) {
    .ap-wizard-wrap {
        padding: var(--space-5) var(--space-5);
        border-radius: var(--radius-xl);
    }

    .ap-resource-row {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
    }
}

/* ══════════════════════════════════════════════════════════════
   DEVELOPMENT COMMITMENTS — Card structure
   ══════════════════════════════════════════════════════════════ */

.ap-commitment-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
    animation: ap-card-in 0.3s both;
}

@keyframes ap-card-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* No hover state on the card itself — the explicit "Open →" button is
   the affordance, so the card never lights up on hover. */

/* ══ Journal-spread card: two panels split by a faint gutter ══
   Left = the "why" (serif title + intention). Right = the "deck"
   (stats, skill chips, actions). Stacks vertically on mobile. */
.ap-commitment-card--journal {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: stretch;
}

/* Left panel — the why (clickable to open; no hover styling) */
.ap-jcard-why {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-6);
    cursor: pointer;
}
.ap-jcard-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-warm-900);
    margin: 0;
    overflow-wrap: anywhere;
    display: flex;
    align-items: flex-start;
    gap: 0.4em;
}
/* Min-width:0 lets the title text wrap inside the flex row; the leading sprout
   keeps its intrinsic size. */
.ap-jcard-title > span {
    min-width: 0;
}
/* Subtle accent-green plant sprout marking each commitment. Sized in em so it
   tracks the title; a brand teal in light mode, lifted to the lighter teal in
   dark so it stays visible on the dark card. */
.ap-jcard-sprout {
    flex: 0 0 auto;
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.08em;
    color: var(--color-primary-dark);
}
[data-theme="dark"] .ap-jcard-sprout {
    color: var(--color-primary-light);
}
.ap-jcard-intention {
    margin: 0;
    padding-left: var(--space-3);
    border-left: 2px solid var(--color-warm-300);
    font-family: var(--font-display);
    font-style: italic;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--color-warm-600);
}

/* Right panel — the deck */
.ap-jcard-deck {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-6);
    border-left: 1px solid var(--border-subtle);
}
.ap-jcard-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: var(--text-sm);
    color: var(--color-warm-600);
}
.ap-jcard-skills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.ap-jcard-skill-more {
    font-size: 0.7rem;
    font-weight: var(--font-semibold);
    color: var(--color-warm-500);
}
.ap-jcard-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-1);
}
.ap-jcard-open {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 16px;
    border-radius: 999px;
    border: none;
    background: var(--color-primary);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease;
}
.ap-jcard-open:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

/* Stack panels on mobile; the gutter becomes a top divider */
@media (max-width: 768px) {
    .ap-commitment-card--journal {
        grid-template-columns: 1fr;
    }
    .ap-jcard-why {
        text-align: center;
        align-items: center;
        padding-bottom: var(--space-4);
    }
    /* Title is centered on mobile; keep the sprout right before the first letter
       and shrink it to roughly a letter's size so it reads as a quiet glyph. */
    .ap-jcard-title {
        justify-content: center;
        gap: 0.3em;
    }
    .ap-jcard-sprout {
        width: 1em;
        height: 1em;
        margin-top: 0.12em;
    }
    .ap-jcard-intention {
        border-left: none;
        padding-left: 0;
        text-align: center;
    }
    .ap-jcard-deck {
        border-left: none;
        border-top: 1px solid var(--border-subtle);
        align-items: center;
        text-align: center;
    }
    .ap-jcard-stats,
    .ap-jcard-skills,
    .ap-jcard-actions {
        justify-content: center;
    }
}

/* ── One-tap Practice on the commitment card (quiet outline pill;
   the filled gradient is reserved for the modal's primary action) ── */
.ap-card-actions {
    display: flex;
    justify-content: center;
    padding: 0 var(--space-5) var(--space-4);
}
.ap-card-practice-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid rgba(20, 184, 166, 0.35);
    background: transparent;
    color: var(--color-primary);
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.ap-card-practice-btn svg { flex-shrink: 0; }
.ap-card-practice-btn:hover {
    background: rgba(20, 184, 166, 0.10);
    border-color: var(--color-primary);
    transform: translateY(-1px);
}
[data-theme="dark"] .ap-card-practice-btn {
    border-color: rgba(20, 184, 166, 0.45);
}


/* ── List header: an editorial section divider. The title sits centered
   between two hairlines that fade out toward the page edges, so it reads as a
   deliberate section marker rather than a small floating label. The New
   Commitment action is the floating button. ── */
.ap-list-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin: var(--space-6) 0 var(--space-5);
}
.ap-list-header::before,
.ap-list-header::after {
    content: '';
    flex: 1 1 auto;
    min-width: 0;
    height: 1px;
}
.ap-list-header::before {
    background: linear-gradient(to right, transparent, var(--border-subtle));
}
.ap-list-header::after {
    background: linear-gradient(to left, transparent, var(--border-subtle));
}
.ap-list-title {
    flex: 0 0 auto;
    margin: 0;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: var(--font-semibold);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-primary);
    white-space: nowrap;
}
[data-theme="dark"] .ap-list-title {
    color: var(--color-primary-light);
}

/* ── Delete commitment, relocated to the card bottom (G10) ── */
.ap-commitment-delete-footer {
    margin-top: var(--space-5);
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-warm-200);
    text-align: right;
}
.ap-commitment-delete-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-warm-500);
    padding: 2px 4px;
}
.ap-commitment-delete-link:hover {
    color: var(--color-error-600);
    text-decoration: underline;
}
[data-theme="dark"] .ap-commitment-delete-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* ── Mobile: center the card contents (G6) ── */
@media (max-width: 768px) {
    .ap-commitment-body { text-align: center; }
    .ap-commitment-body .ap-skill-chips,
    .ap-commitment-body .ap-res-search-chips,
    .ap-commitment-body .ap-flashcards-grid { justify-content: center; }
    .ap-commitment-body .ap-btn-add-ifthen { align-self: center; }
    .ap-commitment-delete-footer { text-align: center; }
    .ap-list-header { justify-content: center; }
}

/* ── Floating "New Commitment" action button (all viewports) ──
   Square with rounded corners, icon only, bottom right — same shape
   as .pg-fab on Requests/Givers. x-show toggles inline display:none. */
.ap-fab-new-commitment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 28px;
    bottom: 28px;
    width: 56px;
    height: 56px;
    z-index: 1200; /* above .mobile-header (1001) */
    background: linear-gradient(135deg, var(--color-primary) 0%, #0ea5e9 60%, #6366f1 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 22px rgba(20, 184, 166, 0.45);
    cursor: pointer;
    transition: filter 0.15s, box-shadow 0.15s, transform 0.15s;
}
.ap-fab-new-commitment:hover {
    filter: brightness(1.08);
    box-shadow: 0 10px 28px rgba(20, 184, 166, 0.5);
    transform: translateY(-2px);
}
.ap-fab-new-commitment:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(20, 184, 166, 0.4);
}
/* Once the wizard has been opened once, the empty state's inline CTA
   yields to the floating button. */
.ap-empty-state .ap-empty-cta--seen { display: none; }
@media (max-width: 768px) {
    .ap-fab-new-commitment {
        right: 16px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        width: 52px;
        height: 52px;
    }
}

/* ── Card header ─────────────────────────────────────────── */
.ap-commitment-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.ap-commitment-header-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ap-commitment-header-right {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.ap-commitment-eyebrow {
    font-size: 10px;
    font-weight: var(--font-semibold);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--color-primary);
    opacity: 0.7;
}

.ap-commitment-title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--color-warm-900);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.ap-commitment-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: var(--text-sm);
    color: var(--color-warm-600);
    margin-top: 3px;
}

.ap-meta-sep {
    opacity: 0.5;
}

/* ── Card body ───────────────────────────────────────────── */
.ap-commitment-body {
    padding: 0 var(--space-5) var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.ap-commitment-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* Chunk the expanded body: a hairline divider above each section after the
   first makes the stacked information far easier to scan on desktop. */
.ap-commitment-section + .ap-commitment-section {
    border-top: 1px solid var(--color-warm-200, #ece7e1);
    padding-top: var(--space-5);
}
[data-theme="dark"] .ap-commitment-section + .ap-commitment-section {
    border-top-color: rgba(255, 255, 255, 0.08);
}

/* ── Commitment detail modal ─────────────────────────────────
   The expanded view is a centered panel over the blurred page —
   one commitment in focus at a time. Full-screen sheet on mobile. */
.ap-commitment-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000; /* above mobile header (1001) + FAB (1200); below practice (4000) */
    background: var(--surface-overlay, rgba(0, 0, 0, 0.5));
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.ap-commitment-modal {
    width: min(860px, 100%);
    max-height: min(92vh, 1000px);
    display: flex;
    flex-direction: column;
    background: var(--surface-elevated, #fff);
    border: 1px solid var(--color-warm-200);
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    animation: ap-modal-in 0.25s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

@keyframes ap-modal-in {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ap-commitment-modal-head {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-6) var(--space-8) var(--space-4);
    border-bottom: 1px solid var(--color-warm-200);
    flex-shrink: 0;
}

.ap-commitment-modal-head-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ap-commitment-modal-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
    color: var(--color-warm-500);
    padding: 7px;
    border-radius: var(--radius-md);
    transition: color 0.15s, background 0.15s;
}
.ap-commitment-modal-close:hover {
    color: var(--color-warm-800);
    background: var(--color-warm-100);
}

/* Roomier body inside the modal; scrolls on its own under the pinned head */
.ap-commitment-body--modal {
    overflow-y: auto;
    padding: var(--space-10) var(--space-8) var(--space-8);
    gap: var(--space-6);
}

[data-theme="dark"] .ap-commitment-modal { border-color: rgba(255, 255, 255, 0.10); }
[data-theme="dark"] .ap-commitment-modal-head { border-bottom-color: rgba(255, 255, 255, 0.08); }

/* Mobile: full-screen sheet — head pinned (close pinned top-right,
   title centered), body scrolls */
@media (max-width: 640px) {
    .ap-commitment-overlay { padding: 0; }
    .ap-commitment-modal {
        width: 100%;
        height: 100%;
        max-height: none;
        border: none;
        border-radius: 0;
    }
    .ap-commitment-modal-head {
        position: relative;
        padding: var(--space-5) var(--space-8) var(--space-3);
    }
    .ap-commitment-modal-head-text {
        align-items: center;
        text-align: center;
    }
    .ap-commitment-modal-head-text .ap-commitment-meta {
        justify-content: center;
        flex-wrap: wrap;
    }
    .ap-commitment-modal-close {
        position: absolute;
        top: 10px;
        right: 10px;
    }
    .ap-commitment-body--modal {
        /* Authoritative mobile padding for the modal body. The generous top
           value separates the first section ("Development Intention") from the
           head's meta line — don't re-introduce a competing
           `.ap-commitment-body { padding }` rule below, it would override this. */
        padding: var(--space-12) var(--space-4) calc(var(--space-8) + env(safe-area-inset-bottom, 0px));
    }
}

.ap-section-label {
    font-size: 11.5px;
    font-weight: var(--font-bold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary-700, #0e7f79);
}
[data-theme="dark"] .ap-section-label {
    color: var(--color-primary-300, #5eead4);
}

/* ── Development Intention ───────────────────────────────────
   Deliberately quiet: a plain hanging quote, not a highlighted
   panel — it's context for the card, not a call to action. */
.ap-intention-text {
    margin: 0;
    padding: var(--space-1) var(--space-4);
    border-left: 2px solid var(--color-warm-300, #d6d3d1);
    background: transparent;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--color-warm-600, #78716c);
    font-style: italic;
}
[data-theme="dark"] .ap-intention-text {
    color: var(--color-warm-600);
    border-left-color: rgba(255, 255, 255, 0.14);
}

/* ── Commitment skills + their resources — collapsible rows ── */
.ap-skills-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ap-skill-row {
    display: flex;
    flex-direction: column;
}
/* Disclosure header — the clickable skill row */
.ap-skill-row-head {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-2);
    background: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--text-primary);
    text-align: left;
    transition: background var(--transition-fast);
}
.ap-skill-row-head:hover { background: var(--color-warm-50); }
[data-theme="dark"] .ap-skill-row-head:hover { background: rgba(255, 255, 255, 0.04); }
.ap-skill-row-caret {
    color: var(--color-warm-400);
    font-size: 0.95rem;
    line-height: 1;
    transition: transform 0.15s ease;
    flex-shrink: 0;
}
.ap-skill-row-caret.open { transform: rotate(90deg); }
.ap-skills-list-bullet {
    color: var(--color-primary);
    font-size: 0.7rem;
    flex-shrink: 0;
}
.ap-skills-list-bullet--other { color: var(--color-warm-400); }
.ap-skills-list-name { font-weight: var(--font-medium); }
.ap-skills-list-focus {
    font-size: 0.65rem;
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-primary);
    background: rgba(20, 184, 166, 0.12);
    padding: 1px 7px;
    border-radius: 999px;
}
.ap-skill-row-count {
    margin-left: auto;
    font-size: var(--text-xs);
    color: var(--color-warm-500);
    flex-shrink: 0;
}
/* Dropdown panel — resources tied to the skill (indented, left rule) */
.ap-skill-resources {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    text-align: left;
    margin: 2px 0 var(--space-2) 9px;
    padding: var(--space-3) 0 var(--space-1) calc(var(--space-3) + 9px);
    border-left: 2px solid var(--border-subtle);
}
.ap-skill-res-empty {
    margin: 0;
    font-size: var(--text-xs);
    color: var(--color-warm-500);
    font-style: italic;
}
.ap-skill-resources .ap-res-search-chip { align-self: flex-start; }

/* Subtle "+ Add resource" button that reveals the name/URL fields on click */
.ap-res-add-toggle {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px dashed var(--color-warm-300);
    border-radius: var(--radius-md);
    padding: 5px 12px;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-primary);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
.ap-res-add-toggle:hover {
    background: var(--color-warm-50);
    border-color: var(--color-primary-light, #99e6da);
}
[data-theme="dark"] .ap-res-add-toggle:hover { background: rgba(255, 255, 255, 0.04); }
.ap-res-add-cancel {
    margin-top: var(--space-2);
    background: none;
    border: none;
    padding: 0;
    font-size: var(--text-xs);
    color: var(--color-warm-500);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.ap-res-add-cancel:hover { color: var(--color-warm-700); }
@media (max-width: 768px) {
    .ap-skill-resources .ap-card-resources-add { grid-template-columns: 1fr; }
}

/* ── Skills chips ────────────────────────────────────────── */
.ap-skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.ap-skill-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--color-primary-100, #ccf5f2);
    color: var(--color-primary-700, #0e7f79);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    line-height: 1.4;
    max-width: 220px;
    word-break: break-word;
    white-space: normal;
}

.ap-skill-chips--editable .ap-skill-chip {
    background: var(--color-primary-100, #ccf5f2);
    padding-right: 6px;
}

.ap-skill-chip-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-primary-600, #1a9e97);
    font-size: 14px;
    line-height: 1;
    padding: 0 2px;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.ap-skill-chip-remove:hover {
    opacity: 1;
}

.ap-skill-input-row {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.ap-btn-add-skill {
    flex-shrink: 0;
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--color-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.ap-btn-add-skill:hover {
    background: var(--color-primary);
    color: white;
}

/* ══════════════════════════════════════════════════════════════
   FLASH CARDS — 3D flip
   ══════════════════════════════════════════════════════════════ */

.ap-flashcards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-4);
}

.ap-flashcard-outer {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

/* The element that does the 3D flip */
.ap-flashcard-wrap {
    height: 200px;
    perspective: 800px;
    cursor: pointer;
}

.ap-flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-xl);
}

.ap-flashcard-wrap.is-flipped .ap-flashcard-inner {
    transform: rotateY(180deg);
}

/* Front & back share the same absolute position */
.ap-flashcard-front,
.ap-flashcard-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    padding: var(--space-4);
    gap: var(--space-2);
    overflow: hidden;
}

/* Front: "index card" — warm paper, faint ruled lines, teal margin rule.
   The card is a little physical object you pick up and rehearse. */
.ap-flashcard-front {
    background:
        /* ruled baselines */
        repeating-linear-gradient(to bottom,
            transparent 0 25px,
            rgba(120, 113, 108, 0.10) 25px 26px),
        /* teal margin rule (the index card's "red line") */
        linear-gradient(to right,
            transparent 12px,
            rgba(13, 148, 136, 0.30) 12px,
            rgba(13, 148, 136, 0.30) 14px,
            transparent 14px),
        /* paper */
        #fbf9f5;
    border: 1px solid var(--color-warm-200);
    padding-left: 26px;
    box-shadow: 0 1px 2px rgba(41, 37, 36, 0.05), 0 5px 12px rgba(41, 37, 36, 0.05);
    transition: box-shadow 0.2s ease;
}

/* Dog-eared corner — the paper fold that invites the flip */
.ap-flashcard-front::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 18px 18px;
    border-color: transparent transparent var(--color-warm-200) transparent;
}

/* Back: same card, answer "inked" on the teal side — shared ruled lines */
.ap-flashcard-back {
    background:
        repeating-linear-gradient(to bottom,
            transparent 0 25px,
            rgba(255, 255, 255, 0.09) 25px 26px),
        linear-gradient(135deg, var(--color-primary-dark) 0%, #0891b2 100%);
    border: 1.5px solid transparent;
    transform: rotateY(180deg);
    color: white;
    box-shadow: 0 1px 2px rgba(41, 37, 36, 0.08), 0 5px 12px rgba(13, 148, 136, 0.16);
    transition: box-shadow 0.2s ease;
}

/* Pick-it-up hover physics (desktop): slight lift + half-degree tilt.
   Split by flip state so the hover transform composes with rotateY. */
@media (hover: hover) {
    .ap-flashcard-wrap:not(.is-flipped):hover .ap-flashcard-inner {
        transform: rotateZ(-0.6deg) translateY(-3px);
    }
    .ap-flashcard-wrap.is-flipped:hover .ap-flashcard-inner {
        transform: rotateY(180deg) rotateZ(0.6deg) translateY(-3px);
    }
    .ap-flashcard-wrap:hover .ap-flashcard-front {
        box-shadow: 0 2px 4px rgba(41, 37, 36, 0.06), 0 10px 22px rgba(41, 37, 36, 0.10);
    }
    .ap-flashcard-wrap:hover .ap-flashcard-back {
        box-shadow: 0 2px 4px rgba(41, 37, 36, 0.10), 0 10px 22px rgba(13, 148, 136, 0.24);
    }
}

/* Dark mode: the card stays in the theme's cool dark family (the warm
   brown clashed with the violet-tinted surfaces) — an elevated slate
   with a soft top-light gradient, visible rules, and the teal margin. */
[data-theme="dark"] .ap-flashcard-front {
    background:
        repeating-linear-gradient(to bottom,
            transparent 0 25px,
            rgba(255, 255, 255, 0.07) 25px 26px),
        linear-gradient(to right,
            transparent 12px,
            rgba(45, 212, 191, 0.40) 12px,
            rgba(45, 212, 191, 0.40) 14px,
            transparent 14px),
        linear-gradient(170deg, #2e2e36 0%, #232329 100%);
    border-color: rgba(255, 255, 255, 0.14);
}
[data-theme="dark"] .ap-flashcard-front::after {
    border-color: transparent transparent rgba(255, 255, 255, 0.18) transparent;
}
[data-theme="dark"] .ap-flashcard-front .ap-flashcard-label {
    color: #5eead4;
    background: rgba(20, 184, 166, 0.16);
}

.ap-flashcard-label {
    font-size: 10px;
    font-weight: var(--font-semibold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.6;
}

.ap-flashcard-front .ap-flashcard-label {
    color: var(--color-primary-dark);
    background: rgba(13, 148, 136, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
    align-self: flex-start;
    opacity: 1;
}

.ap-flashcard-back .ap-flashcard-label {
    color: rgba(255,255,255,0.85);
}

.ap-flashcard-text {
    flex: 1;
    font-family: 'Lora', Georgia, serif; /* same voice as the practice deck's big card */
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--color-warm-800);
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: break-word;
    word-break: break-word;
}

.ap-flashcard-back .ap-flashcard-text {
    color: white;
}

/* Dynamic text sizing — class applied by cardFontSize() based on char count */
.ap-flashcard-text--xl {
    font-size: var(--text-lg);
    -webkit-line-clamp: 3;
}

.ap-flashcard-text--lg {
    font-size: var(--text-base);
    -webkit-line-clamp: 4;
}

/* default (110 chars): inherits --text-sm + line-clamp: 5 from base rule */

.ap-flashcard-text--xs {
    font-size: var(--text-xs);
    -webkit-line-clamp: 6;
}

/* Bottom row: skill tags (left) + flip hint (right) */
.ap-flashcard-bottom-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-2);
    margin-top: auto;
}

.ap-flashcard-hint {
    font-size: var(--text-xs);
    color: var(--color-warm-400);
    white-space: nowrap;
    flex-shrink: 0;
}

.ap-flashcard-obstacle {
    font-size: var(--text-xs);
    color: rgba(255,255,255,0.75);
    margin-top: auto;
    padding-top: var(--space-1);
    border-top: 1px solid rgba(255,255,255,0.2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ap-flashcard-obstacle-label {
    font-weight: var(--font-semibold);
    margin-right: 3px;
}

/* Action buttons row (edit + delete) sit below the card */
.ap-flashcard-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--space-1);
    opacity: 0;
    transition: opacity 0.15s;
}

.ap-flashcard-outer:hover .ap-flashcard-actions {
    opacity: 1;
}

.ap-flashcard-edit-btn,
.ap-flashcard-delete {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-warm-400);
    padding: 2px var(--space-1);
    line-height: 1;
    transition: color 0.15s;
}

.ap-flashcard-edit-btn:hover {
    color: var(--color-primary);
}

.ap-flashcard-delete:hover {
    color: var(--color-error);
}

/* Inline edit form */
.ap-flashcard-edit-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--color-warm-50);
    border: 1.5px solid var(--color-warm-200);
    border-radius: var(--radius-lg);
    margin-top: var(--space-1);
}

.ap-flashcard-edit-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.ap-flashcard-edit-label {
    font-size: 10px;
    font-weight: var(--font-semibold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-primary);
    opacity: 0.8;
}

.ap-flashcard-edit-textarea {
    font-size: var(--text-sm);
    resize: none;
    min-height: 56px;
}

.ap-card-skill-tag-section--edit {
    padding: var(--space-2) var(--space-3);
    margin: 0;
}

/* Wizard review step: centered chips under the preview card */
.ap-card-skill-tag-section--review {
    margin: var(--space-5) 0 var(--space-2);
    text-align: center;
}
.ap-card-skill-tag-section--review .ap-card-skill-chips {
    justify-content: center;
    margin-bottom: 0;
}

.ap-flashcard-edit-actions {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.ap-btn-primary--sm {
    padding: 6px 16px;
    font-size: var(--text-sm);
    margin-left: 0;
}

.ap-btn-ghost--sm {
    padding: 6px 14px;
    font-size: var(--text-sm);
}

/* Empty state for action recipes */
.ap-flashcards-empty {
    font-size: var(--text-sm);
    color: var(--color-warm-400);
    font-style: italic;
    padding: var(--space-2) 0;
}

/* ── Add action recipe button ────────────────────────────── */
.ap-btn-add-ifthen {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: var(--space-2) var(--space-4);
    border: 1.5px dashed var(--color-primary);
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--color-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    margin-top: var(--space-1);
}

.ap-btn-add-ifthen:hover {
    background: var(--color-primary);
    color: white;
    border-style: solid;
}

/* G6: make "+ Add action recipe" a standout gradient pill (on-theme). */
.ap-btn-add-ifthen {
    border: none;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0ea5e9 60%, #6366f1 100%);
    color: #fff;
    font-weight: var(--font-semibold);
    box-shadow: 0 3px 12px rgba(20, 184, 166, 0.28);
}
.ap-btn-add-ifthen:hover {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0ea5e9 60%, #6366f1 100%);
    filter: brightness(1.08);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(20, 184, 166, 0.4);
}

/* Compact variant — sits in the Action Recipes tools row next to
   the Practice pill, so the two recipe actions live together. */
.ap-btn-add-ifthen--sm {
    align-self: auto;
    margin-top: 0;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════
   WIZARD ADDITIONS — textarea, sm gradient button
   ══════════════════════════════════════════════════════════════ */

.ap-textarea {
    resize: vertical;
    min-height: 100px;
    height: auto;
    line-height: var(--leading-relaxed);
}

.ap-btn-gradient--sm {
    padding: 12px 24px;
    font-size: 15px;
    border-radius: 999px;
    font-weight: var(--font-semibold);
    white-space: nowrap;
    width: fit-content;
}

/* ── Action recipe review preview ───────────────────────── */
.ap-flashcard-preview-wrap {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

/* ── Skill-to-card tagging (Step 4 wizard) ───────────────── */
.ap-card-skill-tag-section {
    margin: var(--space-4) 0;
    padding: var(--space-3) var(--space-4);
    background: var(--color-warm-50);
    border: 1.5px solid var(--color-warm-200);
    border-radius: var(--radius-lg);
}

.ap-card-skill-tag-label {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-warm-700);
    margin: 0 0 var(--space-2);
}

.ap-card-skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.ap-card-skill-chip {
    padding: 5px 14px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--color-warm-300);
    background: var(--color-warm-50);
    color: var(--color-warm-700);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.ap-card-skill-chip:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.ap-card-skill-chip--selected {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.ap-card-skill-chip--custom {
    opacity: 0.85;
}

.ap-card-skill-input-row {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.ap-card-skill-input {
    flex: 1;
    padding: 6px 12px;
    border: 1.5px solid var(--color-warm-300);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    color: var(--color-warm-800);
    background: var(--color-warm-50);
    outline: none;
    transition: border-color 0.15s;
}

.ap-card-skill-input:focus {
    border-color: var(--color-primary);
}

.ap-card-skill-input::placeholder {
    color: var(--color-warm-400);
}

.ap-card-skill-add-btn {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--color-primary);
    background: var(--color-warm-50);
    color: var(--color-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.ap-card-skill-add-btn:hover:not(:disabled) {
    background: var(--color-primary);
    color: white;
}

.ap-card-skill-add-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

/* ── Skill tags inside action recipe front face ─────────── */
.ap-flashcard-skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.ap-flashcard-skill-tag {
    font-size: 0.65rem;
    font-weight: var(--font-semibold);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    background: color-mix(in srgb, var(--color-primary) 12%, white);
    /* primary-darker on the mint pill: ~4.9:1 contrast. Plain --color-primary
       was ~2.2:1 — teal-on-mint, unreadable in bright light. */
    color: var(--color-primary-darker);
    border: 1px solid color-mix(in srgb, var(--color-primary) 25%, white);
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dark mode — the light-mint pill glowed against the dark card and kept the
   low-contrast teal text. Use the app's dark chip idiom instead (translucent
   teal fill, bright teal-300 text — same recipe as the active request tab). */
[data-theme="dark"] .ap-flashcard-skill-tag {
    background: rgba(20, 184, 166, 0.14);
    border-color: rgba(45, 212, 191, 0.35);
    color: #5EEAD4;
}

/* Mobile — a touch larger; 0.65rem uppercase was squinting territory. */
@media (max-width: 640px) {
    .ap-flashcard-skill-tag {
        font-size: 0.7rem;
        padding: 3px 9px;
        max-width: 110px;
    }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
    .ap-flashcards-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-3);
    }

    .ap-flashcard-wrap {
        height: 180px;
    }

    .ap-commitment-header {
        padding: var(--space-3) var(--space-4);
    }

    /* The modal body's mobile padding is owned by `.ap-commitment-body--modal`
       above. A generic `.ap-commitment-body { padding }` here has equal
       specificity but, being later in source order, would win and flatten the
       top padding — which is exactly what jammed the first section against the
       meta line. Intentionally omitted. */

    .ap-skill-input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ap-btn-add-skill {
        width: 100%;
    }

    .ap-plans-header {
        justify-content: center;
    }

    .ap-btn-gradient,
    .ap-btn-gradient--sm {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
        padding: 14px 16px;
        font-size: 14px;
        white-space: normal;
        text-align: center;
    }

    .ap-empty-state {
        align-items: center;
    }
    .ap-empty-text {
        text-align: center;
    }
    /* Empty-state CTA hugs its content instead of stretching edge-to-edge. */
    .ap-empty-state .ap-empty-cta {
        width: auto;
        max-width: 100%;
    }
}

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


/* ═══════════════════════════════════════════════════════════════
   FEEDBACK REPORT  (request-detail.html)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Report wrapper ─────────────────────────────────────────── */
/* ============================================================
   REQUEST DETAIL — calm, theme-aware layout
   ============================================================
   Replaces the gradient header + 3-tab structure with:
   - Header strip (calm, surface-raised, accent border-top)
   - Pending strip (compact, collapsible)
   - Segmented toggle (By question / By person)
   - Adaptive: hidden when only 1 giver responded
   All colors flow through role tokens so dark mode "just works".
*/

.rd-back { margin-bottom: 20px; }
.rd-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px 7px 11px;
    border-radius: var(--radius-full);
    background: var(--surface-raised);
    border: 1px solid var(--border-subtle);
    color: var(--color-primary-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: border-color var(--transition-fast), color var(--transition-fast),
                transform var(--transition-fast), box-shadow var(--transition-fast);
}
.rd-back-link:hover {
    border-color: var(--color-primary);
    transform: translateX(-2px);
    box-shadow: var(--shadow-xs);
}
.rd-back-icon { flex-shrink: 0; transition: transform var(--transition-fast); }
.rd-back-link:hover .rd-back-icon { transform: translateX(-2px); }
[data-theme="dark"] .rd-back-link { color: var(--color-primary-light); }

.rd-loading {
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
}

.rd-error { color: var(--color-error); text-align: center; padding: 20px; }

.rd-sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.rd-report {
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* Soften the report's surfaces (scoped here, so the rest of the app is
       untouched). Light mode: warm the near-white cards to a calm ivory so the
       page doesn't read as a wall of white. */
    --surface-raised: #F7F4ED;
    --surface-elevated: #FCFAF4;
    --surface-sunken: #ECE7DD;
}
/* Dark mode: a layered tonal scale so sections read as distinct planes instead
   of one flat black. Backdrop #0F0F12 < controls/track < reading blocks <
   header strip < elevated quote cards. */
[data-theme="dark"] .rd-report {
    --surface-raised: #1B1A20;     /* reading blocks, response cards, explore cards */
    --surface-elevated: #2A2931;   /* quote cards + hovers — the brightest plane */
    --surface-sunken: #131217;     /* recessed toggle track / pill backgrounds */
}
/* The summary card sits one step above the reading blocks below it. */
[data-theme="dark"] .rd-strip { background: #23222B; }
/* Unfilled completion markers read as a soft grey (the near-black sunken token
   made them disappear on the dark card). */
[data-theme="dark"] .rd-seg-cell {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.10);
}

.rd-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ─── Header strip ────────────────────────────────────────────
   Single calm container that holds: request title (small),
   subject + pills, progress, role bars, and pending recipients.
   Teal accent border on top anchors the brand without shouting.
*/
.rd-strip {
    background: var(--surface-raised);
    border: 1px solid var(--border-subtle);
    border-top: 3px solid var(--color-primary);
    border-radius: var(--radius-xl);
    padding: 20px 26px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* Legacy class kept in case any old data path still references it.
   The redesigned header drops the top "request title hint" line — the title
   is the hero now (.rd-strip-name). */
.rd-strip-request-title {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.2px;
    margin-bottom: -4px;
}

.rd-strip-top {
    display: flex;
    justify-content: space-between;
    align-items: center;          /* icon + title read as one left cluster */
    gap: 16px;
}

.rd-strip-focus-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: var(--color-primary-50);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.rd-strip-focus-icon .icon-mask {
    width: 36px;
    height: 36px;
}

.rd-strip-titles { min-width: 0; flex: 1; text-align: left; }

.rd-strip-eyebrow {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.rd-strip-name {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.rd-strip-topic {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 6px;
    line-height: 1.4;
}
.rd-strip-topic-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-right: 4px;
    vertical-align: 1px;
}

.rd-strip-meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex-shrink: 0;
    align-self: flex-start;   /* stay top-right even when the title wraps tall */
}

/* ─── Pills (status, anonymity) — quiet, theme-aware ───────── */
.rd-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    border: 1px solid var(--border-subtle);
    background: var(--surface-sunken);
    color: var(--text-secondary);
}
.rd-pill--active {
    background: var(--color-success-50);
    color: var(--color-success-800);
    border-color: var(--color-success-100);
}
[data-theme="dark"] .rd-pill--active {
    background: rgba(16, 185, 129, 0.16);
    color: #6EE7B7;
    border-color: rgba(110, 231, 183, 0.32);
}
.rd-pill--closed {
    background: var(--surface-sunken);
    color: var(--text-muted);
}
/* Anonymous pill — same anonymity-blue as the per-group eye icons below
   (.rd-group-eye), so the title and group indicators read as one family. */
.rd-pill--anon {
    background: rgba(59, 130, 246, 0.10);
    color: #1E40AF;
    border-color: rgba(59, 130, 246, 0.22);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
[data-theme="dark"] .rd-pill--anon {
    background: rgba(96, 165, 250, 0.16);
    color: #BFDBFE;
    border-color: rgba(96, 165, 250, 0.30);
}
.rd-pill--anon svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Topic pill (E8): "About [topic]" beside Active / Anonymous. */
.rd-pill--topic {
    background: var(--surface-sunken);
    color: var(--text-secondary);
    gap: 5px;
}
.rd-pill-topic-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* E7: on mobile the header centers — icon on its own row, then a centered
   title, focus area, and pills. Focus area moves out of the facts strip and
   under the icon (per the redesign feedback). */
@media (max-width: 768px) {
    .rd-strip-top { flex-direction: column; align-items: center; text-align: center; }
    .rd-strip-focus-icon { align-self: center; }
    /* width:100% so the centered text isn't shrink-wrapped left by the
       align-items:flex-start set on .rd-strip-top in the later mobile block. */
    .rd-strip-titles { text-align: center; width: 100%; }
    .rd-strip-meta-pills { justify-content: center; width: 100%; }
    /* Focus area sits in the facts strip (beside Questions), not as an eyebrow. */
    .rd-strip-focusline { display: none; }
    /* match the centered header */
    .rd-strip-progress-line { justify-content: center; }
}

/* ─── Progress block inside header strip ──────────────────── */
.rd-strip-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rd-strip-progress-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.rd-strip-progress-text {
    font-size: 14px;
    color: var(--text-secondary);
}
.rd-strip-progress-text strong {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 16px;
}
.rd-strip-progress-pct {
    color: var(--text-muted);
    margin-left: 4px;
}

/* Subtitle under the title: focus area · About topic.
   Centered under the title on desktop (the titles block is left-aligned there,
   so center the sub explicitly); mobile already centers the whole block. */
.rd-strip-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.4;
    text-align: center;
}
.rd-strip-sub-about {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-right: 2px;
}
/* Focus area: shown in the facts strip on desktop; this mobile-only eyebrow
   re-surfaces it under the icon (above the title), centered. */
.rd-strip-focusline {
    display: none;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-primary-dark);
    margin-bottom: 4px;
}
[data-theme="dark"] .rd-strip-focusline { color: var(--color-primary-light); }

/* Progress line: count + segmented bar */
.rd-strip-progress-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}
.rd-strip-progress-seg { display: inline-flex; }
.rd-strip-progress-state { color: var(--text-muted); font-weight: 500; }
.rd-strip-progress-state--complete { color: var(--color-success-600); font-weight: 600; }

/* Segmented progress — one cell per giver, filled when responded. Used in the
   header and per-group rows; reads clearly down to two givers. */
.rd-seg { display: inline-flex; align-items: center; gap: 3px; }
.rd-seg-cell {
    width: 18px;
    height: 6px;
    border-radius: 3px;
    background: var(--surface-sunken);
    border: 1px solid var(--border-subtle);
}
.rd-seg-cell.is-done {
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    border-color: transparent;
}
/* Continuous fallback when there are many givers */
.rd-seg--bar {
    display: inline-block;
    width: 160px;
    height: 6px;
    border-radius: 999px;
    background: var(--surface-sunken);
    overflow: hidden;
}
.rd-seg-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    border-radius: 999px;
}

/* Centered facts strip (deadline · questions · givers · download) */
.rd-strip-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: 14px 0;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}
.rd-fact {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
/* Light vertical divider between facts so the row reads as distinct columns. */
.rd-fact + .rd-fact {
    margin-left: 26px;
    padding-left: 26px;
    border-left: 1px solid var(--border-subtle);
}
@media (max-width: 600px) {
    /* Focus area + Questions share a two-column row to save vertical space;
       the deadline (with its extension chain) drops to a full-width row below. */
    .rd-strip-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; align-items: start; }
    .rd-fact { order: 2; align-items: center; text-align: center; }
    .rd-fact--focus { order: 1; }
    .rd-fact--deadline { order: 3; grid-column: 1 / -1; }
    .rd-fact-value { justify-content: center; }
    .rd-fact + .rd-fact { margin-left: 0; padding-left: 0; border-left: none; }
    .rd-deadline-history { text-align: center; }
}
.rd-fact-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
}
.rd-fact-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    /* Center the value in a consistent row so the pill-shaped Deadline lines up
       with the plain-text values beside it. */
    display: flex;
    align-items: center;
    min-height: 24px;
}
/* In the facts strip the deadline pill is a standalone value — drop the inline
   left margin so it left-aligns under its label like the others. */
.rd-fact-value .rd-deadline-edit { margin-left: 0; }

/* ── Questions expander — "what did I actually ask?" ──────────────────────────
   The Questions fact doubles as a toggle; the read-only list of question texts
   renders full-width below the facts row, collapsed by default. */
.rd-questions-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
}
.rd-questions-toggle-hint {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-primary-dark);
}
.rd-questions-toggle:hover .rd-questions-toggle-hint { text-decoration: underline; }
.rd-questions-toggle-caret {
    font-size: 10px;
    color: var(--color-warm-500);
    transition: transform 0.2s ease;
}
.rd-questions-toggle--open .rd-questions-toggle-caret { transform: rotate(180deg); }

.rd-questions-list {
    margin: 12px 0 0;
    padding: 12px 16px 12px 34px;
    background: var(--color-warm-50);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
}
.rd-questions-item {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--color-warm-700);
    padding: 3px 0;
}
[data-theme="dark"] .rd-questions-list {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .rd-questions-toggle-hint { color: #5EEAD4; }

/* Results card — the Questions count links to the detail page's expander. */
.rq-meta-qlink {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    color: inherit;
    text-decoration: none;
}
.rq-meta-qlink-hint {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-primary-dark);
}
.rq-meta-qlink:hover .rq-meta-qlink-hint { text-decoration: underline; }
[data-theme="dark"] .rq-meta-qlink-hint { color: #5EEAD4; }
.rd-strip-facts-action {
    margin-left: auto;
    align-self: center;
}
@media (max-width: 600px) {
    .rd-strip-facts-action { margin-left: 0; width: 100%; }
    .rd-strip-facts-action .rd-download-btn { width: 100%; justify-content: center; }
}

/* Right-side cluster on the progress row: due-date chip + download button. */
.rd-strip-progress-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}

/* ─── Editable deadline (inline) ─────────────────────────── */
/* Shared by the request-detail header strip and the results-page meta row.
   The pencil is always visible so the affordance reads as editable at rest;
   the chip background brightens on hover/focus for affordance reinforcement. */
.rd-deadline-edit {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 4px;
    padding: 2px 8px 2px 8px;
    background: var(--surface-sunken);
    border: 1px solid var(--border-default, #E5E7EB);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font: inherit;
    line-height: inherit;
    cursor: pointer;
    transition: background 0.15s var(--ease-smooth),
                border-color 0.15s var(--ease-smooth),
                color 0.15s var(--ease-smooth),
                box-shadow 0.15s var(--ease-smooth);
}
.rd-deadline-edit:hover {
    background: var(--surface-elevated, #fff);
    border-color: var(--color-primary, #14B8A6);
    color: var(--text-primary);
}
.rd-deadline-edit:focus-visible {
    outline: none;
    border-color: var(--color-primary, #14B8A6);
    box-shadow: 0 0 0 3px var(--focus-ring);
}
.rd-deadline-edit--add {
    background: rgba(20, 184, 166, 0.10);
    border-color: rgba(20, 184, 166, 0.35);
    color: var(--color-primary, #14B8A6);
    font-weight: 600;
}
.rd-deadline-edit--add:hover {
    background: rgba(20, 184, 166, 0.16);
    border-color: var(--color-primary, #14B8A6);
    color: var(--color-primary, #14B8A6);
}
.rd-deadline-pencil {
    opacity: 0;
    flex-shrink: 0;
    transition: opacity 0.15s var(--ease-smooth);
}
.rd-deadline-edit:hover .rd-deadline-pencil,
.rd-deadline-edit:focus-visible .rd-deadline-pencil {
    opacity: 1;
}

/* Leading calendar glyph on the due-date chip (replaces the old "·" prefix). */
.rd-deadline-cal {
    flex-shrink: 0;
    opacity: 0.7;
    color: var(--color-primary);
}
.rd-deadline-edit:hover .rd-deadline-cal,
.rd-deadline-edit:focus-visible .rd-deadline-cal {
    opacity: 1;
}
.rd-deadline-edit--add .rd-deadline-cal { opacity: 0.95; }

/* Static (read-only) due-date chip — shown on closed requests, no pencil. */
.rd-deadline-static {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 12px;
    background: var(--surface-sunken);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    white-space: nowrap;
}

/* In the progress-row actions cluster the chip is spaced by flex gap, and
   sized to sit calmly beside the Download button. */
.rd-strip-progress-actions .rd-deadline-edit {
    margin-left: 0;
    font-size: 13px;
    line-height: 1.5;
    padding: 3px 12px;
}

/* Brief teal pulse after a successful deadline save — confirms the change
   landed exactly where the user clicked. JS adds and removes the class. */
@keyframes rdDeadlineFlash {
    0% {
        background: rgba(20, 184, 166, 0.32);
        border-color: var(--color-primary, #14B8A6);
        box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.20);
        color: var(--color-primary-darker, #0F766E);
    }
    100% {
        background: var(--surface-sunken);
        border-color: var(--border-default, #E5E7EB);
        box-shadow: 0 0 0 0 rgba(20, 184, 166, 0);
        color: var(--text-secondary);
    }
}
.rd-deadline-edit--flash {
    animation: rdDeadlineFlash 1500ms var(--ease-smooth) both;
}

.rd-deadline-editor {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 4px;
    padding: 3px 6px;
    background: var(--surface-elevated, #fff);
    border: 1px solid var(--border-default, #E5E7EB);
    border-radius: var(--radius-full);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    vertical-align: middle;
}
.rd-deadline-editor-label {
    font-size: 12px;
    color: var(--text-muted);
    padding-left: 4px;
}
.rd-deadline-input {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    font-size: 13px;
    color: var(--text-primary);
    background: transparent;
    border: 0;
    padding: 2px 4px;
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    min-width: 130px;
}
.rd-deadline-input:focus {
    outline: none;
    background: var(--surface-sunken);
}
.rd-deadline-btn {
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s var(--ease-smooth),
                border-color 0.15s var(--ease-smooth),
                color 0.15s var(--ease-smooth);
}
.rd-deadline-btn--save {
    background: var(--color-primary, #14B8A6);
    color: #fff;
}
.rd-deadline-btn--save:hover:not(:disabled) {
    background: var(--color-primary-dark, #0F9488);
}
.rd-deadline-btn--save:disabled {
    opacity: 0.6;
    cursor: default;
}
.rd-deadline-btn--cancel {
    background: transparent;
    color: var(--text-muted);
}
.rd-deadline-btn--cancel:hover {
    background: var(--surface-sunken);
    color: var(--text-secondary);
}

.rd-progress-track {
    height: 10px;
    background: var(--surface-sunken);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.rd-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    border-radius: var(--radius-full);
    transition: width 0.4s var(--ease-smooth);
}

/* .rd-strip-deadline retired — deadline now lives inline with progress text
   via .rd-strip-progress-pct. Selector kept harmless in case stale markup
   exists in the wild. */
.rd-strip-deadline {
    font-size: 12px;
    color: var(--text-muted);
}

/* ─── Download button ─────────────────────────────────────── */
.rd-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(20, 184, 166, 0.26);
    transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.rd-download-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.34);
}
.rd-download-btn:active { transform: translateY(0); }
.rd-download-icon {
    display: inline-flex;
    align-items: center;
}
.rd-download-icon svg {
    width: 15px;
    height: 15px;
    display: block;
}

/* ─── Pending section — INSIDE the header strip ──────────────
   Subtle top divider, no separate background. Collapsed shows
   one row; expanded reveals the list of pending people with
   person icons. Anonymous mode shows count only, no expand.
*/
.rd-pending-section {
    margin: 4px -26px -20px;
    padding: 0 8px;
    border-top: 1px solid var(--border-subtle);
    background: var(--surface-sunken);
}
[data-theme="dark"] .rd-pending-section {
    background: rgba(255,255,255,0.02);
}

.rd-pending-section-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 13px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}
.rd-pending-section-toggle:hover:not(:disabled) {
    background: var(--hover-overlay);
}
.rd-pending-section-toggle:disabled {
    cursor: default;
}

.rd-pending-section-icon {
    font-size: 14px;
    opacity: 0.7;
}
.rd-pending-section-summary {
    flex: 1;
    color: var(--text-secondary);
}
.rd-pending-section-summary strong { color: var(--text-primary); }
.rd-pending-section-hint {
    color: var(--text-muted);
    font-weight: 400;
}
.rd-pending-section-caret {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}
.rd-pending-section--open .rd-pending-section-caret {
    transform: rotate(180deg);
}

.rd-pending-section-list {
    list-style: none;
    margin: 0;
    padding: 0 18px 12px;
    display: none;
    flex-direction: column;
    gap: 2px;
}
.rd-pending-section--open .rd-pending-section-list {
    display: flex;
}

.rd-pending-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 8px;
    border-radius: var(--radius-md);
    font-size: 13px;
    transition: background var(--transition-fast);
}
.rd-pending-row:hover { background: var(--hover-overlay); }

.rd-pending-row-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface-sunken);
    color: var(--text-muted);
    flex-shrink: 0;
}
.rd-pending-row-name {
    color: var(--text-primary);
    font-weight: 500;
}
.rd-pending-row-email {
    color: var(--text-muted);
    font-size: 12px;
    text-align: right;
}

/* Generic person icon — used wherever a small person glyph is needed */
.rd-person-icon { display: inline-block; vertical-align: middle; }

/* ─── View controls row (toggle + expand-all) ──────────────── */
.rd-view-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.rd-view-controls--single {
    justify-content: flex-end;
}

.rd-expand-all-btn {
    /* Light mode: a real lifted pill (warm elevated surface + defined
       border + hair of shadow) instead of a washed-out transparent ghost. */
    background: var(--surface-elevated);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: all var(--transition-fast);
}
.rd-expand-all-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-50);
}
/* Dark mode keeps the lighter ghost look — no filled surface or shadow. */
[data-theme="dark"] .rd-expand-all-btn {
    background: transparent;
    border-color: var(--border-subtle);
    box-shadow: none;
}
[data-theme="dark"] .rd-expand-all-btn:hover { color: var(--color-primary-light); }

/* ─── Segmented toggle (By question / By person) ───────────── */
.rd-toggle {
    display: inline-flex;
    align-self: flex-start;
    background: var(--surface-sunken);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 3px;
}
.rd-toggle-btn {
    padding: 6px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.rd-toggle-btn:hover { color: var(--text-primary); }
.rd-toggle-btn--active {
    background: var(--surface-raised);
    color: var(--color-primary-dark);
    font-weight: 600;
    box-shadow: var(--shadow-xs);
}
[data-theme="dark"] .rd-toggle-btn--active {
    color: var(--color-primary-light);
}

.rd-view { display: none; flex-direction: column; gap: 16px; }
.rd-view--active { display: flex; }

/* ─── Section wrapper (legacy — used by MC summary) ─────────── */
.rd-section {
    background: var(--surface-raised);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.rd-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--color-gray-700);
    margin-bottom: 4px;
}

.rd-section-sub {
    font-size: 13px;
    color: var(--color-gray-400);
    margin-bottom: 16px;
}

.rd-empty {
    padding: 40px 24px;
    text-align: center;
    color: var(--color-gray-400);
    font-size: 14px;
    background: var(--color-warm-50);
    border: 1px dashed var(--color-gray-200);
    border-radius: 12px;
}

/* ─── Participation tiles ────────────────────────────────────── */
.rd-stat-tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.rd-stat-tile {
    padding: 16px;
    background: var(--color-gray-50);
    border: 1px solid var(--color-gray-200);
    border-radius: 10px;
    text-align: center;
}

.rd-stat-tile--accent {
    background: var(--color-primary-50);
    border-color: #99f6e4;
}

.rd-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-gray-900);
    line-height: 1;
    margin-bottom: 4px;
}

.rd-stat-tile--accent .rd-stat-value { color: var(--color-primary-darker); }

.rd-stat-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-gray-400);
}

/* ─── Group participation breakdown ──────────────────────────── */
/* Per-group response status as a compact 2-up grid. Each cell shows the
   group, an "n of m" count, and a row of avatars (filled teal = responded,
   dashed = still awaited). Fully-collected groups read in brand teal so the
   requester can scan which cohorts are in at a glance. */
.rd-group-section {
    border-top: 1px solid var(--border-subtle);
    padding-top: 16px;
}

/* Collapsible toggle for the group breakdown (collapsed by default). */
.rd-group-section-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    text-align: center;
}
.rd-group-section-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.rd-group-section-meta {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-subtle);
}
.rd-group-section-hint {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-primary-dark);
}
[data-theme="dark"] .rd-group-section-hint { color: var(--color-primary-light); }
.rd-group-section-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid var(--color-primary);
    background: var(--color-primary-50);
    color: var(--color-primary-dark);
    transition: transform 0.2s ease, background 0.15s ease;
}
[data-theme="dark"] .rd-group-section-caret { color: var(--color-primary-light); }
.rd-group-section-toggle:hover .rd-group-section-hint { color: var(--color-primary); }
.rd-group-section-toggle:hover .rd-group-section-caret { background: rgba(20, 184, 166, 0.16); }
.rd-group-section--open .rd-group-section-caret { transform: rotate(180deg); }
/* Collapsed by default; the rows' grid/flex display returns when open. */
.rd-group-section:not(.rd-group-section--open) .rd-group-rows { display: none; }
.rd-group-section--open .rd-group-rows { margin-top: 14px; }

/* Group rows form one shared grid (rows are subgrid) so name · count · bar ·
   chip line up as true columns, while each row stays a real box with a hairline
   separator beneath it — reads as a tidy mini-table, not a dense stack. */
.rd-group-rows {
    display: grid;
    grid-template-columns: auto auto minmax(40px, 1fr) auto;
    column-gap: 18px;
    row-gap: 0;
}
.rd-group-row {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.rd-group-row:first-child { padding-top: 2px; }
.rd-group-row:last-child { padding-bottom: 0; border-bottom: none; }
.rd-group-row-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 0;
    /* breathing room before the count/bar column */
    padding-right: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rd-group-row-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.rd-group-row-done { color: var(--color-primary); font-weight: 700; }
.rd-group-row--empty .rd-group-row-done { color: inherit; font-weight: 600; }
.rd-group-row-seg {
    display: flex;
    align-items: center;
    min-width: 0;
}
.rd-group-row--complete .rd-group-row-label { color: var(--text-primary); }
.rd-group-row--complete .rd-group-row-count { color: var(--color-primary); }
/* Mobile: each group is its own block (the desktop display:contents grid blurs
   them together at this width). Label on its own line; then count · bar · chip,
   with counts left-aligned and chips right-aligned so they line up across
   groups. A clear gap separates one group from the next. */
@media (max-width: 560px) {
    .rd-group-rows {
        display: flex;
        flex-direction: column;
        align-items: stretch;   /* override the grid's align-items:center, which
                                   in a flex column would centre each group */
        gap: 16px;
        text-align: left;
    }
    .rd-group-row {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "label label label"
            "count seg   chip";
        justify-items: start;
        align-items: center;
        gap: 8px 10px;
        /* the 16px column gap separates groups on mobile; drop the table rule */
        padding: 0;
        border-bottom: none;
    }
    .rd-group-row-label {
        grid-area: label;
        white-space: normal;
        overflow: visible;
    }
    .rd-group-row-count { grid-area: count; }
    .rd-group-row-seg   { grid-area: seg; }
    .rd-group-chip      { grid-area: chip; justify-self: end; }
}

/* Per-group status chip — bound to its own row, so the anonymity state reads
   unambiguously for that group (no more floating "Hidden until…" line). */
.rd-group-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    justify-self: end;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
}
.rd-group-chip svg { width: 11px; height: 11px; flex-shrink: 0; }
.rd-group-chip--revealed,
.rd-group-chip--complete {
    background: rgba(13, 148, 136, 0.12);
    color: var(--color-primary-dark);
    border-color: rgba(13, 148, 136, 0.26);
}
.rd-group-chip--hidden {
    background: rgba(202, 138, 4, 0.13);
    color: #92400E;
    border-color: rgba(202, 138, 4, 0.30);
}
.rd-group-chip--pending {
    background: var(--surface-sunken);
    color: var(--text-muted);
    border-color: var(--border-subtle);
}
[data-theme="dark"] .rd-group-chip--revealed,
[data-theme="dark"] .rd-group-chip--complete { color: var(--color-primary-light); }
[data-theme="dark"] .rd-group-chip--hidden {
    background: rgba(251, 191, 36, 0.16);
    color: #FCD34D;
    border-color: rgba(251, 191, 36, 0.30);
}
/* Awaiting chip: the scoped --surface-sunken is near-black in dark mode, which
   looked bad — use a soft grey instead. */
[data-theme="dark"] .rd-group-chip--pending {
    background: rgba(255, 255, 255, 0.09);
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.14);
}

/* Jump-enabled chip (Revealed / View / Complete) — clickable, scrolls to the
   matching group section in the responses below. */
.rd-group-chip { font-family: var(--font-sans); }
.rd-group-chip--link { cursor: pointer; transition: filter 0.15s ease, transform 0.15s ease; }
.rd-group-chip--link:hover { filter: brightness(0.97); transform: translateX(1px); }
.rd-group-chip-arrow { width: 11px; height: 11px; margin-left: 1px; }

/* Per-group anonymity indicator — a plain icon (no pill): eye = named
   (exception), eye-crossed = anonymous. Both in the anonymity blue. */
.rd-group-eye {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    vertical-align: middle;
    color: #1E40AF;
}
.rd-group-eye svg { width: 14px; height: 14px; flex-shrink: 0; }
[data-theme="dark"] .rd-group-eye { color: #BFDBFE; }

/* "Done" status chip — perspectives are in/viewable for this group (teal). */
.rd-group-chip--done {
    background: rgba(13, 148, 136, 0.12);
    color: var(--color-primary-dark);
    border-color: rgba(13, 148, 136, 0.26);
}
[data-theme="dark"] .rd-group-chip--done { color: var(--color-primary-light); }

/* ─── Perspectives section header (introduces the responses) ─────── */
.rd-perspectives { display: flex; flex-direction: column; gap: 18px; }
.rd-perspectives-head {
    display: flex;
    flex-direction: column;
    gap: 14px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 20px;
}
.rd-perspectives-intro-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 22px;
}

/* Explore chooser: pick how to view the perspectives (read here / present). */
.rd-explore {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.rd-explore-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    text-align: left;
    padding: 18px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    background: var(--surface-raised);
    cursor: pointer;
    font-family: var(--font-sans);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.rd-explore-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}
.rd-explore-icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    margin-bottom: 4px;
    background: var(--color-primary-50);
    color: var(--color-primary-dark);
}
[data-theme="dark"] .rd-explore-icon { color: var(--color-primary-light); }
.rd-explore-card--present .rd-explore-icon {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
}
.rd-explore-name { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.rd-explore-desc { font-size: 13px; line-height: 1.45; color: var(--text-muted); }
.rd-views-wrap { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 600px) {
    .rd-explore { grid-template-columns: 1fr; }
}

.rd-perspectives-title {
    font-family: var(--font-display);
    /* Significantly larger, but clamped so it stays proportional from
       mobile (≈28px) up to desktop (36px). */
    font-size: clamp(28px, 6vw, 36px);
    font-weight: 600;
    line-height: 1.15;
    color: var(--text-primary);
    margin: 0;
}
.rd-perspectives-sub {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}
.rd-perspectives-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rd-perspectives-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.rd-views { display: flex; flex-direction: column; }

/* "Present" — secondary outline action (Download report stays the primary) */
.rd-present-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-primary);
    background: transparent;
    color: var(--color-primary-dark);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.rd-present-btn:hover { background: var(--color-primary); color: var(--text-on-brand); }
.rd-present-btn svg { width: 14px; height: 14px; }
[data-theme="dark"] .rd-present-btn { color: var(--color-primary-light); border-color: var(--color-primary-light); }
[data-theme="dark"] .rd-present-btn:hover { color: #06251f; }

@media (max-width: 600px) {
    .rd-perspectives-controls { align-items: stretch; }
    .rd-perspectives-controls .rd-toggle { width: 100%; }
    .rd-perspectives-controls .rd-toggle-btn { flex: 1; }
    .rd-perspectives-actions { margin-left: 0; width: 100%; justify-content: center; }
}

/* ─── Anchored group sections (jump targets in By group / By person) ─ */
.rd-group-block { scroll-margin-top: 16px; }
.rd-group-block-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}
.rd-group-block-label {
    font-family: var(--font-sans);
    /* Significantly larger group names, clamped to stay proportional
       across mobile (16px) and desktop (18px). */
    font-size: clamp(16px, 4vw, 18px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}
.rd-group-block-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.rd-group-block-body { display: flex; flex-direction: column; gap: 12px; }
@keyframes rd-grp-flash {
    0%   { background: var(--color-primary-50); }
    100% { background: transparent; }
}
.rd-group-block--flash { animation: rd-grp-flash 1.2s ease-out; border-radius: 12px; }

/* ─── Presentation mode (full-screen, one perspective per slide) ──── */
body.rd-present-lock { overflow: hidden; }
.rd-present {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    background: var(--gradient-warm);
}
.rd-present[hidden] { display: none; }

.rd-present-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
}
.rd-present-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-display);
    font-size: 15px;
    color: var(--text-muted);
}
.rd-present-pos {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    letter-spacing: 0.02em;
}
.rd-present-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: var(--surface-raised);
    color: var(--text-secondary);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.rd-present-close:hover { color: var(--text-primary); border-color: var(--border-default); }

/* In-overlay theme toggle: bottom-right on desktop; moves between Prev/Next on
   mobile (it's a child of .rd-present-nav). The global floating toggle is
   hidden while presenting. */
.rd-present-theme {
    position: absolute;
    right: 24px;
    bottom: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: var(--surface-raised);
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.rd-present-theme:hover { color: var(--text-primary); border-color: var(--border-default); transform: translateY(-1px); }
.rd-present-theme svg { width: 18px; height: 18px; }
body.rd-present-lock .zen-theme-toggle { display: none; }

/* Practice mode is a full-screen overlay (z 4000); hide the floating
   theme toggle (z 9999) so it doesn't sit on top of the close button. */
body.ap-practice-lock .zen-theme-toggle { display: none; }

.rd-present-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 24px;
    min-height: 0;
    overflow: auto;
    scroll-behavior: smooth;
}
/* When even the smallest size can't fit, top-align and let it scroll, with a
   soft fade at the top/bottom edges so text glides in and out gracefully. */
.rd-present-stage--scroll {
    align-items: flex-start;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
}
.rd-present-stage::-webkit-scrollbar { width: 8px; }
.rd-present-stage::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 999px;
}
.rd-present-card {
    width: 100%;
    max-width: 760px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    text-align: center;
}
.rd-present-q {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--color-primary-dark);
}
[data-theme="dark"] .rd-present-q { color: var(--color-primary-light); }
.rd-present-quote {
    font-family: var(--font-display);
    font-size: clamp(22px, 3.4vw, 34px);
    line-height: 1.4;
    color: var(--text-primary);
    white-space: pre-wrap;
    /* Unbroken runs (long URLs, "AAAA…") must wrap instead of forcing
       horizontal scroll on the slide. */
    overflow-wrap: anywhere;
}
.rd-present-who {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
}

/* Growth-mindset welcome slide */
.rd-present-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}
.rd-present-intro-eyebrow {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary-dark);
}
[data-theme="dark"] .rd-present-intro-eyebrow { color: var(--color-primary-light); }
.rd-present-intro-title {
    font-family: var(--font-display);
    font-size: clamp(24px, 3.6vw, 34px);
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-primary);
}
.rd-present-intro-body {
    font-family: var(--font-sans);
    font-size: clamp(15px, 1.8vw, 17px);
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}
.rd-present-begin {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(20, 184, 166, 0.3);
    transition: filter 0.15s ease, transform 0.15s ease;
}
.rd-present-begin:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* Save-as-gem control on a present slide */
.rd-present-gem-btn {
    margin: 10px auto 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-default);
    background: var(--surface-raised);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.rd-present-gem-btn:hover { border-color: var(--color-primary); color: var(--color-primary-dark); }
.rd-present-gem-btn svg { width: 16px; height: 16px; }
.rd-present-gem {
    width: 100%;
    max-width: 520px;
    margin: 12px auto 0;
    text-align: left;
    background: var(--surface-raised);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 12px 14px;
}
.rd-present-gem-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.rd-present-gem-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary-dark);
}
[data-theme="dark"] .rd-present-gem-status { color: var(--color-primary-light); }
.rd-present-gem-status svg { width: 16px; height: 16px; }
.rd-present-gem-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: underline;
}
.rd-present-gem-remove:hover { color: var(--color-error-600); }
.rd-present-gem-note,
.rd-present-reflect-note {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    min-height: 64px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    background: var(--surface-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
}
.rd-present-gem-note:focus,
.rd-present-reflect-note:focus { outline: none; border-color: var(--color-primary); }
/* iOS Safari zooms the whole page when a focused field's font-size is
   under 16px — keep these at 16px on touch widths. */
@media (max-width: 768px) {
    .rd-present-gem-note,
    .rd-present-reflect-note { font-size: 16px; }
}

/* Per-question reflection slide */
.rd-present-reflect {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}
.rd-present-reflect-eyebrow {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
[data-theme="dark"] .rd-present-reflect-eyebrow { color: var(--color-primary-light); }
.rd-present-reflect-optional {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: 999px;
    padding: 2px 9px;
}
/* The prominent line is the invitation to pause — moderate, not headline-huge. */
.rd-present-reflect-lead {
    font-family: var(--font-display);
    font-size: clamp(18px, 2.1vw, 22px);
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
}
/* The question being reflected on — quiet, secondary reference. */
.rd-present-reflect-ref {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.rd-present-reflect-ref-label {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.rd-present-reflect-ref-q {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.45;
    font-style: italic;
    color: var(--text-secondary);
}
.rd-present-reflect-prompt {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
    color: var(--color-primary-dark);
    margin: 0;
}
[data-theme="dark"] .rd-present-reflect-prompt { color: var(--color-primary-light); }
.rd-present-reflect-note { min-height: 120px; text-align: left; }
.rd-present-reflect-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 34px;
}
.rd-present-reflect-save {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius-md);
    padding: 8px 18px;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}
.rd-present-reflect-save:hover { background: var(--color-primary-dark); }
.rd-present-reflect-save:disabled { opacity: 0.45; cursor: default; }
.rd-present-reflect-status {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-success-600);
}
.rd-present-sbi {
    text-align: left;
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
}
.rd-present-sbi-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-primary-dark);
}
[data-theme="dark"] .rd-present-sbi-label { color: var(--color-primary-light); }
.rd-present-sbi-text {
    font-family: var(--font-display);
    font-size: clamp(18px, 2.4vw, 24px);
    line-height: 1.4;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.rd-present-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 14px 24px;
}
.rd-present-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-default);
    background: var(--surface-raised);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.rd-present-arrow:hover:not(:disabled) { border-color: var(--color-primary); color: var(--color-primary-dark); }
.rd-present-arrow:disabled { opacity: 0.4; cursor: default; }
/* Last slide: the forward button becomes a primary "Finish" (saves + exits). */
.rd-present-arrow--finish {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(20, 184, 166, 0.28);
}
.rd-present-arrow--finish:hover:not(:disabled) {
    border-color: transparent;
    color: #fff;
    filter: brightness(1.05);
}

.rd-present-progress {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 50%;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}
.rd-present-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border-default);
    transition: transform 0.2s ease, background 0.2s ease;
}
.rd-present-dot.is-active { background: var(--color-primary); transform: scale(1.4); }
.rd-present-dot.is-group-start { margin-left: 10px; }

.rd-present-hints {
    text-align: center;
    padding: 0 24px 20px;
    font-size: 11.5px;
    color: var(--text-subtle);
    letter-spacing: 0.02em;
}

@media (max-width: 600px) {
    .rd-present-progress { display: none; }
    .rd-present-hints { display: none; }
    .rd-present-nav { justify-content: space-between; gap: 12px; }
    .rd-present-bar { padding: 14px 16px; }
    .rd-present-stage { padding: 12px 18px; }
    /* Theme toggle rejoins the nav flow, sitting between Prev and Next. */
    .rd-present-theme { position: static; right: auto; bottom: auto; width: 38px; height: 38px; }
}

/* Overall giver-status avatar row in the header strip (E9). */
.rd-strip-avatars {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex: 1;
}
.rd-strip-avatar-more {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 2px;
}

/* ─── Highlights ─────────────────────────────────────────────── */
.rd-highlights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 4px;
}

.rd-highlights-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rd-highlights-heading {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-gray-200);
    margin-bottom: 4px;
}

.rd-highlights-heading--top { color: var(--color-primary-darker); border-color: #99f6e4; }
.rd-highlights-heading--dev { color: var(--color-warning-600); border-color: var(--color-warning-200); }

.rd-highlight-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rd-highlight-q {
    font-size: 13px;
    color: var(--color-gray-700);
    font-weight: 500;
    line-height: 1.4;
}

.rd-highlight-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rd-highlight-bar-track {
    flex: 1;
    height: 6px;
    background: var(--color-gray-100);
    border-radius: 3px;
    overflow: hidden;
}

.rd-highlight-bar-fill {
    height: 100%;
    border-radius: 3px;
}

.rd-highlight-bar--top { background: linear-gradient(90deg, var(--color-primary), var(--color-success)); }
.rd-highlight-bar--dev { background: linear-gradient(90deg, var(--color-warning), var(--color-error)); }

.rd-highlight-score {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-gray-900);
    white-space: nowrap;
}

.rd-highlight-anchor {
    font-size: 11px;
    color: var(--color-gray-400);
    white-space: nowrap;
}

/* ─── Alignment ──────────────────────────────────────────────── */
.rd-align-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 4px;
}

.rd-align-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-gray-100);
}

.rd-align-row:last-child { border-bottom: none; }

.rd-align-q {
    font-size: 13px;
    color: var(--color-gray-700);
    flex: 1;
    line-height: 1.4;
}

.rd-align-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.rd-align-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.rd-align-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--color-gray-200);
    color: var(--color-gray-700);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* color dots by value */
.rd-align-dot[data-val="1"] { background: var(--color-error-100); color: var(--color-error-700); }
.rd-align-dot[data-val="2"] { background: var(--color-warning-100); color: var(--color-warning-700); }
.rd-align-dot[data-val="3"] { background: #e0f2fe; color: #0369a1; }
.rd-align-dot[data-val="4"] { background: var(--color-success-100); color: var(--color-success-800); }
.rd-align-dot[data-val="5"] { background: #ccfbf1; color: var(--color-primary-darker); }

.rd-align-legend {
    margin-top: 16px;
    font-size: 12px;
    color: var(--color-gray-400);
}

/* ─── Tags ───────────────────────────────────────────────────── */
.rd-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.rd-tag--agree { background: var(--color-success-100); color: var(--color-success-800); }
.rd-tag--mixed { background: var(--color-warning-100); color: var(--color-warning-800); }
.rd-tag--split { background: var(--color-error-100); color: var(--color-error-800); }

/* ─── Scores by question ─────────────────────────────────────── */
.rd-score-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 4px;
}

.rd-score-row {
    padding: 14px 0;
    border-bottom: 1px solid var(--color-gray-100);
}

.rd-score-row:last-child { border-bottom: none; }

.rd-score-q {
    font-size: 14px;
    color: var(--color-gray-900);
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
}

.rd-score-bar-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rd-score-bar-track {
    flex: 1;
    height: 10px;
    background: var(--color-gray-100);
    border-radius: 5px;
    overflow: hidden;
}

.rd-score-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), #0ea5e9);
    border-radius: 5px;
    transition: width 0.4s ease;
}

.rd-score-right {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-shrink: 0;
}

.rd-score-num {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-gray-900);
    line-height: 1;
}

.rd-score-of {
    font-size: 13px;
    color: var(--color-gray-400);
}

.rd-score-anchor {
    font-size: 12px;
    color: var(--color-gray-500);
    font-weight: 500;
}

.rd-score-meta {
    font-size: 11px;
    color: var(--color-gray-400);
    margin-top: 4px;
}

.rd-score-empty {
    font-size: 13px;
    color: var(--color-gray-400);
    font-style: italic;
}

/* ─── Group comparison table ─────────────────────────────────── */
.rd-gtable-wrap {
    overflow-x: auto;
    margin-top: 4px;
    border-radius: 8px;
    border: 1px solid var(--color-gray-200);
}

.rd-gtable {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.rd-gtable-th {
    padding: 10px 14px;
    background: var(--color-gray-50);
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-gray-500);
    border-bottom: 1px solid var(--color-gray-200);
    white-space: nowrap;
}

.rd-gtable-th--question { text-align: left; min-width: 200px; }
.rd-gtable-th--overall  { background: var(--color-primary-50); color: var(--color-primary-darker); }
.rd-gtable-th--locked   { color: var(--color-gray-300); }

.rd-gtable-row:nth-child(even) td { background: #fafafa; }

.rd-gtable-q {
    padding: 12px 14px;
    font-size: 13px;
    color: var(--color-gray-700);
    font-weight: 500;
    line-height: 1.4;
    border-right: 1px solid var(--color-gray-100);
}

.rd-gtable-td {
    padding: 10px 14px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid var(--color-gray-100);
}

.rd-gtable-td--overall { background: var(--color-primary-50) !important; }
.rd-gtable-td--locked  { color: var(--color-gray-300); }
.rd-gtable-td--empty   { color: var(--color-gray-300); font-size: 16px; }

.rd-gtable-score {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 4px;
}

.rd-gtable-bar-track {
    height: 5px;
    background: var(--color-gray-100);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto;
    max-width: 80px;
}

.rd-gtable-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), #0ea5e9);
    border-radius: 3px;
}

.rd-gtable-lock { font-size: 14px; }

/* ─── Gap badges ─────────────────────────────────────────────── */
.rd-gap-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 4px;
}

.rd-gap-badge--high { background: var(--color-error-100); color: var(--color-error-700); }
.rd-gap-badge--med  { background: var(--color-warning-100); color: var(--color-warning-800); }

.rd-gap-legend {
    margin-top: 12px;
    font-size: 12px;
    color: var(--color-gray-400);
}

/* ─── Multiple choice ────────────────────────────────────────── */
.rd-mc-block {
    margin-bottom: 20px;
}

.rd-mc-block:last-child { margin-bottom: 0; }

.rd-mc-q {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-gray-900);
    margin-bottom: 10px;
    line-height: 1.4;
}

.rd-mc-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.rd-mc-choice {
    font-size: 13px;
    color: var(--color-gray-700);
    min-width: 130px;
    flex-shrink: 0;
}

.rd-mc-bar-track {
    flex: 1;
    height: 8px;
    background: var(--color-gray-100);
    border-radius: 4px;
    overflow: hidden;
}

.rd-mc-bar-fill {
    height: 100%;
    background: var(--color-gray-200);
    border-radius: 4px;
}

.rd-mc-bar-fill--active {
    background: linear-gradient(90deg, var(--color-primary), #0ea5e9);
}

.rd-mc-stat {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-gray-700);
    min-width: 50px;
    text-align: right;
    white-space: nowrap;
}

.rd-mc-pct {
    font-size: 11px;
    color: var(--color-gray-400);
    font-weight: 400;
}

/* ─── Written feedback — progressive disclosure ──────────────
   Each question is a collapsible card. Header is a button that
   shows: question text + count + chevron. Body holds the quote
   list + a "show next perspective" button that reveals one at a
   time, until everything is shown.
*/
.rd-q-block {
    background: var(--surface-raised);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.rd-q-block:hover { border-color: var(--border-default); }
.rd-q-block--open {
    border-color: var(--border-default);
    box-shadow: var(--shadow-sm);
}

.rd-q-block-header {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-fast);
}
.rd-q-block-header:hover { background: var(--hover-overlay); }

.rd-q-block-q {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    flex: 1;
}

.rd-q-block-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.rd-q-block-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
    background: var(--color-primary-50);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}
[data-theme="dark"] .rd-q-block-count { color: var(--color-primary-light); }

.rd-q-block-caret {
    font-size: 14px;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}
.rd-q-block--open .rd-q-block-caret { transform: rotate(180deg); }

.rd-q-block-body {
    display: none;
    padding: 4px 22px 22px;
    border-top: 1px solid var(--border-subtle);
}
.rd-q-block--open .rd-q-block-body { display: block; }

.rd-q-block-more {
    margin-top: 14px;
    background: transparent;
    border: 1px dashed var(--border-default);
    color: var(--color-primary-dark);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    width: 100%;
    transition: all var(--transition-fast);
}
.rd-q-block-more:hover {
    border-style: solid;
    border-color: var(--color-primary);
    background: var(--color-primary-50);
}
[data-theme="dark"] .rd-q-block-more { color: var(--color-primary-light); }
.rd-q-block-more-count {
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 4px;
}

/* Legacy alias kept for any straggler renderers */
.rd-written-block {
    background: var(--surface-raised);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
}

.rd-written-q {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* "N givers skipped" badge in question headers (3.5) */
.rd-skip-badge {
    display: inline-flex;
    align-items: center;
    background: var(--color-warning-100);
    color: var(--color-warning-800);
    border: 1px solid var(--color-warning-200);
    border-radius: 99px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-transform: none;
}

.rd-empty--skip {
    background: var(--color-warning-50);
    color: var(--color-warning-800);
    border: 1px dashed var(--color-warning-200);
    padding: 16px 20px;
    border-radius: 8px;
    font-style: italic;
}

.rd-card-text--skip {
    font-style: italic;
    color: var(--color-gray-500);
}

.insight-feedback-skip-count {
    color: var(--color-warning-800);
    font-weight: 500;
    margin-left: 4px;
}

.rd-quote-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}

/* Quote card — distinct from the question above it.
   Clean white surface, teal left accent, soft shadow. The
   beige sunken background was washing out against the outer
   q-block in light mode — white reads cleaner.
*/
.rd-quote-card {
    position: relative;
    padding: 16px 20px 16px 48px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--color-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    overflow: hidden; /* contains the attached gem note */
    animation: rd-quote-fade-in 0.3s var(--ease-smooth);
}
[data-theme="dark"] .rd-quote-card {
    background: var(--surface-elevated);
    border-color: var(--border-default);
}

.rd-quote-card--hidden { display: none; }

@keyframes rd-quote-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rd-quote-mark {
    position: absolute;
    left: 16px;
    top: 14px;
    font-size: 32px;
    font-weight: 700;
    color: var(--color-primary);
    opacity: 0.45;
    line-height: 1;
    font-family: Georgia, serif;
    user-select: none;
}

.rd-quote-text {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.65;
    margin-bottom: 10px;
    font-weight: 400;
}

.rd-quote-meta {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.rd-quote-role {
    font-weight: 600;
    color: var(--text-secondary);
}

/* ─── SBI cards ──────────────────────────────────────────────── */
.rd-sbi-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rd-sbi-card {
    background: var(--color-gray-50);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--color-gray-200);
}

.rd-sbi-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--color-gray-100);
    border-bottom: 1px solid var(--color-gray-200);
}

.rd-sbi-badge {
    background: #e65100;
    color: white;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    padding: 2px 7px;
    border-radius: 4px;
    flex-shrink: 0;
}

.rd-sbi-badge--inline { flex-shrink: 0; }

.rd-sbi-part {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-gray-200);
}

.rd-sbi-part:last-child { border-bottom: none; }

.rd-sbi-part-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--color-gray-400);
    margin-bottom: 4px;
}

.rd-sbi-part-text {
    font-size: 14px;
    color: var(--color-gray-800);
    line-height: 1.6;
}

/* ─── Response cards (By person view) — collapsible ──────── */
.rd-response-card {
    background: var(--surface-raised);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 12px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.rd-response-card:hover { border-color: var(--border-default); }
.rd-response-card--open {
    border-color: var(--border-default);
    box-shadow: var(--shadow-sm);
}

.rd-response-card:last-child { margin-bottom: 0; }

.rd-response-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-fast);
}
.rd-response-header:hover { background: var(--hover-overlay); }

.rd-response-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), #0ea5e9);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px var(--surface-raised), 0 2px 8px rgba(20,184,166,0.2);
}

.rd-response-info { flex: 1; }

.rd-response-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-gray-900);
}

.rd-response-sub {
    font-size: 12px;
    color: var(--color-gray-400);
    margin-top: 3px;
    display: flex;
    align-items: center;
    /* Let the role pill, "identifiable" pill, and submitted date wrap onto
       extra lines instead of cramming into one narrow row on mobile. */
    flex-wrap: wrap;
    gap: 6px 8px;
}

.rd-response-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-success-100);
    color: var(--color-success-800);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rd-response-caret {
    font-size: 14px;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
    flex-shrink: 0;
    margin-left: 8px;
}
.rd-response-card--open .rd-response-caret { transform: rotate(180deg); }

/* "N answers" hint on the collapsed header, so the bar reads as expandable */
.rd-response-answers-hint {
    flex-shrink: 0;
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary-dark);
    white-space: nowrap;
}
[data-theme="dark"] .rd-response-answers-hint { color: var(--color-primary-light); }

.rd-role-badge {
    background: var(--color-info-50);
    color: var(--color-info-800);
    border: 1px solid var(--color-info-100);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;   /* keep "Manager / Senior" on one line */
}
/* Sits to the right of .rd-role-badge for givers who were opted in to be
   named (sole occupant of their role group). Warning-tinted so it visually
   separates from the info-toned role pill — same anonymity-exception
   semantic as .rv-giver-identifiable in the wizard review step. */
.rd-identifiable-badge {
    background: var(--color-warning-50);
    color: var(--color-warning-800);
    border: 1px solid var(--color-warning-200);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.rd-card-answers {
    display: none;
    flex-direction: column;
    padding: 4px 0;
    border-top: 1px solid var(--border-subtle);
}
.rd-response-card--open .rd-card-answers { display: flex; }

.rd-card-answer {
    padding: 16px 22px;
    border-bottom: 1px solid var(--border-subtle);
}

.rd-card-answer:last-child { border-bottom: none; }

.rd-card-answer-q {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.rd-card-answer-v { }

.rd-card-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rd-card-rating-bar-track {
    height: 6px;
    width: 100px;
    background: var(--color-gray-100);
    border-radius: 3px;
    overflow: hidden;
}

.rd-card-rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), #0ea5e9);
    border-radius: 3px;
}

.rd-card-rating-num {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-gray-900);
}

.rd-card-rating-of {
    font-size: 12px;
    color: var(--color-gray-400);
}

.rd-card-rating-label {
    font-size: 12px;
    color: var(--color-gray-500);
}

.rd-card-na {
    font-size: 13px;
    color: var(--color-gray-400);
    font-style: italic;
}

.rd-card-text {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.65;
    padding: 12px 16px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--color-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    box-shadow: var(--shadow-xs);
}
[data-theme="dark"] .rd-card-text {
    border-color: var(--border-default);
}

.rd-card-mc {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rd-card-mc-opt {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    border: 1px solid var(--color-gray-200);
    color: var(--color-gray-400);
    background: var(--color-gray-50);
}

.rd-card-mc-opt--chosen {
    border-color: var(--color-primary-darker);
    background: var(--color-primary-50);
    color: var(--color-primary-darker);
    font-weight: 600;
}
[data-theme="dark"] .rd-card-mc-opt--chosen {
    color: var(--color-primary-light);
    border-color: var(--color-primary);
}

.rd-card-sbi {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rd-card-sbi-part {
    display: flex;
    gap: 10px;
}

.rd-card-sbi-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-gray-400);
    min-width: 64px;
    padding-top: 2px;
    flex-shrink: 0;
}

.rd-card-sbi-text {
    font-size: 14px;
    color: var(--color-gray-800);
    line-height: 1.6;
}

/* ─── Group headers (By person view, anonymous + roles) ────── */
.rd-group-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0 8px;
    margin-top: 8px;
    border-bottom: 2px solid var(--color-gray-200);
    margin-bottom: 12px;
}

.rd-group-header:first-child { margin-top: 0; }

.rd-group-header-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-gray-500);
}

.rd-group-header-count {
    font-size: 12px;
    color: var(--color-gray-400);
}

/* ─── Lock card ──────────────────────────────────────────────── */
.rd-lock-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 24px;
    background: var(--color-info-50);
    border: 2px solid var(--color-info-100);
    border-radius: 12px;
    text-align: center;
    color: var(--color-info-800);
}

.rd-lock-icon {
    font-size: 40px;
    margin-bottom: 12px;
    color: var(--color-info-800);
    line-height: 1;
}
.rd-lock-icon svg { width: 40px; height: 40px; display: block; }

.rd-lock-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-info-800);
    margin-bottom: 6px;
}

.rd-lock-sub {
    font-size: 13px;
    color: var(--color-gray-500);
    line-height: 1.6;
    max-width: 380px;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .rd-strip {
        padding: 18px;
    }
    .rd-strip-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .rd-strip-name { font-size: 22px; }

    /* Pull the progress bar up directly under the "x of y received" line so it
       reads as that line's bar; the due-date + download actions drop below it.
       display:contents lets the bar slot between the row's two children. */
    .rd-strip-progress-row { display: contents; }
    .rd-strip-progress-text    { order: 1; }
    .rd-progress-track         { order: 2; }
    .rd-strip-progress-actions { order: 3; margin-top: 2px; }
    .rd-download-btn { align-self: flex-start; }

    .rd-pending-section { margin: 4px -18px -18px; }
    .rd-pending-section-toggle { padding: 12px 14px; }
    .rd-pending-section-list   { padding: 0 14px 12px; }
    .rd-pending-row { grid-template-columns: auto 1fr; }
    .rd-pending-row-email { display: none; }

    .rd-q-block-header {
        padding: 14px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .rd-q-block-q { font-size: 16px; }
    .rd-q-block-meta { width: 100%; justify-content: space-between; }
    .rd-q-block-body { padding: 4px 16px 16px; }

    .rd-view-controls { flex-direction: column; align-items: stretch; }
    .rd-toggle { width: 100%; }
    .rd-toggle-btn { flex: 1; }
    .rd-expand-all-btn { align-self: flex-end; }

    .rd-highlights-grid { grid-template-columns: 1fr; }

    .rd-align-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .rd-align-right { width: 100%; justify-content: space-between; }

    .rd-score-right { flex-direction: column; align-items: flex-end; gap: 2px; }

    /* Mobile: the per-person avatar pile reads as clutter in a single column,
       and the "n of m" count already carries the signal. Collapse each group
       to a tidy one-line list row (label · count) with hairline dividers, and
       drop the avatars. The teal "complete" coloring is preserved. */
    .rd-group-avatars { grid-template-columns: 1fr; gap: 0; }
    .rd-group-av-stack { display: none; }
    .rd-group-av-row {
        padding: 11px 0;
        border-bottom: 1px solid var(--border-subtle);
    }
    .rd-group-av-row:first-child { padding-top: 2px; }
    .rd-group-av-row:last-child  { padding-bottom: 0; border-bottom: 0; }
    .rd-group-av-label { font-size: 13px; }

    .rd-gtable-th, .rd-gtable-q, .rd-gtable-td { padding: 8px 10px; }
}

/* ══════════════════════════════════════════════════════════════
   DEVELOPMENT PLANNER — Phase 3 Modal Wizard
   ══════════════════════════════════════════════════════════════ */

/* ── Overlay transition helpers ─────────────────────────────── */
.ap-overlay-enter {
    transition: opacity 0.2s ease;
}
.ap-panel-enter {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* ── Full-page overlay (no blur — solid background) ────────── */
.ap-wizard-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--color-warm-100);
    display: flex;
    flex-direction: column;
}

/* ── Page-level banner (mirrors fp-process-banner) ──────────── */
.ap-wizard-page-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 32px;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, #0891b2 100%);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.ap-wizard-page-title {
    font-size: 13px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.3px;
}

.ap-wizard-page-cancel {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 4px 14px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.ap-wizard-page-cancel:hover {
    background: rgba(255,255,255,0.28);
    color: white;
}

/* Banner actions row — groups Insights + Close on the right */
.ap-wizard-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Insights button — solid white pill with brand teal text so it stands
   out clearly against the gradient banner and reads distinctly from the
   ghost Close button next to it (Insights = invitation, Close = exit). */
.ap-wizard-banner-insights {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-primary-darker);
    background: #fff;
    border: 1px solid #fff;
    border-radius: 20px;
    padding: 4px 12px;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    white-space: nowrap;
}
.ap-wizard-banner-insights:hover {
    background: var(--color-primary-50);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.18);
}
.ap-wizard-banner-insights svg {
    color: var(--color-primary);
}

@media (max-width: 480px) {
    /* Drop the label on very narrow screens — icon alone keeps the
       banner uncluttered while the title and Close button stay legible. */
    .ap-wizard-banner-insights-label { display: none; }
    .ap-wizard-banner-insights { padding: 4px 8px; }
}

@media (max-width: 640px) {
    .ap-wizard-page-banner {
        padding: 10px 16px;
    }
}

/* ── Scrollable content area below the banner ───────────────── */
.ap-wizard-page-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem 4rem;
}

/* ── Centered wizard panel ──────────────────────────────────── */
.ap-wizard-panel {
    width: 100%;
    max-width: 600px;
    background: var(--color-warm-50);
    border-radius: 16px;
    padding: 2rem 2.5rem 2.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.05);
}

@media (max-width: 640px) {
    .ap-wizard-page-body {
        padding: 1rem 0.75rem 3rem;
    }
    .ap-wizard-panel {
        padding: 1.5rem 1.25rem 2rem;
        border-radius: 12px;
    }
}

/* ── Summary box inside panel ───────────────────────────────── */
.ap-wizard-summary--modal {
    max-width: none;
    margin: 0 0 var(--space-5);
}

/* ── Step examples (outside textboxes) ─────────────────────── */
.ap-step-examples {
    margin-top: var(--space-4);
    margin-bottom: var(--space-1);
}

.ap-step-examples-label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-warm-400);
    margin-bottom: var(--space-2);
}

/* ── Large input (Step 1 title) ─────────────────────────────── */
.ap-input--lg {
    font-size: var(--text-base);
    font-weight: 500;
    padding: var(--space-3) var(--space-4);
    min-height: 52px;
}

/* ── Trigger input wrapper ──────────────────────────────────── */
.ap-trigger-input-wrap {
    margin-bottom: var(--space-4);
}

.ap-then-input-wrap {
    margin-bottom: var(--space-4);
}

/* ── "Step 1 of 2" heading above input ─────────────────────── */
.ap-trigger-input-heading {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    margin-bottom: var(--space-2);
}

/* ── Hint text below heading ────────────────────────────────── */
.ap-trigger-input-hint {
    font-size: var(--text-sm);
    color: var(--color-warm-500);
    line-height: 1.55;
    margin-bottom: var(--space-3);
}

/* ── Active (editable) border state on input card ───────────── */
.ap-recipe-input-card--active {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

/* ════ Growth wizard redesign Phase 1 ════════════════════════ */

/* Completion screen — the payoff moment after Create */
.ap-done-heading {
    font-family: 'Lora', Georgia, serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--color-primary-dark);
    margin: 0 0 var(--space-5);
    text-align: center;
}

.ap-done-recap {
    border: 1px solid var(--color-warm-200);
    border-radius: var(--radius-xl);
    padding: var(--space-5) var(--space-6);
    margin-bottom: var(--space-6);
    background: var(--color-warm-50);
}

.ap-done-eyebrow {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    margin: 0 0 var(--space-1);
}

.ap-done-title {
    font-family: 'Lora', Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-warm-800);
    margin: 0 0 var(--space-2);
}

.ap-done-intention {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: var(--text-sm);
    color: var(--color-warm-600);
    line-height: var(--leading-relaxed);
    border-left: 3px solid var(--color-primary-light, #99e6da);
    padding-left: var(--space-3);
    margin: 0 0 var(--space-3);
}

.ap-done-rehearse {
    margin-bottom: var(--space-6);
}

.ap-done-rehearse-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-warm-800);
    margin: 0 0 var(--space-1);
}

.ap-done-rehearse-hint {
    font-size: var(--text-sm);
    color: var(--color-warm-500);
    line-height: 1.55;
    margin: 0 0 var(--space-4);
}

.ap-done-actions {
    justify-content: space-between;
}

/* "How do I use these?" ritual block — completion screen + card */
.ap-recipe-howto {
    background: var(--color-primary-50);
    border: 1px solid rgba(13, 148, 136, 0.15);
    border-radius: var(--radius-xl);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-5);
}

.ap-recipe-howto-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-primary-dark);
    margin: 0 0 var(--space-2);
}

.ap-recipe-howto-list {
    margin: 0;
    padding-left: 1.2em;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--color-warm-700);
}

.ap-recipe-howto--card {
    margin: 0 0 var(--space-4);
    position: relative;
}
.ap-recipe-howto--card .ap-recipe-howto-title { padding-right: var(--space-5); }
.ap-recipe-howto-close {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: var(--color-warm-500);
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: color var(--transition-fast), background var(--transition-fast);
}
.ap-recipe-howto-close:hover { color: var(--color-warm-800); background: rgba(0,0,0,0.06); }
[data-theme="dark"] .ap-recipe-howto-close:hover { background: rgba(255,255,255,0.08); }

/* Help affordance: "?" icon (mobile) vs full text (desktop) */
.ap-howto-icon {
    display: none;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--color-primary);
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
}
.ap-howto-label { display: inline; }

.ap-recipe-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}
.ap-recipe-section-head .ap-section-label { margin-bottom: 0; }

.ap-recipe-howto-toggle {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    white-space: nowrap;
}
.ap-recipe-howto-toggle:hover { color: var(--color-primary-dark); }

/* Self-check coaching tips (review step) */
.ap-self-check-tip {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--color-warm-500);
    line-height: 1.5;
    margin: -2px 0 var(--space-2) 30px;
}

/* Running summary — collapsible single line on mobile */
.ap-wizard-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}
.ap-wizard-summary-head .ap-wizard-summary-label { margin: 0; }
.ap-wizard-summary-caret { display: none; }

@media (max-width: 640px) {
    .ap-wizard-summary-head { cursor: pointer; margin-bottom: 0; }
    .ap-wizard-summary-caret {
        display: inline-block;
        color: var(--color-primary-dark);
        font-size: 16px;
        line-height: 1;
        transition: transform 0.18s ease;
        opacity: 0.7;
    }
    .ap-wizard-summary-caret.open { transform: rotate(90deg); }
    .ap-wizard-summary--modal .ap-wizard-summary-entries { display: none; }
    .ap-wizard-summary--modal .ap-wizard-summary-entries--open {
        display: flex;
        margin-top: var(--space-3);
    }
    .ap-done-actions { flex-direction: column-reverse; align-items: stretch; }
    .ap-done-actions .ap-btn-primary,
    .ap-done-actions .ap-btn-ghost { width: 100%; justify-content: center; text-align: center; }
}

/* Dark-mode pass — wizard surfaces that used literal light tints */
[data-theme="dark"] .ap-wizard-summary {
    background: rgba(20, 184, 166, 0.10);
    border-color: rgba(20, 184, 166, 0.25);
}
[data-theme="dark"] .ap-recipe-input-card--if {
    background: rgba(20, 184, 166, 0.05);
    border-color: rgba(20, 184, 166, 0.30);
}
[data-theme="dark"] .ap-recipe-howto {
    background: rgba(20, 184, 166, 0.08);
    border-color: rgba(20, 184, 166, 0.22);
}
[data-theme="dark"] .ap-done-recap {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.10);
}

/* ════ Growth wizard redesign Phase 2 — Practice mode ════════
   Full-screen rehearsal deck. Deliberately immersive in BOTH themes:
   near-black backdrop, the card is the single lit object. */

.ap-recipe-section-tools {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-shrink: 0;
}

.ap-practice-launch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0891b2 100%);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(20, 184, 166, 0.30);
    transition: transform 0.15s ease, filter 0.15s ease;
}
.ap-practice-launch:hover { filter: brightness(1.06); transform: translateY(-1px); }

.ap-practice-overlay {
    position: fixed;
    inset: 0;
    z-index: 4000;
    background: rgba(14, 18, 17, 0.97);
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.ap-practice-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.ap-practice-topic { min-width: 0; }

.ap-practice-topic-eyebrow {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #5eead4;
    margin-bottom: 2px;
}

.ap-practice-topic-title {
    display: block;
    font-family: 'Lora', Georgia, serif;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ap-practice-close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    font-size: 15px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.ap-practice-close:hover { background: rgba(255, 255, 255, 0.08); }

.ap-practice-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.ap-practice-counter {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
}

.ap-practice-card {
    width: 100%;
    min-height: 230px;
    border-radius: 20px;
    /* same "index card" paper as the small recipe cards — one object, two sizes */
    background:
        repeating-linear-gradient(to bottom,
            transparent 0 31px,
            rgba(120, 113, 108, 0.10) 31px 32px),
        linear-gradient(to right,
            transparent 16px,
            rgba(13, 148, 136, 0.30) 16px,
            rgba(13, 148, 136, 0.30) 18px,
            transparent 18px),
        #fbf9f5;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
    cursor: pointer;
    display: flex;
    align-items: stretch;
    padding: var(--space-6);
    padding-left: calc(var(--space-6) + 8px);
    transition: transform 0.18s ease;
}
.ap-practice-card:not(.is-revealed):active { transform: scale(0.985); }
.ap-practice-card.is-revealed {
    cursor: default;
    background:
        repeating-linear-gradient(to bottom,
            transparent 0 31px,
            rgba(255, 255, 255, 0.09) 31px 32px),
        linear-gradient(150deg, #0d9488 0%, #0e7490 100%);
}

.ap-practice-card-faces { width: 100%; display: flex; }

.ap-practice-face {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.ap-practice-face-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary-dark);
}
.ap-practice-face--back .ap-practice-face-label { color: rgba(255, 255, 255, 0.8); }

.ap-practice-face-text {
    flex: 1;
    font-family: 'Lora', Georgia, serif;
    font-size: 19px;
    line-height: 1.45;
    color: var(--color-warm-800, #292524);
    margin: 0;
    display: flex;
    align-items: center;
}
.ap-practice-face--back .ap-practice-face-text { color: #fff; }

.ap-practice-face-foot {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--color-warm-400, #a8a29e);
    text-align: center;
}

.ap-practice-hint {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
    line-height: 1.5;
    margin: 0;
}

.ap-practice-judge { width: 100%; text-align: center; }

.ap-practice-judge-q {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 var(--space-3);
}

.ap-practice-judge-btns {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

.ap-practice-btn {
    padding: 12px 22px;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}
.ap-practice-btn:hover { transform: translateY(-1px); }

.ap-practice-btn--miss {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.85);
}
.ap-practice-btn--miss:hover { background: rgba(255, 255, 255, 0.07); }

.ap-practice-btn--hit {
    background: linear-gradient(135deg, #14b8a6, #0ea5e9);
    border: none;
    color: #fff;
    box-shadow: 0 6px 18px rgba(20, 184, 166, 0.35);
}

/* End-of-run summary */
.ap-practice-end-score {
    font-family: 'Lora', Georgia, serif;
    font-size: 26px;
    color: #fff;
    margin: 0;
    text-align: center;
}

.ap-practice-end-note {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.55;
    text-align: center;
    margin: 0;
    max-width: 38ch;
}

.ap-practice-end-misses {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.ap-practice-miss-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.ap-practice-miss-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ap-practice-sharpen {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 4px 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #5eead4;
    cursor: pointer;
}
.ap-practice-sharpen:hover { text-decoration: underline; text-underline-offset: 3px; }

.ap-practice-done { margin-top: var(--space-4); }

/* Dark theme: the card's light paper face should still read as "lit" —
   base rule already uses literal paper colors, so only text needs pinning. */
[data-theme="dark"] .ap-practice-card .ap-practice-face-text { color: #292524; }
[data-theme="dark"] .ap-practice-card .ap-practice-face-foot { color: #a8a29e; }
[data-theme="dark"] .ap-practice-card.is-revealed .ap-practice-face-text { color: #fff; }

@media (max-width: 640px) {
    .ap-practice-overlay { padding: 14px; }
    .ap-practice-card { min-height: 260px; padding: var(--space-5); }
    .ap-practice-face-text { font-size: 17px; }
    .ap-practice-judge-btns { flex-direction: row; width: 100%; }
    .ap-practice-judge-btns .ap-practice-btn { flex: 1; padding: 13px 10px; }
    /* Section head (mobile): "Action Recipes" + "?" centered on line 1,
       then Add recipe + Practice centered side-by-side on line 2. The
       tools group is flattened (display:contents) so order/wrap apply to
       each button; an order:3 full-width spacer forces the line break. */
    .ap-recipe-section-head {
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        column-gap: var(--space-3);
        row-gap: var(--space-2);
    }
    .ap-recipe-section-tools { display: contents; }
    .ap-recipe-section-head .ap-section-label { order: 1; margin-bottom: 0; }
    .ap-recipe-howto-toggle { order: 2; text-decoration: none; }
    .ap-recipe-howto-toggle .ap-howto-icon { display: inline-flex; }
    .ap-recipe-howto-toggle .ap-howto-label { display: none; }
    .ap-recipe-section-head::after {
        content: "";
        flex-basis: 100%;
        height: 0;
        order: 3;
    }
    .ap-btn-add-ifthen { order: 4; }
    .ap-practice-launch { order: 5; }
}

/* ════ Growth wizard redesign Phase 4 — focus skill + moments ════ */

/* Star toggle on wizard skill chips */
.ap-skill-star {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    line-height: 1;
    color: #d97706;
    cursor: pointer;
}

.ap-skill-chip--focus {
    border-color: rgba(217, 119, 6, 0.45) !important;
    background: rgba(251, 191, 36, 0.10);
}

.ap-focus-hint {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--color-warm-500);
    margin: var(--space-2) 0 0;
    line-height: 1.5;
}

/* Moment picker (recipe trigger step) */
.ap-moment-picker {
    margin-bottom: var(--space-4);
}

.ap-moment-label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-warm-400);
    margin: 0 0 var(--space-2);
}

.ap-moment-label-opt {
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    font-style: italic;
    color: var(--color-warm-400);
}

.ap-moment-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ap-moment-chip {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--color-warm-300, #d6d3d1);
    background: var(--color-surface, #fff);
    color: var(--color-warm-700);
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.ap-moment-chip:hover {
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
}
.ap-moment-chip--active {
    border-color: var(--color-primary);
    background: var(--color-primary-50);
    color: var(--color-primary-dark);
    font-weight: 600;
}

[data-theme="dark"] .ap-skill-chip--focus { background: rgba(251, 191, 36, 0.10); }
[data-theme="dark"] .ap-moment-chip {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.16);
}
[data-theme="dark"] .ap-moment-chip--active {
    background: rgba(20, 184, 166, 0.14);
    border-color: rgba(20, 184, 166, 0.45);
    color: #5eead4;
}

/* ════ Growth wizard redesign Phase 3 — Print one-pager ══════ */

/* Card footer becomes a two-tool row: print (left) + delete (right) */
.ap-commitment-delete-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.ap-print-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 4px 0;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
}
.ap-print-link:hover { color: var(--color-primary-dark); text-decoration: underline; text-underline-offset: 3px; }

/* Completion screen: two quiet secondary actions next to the primary */
.ap-done-secondary {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}
@media (max-width: 640px) {
    .ap-done-secondary { flex-direction: column; align-items: stretch; }
    .ap-done-secondary .ap-btn-ghost { width: 100%; justify-content: center; }
}

/* The sheet itself — never on screen, alone on paper */
#ap-print-sheet { display: none; }

@media print {
    body.ap-printing > *:not(#ap-print-sheet) { display: none !important; }
    body.ap-printing #ap-print-sheet { display: block; }

    @page { margin: 18mm; }

    #ap-print-sheet {
        font-family: Georgia, 'Times New Roman', serif;
        color: #1c1917;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .ap-print-brand {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 9pt;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: #0d9488;
        margin: 0 0 14pt;
        padding-bottom: 6pt;
        border-bottom: 1.5pt solid #0d9488;
    }

    .ap-print-title {
        font-size: 22pt;
        font-weight: 600;
        line-height: 1.2;
        margin: 0 0 4pt;
    }

    .ap-print-meta {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 9.5pt;
        color: #57534e;
        margin: 0 0 16pt;
    }

    .ap-print-section { margin: 0 0 14pt; page-break-inside: avoid; }

    .ap-print-h2 {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 9pt;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #57534e;
        margin: 0 0 6pt;
    }

    .ap-print-quote {
        font-style: italic;
        font-size: 11.5pt;
        line-height: 1.5;
        margin: 0;
        padding-left: 10pt;
        border-left: 2.5pt solid #99e6da;
    }

    .ap-print-skills { font-size: 11pt; margin: 0; }

    .ap-print-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 10.5pt;
    }
    .ap-print-table th {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 8.5pt;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        text-align: left;
        color: #0d9488;
        padding: 4pt 10pt 4pt 0;
        border-bottom: 1pt solid #d6d3d1;
    }
    .ap-print-table td {
        vertical-align: top;
        line-height: 1.45;
        padding: 6pt 10pt 6pt 0;
        border-bottom: 0.5pt solid #e7e5e4;
        width: 50%;
    }
    .ap-print-table tr { page-break-inside: avoid; }

    .ap-print-list {
        margin: 0;
        padding-left: 14pt;
        font-size: 10.5pt;
        line-height: 1.55;
    }
    .ap-print-list li { margin-bottom: 3pt; }

    .ap-print-help {
        background: #f0fdfa;
        border: 0.75pt solid #99e6da;
        border-radius: 6pt;
        padding: 10pt 12pt;
        margin-top: 16pt;
    }
}

/* ── "I will…" card redesign: teal header + white input zone ── */
/* Base .ap-recipe-input-card--will already overridden above    */

.ap-recipe-will-header {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, #0891b2 100%);
    padding: var(--space-3) var(--space-5);
}

.ap-recipe-will-header .ap-recipe-input-label {
    color: white;
    opacity: 0.9;
}

.ap-recipe-will-textarea {
    display: block;
    width: 100%;
    padding: var(--space-3) var(--space-5);
    background: var(--color-warm-50);
    border: none;
    outline: none;
    resize: none;
    font-family: inherit;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--color-warm-800);
}

.ap-recipe-will-textarea::placeholder {
    color: var(--color-warm-400);
}

/* ── Responsive: stack example-pair vertically on mobile ────── */
@media (max-width: 480px) {
    .ap-recipe-example-pair {
        flex-direction: column;
        align-items: center;
    }
    .ap-recipe-example-arrow {
        transform: rotate(90deg);
        width: 24px;
        height: 48px;
    }
}

/* ── Hide sidebar + mobile header while wizard is open ───────
   (mirrors new-request.html which has no sidebar at all)       */
body.ap-wizard-open .app-sidebar,
body.ap-wizard-open .mobile-header,
body.ap-wizard-open .mobile-sidebar-overlay {
    display: none !important;
}

/* Suppress every outer scroller while the wizard overlay is open.
   Without this, the page (.dashboard-main / body / html) draws a
   scrollbar alongside .ap-wizard-page-body's intentional one. */
html:has(body.ap-wizard-open),
body.ap-wizard-open {
    overflow: hidden !important;
}
body.ap-wizard-open .dashboard-main,
body.ap-wizard-open .dashboard-container {
    overflow: hidden !important;
}

/* Without the sidebar margin-left, the overlay already covers
   full viewport via position:fixed — no layout adjustment needed */

/* ══════════════════════════════════════════════════════════════
   PHASE 3 — Resources Enhancement
   ══════════════════════════════════════════════════════════════ */

/* ── Resources search suggestions ─────────────────────────── */
.ap-res-search-block {
    background: var(--color-primary-50, var(--color-primary-50));
    border: 1px solid var(--color-primary-light, #99e6da);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-4);
}

.ap-res-search-label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-primary-dark);
    margin-bottom: var(--space-2);
    opacity: 0.7;
}

.ap-res-search-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.ap-res-search-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--color-warm-50);
    border: 1px solid var(--color-primary-light, #99e6da);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.ap-res-search-chip:hover {
    background: var(--color-primary-50, var(--color-primary-50));
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
}
/* G9: the light teal bg + teal border read as "too much green" on a dark
   background — use a quiet neutral surface with a restrained teal accent. */
[data-theme="dark"] .ap-res-search-chip {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.78);
}
[data-theme="dark"] .ap-res-search-chip:hover {
    background: rgba(20, 184, 166, 0.16);
    border-color: rgba(45, 212, 191, 0.5);
    color: #5EEAD4;
}

/* ── Resources prompt text ─────────────────────────────────── */
.ap-resources-prompt {
    font-size: var(--text-sm);
    color: var(--color-warm-500);
    margin-bottom: var(--space-3);
    font-style: italic;
    line-height: 1.5;
}

/* ── Wizard resources list ─────────────────────────────────── */
.ap-wiz-resources-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.ap-wiz-resource-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--color-warm-50);
    border: 1px solid var(--color-warm-200);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
}

.ap-wiz-resource-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--color-warm-800);
}

.ap-wiz-resource-link {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: var(--color-primary-light);
}

.ap-wiz-resource-remove {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: var(--color-warm-400);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}

.ap-wiz-resource-remove:hover {
    background: var(--color-warm-200);
    color: var(--color-warm-700);
}

/* ── Wizard resource add inputs ────────────────────────────── */
.ap-wiz-resource-add {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

/* ══════════════════════════════════════════════════════════════
   PHASE 4 — Practice Tracking
   ══════════════════════════════════════════════════════════════ */

/* ── Streak badge ──────────────────────────────────────────── */
.ap-streak-badge {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.01em;
}

/* ── Practice row below each action recipe ────────────────── */
.ap-flashcard-practice-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-1);
    flex-wrap: wrap;
}

.ap-btn-practiced {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 5px 12px;
    background: var(--color-primary-50, var(--color-primary-50));
    border: 1px solid var(--color-primary-light, #99e6da);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.ap-btn-practiced:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.ap-practiced-status {
    font-size: var(--text-xs);
    color: var(--color-warm-500);
}

.ap-practiced-count {
    font-size: var(--text-xs);
    color: var(--color-warm-400);
    font-weight: 600;
}

/* ── Perspectives section (linked Development Check-ins) ────
   Lives inside the expanded commitment card. Header row has the
   primary "Invite perspectives" CTA — when there are no check-ins,
   the empty message sits below. When there are check-ins, each is
   a clickable row linking to the existing request-detail page so
   the requester gets the full results UI for free. */
.ap-perspectives-section {
    border-top: 1px solid var(--color-warm-200);
    padding-top: var(--space-5);
}
.ap-perspectives-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}
.ap-perspectives-hint {
    margin: 2px 0 0;
    font-size: var(--text-sm);
    color: var(--color-warm-500);
    line-height: 1.5;
    max-width: 360px;
}
.ap-btn-invite-perspectives {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #14b8a6 0%, #0ea5e9 60%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(20, 184, 166, 0.25);
    transition: transform 0.12s ease, box-shadow 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.ap-btn-invite-perspectives:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.32);
}
.ap-btn-invite-perspectives:active { transform: translateY(0); }

.ap-perspectives-empty {
    margin: 0;
    padding: 12px 0 4px;
    font-size: var(--text-sm);
    color: var(--color-warm-500);
    font-style: italic;
    line-height: 1.5;
}

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

.ap-checkin-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-lg);
    background: #f0fdfa;
    border: 1px solid rgba(13, 148, 136, 0.22);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.ap-checkin-row:hover {
    border-color: var(--color-primary-light, #99e6da);
    background: white;
    transform: translateY(-1px);
}
/* Dark: a teal-tinted surface so the row reads as its own object,
   not just another elevated dark panel. */
[data-theme="dark"] .ap-checkin-row {
    background: rgba(20, 184, 166, 0.10);
    border-color: rgba(20, 184, 166, 0.30);
}
[data-theme="dark"] .ap-checkin-row:hover {
    background: rgba(20, 184, 166, 0.16);
    border-color: rgba(45, 212, 191, 0.50);
}

.ap-checkin-row-main {
    min-width: 0;
}
.ap-checkin-row-title {
    margin: 0;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-gray-900, #0f172a);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ap-checkin-row-meta {
    margin: 4px 0 0;
    font-size: 11.5px;
    color: var(--color-warm-500, #78716c);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.ap-checkin-row-sep { opacity: 0.4; margin: 0 2px; }

.ap-checkin-row-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 110px;
}
.ap-checkin-counts {
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-gray-700, #334155);
}
.ap-checkin-count-completed {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-primary, #0d9488);
}
.ap-checkin-count-sep {
    margin: 0 2px;
    color: var(--color-warm-400, #a8a29e);
    font-weight: 500;
}
.ap-checkin-count-total {
    color: var(--color-gray-500, #64748b);
}
.ap-checkin-count-label {
    margin-left: 5px;
    font-weight: 500;
    color: var(--color-warm-500, #78716c);
}
.ap-checkin-progress-track {
    width: 100px;
    height: 4px;
    border-radius: 999px;
    background: var(--color-warm-200, #eee8df);
    overflow: hidden;
}
.ap-checkin-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #14b8a6, #0ea5e9);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.ap-checkin-row-chevron {
    font-size: 22px;
    color: var(--color-warm-400, #a8a29e);
    line-height: 1;
    transition: transform 0.12s, color 0.15s;
}
.ap-checkin-row:hover .ap-checkin-row-chevron {
    color: var(--color-primary, #0d9488);
    transform: translateX(2px);
}

/* Subtle state hints — left border tint by state.
   awaiting (gray), inflight (teal pulse), complete (green). */
.ap-checkin-row--awaiting   { border-left: 3px solid var(--color-warm-300, #d6d3d1); }
.ap-checkin-row--inflight   { border-left: 3px solid #14b8a6; }
.ap-checkin-row--complete   { border-left: 3px solid #10b981; }

/* Section label variant — same size but muted color for the secondary share area. */
.ap-section-label--muted {
    color: var(--color-warm-500, #78716c) !important;
}

/* Tiny pill in the commitment header meta row when check-ins exist. */
.ap-checkin-meta-pill {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.12);
    color: #0f766e;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .ap-perspectives-header { flex-direction: column; align-items: stretch; }
    .ap-btn-invite-perspectives { align-self: center; }
    .ap-checkin-row {
        grid-template-columns: 1fr auto;
    }
    /* Center the title + meta line in the row */
    .ap-checkin-row-main { text-align: center; }
    .ap-checkin-row-meta { justify-content: center; }
    .ap-checkin-row-right {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-width: 0;
    }
    .ap-checkin-progress-track { flex: 1; max-width: 180px; }
    .ap-checkin-row-chevron { display: none; }
}

/* ── Share for Feedback section ────────────────────────────── */
.ap-share-section {
    border-top: 1px solid var(--color-warm-200);
    padding-top: var(--space-5);
}

.ap-share-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

.ap-btn-share-toggle {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-primary);
    background: transparent;
    border: 1px solid var(--color-primary-light, #99e6da);
    border-radius: var(--radius-full);
    padding: 4px 12px;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.ap-btn-share-toggle:hover {
    background: var(--color-primary-50, var(--color-primary-50));
}

.ap-share-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.ap-share-hint {
    font-size: var(--text-sm);
    color: var(--color-warm-500);
    line-height: 1.55;
}

.ap-share-textarea {
    width: 100%;
    resize: none;
    font-size: var(--text-sm);
    line-height: 1.65;
    color: var(--color-warm-700);
    background: var(--color-warm-50);
    cursor: text;
    white-space: pre-wrap;
}

.ap-share-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.ap-btn-copy-message {
    display: inline-flex;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.ap-btn-copy-message:hover {
    opacity: 0.88;
}

.ap-btn-email-share {
    display: inline-flex;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary-light, #99e6da);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}

.ap-btn-email-share:hover {
    background: var(--color-primary-50, var(--color-primary-50));
}

/* ── Saved perspective givers in new-request wizard ──────── */
.pg-saved-contacts {
    margin-bottom: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--color-warm-50, #faf8f6);
    border: 1.5px solid var(--color-warm-200);
    border-radius: var(--radius-lg);
}

.pg-saved-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-warm-500);
    margin: 0 0 var(--space-2);
}

.pg-saved-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.pg-saved-chips--collapsed {
    max-height: 84px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}

.pg-saved-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: var(--space-2);
    padding: 4px 0;
    background: none;
    border: none;
    color: var(--color-primary-dark, var(--color-primary-darker));
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s;
}
.pg-saved-toggle:hover {
    color: var(--color-primary, var(--color-primary));
    text-decoration: underline;
}
.pg-saved-toggle-chevron {
    transition: transform 0.2s ease;
}
.pg-saved-toggle-chevron--up {
    transform: rotate(180deg);
}

.pg-saved-chip {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px 6px 8px;
    background: var(--color-warm-50);
    border: 1.5px solid var(--color-warm-300);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.pg-saved-chip:hover:not(:disabled) {
    border-color: var(--color-primary);
    background: var(--color-primary-50, var(--color-primary-50));
}

.pg-saved-chip--added {
    border-color: var(--color-primary);
    background: var(--color-primary-50, var(--color-primary-50));
    opacity: 0.7;
    cursor: default;
}

.pg-saved-chip-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    font-size: 10px;
    font-weight: var(--font-semibold);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.pg-saved-chip-name {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-warm-800);
}

.pg-saved-chip-check {
    font-size: var(--text-xs);
    color: var(--color-primary);
    font-weight: var(--font-bold);
}

/* ============================================================
   MY PERSPECTIVE GIVERS PAGE
   ============================================================ */

.pg-page-header {
    padding-bottom: var(--space-2);
}

.pg-page-subtitle {
    font-size: var(--text-sm);
    color: var(--color-warm-500);
    margin-top: 4px;
    max-width: 520px;
    line-height: 1.5;
}

.pg-btn-add-primary {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0ea5e9 60%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    cursor: pointer;
    white-space: nowrap;
    transition: filter 0.15s, box-shadow 0.15s, transform 0.15s;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.3);
}

.pg-btn-add-primary:hover {
    filter: brightness(1.08);
    box-shadow: 0 4px 16px rgba(20, 184, 166, 0.4);
    transform: translateY(-1px);
}

.pg-btn-add-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.25);
}

/* ── Add / Edit form ────────────────────────────────────── */
.pg-form-card {
    background: var(--color-warm-50);
    border: 1.5px solid var(--color-primary-200, #99e6e0);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.pg-form-title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-warm-900);
    margin: 0 0 var(--space-4);
}

.pg-form-fields {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.pg-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

.pg-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pg-field-label {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-warm-700);
}

.pg-required { color: var(--color-primary); }
.pg-optional { font-weight: 400; color: var(--color-warm-400); font-size: var(--text-xs); }

.pg-input {
    padding: 9px 13px;
    border: 1.5px solid var(--color-warm-300);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--color-warm-900);
    background: var(--color-warm-50);
    outline: none;
    transition: border-color 0.15s;
    font-family: inherit;
}

.pg-input:focus {
    border-color: var(--color-primary);
}

.pg-input::placeholder {
    color: var(--color-warm-400);
}

.pg-form-error {
    font-size: var(--text-sm);
    color: var(--color-error);
    margin: var(--space-2) 0 0;
}

.pg-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.pg-btn-cancel {
    padding: 9px 18px;
    background: transparent;
    border: 1.5px solid var(--color-warm-300);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-warm-600);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.pg-btn-cancel:hover { border-color: var(--color-warm-500); color: var(--color-warm-800); }

.pg-btn-save {
    padding: 9px 22px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: background 0.15s;
}

.pg-btn-save:hover:not(:disabled) { background: var(--color-primary-dark); }
.pg-btn-save:disabled { opacity: 0.55; cursor: default; }

/* ── Loading ────────────────────────────────────────────── */
.pg-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-8) 0;
    color: var(--color-warm-500);
    font-size: var(--text-sm);
}

/* ── Empty state ────────────────────────────────────────── */
.pg-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-8) var(--space-4);
    gap: var(--space-3);
}


.pg-empty-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-warm-800);
    margin: 0;
}

.pg-empty-body {
    font-size: var(--text-sm);
    color: var(--color-warm-500);
    max-width: 400px;
    line-height: 1.6;
    margin: 0;
}

/* ── Role grouping ──────────────────────────────────────── */
.pg-group {
    margin-bottom: var(--space-6);
}

.pg-group-label {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-warm-800);
    letter-spacing: 0.01em;
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--color-warm-300);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.pg-group-label::before {
    content: '';
    width: 4px;
    height: 1.1em;
    background: var(--color-primary);
    border-radius: 2px;
}

/* ── Contacts grid ──────────────────────────────────────── */
.pg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-3);
    align-items: start;
}

/* ── Contact card ───────────────────────────────────────── */
.pg-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
    overflow: hidden;
    user-select: none;
}

.pg-card:hover {
    box-shadow: 0 3px 14px rgba(0,0,0,0.06);
    border-color: var(--color-warm-300);
}

.pg-card--expanded {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-color: var(--color-warm-300);
}

/* Card header: always visible */
.pg-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
}

.pg-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0ea5e9 100%);
    color: white;
    font-size: 13px;
    font-weight: var(--font-semibold);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.04em;
}

.pg-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.pg-card-name {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-warm-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pg-card-email {
    font-size: var(--text-xs);
    color: var(--color-warm-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pg-card-chevron {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--color-warm-400);
    transition: transform 0.22s ease;
}

.pg-card--expanded .pg-card-chevron {
    transform: rotate(180deg);
}

/* Expanded detail area */
.pg-card-details {
    padding: var(--space-3) var(--space-4) var(--space-4);
    border-top: 1px solid var(--color-warm-100);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.pg-card-role-badge {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    padding: 3px 10px;
    background: rgba(20, 184, 166, 0.1);
    color: var(--color-primary-dark);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
}

.pg-card-notes-text {
    font-size: var(--text-xs);
    color: var(--color-warm-500);
    font-style: italic;
    line-height: 1.5;
}

.pg-card-expanded-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding-top: var(--space-1);
    flex-wrap: wrap;
}

/* Edit button — outlined */
.pg-card-btn-edit {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 13px;
    border: 1.5px solid var(--color-warm-200);
    border-radius: var(--radius-full);
    background: var(--color-warm-50);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-warm-600);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.pg-card-btn-edit:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Remove button — ghost danger */
.pg-card-btn-remove {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 13px;
    border: 1.5px solid transparent;
    border-radius: var(--radius-full);
    background: transparent;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-warm-400);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.pg-card-btn-remove:hover {
    border-color: #fca5a5;
    color: var(--color-error);
    background: var(--color-error-50);
}

.pg-delete-confirm {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: var(--text-xs);
    color: var(--color-warm-700);
    white-space: nowrap;
}

/* "View perspectives" — primary action on each giver card.
   Sits on its own row at the top of the actions area; Edit + Remove
   wrap below as secondary actions, so nothing gets pushed off-card. */
.pg-card-btn-view {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: 1.5px solid var(--color-primary);
    border-radius: var(--radius-full);
    background: var(--color-primary-50);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-primary-dark);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
    flex: 1 0 100%; /* full width = its own row */
    justify-content: center;
}
.pg-card-btn-view:hover {
    background: var(--color-primary);
    color: var(--text-on-brand);
}
[data-theme="dark"] .pg-card-btn-view { color: var(--color-primary-light); }
[data-theme="dark"] .pg-card-btn-view:hover { color: var(--text-on-brand); }

/* ════════════════════════════════════════════════════════════════════════
   GIVER DETAIL PAGE (giver-detail.html)
   ════════════════════════════════════════════════════════════════════════ */

/* Back button — pill-shaped, lifts on hover. Replaces plain text link. */
.gd-back { margin-bottom: 20px; }

.gd-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: var(--surface-raised);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}
.gd-back-btn:hover {
    color: var(--color-primary-dark);
    border-color: var(--color-primary);
    background: var(--color-primary-50);
    transform: translateX(-2px);
}
[data-theme="dark"] .gd-back-btn:hover { color: var(--color-primary-light); }

/* Business card — single container holding avatar, name, email,
   integrated note, and a quiet summary footer. Replaces the prior
   eyebrow + name + separate notes-card layout. */
.gd-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-top: 3px solid var(--color-primary);
    border-radius: var(--radius-xl);
    padding: 24px 26px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gd-card-main {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.gd-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), #0ea5e9);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px var(--surface-raised), 0 2px 8px rgba(20,184,166,0.2);
}

.gd-card-identity {
    flex: 1;
    min-width: 0;
}

.gd-card-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.gd-card-name {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.15;
    color: var(--text-primary);
    margin: 0;
    word-break: break-word;
}

.gd-card-role {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: var(--color-info-50);
    color: var(--color-info-800);
    border: 1px solid var(--color-info-100);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.gd-card-email {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
    word-break: break-all;
}
.gd-card-email-icon { color: var(--color-primary); flex-shrink: 0; }
.gd-card-email-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.gd-card-email-link:hover { color: var(--color-primary-dark); }
[data-theme="dark"] .gd-card-email-link:hover { color: var(--color-primary-light); }

/* Integrated note — annotation panel on the business card.
   Brand teal tint, calm. Inline edit mode swaps text for textarea. */
.gd-card-note {
    background: var(--color-primary-50);
    border: 1px solid var(--color-primary-100, rgba(20,184,166,0.18));
    border-left: 3px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    position: relative;
}

.gd-card-note-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.gd-card-note-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--color-primary-dark);
}
[data-theme="dark"] .gd-card-note-label { color: var(--color-primary-light); }

.gd-card-note-edit-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--color-primary-dark);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    opacity: 0.75;
    transition: all var(--transition-fast);
}
.gd-card-note-edit-btn:hover {
    opacity: 1;
    border-color: var(--color-primary);
    background: rgba(255,255,255,0.5);
}
[data-theme="dark"] .gd-card-note-edit-btn { color: var(--color-primary-light); }
[data-theme="dark"] .gd-card-note-edit-btn:hover { background: rgba(255,255,255,0.05); }

.gd-card-note-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.55;
    margin: 0;
    font-family: var(--font-display);
    font-style: italic;
}

.gd-card-note-empty {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    margin: 0;
}

/* Inline edit mode */
.gd-card-note-textarea {
    width: 100%;
    box-sizing: border-box;
    background: var(--surface-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    font: inherit;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    resize: vertical;
    min-height: 70px;
    transition: border-color var(--transition-fast);
}
.gd-card-note-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.gd-card-note-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.gd-card-note-btn {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}
.gd-card-note-btn-cancel {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border-subtle);
}
.gd-card-note-btn-cancel:hover { color: var(--text-primary); border-color: var(--border-default); }
.gd-card-note-btn-save {
    background: var(--color-primary);
    color: var(--text-on-brand);
}
.gd-card-note-btn-save:hover { background: var(--color-primary-dark); }
.gd-card-note-btn-save:disabled { opacity: 0.5; cursor: not-allowed; }

/* Empty state — full-width "+ Add a note" button styled like a placeholder */
.gd-card-add-note-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px dashed var(--border-default);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    align-self: flex-start;
}
.gd-card-add-note-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
    border-style: solid;
}
[data-theme="dark"] .gd-card-add-note-btn:hover { color: var(--color-primary-light); }

.gd-card-footer {
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
    font-size: 13px;
    color: var(--text-secondary);
}
.gd-card-footer strong {
    color: var(--text-primary);
    font-weight: 700;
}
.gd-card-anon-hint {
    color: var(--text-muted);
    font-size: 12px;
}

#gd-perspectives {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gd-request-link {
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px dashed var(--border-default);
    transition: color var(--transition-fast), border-color var(--transition-fast);
}
.gd-request-link:hover {
    color: var(--color-primary-dark);
    border-bottom-color: var(--color-primary);
}
[data-theme="dark"] .gd-request-link:hover { color: var(--color-primary-light); }

.gd-request-meta {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 6px;
}

.gd-anon-note {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--surface-sunken);
    border: 1px dashed var(--border-default);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

@media (max-width: 768px) {
    .gd-card { padding: 20px; }
    .gd-card-main { gap: 14px; }
    .gd-avatar { width: 52px; height: 52px; font-size: 19px; }
    .gd-card-name { font-size: 22px; }
    .gd-card-name-row { gap: 8px; }
    .gd-card-email { font-size: 13px; }
}

.pg-confirm-yes, .pg-confirm-no {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    cursor: pointer;
    border: 1.5px solid;
    transition: background 0.15s, color 0.15s;
}

.pg-confirm-yes { border-color: var(--color-error); color: var(--color-error); background: var(--color-warm-50); }
.pg-confirm-yes:hover { background: var(--color-error); color: white; }
.pg-confirm-no  { border-color: var(--color-warm-300); color: var(--color-warm-600); background: var(--color-warm-50); }
.pg-confirm-no:hover  { border-color: var(--color-warm-500); }

/* ── FAB: Add Giver ─────────────────────────────────────── */
/* Square floating action button with rounded corners — icon only,
   bottom right (shared shape with the Growth FAB). */
.pg-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0ea5e9 55%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(20, 184, 166, 0.45);
    transition: filter 0.15s, box-shadow 0.15s, transform 0.15s;
}

.pg-fab:hover {
    filter: brightness(1.08);
    box-shadow: 0 8px 28px rgba(20, 184, 166, 0.5);
    transform: translateY(-2px);
}

.pg-fab:active {
    transform: translateY(0);
    box-shadow: 0 3px 12px rgba(20, 184, 166, 0.3);
}

/* Hide the dashboard FAB when the empty-state CTA is showing,
   so we don't render two "Ask for Perspectives" buttons at once. */
body.dashboard-empty .pg-fab {
    display: none;
}

/* ── Contact picker (browser API) ───────────────────────── */
.pg-contact-picker-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--space-1);
}

.pg-contact-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 1.5px solid var(--color-warm-200);
    border-radius: var(--radius-full);
    background: var(--color-warm-50);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-warm-600);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.pg-contact-picker-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .pg-field-row   { grid-template-columns: 1fr; }
    .pg-grid        { grid-template-columns: 1fr; }
    .pg-fab         { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); right: 16px; width: 52px; height: 52px; }
}

/* ============================================
   ✦ ELEGANT REQUEST CARDS — results.html
   ============================================ */

.requests-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ── Calm paper cards ────────────────────── */
.rq-card {
    position: relative;
    /* Primary content card surface — beige in light, lifted grey (#23222B)
       in dark. Shared by every top-level card across the app via --surface-card. */
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.22s ease, transform 0.22s ease,
                border-color 0.22s ease, opacity 0.24s ease;
}

@media (hover: hover) {
    .rq-card:hover {
        transform: translateY(-2px);
        border-color: rgba(20, 184, 166, 0.35);
        box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.07), var(--shadow-md);
    }
}

.rq-card--expanded {
    border-color: rgba(20, 184, 166, 0.4);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1), var(--shadow-md);
}

.rq-card--removing {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    pointer-events: none;
}

/* Rail + glow removed in Paper & Ink */
.rq-rail,
.rq-glow {
    display: none;
}

.rq-surface {
    position: relative;
    z-index: 1;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Header ─────────────────────────────── */
.rq-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
}

/* Non-draft cards carry a status chip. Promote it to its own grid cell so the
   title column keeps full width on desktop, and so the mobile media query can
   re-flow it into a slim top bar (see below). Drafts have no .rq-status-group,
   so they keep the simple 3-column header above. */
.rq-header:has(.rq-status-group) {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "icon heading status menu";
}
.rq-header:has(.rq-status-group) > .rq-icon-tile { grid-area: icon; }
.rq-header:has(.rq-status-group) > .rq-heading   { grid-area: heading; }
.rq-header:has(.rq-status-group) > .rq-top-right { grid-area: menu; }

.rq-status-group {
    grid-area: status;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.rq-icon-tile {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    background: rgba(240, 253, 250, 0.85);
    border: 1px solid rgba(45, 212, 191, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rq-icon-tile .icon-mask {
    width: 28px;
    height: 28px;
    /* Match the focus-area icons in new-request Step 1: the same teal→blue→indigo
       gradient fill (in both light and dark), not a flat teal. */
    background-image: linear-gradient(135deg, var(--color-primary) 0%, #0ea5e9 60%, #6366f1 100%);
    background-color: transparent;
    transition: none;
}

.rq-heading {
    min-width: 0;
}

.rq-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--color-warm-800);
    line-height: 1.3;
    margin: 0 0 6px 0;
    word-break: break-word;
    overflow-wrap: anywhere;
    letter-spacing: -0.005em;
}

.rq-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-family: var(--font-sans);
    line-height: 1;
}

.rq-sub-sep {
    color: var(--color-warm-400);
    font-size: 11px;
    user-select: none;
}

.rq-deadline-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--color-warm-600);
    white-space: nowrap;
}

/* Scoped with parent class to beat the broad `.requests-section svg { width: 40px }` mobile rule */
.rq-deadline-text .rq-deadline-icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    color: var(--color-warm-500);
}

.rq-anon-flag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px 3px 6px;
    border-radius: 999px;
    background: rgba(234, 179, 8, 0.12);
    color: #854D0E;
    border: 1px solid rgba(234, 179, 8, 0.3);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.rq-anon-flag svg {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

/* Top-right: status badge + kebab menu */
.rq-top-right {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    flex-shrink: 0;
}

.rq-status {
    font-family: var(--font-sans);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--color-gray-600);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--color-gray-100);
    border: 1px solid transparent;
}

.rq-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

/* Each variant: text in the status colour, a soft tint of the same hue behind
   it, and a faint matching border so the pill reads as a contained chip. */
.rq-status--completed { color: var(--color-success);      background: rgba(16, 185, 129, 0.12);  border-color: rgba(16, 185, 129, 0.28); }
.rq-status--active    { color: var(--color-primary-dark); background: rgba(13, 148, 136, 0.12);  border-color: rgba(13, 148, 136, 0.28); }
/* due-soon: golden yellow that reads on white, in the same hue family as the
   dark-mode #FBBF24. due-today is a step more urgent (amber/orange). */
.rq-status--due-soon  { color: #CA8A04;                   background: rgba(202, 138, 4, 0.13);   border-color: rgba(202, 138, 4, 0.30); }
.rq-status--due-today { color: #C2410C;                   background: rgba(234, 88, 12, 0.13);   border-color: rgba(234, 88, 12, 0.32); }
.rq-status--overdue   { color: var(--color-error-600);    background: rgba(220, 38, 38, 0.12);   border-color: rgba(220, 38, 38, 0.28); }
.rq-status--draft     { color: var(--color-gray-500);     background: var(--color-gray-100);     border-color: var(--color-gray-200); }

[data-theme="dark"] .rq-status--due-soon  { color: var(--color-warning-600); background: rgba(251, 191, 36, 0.16); border-color: rgba(251, 191, 36, 0.30); }
[data-theme="dark"] .rq-status--due-today { color: #FDBA74;                  background: rgba(249, 115, 22, 0.18); border-color: rgba(249, 115, 22, 0.34); }

/* Completed gets a checkmark instead of the default dot — inherits the same
   green via currentColor. Overrides the ::before shape from .rq-status above. */
.rq-status--completed::before {
    content: '✓';
    width: auto;
    height: auto;
    background: transparent;
    border-radius: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}
.rq-status--cancelled,
.rq-status--expired,
.rq-status--pending   { color: var(--color-warm-500); }

/* ── Draft card variant ─────────────────────────────────── */
.rq-card--draft {
    background: #FAFAF7;
    border: 1px dashed var(--color-warm-300, #d6d3cf);
}
.rq-card--draft:hover {
    border-color: var(--color-warm-400, #b8b5ae);
}
.rq-card--draft .rq-title {
    color: var(--color-warm-700, #52524c);
}
.rq-icon-tile--draft {
    background: #EEF2FF;
    color: #4F46E5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rq-draft-surface {
    padding-bottom: 16px;
}
.rq-draft-summary {
    margin: 6px 0 0 0;
    padding: 0 20px;
    color: var(--color-warm-600, #70716c);
    font-size: 13px;
    font-style: italic;
}
.rq-draft-actions {
    display: flex;
    justify-content: flex-end;
    padding: 12px 20px 0;
}
.rq-draft-continue {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-primary, var(--color-primary));
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.rq-draft-continue:hover {
    background: var(--color-primary-dark, var(--color-primary-dark));
}

.rq-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--color-warm-500);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.rq-menu-btn:hover {
    background: rgba(46, 44, 42, 0.06);
    color: var(--color-warm-800);
}

.rq-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 170px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(46, 44, 42, 0.08);
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 12px 32px -8px rgba(20, 184, 166, 0.18);
    z-index: 10;
}

.rq-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-warm-800);
    text-align: left;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.rq-menu-item:hover {
    background: rgba(17, 24, 39, 0.05);
}

.rq-menu-item--danger {
    color: var(--color-error-700);
}

.rq-menu-item--danger:hover {
    background: var(--color-error-50);
    color: var(--color-error-800);
}

.rq-menu-item--success {
    color: var(--color-primary-darker);
}

.rq-menu-item--success:hover {
    background: rgba(20, 184, 166, 0.08);
    color: #115E59;
}

/* ── Progress ───────────────────────────── */
/* Focus-area label in the collapsed sub-line (the "what") */
.rq-sub-focus {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-warm-700);
    white-space: nowrap;
}

/* Unified progress zone: avatar cluster + count/bar in one row */
.rq-progress {
    display: flex;
    align-items: center;
    gap: 14px;
}
.rq-progress .rq-avatars {
    flex-shrink: 0;
}
.rq-progress-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rq-progress-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rq-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-family: var(--font-sans);
}

.rq-progress-count {
    font-size: 13px;
    color: var(--color-warm-600);
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}

.rq-progress-count strong {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-warm-800);
    line-height: 1;
}

.rq-progress-total {
    font-size: 13px;
    color: var(--color-warm-500);
    font-weight: 500;
    margin-right: 6px;
}

.rq-progress-label {
    font-size: 12px;
    color: var(--color-warm-600);
}

.rq-progress-pct {
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: var(--color-primary-dark);
    letter-spacing: 0;
}

.rq-bar {
    height: 4px;
    background: rgba(46, 44, 42, 0.08);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.rq-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-primary-light) 0%, var(--color-primary-dark) 100%);
    box-shadow: 0 0 12px rgba(20, 184, 166, 0.3);
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.rq-bar-fill::after {
    content: none;
}

/* ── Footer: avatars + deadline + chevron ─ */
.rq-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.rq-avatars {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 4px;
}

.rq-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #FFFFFF;
    font-family: var(--font-sans);
    flex-shrink: 0;
    overflow: hidden;
}

.rq-avatar + .rq-avatar {
    margin-left: 1px;
}

.rq-avatar svg {
    width: 16px;
    height: 16px;
    display: block;
}

.rq-avatar--done {
    background: #CCFBF1;
    color: var(--color-primary-darker);
}

.rq-avatar--pending {
    background: var(--color-gray-100);
    color: #B4B8BE;
}

.rq-avatar--overflow {
    background: var(--color-warm-50);
    color: var(--color-gray-500);
    border: 1px solid var(--color-gray-200);
    font-size: 10px;
    font-weight: 600;
}

.rq-deadline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--color-warm-600);
    font-weight: 500;
}

.rq-deadline svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.rq-expand-chevron {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: var(--color-warm-500);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.15s ease;
}

@media (hover: hover) {
    .rq-card:hover .rq-expand-chevron {
        background: rgba(17, 24, 39, 0.04);
    }
}

.rq-expand-chevron--open {
    transform: rotate(180deg);
}

/* ── Expand wrapper (grid-rows auto-height animation) ─ */
.rq-expand-wrap {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.rq-card--expanded .rq-expand-wrap {
    grid-template-rows: 1fr;
}

.rq-expand-inner {
    overflow: hidden;
    min-height: 0;
}

.rq-expand-body {
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid rgba(46, 44, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rq-meta-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 16px 30px;
    text-align: left;
}

.rq-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.rq-meta-label {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-warm-500);
}

.rq-meta-value {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-warm-800);
}

/* Deadline extension chain — shown under the Deadline value when a request
   has been pushed at least once. Original → … → current. */
.rq-deadline-history {
    display: block;
    margin-top: 3px;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 500;
    color: var(--color-warm-500);
    line-height: 1.4;
}
.rq-deadline-history-label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 9.5px;
}
.rq-deadline-hist-orig {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    opacity: 0.85;
}
.rq-deadline-hist-current {
    font-weight: 700;
    color: var(--color-warm-800);
}
.rq-deadline-hist-arrow {
    opacity: 0.6;
    padding: 0 1px;
}

/* Request-detail strip variant of the extension chain. */
.rd-deadline-history {
    margin-top: 8px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    color: var(--color-warm-500);
    line-height: 1.4;
}
.rd-deadline-history-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 10px;
    margin-right: 4px;
}

.rq-cta {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0ea5e9 55%, #6366f1 100%);
    color: #FFFFFF;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(20, 184, 166, 0.28);
    transition: box-shadow 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}

.rq-cta:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(20, 184, 166, 0.38);
}

.rq-cta:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(20, 184, 166, 0.28);
}

/* State-driven primary action (footer of the resting card, and reachable when
   expanded). Single teal action; secondary states reuse it without the fill. */
.rq-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.rq-action svg { width: 15px; height: 15px; flex-shrink: 0; }
.rq-action--primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(20, 184, 166, 0.26);
}
.rq-action--primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.34);
}
.rq-action--primary:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(20, 184, 166, 0.26);
}

.rq-empty-note {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-warm-500);
    font-style: italic;
    margin: 0;
    text-align: center;
}

/* Anonymity-lock variant: responses are in but still hidden behind the
   threshold. Slightly more present than the plain "waiting" note. */
.rq-empty-note--locked {
    color: var(--color-warm-600);
    font-style: normal;
    line-height: 1.45;
}

/* ─── Section I: overdue-with-pending callout (expanded card) ─── */
.rq-overdue-callout {
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.07);
    border: 1px solid rgba(239, 68, 68, 0.22);
}

.rq-overdue-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.rq-overdue-icon {
    color: var(--color-error-600);
    flex: 0 0 auto;
    margin-top: 1px;
}

.rq-overdue-title {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #b91c1c;
}

.rq-overdue-sub {
    font-family: var(--font-sans);
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--color-warm-600);
    margin-top: 2px;
}

.rq-overdue-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.rq-overdue-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--color-warm-300, #d6d3d1);
    background: var(--color-surface, #fff);
    color: var(--color-warm-700, #44403c);
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.rq-overdue-btn:hover {
    background: var(--color-warm-100, #f5f5f4);
    transform: translateY(-1px);
}

.rq-overdue-btn--primary {
    border: none;
    background: linear-gradient(135deg, #f59e0b 0%, var(--color-error) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.26);
}

.rq-overdue-btn--primary:hover {
    filter: brightness(1.05);
    background: linear-gradient(135deg, #f59e0b 0%, var(--color-error) 100%);
}

/* Post-extend follow-up state ("Deadline extended"): the urgent red has done
   its job — switch to calm teal while offering the optional final reminder. */
.rq-overdue-callout--extended {
    background: rgba(20, 184, 166, 0.07);
    border-color: rgba(20, 184, 166, 0.25);
}

.rq-overdue-callout--extended .rq-overdue-icon { color: #0d9488; }
.rq-overdue-callout--extended .rq-overdue-title { color: #0f766e; }

.rq-overdue-callout--extended .rq-overdue-btn--primary {
    background: linear-gradient(135deg, #14b8a6, #0ea5e9);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.26);
}

.rq-overdue-callout--extended .rq-overdue-btn--primary:hover {
    background: linear-gradient(135deg, #14b8a6, #0ea5e9);
}

.rq-overdue-callout--extended .rq-final-editor {
    border-top-color: rgba(20, 184, 166, 0.25);
}

.rq-overdue-callout--extended .rq-final-send {
    background: linear-gradient(135deg, #14b8a6, #0ea5e9);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.26);
}

.rq-overdue-sent {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 600;
    color: #15803d;
}

.rq-final-editor {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed rgba(239, 68, 68, 0.22);
}

.rq-final-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-warm-500);
    margin-bottom: 6px;
}

.rq-final-text {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--color-warm-300, #d6d3d1);
    background: var(--color-warm-50, #fff);
    color: var(--color-warm-800, #292524);
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
}

.rq-final-text:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.rq-final-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.rq-final-cancel {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--color-warm-300, #d6d3d1);
    background: transparent;
    color: var(--color-warm-600);
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.rq-final-cancel:hover { background: var(--color-warm-100, #f5f5f4); }

.rq-final-send {
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #f59e0b 0%, var(--color-error) 100%);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.26);
    transition: filter 0.18s ease, transform 0.18s ease;
}

.rq-final-send:hover:not(:disabled) { filter: brightness(1.05); transform: translateY(-1px); }
.rq-final-send:disabled, .rq-final-cancel:disabled { opacity: 0.55; cursor: default; }

.rq-final-hint {
    margin: 8px 0 0;
    font-family: var(--font-sans);
    font-size: 11.5px;
    font-style: italic;
    color: var(--color-warm-500);
}

/* Dark mode: the warm-* token inversion leaves this callout's copy too dim
   (sub = warm-600, label/hint = the subtle warm-500), and the extended-state
   title/icon are hardcoded dark teal that nearly vanishes on the dark teal
   surface. Lift each one step brighter for legibility. */
[data-theme="dark"] .rq-overdue-sub { color: var(--color-warm-700); }
[data-theme="dark"] .rq-final-label,
[data-theme="dark"] .rq-final-hint { color: var(--color-warm-600); }
[data-theme="dark"] .rq-overdue-title { color: #f87171; }
[data-theme="dark"] .rq-overdue-callout--extended .rq-overdue-title { color: #5eead4; }
[data-theme="dark"] .rq-overdue-callout--extended .rq-overdue-icon { color: #2dd4bf; }

/* Mobile: center the callout content to match the card's mobile treatment. */
@media (max-width: 560px) {
    .rq-overdue-actions { justify-content: center; }
    .rq-final-actions { justify-content: center; }
}

/* Journey section — set off from the request's high-level info above it with a
   divider and extra top spacing so the two blocks read as distinct. */
.rq-journey {
    border-top: 1px solid rgba(46, 44, 42, 0.10);
    padding-top: 18px;
    margin-top: 2px;
}
[data-theme="dark"] .rq-journey {
    border-top-color: rgba(255, 255, 255, 0.10);
}
.rq-journey-label {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--color-warm-900);
    text-align: left;
    margin-bottom: 16px;
}

.rq-journey-groups {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

/* Group headers — pill chips echoing the wizard review's Identifiable/Anonymous
   tags, plus a neutral "x of y shared" count so each section carries its own
   completion state. Teal = anonymous cohort, amber = identifiable opt-in
   groups, plain = role groups on a non-anonymous request. */
.rq-jrny-group-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    row-gap: 6px;
    margin-bottom: 12px;
}
.rq-jrny-pill {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.4;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--surface-sunken);
    border: 1px solid var(--border-subtle);
    color: var(--color-warm-700);
    white-space: nowrap;
}
.rq-jrny-pill--anon {
    background: var(--color-info-50, #ecfeff);
    border-color: var(--color-info-100, #cffafe);
    color: var(--color-info-800, #075985);
}
[data-theme="dark"] .rq-jrny-pill--anon {
    background: rgba(14, 165, 233, 0.16);
    border-color: rgba(14, 165, 233, 0.32);
    color: #7dd3fc;
}
.rq-jrny-pill--ident {
    background: var(--color-warning-50);
    border-color: var(--color-warning-200);
    color: var(--color-warning-800);
}
[data-theme="dark"] .rq-jrny-pill--ident {
    background: rgba(234, 179, 8, 0.18);
    border-color: rgba(234, 179, 8, 0.36);
    color: #FCD34D;
}
/* Completion count beside the pill: a tiny dot meter (one dot per giver,
   filled = shared) + "x of y shared". Borderless so it reads as a quiet
   legend, not another chip. */
.rq-jrny-count {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-sans);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-warm-600);
    white-space: nowrap;
}
.rq-jrny-meter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.rq-jrny-meter-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1.5px solid var(--color-warm-400);
    box-sizing: border-box;
    flex-shrink: 0;
}
.rq-jrny-meter-dot.is-filled {
    background: linear-gradient(135deg, #0D9488 0%, #059669 100%);
    border-color: transparent;
}
[data-theme="dark"] .rq-jrny-meter-dot.is-filled {
    background: linear-gradient(135deg, #2DD4BF 0%, #34D399 100%);
}

.rq-journey-group-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Anonymous cohort journey ───────────────────────────────────────────────
   Aggregate block shown instead of per-giver rows for the anonymous givers on an
   anonymous request. Identifiable opt-in givers still render as normal rows. */
/* The aggregate "x of y perspectives shared" label runs longer than per-giver
   labels, so give the horizontal track a little more vertical room. */
.rq-cohort .jrny--h .jrny-track { height: 104px; }

/* ── Compact giver rows (timeline reveals on click) ─────────────── */
.rq-giver-row {
    border-bottom: 1px solid var(--border-subtle);
}
.rq-giver-row:last-child {
    border-bottom: none;
}
.rq-giver-row-head {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 2px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    text-align: left;
}
@media (hover: hover) {
    .rq-giver-row-head:hover .rq-giver-row-name { color: var(--color-primary-dark); }
    .rq-giver-row-head:hover .rq-giver-row-chev { color: var(--color-warm-700); }
}
/* State circle before the giver name — a filled brand-gradient check once
   they've shared (echoes the journey's final node), a dashed hollow circle
   while awaiting (echoes the journey's "scheduled, not yet" node). */
.rq-giver-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rq-giver-check svg { width: 12px; height: 12px; display: block; }
.rq-giver-check--done {
    background: linear-gradient(135deg, #0D9488 0%, #059669 100%);
    color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.16);
}
.rq-giver-check--pending {
    background: transparent;
    border: 2px dashed var(--color-warm-300);
}
[data-theme="dark"] .rq-giver-check--done {
    background: linear-gradient(135deg, #2DD4BF 0%, #34D399 100%);
    color: #062521;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.22);
}
[data-theme="dark"] .rq-giver-check--pending { border-color: var(--color-warm-400); }
/* A step below the 16px "Giver journey" heading so the type hierarchy reads
   heading → group pill → giver row. */
.rq-giver-row-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: var(--color-warm-700);
    transition: color 0.15s ease;
}
.rq-giver-row-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    font-size: 12px;
    color: var(--color-warm-600);
    white-space: nowrap;
}
.rq-giver-row-chev {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: var(--color-warm-500);
    transition: transform 0.2s ease, color 0.15s ease;
}
.rq-giver-row-head.is-open .rq-giver-row-chev { transform: rotate(180deg); }
.rq-giver-row-detail {
    padding: 2px 2px 14px;
}

.rq-giver-card {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(46, 44, 42, 0.07);
    border-radius: 12px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.rq-giver-card--done {
    background: rgba(240, 253, 250, 0.65);
    border-color: rgba(45, 212, 191, 0.25);
}

.rq-giver-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.rq-giver-name {
    font-family: var(--font-sans);
    font-weight: 700;
    color: var(--color-warm-900);
    font-size: 16px;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}

.rq-giver-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.03em;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Quiet role suffix after a giver's name in the merged "Identifiable givers"
   section (which has no per-role sub-headers). */
.rq-giver-row-role {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-warm-500);
}

/* "Ready to read" — red attention pill on a freshly-completed card. */
.rq-new-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.25);
    white-space: nowrap;
}
[data-theme="dark"] .rq-new-pill {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.4);
}

/* ── Delete confirm overlay ─────────────── */
.rq-delete-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 18px;
    border-radius: inherit;
}

.rq-delete-panel {
    text-align: center;
    max-width: 360px;
    width: 100%;
}

.rq-delete-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-warm-800);
    margin-bottom: 4px;
    line-height: 1.3;
}

.rq-delete-sub {
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--color-warm-600);
    line-height: 1.45;
    margin-bottom: 12px;
    word-break: break-word;
}

.rq-delete-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.rq-delete-cancel,
.rq-delete-confirm-btn {
    padding: 7px 16px;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rq-delete-cancel {
    background: var(--color-warm-50);
    color: var(--color-warm-700);
    border-color: rgba(17, 24, 39, 0.12);
}

.rq-delete-cancel:hover:not(:disabled) {
    background: var(--color-gray-50);
    border-color: rgba(17, 24, 39, 0.2);
}

.rq-delete-confirm-btn {
    background: linear-gradient(135deg, var(--color-error) 0%, var(--color-error-700) 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 12px -3px rgba(185, 28, 28, 0.4);
}

.rq-delete-confirm-btn:hover:not(:disabled) {
    filter: brightness(1.05);
}

.rq-delete-cancel:disabled,
.rq-delete-confirm-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Card entrance animation */
@keyframes rq-card-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rq-card {
    animation: rq-card-in 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.rq-card:nth-child(1) { animation-delay: 0.05s; }
.rq-card:nth-child(2) { animation-delay: 0.1s; }
.rq-card:nth-child(3) { animation-delay: 0.15s; }
.rq-card:nth-child(4) { animation-delay: 0.2s; }
.rq-card:nth-child(n+5) { animation-delay: 0.25s; }

/* ── Mobile ─────────────────────────────── */
@media (max-width: 640px) {
    .requests-list {
        gap: 14px;
        /* Room to scroll the last card's content clear of the fixed
           56px .pg-fab in the bottom-right corner. */
        padding-bottom: 88px;
    }

    .rq-card {
        padding: 18px 18px 16px 18px;
        border-radius: 12px;
    }

    .rq-surface {
        gap: 14px;
    }

    .rq-header {
        column-gap: 10px;
        align-items: start;
    }

    /* On a phone, give the title the entire card width. The icon, status chip
       and kebab form a slim top bar; the title (and its meta sub-line) span
       full-width on the row beneath, so long titles wrap cleanly instead of
       being crushed into a narrow column. */
    .rq-header:has(.rq-status-group) {
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "icon    status menu"
            "heading heading heading";
        align-items: center;
        column-gap: 10px;
        row-gap: 12px;
    }
    .rq-header:has(.rq-status-group) > .rq-status-group {
        justify-self: end;
        align-self: center;
    }

    .rq-icon-tile {
        width: 44px;
        height: 44px;
        border-radius: 11px;
    }

    .rq-icon-tile .icon-mask {
        width: 24px;
        height: 24px;
    }

    .rq-heading {
        min-width: 0;
    }

    .rq-title {
        font-size: 16px;
        margin-bottom: 5px;
    }

    .rq-sub {
        gap: 6px;
    }

    .rq-deadline-text,
    .rq-anon-flag,
    .rq-status {
        font-size: 10px;
    }

    .rq-menu-btn {
        width: 26px;
        height: 26px;
        border-radius: 8px;
    }

    .rq-menu-btn svg {
        width: 14px;
        height: 14px;
    }

    .rq-progress-count strong {
        font-size: 14px;
    }

    .rq-progress-pct {
        font-size: 12px;
    }

    .rq-avatar {
        width: 24px;
        height: 24px;
    }

    .rq-avatar svg {
        width: 14px;
        height: 14px;
    }

    .rq-footer {
        gap: 10px;
    }
    /* When the footer holds only the expand chevron (no primary action),
       pull it up toward the progress bar — a full-height row for a lone
       28px affordance reads as dead space on a phone. */
    .rq-footer:not(:has(.rq-action)) {
        margin-top: -8px;
    }

    .rq-meta-grid {
        gap: 14px 22px;
    }
    .rq-meta {
        min-width: 88px;
    }

    /* Avatars share the row with the count + bar (like desktop) as long as
       the bar keeps ~190px; with more avatars the main section wraps below
       them to full width, so neither gets cramped on narrow screens. */
    .rq-progress {
        flex-wrap: wrap;
        gap: 10px 14px;
    }
    .rq-progress-main {
        min-width: 190px;
    }

    .rq-cta {
        align-self: stretch;
        justify-content: center;
    }

    /* Primary action fills the row, chevron stays beside it */
    .rq-action {
        flex: 1;
        justify-content: center;
    }

    .rq-menu {
        right: 0;
        min-width: 160px;
    }

    .rq-menu-item {
        font-size: 12px;
        padding: 7px 10px;
        gap: 7px;
    }

    .rq-menu-item svg {
        width: 12px;
        height: 12px;
    }

    .rq-delete-panel {
        max-width: 100%;
    }

    .rq-delete-title {
        font-size: 14px;
    }

    .rq-delete-sub {
        font-size: 11.5px;
    }

    /* Deadline chip is visually heavy on narrow cards — tighten it down
       so it doesn't dominate the meta row. */
    .rq-meta-value .rd-deadline-edit {
        font-size: 12px;
        padding: 1px 7px;
        gap: 4px;
        /* Touch has no hover, so signal "editable" with a teal border. */
        border-color: rgba(20, 184, 166, 0.45);
    }
    /* The pencil is hover-only on desktop; touch never hovers, so keep the
       edit cue always visible (and teal) on mobile. */
    .rq-meta-value .rd-deadline-pencil {
        width: 11px;
        height: 11px;
        opacity: 1;
        color: var(--color-primary);
    }

    /* Inline deadline editor: the date input + Save/Cancel are wider than a
       half-width meta cell, which pushed the neighbouring column off-screen.
       Give the editing cell the full row and let the editor shrink/wrap. */
    .rq-meta {
        min-width: 0;
    }
    .rq-meta:has(.rd-deadline-editor) {
        grid-column: 1 / -1;
    }
    .rd-deadline-editor {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        box-sizing: border-box;
        margin-left: 0;
        gap: 8px;
        padding: 10px 12px;
        /* The pill radius looks broken once the row wraps — use a card radius
           and give the date its own line with the buttons beneath. */
        border-radius: var(--radius-md, 10px);
    }
    .rd-deadline-input {
        min-width: 0;
        flex: 1 1 100%;
        /* 16px keeps iOS Safari from zooming the focused field. */
        font-size: 16px;
    }
    .rd-deadline-btn { flex: 0 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .rq-card,
    .rq-icon-tile,
    .rq-expand-chevron,
    .rq-bar-fill,
    .rq-expand-wrap {
        animation: none !important;
        transition: none !important;
    }
    .rq-bar-fill::after { animation: none !important; }
}

/* ============================================================
   STEP 3 — PRIVACY & STRUCTURE CARD (grouped toggles)
   ============================================================ */
/* Compact collapsible settings bar (replaces .privacy-card) */
.wiz-settings-bar {
    margin-bottom: 16px;
    background: var(--color-warm-50, #faf8f6);
    border: 1px solid var(--color-warm-200);
    border-radius: 10px;
    overflow: hidden;
}

.wiz-settings-summary {
    width: 100%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    transition: background-color 0.15s;
}
.wiz-settings-summary:hover { background: rgba(0, 0, 0, 0.025); }

.wiz-settings-bar--open .wiz-settings-summary {
    border-bottom: 1px solid var(--color-warm-200);
}

.wiz-settings-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--color-warm-600);
    font-weight: 500;
    line-height: 1;
}
.wiz-settings-pill strong { font-weight: 600; color: var(--color-warm-700); }
.wiz-settings-pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-warm-300);
    flex-shrink: 0;
}
.wiz-settings-pill--on { color: var(--color-primary-dark, var(--color-primary-darker)); }
.wiz-settings-pill--on strong { color: var(--color-primary-dark, var(--color-primary-darker)); }
.wiz-settings-pill--on .wiz-settings-pill-dot { background: var(--color-primary, var(--color-primary)); }

.wiz-settings-toggle {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-warm-600);
}
.wiz-settings-chevron {
    transition: transform 0.2s ease;
}
.wiz-settings-chevron--up {
    transform: rotate(180deg);
}

.wiz-settings-body {
    padding: 14px 18px 16px;
}

/* One-liner explaining why anonymity + role grouping share this bar */
.wiz-settings-explain {
    margin: 0 0 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-warm-200);
    font-size: 12.5px;
    color: var(--color-gray-500);
    line-height: 1.5;
}
[data-theme="dark"] .wiz-settings-explain {
    color: var(--text-muted);
    border-bottom-color: var(--border-subtle);
}

.privacy-toggle-row {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
}

.privacy-card-divider {
    height: 1px;
    background: var(--color-warm-200);
    margin: 14px 0;
}

.wiz-group-hint {
    font-size: 13px;
    color: var(--color-gray-600);
    line-height: 1.5;
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--color-success-50);
    border-left: 3px solid #86EFAC;
    border-radius: 6px;
}
/* ── Consolidated N=1 identifiable opt-in (Step 3, above Next button) ───
   Single panel that lists every role group with only one giver, asking
   the requester to either accept the giver will be named or add another
   person. Only surfaces once the user has otherwise reached the anonymity
   minimum (3 valid givers, all roles assigned) — so it doesn't pop up
   while they're still building the list. */
.wiz-n1-panel {
    margin-top: 20px;
    padding: 14px 16px;
    background: var(--color-warning-50);
    border: 1px solid var(--color-warning-200);
    border-left: 3px solid var(--color-warning-600);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wiz-n1-panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-warning-800);
}
.wiz-n1-panel-icon {
    font-size: 15px;
    line-height: 1;
}
.wiz-n1-panel-sub {
    margin: 0 0 4px 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--color-gray-700);
}
/* One labelled checkbox per N=1 group — "Show {name} (only {role}) by name".
   Whole row is a <label> so click anywhere toggles. Text wraps naturally,
   so it works at any width without per-breakpoint overrides. */
.wiz-n1-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--color-warning-50);
    border: 1px solid var(--color-warning-200);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-gray-800);
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.wiz-n1-row:hover {
    background: var(--color-warning-100);
}
.wiz-n1-row--checked {
    background: var(--color-warning-100);
    border-color: var(--color-warning-600);
}
.wiz-n1-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--color-primary);
    flex-shrink: 0;
    cursor: pointer;
}
.wiz-n1-row-text {
    flex: 1;
    min-width: 0;
}
.wiz-n1-row-role {
    color: var(--color-gray-600);
    font-size: 12.5px;
}

/* Step 5 review: chip flagging a giver whose response will be identifiable
   because they're the sole occupant of their role group. */
.rv-giver-identifiable {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-warning-800);
    background: var(--color-warning-50);
    border: 1px solid var(--color-warning-200);
    border-radius: 99px;
    padding: 2px 8px;
    white-space: nowrap;
}

/* Anonymous pill in the review giver list (B3) — teal, distinct from the amber
   Identifiable pill. */
.rv-giver-anon {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-info-800, #075985);
    background: var(--color-info-50, #ecfeff);
    border: 1px solid var(--color-info-100, #cffafe);
    border-radius: 99px;
    padding: 2px 8px;
    white-space: nowrap;
}
[data-theme="dark"] .rv-giver-anon {
    background: rgba(14, 165, 233, 0.16);
    color: #7dd3fc;
    border-color: rgba(14, 165, 233, 0.32);
}

.wiz-group-warn {
    margin-top: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--color-warning-700);
}

/* ── Live anonymity status ─────────────────────────────────── */
.wiz-anon-status-wrap {
    margin-top: 12px;
}

.wiz-anon-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    line-height: 1.3;
}

.wiz-anon-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.wiz-anon-status--need {
    background: var(--color-error-50);
    color: var(--color-error-800);
    border-color: var(--color-error-200);
}
.wiz-anon-status--need .wiz-anon-status-dot { background: var(--color-error-600); }

.wiz-anon-status--ok {
    background: var(--color-warning-50);
    color: var(--color-warning-800);
    border-color: var(--color-warning-200);
}
.wiz-anon-status--ok .wiz-anon-status-dot { background: var(--color-warning); }

.wiz-anon-status--great {
    background: var(--color-success-50);
    color: #166534;
    border-color: #BBF7D0;
}
.wiz-anon-status--great .wiz-anon-status-dot { background: #16A34A; }

.wiz-anon-status-hint {
    font-size: 12px;
    color: var(--color-gray-500);
    margin: 8px 0 0;
    line-height: 1.5;
}

/* ── Saved contacts header + search ────────────────────────── */
.pg-saved-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.pg-saved-header .pg-saved-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.pg-saved-icon {
    color: var(--color-primary, var(--color-primary));
    flex-shrink: 0;
}

.pg-saved-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 16px;
    padding: 0 5px;
    background: var(--color-warm-200);
    color: var(--color-warm-700, #44403c);
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    letter-spacing: 0;
}

/* ── Invited givers header (above the giver forms list) ─────── */
.givers-list-header {
    display: flex;
    align-items: center;
    margin: 18px 0 10px;
}

.givers-list-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-warm-500);
}

.givers-list-icon {
    color: var(--color-primary, var(--color-primary));
    flex-shrink: 0;
}

.givers-list-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 16px;
    padding: 0 5px;
    background: var(--color-warm-200);
    color: var(--color-warm-700, #44403c);
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    letter-spacing: 0;
}

.pg-contact-search {
    flex: 0 1 200px;
    max-width: 200px;
    height: 26px;
    padding: 0 10px;
    font-size: 12px;
    line-height: 26px;
    border: 1px solid var(--color-warm-300);
    border-radius: 6px;
    background: var(--color-warm-50);
    outline: none;
    transition: border-color 0.15s;
}
.pg-contact-search::placeholder { font-size: 12px; }
.pg-contact-search:focus {
    border-color: var(--color-primary, var(--color-primary));
}

.pg-saved-empty {
    width: 100%;
    font-size: 13px;
    color: var(--color-warm-500);
    font-style: italic;
    padding: 4px 2px;
}

/* Differentiate saved-contact chips from giver pills */
.pg-saved-chip {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.pg-saved-chip-plus {
    font-size: 14px;
    color: var(--color-primary, var(--color-primary));
    font-weight: 700;
    line-height: 1;
    margin-left: 2px;
}

/* ── Inline email validation ──────────────────────────────── */
.giver-email-wrap {
    position: relative;
    margin-bottom: 16px;
}
.giver-email-wrap .feedback-input {
    margin-bottom: 0 !important;
    padding-right: 36px;
}

.feedback-input--valid {
    border-color: #86EFAC !important;
    background-color: var(--color-success-50) !important;
}
.feedback-input--invalid {
    border-color: #FCA5A5 !important;
    background-color: var(--color-error-50) !important;
}

.giver-email-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    pointer-events: none;
}
.giver-email-icon--valid {
    background: #16A34A;
    color: white;
}
.giver-email-icon--invalid {
    background: var(--color-error-600);
    color: white;
}

.giver-error-msg {
    font-size: 13px;
    color: var(--color-error-700);
    margin-top: 4px;
    margin-bottom: 4px;
}

/* ── Giver summary row: meta cluster on the right ────────── */
.giver-summary-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

/* ── Flash/pulse when a giver is added via saved contact ── */
@keyframes giver-flash {
    0%   { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.0); background-color: var(--color-primary-50); }
    40%  { box-shadow: 0 0 0 6px rgba(20, 184, 166, 0.25); background-color: #CCFBF1; }
    100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.0); background-color: transparent; }
}
.feedback-giver-form.giver-flash {
    animation: giver-flash 1.4s ease-out;
}

/* ── +Add Another Person row with disabled-hint ──────────── */
.add-giver-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.add-giver-hint {
    font-size: 12.5px;
    color: var(--color-warm-500);
    font-style: italic;
}

/* ── Next button cluster with anonymity badge ─────────────── */
.wizard-next-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.wiz-next-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    letter-spacing: 0.02em;
}
.wiz-next-badge--need {
    background: var(--color-error-50);
    color: var(--color-error-800);
    border: 1px solid var(--color-error-200);
}
.wiz-next-badge--ok {
    background: var(--color-warning-50);
    color: var(--color-warning-800);
    border: 1px solid var(--color-warning-200);
}
.wiz-next-badge--great {
    background: var(--color-success-50);
    color: #166534;
    border: 1px solid #BBF7D0;
}

@media (prefers-reduced-motion: reduce) {
    .feedback-giver-form.giver-flash { animation: none; }
}

.givers-empty-state {
    margin: 12px 0 20px;
    padding: 14px 18px;
    border: 1.5px dashed var(--color-warm-300);
    border-radius: 10px;
    background: var(--color-warm-50, #faf8f6);
    text-align: center;
}
.givers-empty-state p {
    margin: 0;
    font-size: 13.5px;
    color: var(--color-warm-600, #57534e);
    line-height: 1.5;
}

.giver-save-row {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-warm-200);
}
.giver-save-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-gray-600);
    cursor: pointer;
    user-select: none;
}
.giver-save-check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--color-primary, var(--color-primary));
    cursor: pointer;
}
.giver-save-already {
    display: inline-flex;
    align-items: center;
    font-size: 12.5px;
    color: var(--color-warm-500);
    font-style: italic;
}

/* ════════════════════════════════════════════════════════════════
   Generic page hero — icon + eyebrow + title + sub.
   Same pattern as the Gems page header (.gems-page-*); abstracted
   so it can be reused on Perspectives, Growth Planner, My Givers. */
.app-page-hero {
    display: flex;
    align-items: center; /* icon tile optically centered against the title+sub block */
    gap: 18px;
    margin-bottom: 32px;
}
.app-page-hero-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--color-primary-50);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary-darker);
}
.app-page-hero-eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--color-primary-darker);
    margin: 0 0 4px;
}
.app-page-hero-title {
    font-family: 'Lora', Georgia, serif;
    font-size: 32px;
    font-weight: 600;
    color: var(--color-gray-900);
    margin: 0 0 6px;
    line-height: 1.2;
    letter-spacing: -0.4px;
}
.app-page-hero-sub {
    font-size: 15px;
    color: var(--color-gray-500);
    margin: 0;
    line-height: 1.55;
    max-width: 60ch;
}
@media (max-width: 640px) {
    .app-page-hero { gap: 14px; margin-bottom: 18px; }
    .app-page-hero-icon { width: 48px; height: 48px; border-radius: 12px; }
    .app-page-hero-title { font-size: 26px; }
    .app-page-hero-sub { font-size: 14px; }

    /* Pillar pages (Requests · Insights · Givers · Growth) — stacked +
       centered hero on mobile. 64px keeps the icon a clear identity mark
       without spending a third of the first screen on decoration. */
    .app-page-hero--stacked {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .app-page-hero--stacked .app-page-hero-icon {
        width: 64px;
        height: 64px;
        border-radius: 16px;
    }
    .app-page-hero--stacked .app-page-hero-icon svg {
        width: 40px;
        height: 40px;
    }
}
[data-theme="dark"] .app-page-hero-icon {
    background: rgba(20, 184, 166, 0.18);
    color: #5EEAD4;
}
[data-theme="dark"] .app-page-hero-eyebrow {
    color: #5EEAD4;
}

/* ============================================
   🌙 DARK MODE POLISH — component-level overrides
   ============================================
   Co-located here so the light-mode rules above stay readable.
   Most components flip "for free" via inverted warm/grey scales
   in design-tokens.css. This block only handles components that
   hardcode rgba(255,255,255,…) glass tints or specific hex values
   that don't pick up the inversion.
*/

/* ── results.html: request cards ─────────────── */
[data-theme="dark"] .rq-card {
    background: var(--surface-card);
    border-color: var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

@media (hover: hover) {
    [data-theme="dark"] .rq-card:hover {
        border-color: rgba(20, 184, 166, 0.4);
        box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12), var(--shadow-md);
    }
}

[data-theme="dark"] .rq-card--expanded {
    border-color: rgba(20, 184, 166, 0.45);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15), var(--shadow-md);
}

[data-theme="dark"] .rq-icon-tile {
    background: rgba(20, 184, 166, 0.14);
    border-color: rgba(45, 212, 191, 0.32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .rq-card--draft {
    background: rgba(30, 30, 36, 0.5);
    border-color: rgba(255, 255, 255, 0.14);
    border-style: dashed;
}
[data-theme="dark"] .rq-icon-tile--draft {
    background: rgba(99, 102, 241, 0.18);
    color: #A5B4FC;
}

[data-theme="dark"] .rq-anon-flag {
    background: rgba(234, 179, 8, 0.18);
    color: #FCD34D;
    border-color: rgba(234, 179, 8, 0.36);
}

[data-theme="dark"] .rq-bar {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .rq-menu {
    background: rgba(30, 30, 36, 0.95);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
}
[data-theme="dark"] .rq-menu-item:hover {
    background: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .rq-menu-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .rq-avatar {
    border-color: rgba(30, 30, 36, 0.95);
}
[data-theme="dark"] .rq-avatar--done {
    background: rgba(20, 184, 166, 0.25);
    color: #5EEAD4;
}
[data-theme="dark"] .rq-avatar--pending {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
}
[data-theme="dark"] .rq-avatar--overflow {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .rq-expand-body {
    border-top-color: rgba(255, 255, 255, 0.08);
}

@media (hover: hover) {
    [data-theme="dark"] .rq-card:hover .rq-expand-chevron {
        background: rgba(255, 255, 255, 0.06);
    }
}

[data-theme="dark"] .rq-giver-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .rq-giver-card--done {
    background: rgba(20, 184, 166, 0.1);
    border-color: rgba(45, 212, 191, 0.32);
}

/* Theme-aware giver badge classes (replace inline hex styles in results.js) */
.rq-giver-badge--done {
    background: var(--color-primary-50);
    color: var(--color-primary-darker);
    border: 1px solid #CCFBF1;
}
[data-theme="dark"] .rq-giver-badge--done {
    background: rgba(20, 184, 166, 0.18);
    color: #5EEAD4;
    border-color: rgba(45, 212, 191, 0.4);
}
.rq-giver-badge--pending {
    background: #FFFFFF;
    color: var(--color-gray-500);
    border: 1px solid var(--color-gray-200);
}
[data-theme="dark"] .rq-giver-badge--pending {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.65);
    border-color: rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .rq-delete-overlay {
    background: rgba(15, 15, 18, 0.95);
}

/* ── new-request.html Step 1: Request Title + display name ─────────────── */

/* Make inputs feel more lifted in dark mode and demarcated from their neighbours */
[data-theme="dark"] .feedback-input {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.14);
}
[data-theme="dark"] .feedback-input:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Native <select> dark-mode fix.
   Without color-scheme: dark, the open option-list panel and the OS-default
   selection highlight render in light mode — white panel + off-brand blue
   hover. Setting color-scheme on the element tells the browser to use dark
   OS colours for the popup, scrollbar, and highlight. The chevron SVG also
   needs a lighter stroke to stay visible on the dark background. */
[data-theme="dark"] select.feedback-input {
    color-scheme: dark;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23C4C4CB' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    /* The dark-mode `.feedback-input` rule above uses the `background`
       shorthand, which silently resets background-repeat and
       background-position to their defaults (repeat / 0 0). The base
       `select.feedback-input` rule that anchored the chevron to the right
       side loses to that higher-specificity dark-mode rule, so the chevron
       tiles across the whole control. Re-declaring both properties here
       keeps the chevron pinned to the right edge in dark mode. */
    background-repeat: no-repeat;
    background-position: right 16px center;
}

/* <option> styling as a fallback. Chromium/WebKit ignore these (they use
   OS rendering, controlled by color-scheme above), but Firefox honors them. */
[data-theme="dark"] select.feedback-input option {
    background: #1E1E24;
    color: #E8E8EC;
}
[data-theme="dark"] select.feedback-input option:checked,
[data-theme="dark"] select.feedback-input option:hover {
    background: rgba(20, 184, 166, 0.25);
    color: #FFFFFF;
}

/* Add a soft separator between Request Title and the display-name section */
[data-theme="dark"] .request-title-section {
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 6px;
}

/* ── Step 1: Focus area cards ─────────────── */

/* The .focus-area-section wrapper had a hardcoded #F9F7F4 cream — fixing
   that here is the ROOT of the visibility problem. Once the panel is dark,
   the inverted text tokens read as light-on-dark instead of light-on-cream. */
[data-theme="dark"] .focus-area-section {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Section heading "Pick a Focus Area" — bump to a brighter colour so it
   carries weight as the section title against the dark panel */
[data-theme="dark"] .step1-section-label {
    color: #F4F4F8;
}

[data-theme="dark"] .feedback-type-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.25);
}
[data-theme="dark"] .feedback-type-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(20, 184, 166, 0.4);
    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.4),
        0 8px 22px rgba(20, 184, 166, 0.22);
}
/* Card titles — bright white for full prominence */
[data-theme="dark"] .type-card-label {
    color: #F4F4F8;
}

/* "Or load a saved template" pill — brighter text, stronger bg + border for contrast */
[data-theme="dark"] .tpl-loader-toggle {
    background: rgba(20, 184, 166, 0.22);
    border-color: rgba(94, 234, 212, 0.55);
    color: #F4F4F8;
}
[data-theme="dark"] .tpl-loader-toggle .tpl-loader-label {
    color: #F4F4F8;
}
[data-theme="dark"] .tpl-loader-toggle:hover {
    background: rgba(20, 184, 166, 0.32);
    border-color: rgba(94, 234, 212, 0.75);
}
[data-theme="dark"] .tpl-loader-icon,
[data-theme="dark"] .tpl-loader-count {
    color: #5EEAD4;
}
[data-theme="dark"] .tpl-loader-count {
    background: rgba(20, 184, 166, 0.28);
}
[data-theme="dark"] .tpl-loader-panel {
    background: var(--surface-elevated);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
}

/* ── Step 1: Focus area expanded modal (the "fae-*" preview) ─────────────── */

[data-theme="dark"] .fa-expanded {
    background: var(--surface-elevated);
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .fae-close {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}
[data-theme="dark"] .fae-close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #E8E8EC;
}
[data-theme="dark"] .fae-title {
    color: #F4F4F8;
}
[data-theme="dark"] .fae-rule {
    background: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .fae-desc {
    color: #C4C4CB;
}
[data-theme="dark"] .fae-questions {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .fae-questions-label {
    color: rgba(255, 255, 255, 0.55);
}
[data-theme="dark"] .fae-question-list li {
    color: #D4D4DB;
}
[data-theme="dark"] .fae-question-list li::before {
    background: rgba(255, 255, 255, 0.4);
}
[data-theme="dark"] .fae-library-note {
    color: rgba(255, 255, 255, 0.45);
    border-top-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .fae-btn-ghost {
    border-color: rgba(255, 255, 255, 0.2);
    color: #E8E8EC;
}
[data-theme="dark"] .fae-btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.04);
}
/* Select button: solid teal in dark mode (was almost-black, vanished against dark page) */
[data-theme="dark"] .fae-btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    box-shadow: 0 4px 14px rgba(20, 184, 166, 0.32);
}
[data-theme="dark"] .fae-btn-primary:hover {
    filter: brightness(1.08);
    box-shadow: 0 6px 22px rgba(20, 184, 166, 0.42);
}
[data-theme="dark"] .fae-btn-primary:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    box-shadow: none;
}
[data-theme="dark"] .fa-backdrop {
    background: rgba(0, 0, 0, 0.7);
}

/* ── new-request.html Step 2: Question Builder ─────────────── */

/* Speech-bubble icon next to "Instructions for Givers": white SVG, keep teal circle */
[data-theme="dark"] .gi-icon {
    background: linear-gradient(135deg,
        rgba(20, 184, 166, 0.35) 0%,
        rgba(45, 212, 191, 0.45) 100%);
    color: #FFFFFF;
    box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.5);
}

/* "Instructions for Givers" title + typed text stay #000 in both modes
   (per explicit request). Keep the textarea bg light in dark mode so the
   black text remains readable, and lift the placeholder to a mid-grey. */

/* Instructions textarea: in dark mode the section's :focus-within rule
   lightens the surrounding container bg, so we keep the textarea itself
   as a clear light card with #000 text. That way typed letters stay
   black regardless of focus state. */
[data-theme="dark"] .gi-textarea {
    background: rgba(255, 255, 255, 0.92);
    color: #000;
    border-color: rgba(255, 255, 255, 0.2);
}
[data-theme="dark"] .gi-textarea:focus {
    background: #FFFFFF;
    border-color: var(--color-primary);
}
[data-theme="dark"] .gi-textarea::placeholder {
    color: rgba(0, 0, 0, 0.45);
}
[data-theme="dark"] .auto-generate-btn {
    /* Opaque fill so the pill reads against the card's teal-grey gradient
       header instead of blending into it (the transparent version washed out). */
    background: #0C2E2B;
    border-color: rgba(94, 234, 212, 0.55);
    color: #99F6E4;
}
[data-theme="dark"] .auto-generate-btn:hover {
    background: #12433E;
    border-color: #5EEAD4;
    color: #CCFBF1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

/* "Write Your Own" / "Browse Library" cards — match instructions textarea bg */
[data-theme="dark"] .q-add-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .q-add-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.18);
}
[data-theme="dark"] .q-add-card--library {
    background: rgba(20, 184, 166, 0.1);
    border-color: rgba(45, 212, 191, 0.4);
}
[data-theme="dark"] .q-add-card--library:hover {
    background: rgba(20, 184, 166, 0.18);
    border-color: var(--color-primary);
}
[data-theme="dark"] .q-add-card--library .q-add-card-title { color: #5EEAD4; }
[data-theme="dark"] .q-add-card--library .q-add-card-desc  { color: #99F6E4; }

/* "Save as Template" button: simple glow on hover, no green-tinted bg */
[data-theme="dark"] .q-save-template-btn {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.16);
    color: #C4C4CB;
}
[data-theme="dark"] .q-save-template-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.32);
    color: #E8E8EC;
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.04),
        0 4px 14px rgba(255, 255, 255, 0.08);
}

/* Toast confirmation: "saved template" / "saved progress" — flip light bg */
/* Dark toasts need a solid surface — the translucent tints washed out against
   the dark page and read as barely-there. Solid tinted backgrounds + a border
   and deeper shadow give the toast a clear card edge. */
[data-theme="dark"] .toast {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .toast-success {
    background: #19271f;
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-left: 4px solid var(--color-success);
    color: #A7F3D0;
}
[data-theme="dark"] .toast-error {
    background: #2a1b1d;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-left: 4px solid var(--color-error);
    color: #FECACA;
}
[data-theme="dark"] .toast-info {
    background: #15262a;
    border: 1px solid rgba(20, 184, 166, 0.4);
    border-left: 4px solid var(--color-primary);
    color: #99F6E4;
}

/* Wizard back button — make visible against dark surfaces */
[data-theme="dark"] .wizard-buttons button:not(:last-child):not(#step1-next-btn):not(#step2-next-btn):not(#step3-next-btn):not(#step4-next-btn):not(#step5-next-btn) {
    color: #C4C4CB;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
}
[data-theme="dark"] .wizard-buttons button:not(:last-child):hover {
    color: #F4F4F8;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.24);
}

/* ── Question Library panel ─────────────── */

[data-theme="dark"] .fp-mobile-lib {
    background: var(--surface-base);
}
[data-theme="dark"] .fp-mobile-lib-header {
    background: rgba(255, 255, 255, 0.04);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .fp-mobile-lib-title {
    color: #E8E8EC;
}
[data-theme="dark"] .q-library-search {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .q-search-input {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #E8E8EC !important;
}

/* Filter pills (LOOKING FOR / TOPIC) */
[data-theme="dark"] .filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: #C4C4CB;
}
[data-theme="dark"] .filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #F4F4F8;
}
[data-theme="dark"] .filter-btn.active {
    background: var(--color-primary);
    color: #FFFFFF;
    border-color: var(--color-primary);
}
[data-theme="dark"] .q-library-filters {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .q-library-filters--secondary {
    background: rgba(255, 255, 255, 0.03);
    border-top-color: rgba(255, 255, 255, 0.1);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .q-filter-label {
    color: #9595A0;
}
[data-theme="dark"] .filter-btn--intent.active {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(147, 197, 253, 0.5);
    color: #93C5FD;
}
[data-theme="dark"] .q-library-filters--intent {
    border-bottom-color: rgba(99, 102, 241, 0.18);
}

/* Question text inside library items (used by both mobile + desktop drawer).
   Light mode keeps the original near-black; dark mode inherits #FFFFFF
   from the .q-library-item rule below. Class replaces an inline style
   on the div so dark-mode CSS can win. */
.q-library-item-text {
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 6px;
    color: #202124;
}
[data-theme="dark"] .q-library-item-text {
    color: #FFFFFF;
}

/* Question library items — fix all-black-everything */
[data-theme="dark"] .q-library-item {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #FFFFFF !important;
}
[data-theme="dark"] .q-library-item:hover:not(:disabled) {
    background: rgba(20, 184, 166, 0.12) !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.18) !important;
}
[data-theme="dark"] .q-library-item--added {
    background: rgba(20, 184, 166, 0.1) !important;
    border-color: rgba(45, 212, 191, 0.4) !important;
    opacity: 0.95 !important;
}
[data-theme="dark"] .q-library-add-icon {
    background: rgba(20, 184, 166, 0.18);
    border-color: var(--color-primary);
    color: #5EEAD4;
}
[data-theme="dark"] .q-library-item:hover:not(:disabled) .q-library-add-icon {
    background: var(--color-primary);
    color: #FFFFFF;
}
[data-theme="dark"] .q-library-added-check,
[data-theme="dark"] .q-library-added-check--tap {
    background: rgba(20, 184, 166, 0.2);
    border-color: rgba(45, 212, 191, 0.5);
    color: #5EEAD4;
}

/* Topic tag (e.g. "new_role") — match the "Added" callout: light teal
   outline + text on a soft teal-tinted bg */
[data-theme="dark"] .q-topic-tag {
    background: rgba(20, 184, 166, 0.2);
    border-color: rgba(45, 212, 191, 0.5);
    color: #5EEAD4;
}

/* TOPIC filter row (top of question library) — only the SELECTED topic
   gets the green/teal outline treatment (same as topic tag + "Added"
   callout). Idle pills keep the neutral default. */
.q-library-filters:not(.q-library-filters--intent) .filter-btn.active {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}
[data-theme="dark"] .q-library-filters:not(.q-library-filters--intent) .filter-btn.active {
    background: rgba(20, 184, 166, 0.2);
    border-color: rgba(45, 212, 191, 0.5);
    color: #5EEAD4;
}

/* Intent tags — uniform soft navy outline in dark mode (mirror of light) */
[data-theme="dark"] .q-intent-tag,
[data-theme="dark"] .q-intent-tag--strength,
[data-theme="dark"] .q-intent-tag--develop_area,
[data-theme="dark"] .q-intent-tag--take_action,
[data-theme="dark"] .q-intent-tag--blind_spot,
[data-theme="dark"] .q-intent-tag--concrete_example {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(147, 197, 253, 0.5);
    color: #93C5FD;
}

/* Question library: highlighted name in question text (e.g. green "Victor")
   uses placeholders with .wiz-hl-* — keep teal but slightly lighter */
[data-theme="dark"] .wiz-hl-person,
[data-theme="dark"] .wiz-hl-topic {
    color: #5EEAD4;
}
[data-theme="dark"] .wiz-hl-future {
    color: #A5B4FC;
}

/* Desktop drawer — flip the hardcoded #fafafa */
@media (min-width: 769px) {
    [data-theme="dark"] .fp-mobile-lib {
        background: var(--surface-elevated);
        box-shadow: -4px 0 32px rgba(0, 0, 0, 0.6);
    }
    [data-theme="dark"] .fp-mobile-lib-header {
        background: rgba(255, 255, 255, 0.04);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    [data-theme="dark"] .fp-mobile-lib-title {
        color: #C4C4CB;
    }
}
[data-theme="dark"] .fp-lib-backdrop {
    background: rgba(0, 0, 0, 0.7);
}

/* Selected question cards in the builder column */
[data-theme="dark"] .q-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .q-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .q-arrow-btn {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.14);
}

/* Edit panel inside selected questions — its light-mode #f8fffe is
   hardcoded, so without this the panel stays white behind the dark
   textarea and its light text. */
[data-theme="dark"] .q-edit-panel {
    background: rgba(20, 184, 166, 0.07);
}

/* Edit textarea inside selected questions */
[data-theme="dark"] .q-edit-textarea {
    background: rgba(255, 255, 255, 0.05);
    color: #E8E8EC;
    border-color: rgba(255, 255, 255, 0.14);
}

/* "Editing template" pill on Step 2 */
[data-theme="dark"] .q-template-pill {
    background: rgba(20, 184, 166, 0.14);
    border-color: rgba(45, 212, 191, 0.4);
    color: #5EEAD4;
}

/* ── new-request.html Step 3: Givers ─────────────── */

/* Step 3 title with paper-plane icon (mirrors Step 5 Send button) */
.step3-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.step3-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg,
        rgba(20, 184, 166, 0.14) 0%,
        rgba(45, 212, 191, 0.2) 100%);
    color: var(--color-primary-dark);
    box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.22);
    flex-shrink: 0;
}
[data-theme="dark"] .step3-title-icon {
    background: linear-gradient(135deg,
        rgba(20, 184, 166, 0.35) 0%,
        rgba(45, 212, 191, 0.45) 100%);
    color: #FFFFFF;
    box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.5);
}

/* Saved-giver chips — kill the hardcoded white gradient in dark mode */
[data-theme="dark"] .pg-saved-chip {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.14);
}
[data-theme="dark"] .pg-saved-chip:hover:not(:disabled) {
    background: rgba(20, 184, 166, 0.14);
    border-color: var(--color-primary);
}
[data-theme="dark"] .pg-saved-chip--added {
    background: rgba(20, 184, 166, 0.12);
    border-color: rgba(45, 212, 191, 0.5);
}
[data-theme="dark"] .pg-saved-chip-name {
    color: #E8E8EC;
}

/* Collapsed giver summary cards */
[data-theme="dark"] .feedback-giver-form {
    background: rgba(20, 184, 166, 0.08);
    border-color: rgba(45, 212, 191, 0.32);
}

/* ── give-feedback.html: native dark mode ─────────────────────
   Light mode keeps the zen-rocks photo with the teal overlay.
   Dark mode drops the image (it doesn't pair well with dark text)
   and uses a soft dark gradient instead. The card flips to dark
   glass; gf-intro-* text colors flip to readable light tones. */

[data-theme="dark"] .gf-page {
    background:
        radial-gradient(ellipse 70% 60% at 0% 0%,
            rgba(20, 184, 166, 0.16) 0%,
            transparent 60%),
        radial-gradient(ellipse 70% 60% at 100% 0%,
            rgba(14, 165, 233, 0.14) 0%,
            transparent 60%),
        radial-gradient(ellipse 80% 50% at 50% 100%,
            rgba(20, 184, 166, 0.1) 0%,
            transparent 65%),
        linear-gradient(180deg, #1A1A1F 0%, #222228 100%);
}
[data-theme="dark"] .gf-layout::before {
    background: transparent; /* mesh background owns the colour */
}

[data-theme="dark"] .gf-card {
    /* Lighter, more opaque surface so the card reads as elevated above the
       softened page background (which sits around #1A1A1F–#222228). */
    background: rgba(44, 44, 53, 0.96);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.55),
        0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Welcome-screen text — re-tone for dark surfaces */
[data-theme="dark"] .gf-intro-lead {
    color: #5EEAD4;
}
[data-theme="dark"] .gf-intro-context {
    border-left-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.7);
}
[data-theme="dark"] .gf-intro-meta {
    color: rgba(255, 255, 255, 0.6);
}
[data-theme="dark"] .gf-intro-meta-dot {
    color: rgba(255, 255, 255, 0.3);
}
[data-theme="dark"] .gf-intro-anon-status {
    color: rgba(255, 255, 255, 0.6);
}
[data-theme="dark"] .gf-intro-anon {
    color: rgba(255, 255, 255, 0.6);
}
[data-theme="dark"] .gf-intro-anatomy-link {
    color: #5EEAD4;
    text-decoration-color: rgba(94, 234, 212, 0.4);
}
[data-theme="dark"] .gf-intro-anatomy-link:hover {
    text-decoration-color: #5EEAD4;
}
[data-theme="dark"] .gf-intro-pledge {
    background: rgba(255, 255, 255, 0.04);
    color: #E8E8EC;
}
[data-theme="dark"] .gf-resume-notice {
    background: rgba(20, 184, 166, 0.12);
    border-color: rgba(45, 212, 191, 0.3);
    color: #99F6E4;
}

/* Question screen + review screen — keep typed text + labels readable */
[data-theme="dark"] .gf-question-counter {
    color: #5EEAD4;
}
[data-theme="dark"] .gf-question-label,
[data-theme="dark"] .gf-tf-textarea {
    color: #E8E8EC;
}
[data-theme="dark"] .gf-tf-textarea {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.14);
}
[data-theme="dark"] .gf-tf-textarea:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--color-primary);
}
[data-theme="dark"] .gf-tf-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
[data-theme="dark"] .gf-tf-hint,
[data-theme="dark"] .gf-char-count,
[data-theme="dark"] .gf-time-remaining,
[data-theme="dark"] .field-description {
    color: rgba(255, 255, 255, 0.5);
}
[data-theme="dark"] .request-context-box {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
}

/* Step dots in the gradient banner — keep readable.
   The banner gradient (teal → blue → indigo) is the same in both themes, so
   active/done dots must stay LIGHT in dark mode. Without these overrides
   they pick up var(--color-warm-50), which dark mode redefines to #1E1E24
   — producing dark circles with low-contrast indigo numbers. */
[data-theme="dark"] .gf-dot-label {
    color: rgba(255, 255, 255, 0.65);
}
[data-theme="dark"] .gf-dot-label--active {
    color: #FFFFFF;
}
[data-theme="dark"] .gf-dot--active,
[data-theme="dark"] .gf-dot--done {
    background: rgba(255, 255, 255, 0.96);
    color: #4f46e5;
}
[data-theme="dark"] .gf-dot-line--done {
    background: rgba(255, 255, 255, 0.85);
}

/* Footer branding */
[data-theme="dark"] .gf-footer-brand-name {
    color: rgba(255, 255, 255, 0.7);
}
[data-theme="dark"] .gf-footer-copy {
    color: rgba(255, 255, 255, 0.4);
}
[data-theme="dark"] .gf-footer-legal {
    color: rgba(255, 255, 255, 0.4);
}
[data-theme="dark"] .gf-footer-legal a:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* ─── Anatomy modal — dark-mode fixes ─────────────────────────────
   The behavior chip/tag is hardcoded to light purple (#EDE9FE) while
   the info/warning/success chips use tokens that flip dark in dark
   mode. Without these overrides chip (2) reads as light-grey-on-light-
   purple. We mirror the dark/light pair used by the other ingredients.
   The pitfalls card has a hardcoded #FAFAFA bg; in dark mode the text
   tokens (gray-900/800/600) flip to LIGHT, so light text sits on a
   white card and disappears. Swap the surface to a recessed dark. */
[data-theme="dark"] .gf-anatomy-chip--behavior {
    background: #2A1A4F;
}
[data-theme="dark"] .gf-anatomy-chip--behavior .gf-anatomy-chip-num {
    color: #C4B5FD;
}
[data-theme="dark"] .gf-anatomy-row--behavior .gf-anatomy-row-tag {
    background: #2A1A4F;
    color: #C4B5FD;
}
[data-theme="dark"] .gf-anatomy-row--behavior .gf-anatomy-tag-num {
    color: #C4B5FD;
}
[data-theme="dark"] .gf-anatomy-pitfalls,
[data-theme="dark"] .gf-anatomy-legend {
    background: var(--color-warm-200);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Submission success screen — overlay was hardcoded white-alpha which
   clashed with the dark card in the centre. Flip the overlay + interior
   surfaces to dark in dark mode. */
[data-theme="dark"] .fp-success {
    background: rgba(15, 15, 18, 0.96);
}
[data-theme="dark"] .fp-success-card {
    background: var(--surface-elevated);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
[data-theme="dark"] .fp-success-stats {
    background: rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] .fp-success-stat-divider {
    background: rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .feedback-giver-form.giver-collapsed {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .giver-summary-row:hover {
    background: rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] .giver-avatar-mini {
    background: rgba(20, 184, 166, 0.2);
    color: #5EEAD4;
}
[data-theme="dark"] .giver-summary-name {
    color: #E8E8EC;
}
[data-theme="dark"] .giver-summary-email {
    color: rgba(255, 255, 255, 0.55);
}

/* ── new-request.html Step 4: Schedule (deadline / notifications / reminders) ─────────────── */

/* Section card surfaces */
[data-theme="dark"] .sd-card {
    background: linear-gradient(180deg,
        rgba(20, 184, 166, 0.06) 0%,
        rgba(255, 255, 255, 0.03) 100%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .sd-card:focus-within {
    border-color: rgba(45, 212, 191, 0.45);
    box-shadow: 0 4px 16px rgba(20, 184, 166, 0.18);
}

/* All three section icons (clock / notification / bell) → white SVG, keep teal circle */
[data-theme="dark"] .sd-card-icon--accent {
    background: linear-gradient(135deg,
        rgba(20, 184, 166, 0.32) 0%,
        rgba(45, 212, 191, 0.42) 100%);
    border-color: rgba(45, 212, 191, 0.48);
    color: #FFFFFF;
}

/* Preset tiles */
[data-theme="dark"] .sd-preset {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.12);
    color: #C4C4CB;
}
[data-theme="dark"] .sd-preset:hover {
    background: rgba(20, 184, 166, 0.12);
    border-color: rgba(45, 212, 191, 0.5);
    color: #5EEAD4;
}

/* Custom date row */
[data-theme="dark"] .sd-date-row {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .sd-date-input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.14);
    color: #E8E8EC;
}
[data-theme="dark"] .sd-date-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-primary);
}
/* Date-picker calendar icon — invert the small chevron the browser draws */
[data-theme="dark"] .sd-date-input::-webkit-calendar-picker-indicator {
    filter: invert(0.85);
}

/* Deadline confirmation summary */
[data-theme="dark"] .sd-deadline-summary {
    background: rgba(20, 184, 166, 0.12);
    border-color: rgba(45, 212, 191, 0.3);
    color: #C4C4CB;
}
[data-theme="dark"] .sd-deadline-summary strong {
    color: #F4F4F8;
}
[data-theme="dark"] .sd-deadline-summary-icon {
    background: rgba(20, 184, 166, 0.25);
    color: #5EEAD4;
}

/* "Continue" link button — visible against dark page; subtle indigo accent */
[data-theme="dark"] .sd-continue-link {
    background: rgba(99, 102, 241, 0.14);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-style: solid;
    color: #C7D2FE;
}
[data-theme="dark"] .sd-continue-link:hover {
    background: rgba(99, 102, 241, 0.22);
    border-color: rgba(129, 140, 248, 0.6);
    color: #DDD6FE;
}

/* "REMINDER SCHEDULE" label visibility */
[data-theme="dark"] .sd-reminders-label,
[data-theme="dark"] .sd-flow-label {
    color: rgba(255, 255, 255, 0.7);
}
[data-theme="dark"] .sd-reminders {
    border-top-color: rgba(255, 255, 255, 0.12);
}

/* Schedule timeline canvas */
[data-theme="dark"] .sd-flow {
    background: linear-gradient(180deg,
        rgba(20, 184, 166, 0.05) 0%,
        rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Reminder editor cards */
[data-theme="dark"] .sd-reminder-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .sd-reminder-card:hover {
    border-color: rgba(45, 212, 191, 0.4);
}
[data-theme="dark"] .sd-stepper {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.14);
}
[data-theme="dark"] .sd-stepper-input {
    color: #E8E8EC;
    background: transparent;
}

/* ── new-request.html Step 5: Review screen ─────────────── */

/* Review cards */
[data-theme="dark"] .rv-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .rv-card-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .rv-card-icon {
    background: linear-gradient(135deg,
        rgba(20, 184, 166, 0.32) 0%,
        rgba(45, 212, 191, 0.42) 100%);
    color: #FFFFFF;
    box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.5);
}

/* Schedule visual on review screen — match Step 4 timeline canvas */
[data-theme="dark"] .rv-flow {
    background: linear-gradient(180deg,
        rgba(20, 184, 166, 0.05) 0%,
        rgba(255, 255, 255, 0.02) 100%);
}

/* ============================================
   📱 THEME TOGGLE — mobile placement
   ============================================
   On dashboard pages with a .mobile-header, dock the floating theme
   toggle in the centre of the header so it aligns with the menu button
   (left) and logo (right) instead of overlapping the logo. Higher
   specificity beats theme.js's injected stylesheet. */
/* Default desktop sizing override — slightly smaller (36px instead of 40px)
   and pulled in from the right so the button doesn't clip into the
   browser's vertical scrollbar (~15-17px wide). The reduced size also lines
   the toggle's vertical centre up better with banner buttons. Higher
   specificity (`body .zen-theme-toggle`) beats theme.js's injected stylesheet. */
body .zen-theme-toggle {
    width: 36px;
    height: 36px;
    top: 12px;
    right: 22px;
}
body .zen-theme-toggle svg {
    width: 19px;
    height: 19px;
}

/* New-request page (desktop): dock the toggle in the bottom-right corner
   so the gradient banner stays clean. Detected via the .fp-progress-section
   wizard banner that's unique to this page. */
@media (min-width: 769px) {
    body:has(.fp-progress-section) .zen-theme-toggle {
        top: auto;
        bottom: 24px;
        right: 24px;
    }
}

/* Commitment-wizard (action-planner) overrides — positions the toggle
   within the wizard's chrome rather than competing with the Close button.
   Desktop: docked bottom-RIGHT (clear of the banner; out of the way).
   Mobile: vertically contained inside the gradient page-banner, centered
   between the title and the Close button.                                  */
@media (min-width: 769px) {
    body.ap-wizard-open .zen-theme-toggle {
        top: auto;
        left: auto;
        bottom: 24px;
        right: 24px;
    }
}
@media (max-width: 768px) {
    body.ap-wizard-open .zen-theme-toggle,
    body.ap-wizard-open:has(.mobile-header) .zen-theme-toggle {
        /* Banner is ~46px tall (10px padding + 26px content). 28px button
           with top:9px sits flush inside vertically. Centered horizontally. */
        top: 9px;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translateX(-50%);
        width: 28px;
        height: 28px;
        z-index: 1010; /* above .ap-wizard-page-banner */
    }
    body.ap-wizard-open .zen-theme-toggle:hover {
        transform: translateX(-50%) translateY(-1px) rotate(8deg);
    }
    body.ap-wizard-open .zen-theme-toggle:active {
        transform: translateX(-50%) scale(0.96);
    }
    body.ap-wizard-open .zen-theme-toggle svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 768px) {
    body:has(.mobile-header) .zen-theme-toggle {
        /* Header is ~60px (10px padding + 40px logo); 28px button at top:16px
           sits on the same vertical centre as the logo and menu button. */
        top: 16px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        z-index: 1002; /* above .mobile-header (z-index: 1001) */
    }
    body:has(.mobile-header) .zen-theme-toggle:hover {
        transform: translateX(-50%) translateY(-1px) rotate(8deg);
    }
    body:has(.mobile-header) .zen-theme-toggle:active {
        transform: translateX(-50%) scale(0.96);
    }

    /* Mobile: smaller still + pushed flush into the top-right corner so
       it doesn't crowd the wizard banner. */
    body .zen-theme-toggle {
        width: 28px;
        height: 28px;
        top: 8px;
        right: 12px;
    }
    body .zen-theme-toggle svg {
        width: 14px;
        height: 14px;
    }
}

/* Hint under each giver's personal-message textarea, explaining what the
   email will prepend and that the default text can be edited freely. */
.giver-msg-hint {
    margin: 4px 0 16px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-muted);
}
.giver-msg-hint strong {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Step 5 deliverability tip — soft info card above the Send button so
   requesters know to give their givers a heads-up about the email. */
.rv-deliver-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 8px 0 20px;
    padding: 12px 14px;
    background: var(--color-info-50);
    border: 1px solid var(--color-info-100);
    border-radius: 10px;
}
.rv-deliver-tip-icon {
    flex: 0 0 auto;
    margin-top: 1px;
    color: var(--color-info-600);
    display: inline-flex;
}
.rv-deliver-tip-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
}
.rv-deliver-tip-text strong {
    color: var(--text-primary);
    font-weight: 600;
}
.rv-deliver-tip-text code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--surface-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════════════════
   SIDEBAR USER MENU — extra link (Welcome tour) above Log out
   ════════════════════════════════════════════════════════════════════════ */
.sidebar-menu-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    padding: 10px var(--space-3);
    background: none;
    border: none;
    text-align: left;
    font-size: var(--text-sm);
    color: var(--color-warm-700);
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}
.sidebar-menu-link:hover {
    background: var(--color-warm-50);
    color: var(--color-warm-900);
}
.sidebar-menu-link + .sidebar-logout-btn {
    border-top: 1px solid var(--color-warm-200);
}

/* ════════════════════════════════════════════════════════════════════════
   WELCOME PAGE — first-login walkthrough (Set up → Collect → Interpret → Plan)
   ════════════════════════════════════════════════════════════════════════ */
.welcome-journey {
    list-style: none;
    padding: 0;
    margin: 24px 0 28px;
    display: flex;
    align-items: stretch;
    gap: 16px;
}

.welcome-step {
    flex: 1;
    background: var(--surface-raised);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 26px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.welcome-step:not(:last-child)::after {
    content: "";
    position: absolute;
    right: -16px;
    top: 50%;
    width: 16px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), rgba(20, 184, 166, 0.25));
    transform: translateY(-50%);
    pointer-events: none;
}
.welcome-step:not(:last-child)::before {
    content: "";
    position: absolute;
    right: -19px;
    top: 50%;
    width: 0;
    height: 0;
    border-left: 7px solid var(--color-primary);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
}

.welcome-step-icon {
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--color-primary-50);
}

.welcome-step-title {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 4px 0 0;
    line-height: 1.2;
}

.welcome-step-body {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
    max-width: 28ch;
}

.welcome-cta-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.welcome-cta-primary {
    background: linear-gradient(135deg, var(--color-primary), #0EA5E9);
    color: white;
    border: none;
    border-radius: 99px;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(20, 184, 166, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.welcome-cta-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(20, 184, 166, 0.4);
}

.welcome-cta-secondary {
    background: transparent;
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    border-radius: 99px;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.welcome-cta-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary-darker);
    background: var(--color-primary-50);
}

@media (max-width: 768px) {
    .welcome-journey {
        flex-direction: column;
        gap: 24px;
    }
    /* Thin vertical rule between cards — no arrowhead, just a calm connector. */
    .welcome-step:not(:last-child)::after {
        right: 50%;
        bottom: -16px;
        top: auto;
        width: 2px;
        height: 16px;
        background: linear-gradient(180deg, rgba(20, 184, 166, 0.55), rgba(20, 184, 166, 0.15));
        transform: translateX(50%);
        border-radius: 1px;
    }
    .welcome-step:not(:last-child)::before {
        display: none;
    }
    .welcome-step-body { max-width: 38ch; }
    .welcome-cta-row {
        flex-direction: column;
        align-items: stretch;
    }
    .welcome-cta-primary,
    .welcome-cta-secondary {
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }
}

/* ═══ About page ═══════════════════════════════════════════════════════════
   Built entirely on role tokens (--surface-raised, --text-*, --color-primary-50)
   so light/dark are handled automatically; a few accent colors are brightened
   for dark below since --color-primary-dark doesn't flip. */
.about-page { max-width: 760px; }

.about-section { margin-top: 36px; }
.about-section-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 14px 0;
}
.about-lead {
    font-family: var(--font-display);
    font-size: 19px;
    line-height: 1.5;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}
.about-prose p {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0 0 14px 0;
}
.about-prose p:last-child { margin-bottom: 0; }
.about-citation {
    font-size: 12.5px;
    font-style: italic;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Principles */
.about-principles {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.about-principle {
    background: var(--surface-raised);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.about-principle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--color-primary-50);
    color: var(--color-primary-dark);
    margin-bottom: 12px;
}
.about-principle-title {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}
.about-principle-body {
    font-family: var(--font-sans);
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

/* Founder */
.about-founder {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: var(--surface-raised);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 24px;
}
.about-founder-avatar {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    /* Seated portrait cropped to a circle, focal point on the face (upper third). */
    object-fit: cover;
    object-position: center 16%;
    border: 1px solid var(--border-default);
    background: linear-gradient(135deg, var(--color-primary) 0%, #0ea5e9 60%, #6366f1 100%);
}
.about-founder-name {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2px 0;
}
.about-founder-role {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-primary-dark);
    margin: 0 0 10px 0;
}
.about-founder-bio {
    font-family: var(--font-sans);
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}
.about-founder-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-primary-dark);
    text-decoration: none;
}
.about-founder-link:hover { text-decoration: underline; }

/* Pilot callout */
.about-callout {
    background: var(--color-primary-50);
    border: 1px solid var(--color-primary-light);
    border-radius: var(--radius-lg);
    padding: 24px;
}
.about-callout-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: var(--color-primary);
    border-radius: 999px;
    padding: 3px 10px 3px 8px;
    margin-bottom: 12px;
}
.about-callout-badge svg { flex-shrink: 0; }
.about-callout-title {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}
.about-callout-body {
    font-family: var(--font-sans);
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
}
.about-callout-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--color-primary);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    text-decoration: none;
    transition: background 0.15s ease;
}
.about-callout-cta:hover { background: var(--color-primary-dark); }

/* FAQ */
.about-faq {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.about-faq-item {
    background: var(--surface-raised);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.about-faq-q {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.about-faq-q::-webkit-details-marker { display: none; }
.about-faq-q::after {
    content: '+';
    font-size: 20px;
    font-weight: 400;
    color: var(--color-primary-dark);
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.about-faq-item[open] .about-faq-q::after { content: '\2212'; }
.about-faq-a { padding: 0 16px 16px 16px; }
.about-faq-a p {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0;
}
.about-faq-a a { color: var(--color-primary-dark); font-weight: 600; }

/* Footer (legal links + meta) */
.about-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}
.about-footer-links {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}
.about-footer-links a { color: var(--color-primary-dark); text-decoration: none; }
.about-footer-links a:hover { text-decoration: underline; }
[data-theme="dark"] .about-footer-links a { color: var(--color-primary-light); }
.about-meta {
    font-family: var(--font-sans);
    font-size: 12.5px;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
}

/* Dark: brighten the teal accents that don't flip on their own. */
[data-theme="dark"] .about-founder-role,
[data-theme="dark"] .about-founder-link,
[data-theme="dark"] .about-principle-icon,
[data-theme="dark"] .about-faq-q::after,
[data-theme="dark"] .about-faq-a a { color: var(--color-primary-light); }

@media (max-width: 700px) {
    .about-principles { grid-template-columns: 1fr; }
    .about-founder { flex-direction: column; }
}

/* ═══ Legal pages (Privacy, Terms) — public, no app sidebar ════════════════
   Standalone readable layout built on role tokens for light/dark. */
.legal-body {
    background: var(--surface-base);
    color: var(--text-primary);
    margin: 0;
    min-height: 100vh;
}
.legal-topbar {
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 24px;
}
.legal-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
}
.legal-logo { width: 28px; height: 28px; }
.legal-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 24px 64px;
}
.legal-doc h1 {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}
.legal-updated {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 28px 0;
}
.legal-doc h2 {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 28px 0 8px 0;
}
.legal-doc p,
.legal-doc li {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}
.legal-doc p { margin: 0 0 12px 0; }
.legal-doc ul { margin: 0 0 12px 0; padding-left: 22px; }
.legal-doc li { margin-bottom: 6px; }
.legal-doc strong { color: var(--text-primary); font-weight: 600; }
.legal-doc a { color: var(--color-primary-dark); font-weight: 500; }
[data-theme="dark"] .legal-doc a { color: var(--color-primary-light); }
.legal-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.legal-footer a { color: var(--color-primary-dark); text-decoration: none; }
.legal-footer a:hover { text-decoration: underline; }
[data-theme="dark"] .legal-footer a { color: var(--color-primary-light); }
