/* Teaching Impact Score - Styles */

.teaching-impact-calculator {
    max-width: 800px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.tic-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 40px;
    margin-bottom: 30px;
}

.tic-header {
    text-align: center;
    margin-bottom: 40px;
}

.tic-header h2 {
    color: #2c3e50;
    font-size: 32px;
    margin-bottom: 10px;
}

.tic-header p {
    color: #7f8c8d;
    font-size: 16px;
}

.tic-form-group {
    margin-bottom: 25px;
}

.tic-form-group label {
    display: block;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 8px;
    font-size: 14px;
}

.tic-optional {
    font-weight: 400;
    color: #95a5a6;
    font-size: 12px;
}

.tic-form-group input[type="text"],
.tic-form-group input[type="number"],
.tic-form-group input[type="email"],
.tic-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.tic-form-group textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.tic-form-group input:focus,
.tic-form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.tic-form-group small {
    display: block;
    color: #95a5a6;
    margin-top: 5px;
    font-size: 13px;
}

.tic-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 16px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.tic-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

.tic-btn:active {
    transform: translateY(0);
}

.tic-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.tic-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 12px;
    text-align: center;
    min-height: 1em;
}

/* --- Progress bar --- */

.tic-progress-wrap {
    margin-bottom: 30px;
}

.tic-progress-bar {
    background: #ecf0f1;
    border-radius: 50px;
    height: 10px;
    overflow: hidden;
}

.tic-progress-fill {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    width: 16.6%;
    transition: width 0.4s ease;
    border-radius: 50px;
}

.tic-progress-label {
    text-align: center;
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 8px;
    font-weight: 600;
}

/* --- Wizard steps --- */

.tic-step-title {
    color: #2c3e50;
    font-size: 22px;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
}

.tic-wizard-nav {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.tic-wizard-nav .tic-btn {
    flex: 1;
}

/* --- Click-to-rank questions --- */

.tic-ranking {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tic-ranking-hint {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 6px;
}

.tic-rank-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-size: 15px;
    color: #34495e;
    background: #fff;
    text-align: left;
    width: 100%;
    font-family: inherit;
}

.tic-rank-option:hover {
    border-color: #b3c2f2;
    background: #f8f9ff;
}

.tic-rank-option.tic-rank-selected {
    border-color: #667eea;
    background: #f0f2ff;
}

.tic-rank-badge {
    flex: 0 0 28px;
    height: 28px;
    border-radius: 50%;
    background: #ecf0f1;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.tic-rank-option.tic-rank-selected .tic-rank-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.tic-rank-text {
    flex: 1;
}

.tic-ranking-controls {
    display: flex;
    justify-content: flex-end;
}

.tic-rank-undo {
    background: none;
    border: none;
    color: #7f8c8d;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
}

.tic-rank-undo:hover:not(:disabled) {
    color: #667eea;
    text-decoration: underline;
}

.tic-rank-undo:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* --- Slider trade-off questions --- */

.tic-slider-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tic-slider-input {
    width: 100%;
    height: 8px;
    border-radius: 50px;
    background: #ecf0f1;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
    margin: 10px 0;
}

.tic-slider-input::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.5);
    cursor: pointer;
    border: 3px solid #fff;
}

.tic-slider-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.5);
    cursor: pointer;
    border: 3px solid #fff;
}

.tic-slider-input[data-touched="false"]::-webkit-slider-thumb {
    background: #bbc2e0;
    box-shadow: none;
}

.tic-slider-input[data-touched="false"]::-moz-range-thumb {
    background: #bbc2e0;
    box-shadow: none;
}

.tic-slider-labels {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.tic-slider-label-low,
.tic-slider-label-high {
    font-size: 13px;
    color: #34495e;
    max-width: 48%;
}

.tic-slider-label-high {
    text-align: right;
}

.tic-slider-hint {
    font-size: 13px;
    color: #7f8c8d;
}

/* --- This-or-that binary choice questions --- */

.tic-tot {
    display: flex;
    align-items: stretch;
    gap: 14px;
}

.tic-tot-option {
    flex: 1;
    padding: 18px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #34495e;
    font-size: 15px;
    font-family: inherit;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.tic-tot-option:hover {
    border-color: #b3c2f2;
    background: #f8f9ff;
}

.tic-tot-option.tic-tot-selected {
    border-color: #667eea;
    background: #f0f2ff;
    font-weight: 600;
}

.tic-tot-or {
    align-self: center;
    color: #95a5a6;
    font-size: 13px;
    font-style: italic;
}

/* --- Word selection grid questions --- */

.tic-word-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tic-word-grid-hint {
    font-size: 13px;
    color: #7f8c8d;
    font-weight: 600;
}

.tic-word-grid-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tic-word-option {
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    background: #fff;
    color: #34495e;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.tic-word-option:hover {
    border-color: #b3c2f2;
    background: #f8f9ff;
}

.tic-word-option.tic-word-selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

/* --- Dimension score bars --- */

.tic-dimension-scores {
    margin-bottom: 25px;
}

.tic-dimension-scores h4 {
    color: #34495e;
    margin-bottom: 15px;
}

.tic-dim-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.tic-dim-label {
    flex: 0 0 220px;
    font-size: 14px;
    color: #34495e;
    font-weight: 600;
}

.tic-dim-bar-wrap {
    flex: 1;
    background: #ecf0f1;
    border-radius: 50px;
    height: 14px;
    overflow: hidden;
}

.tic-dim-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    border-radius: 50px;
    transition: width 0.6s ease;
}

.tic-dim-score {
    flex: 0 0 36px;
    text-align: right;
    font-weight: 700;
    color: #2c3e50;
}

/* --- Diagnostic blocks --- */

.tic-diagnostic {
    margin-bottom: 25px;
}

.tic-diagnostic-block {
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.tic-diagnostic-block h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
}

.tic-diagnostic-block p {
    margin: 0;
    line-height: 1.7;
    color: #2c3e50;
}

.tic-diagnostic-strength {
    background: #eafaf1;
    border-left: 4px solid #2ecc71;
}

.tic-diagnostic-growth {
    background: #fef9e7;
    border-left: 4px solid #f39c12;
}

.tic-results {
    display: none;
}

.tic-results.active {
    display: block;
    animation: ticFadeIn 0.5s;
}

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

.tic-score-display {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.tic-score-display h3 {
    font-size: 18px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.tic-score-number {
    font-size: 72px;
    font-weight: 700;
    margin: 20px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tic-score-max {
    font-size: 36px;
    opacity: 0.8;
}

.tic-score-label {
    font-size: 20px;
    font-weight: 600;
    opacity: 0.95;
}

.tic-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
}

.tic-badge {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.tic-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.tic-badge-icon {
    font-size: 20px;
}

.tic-badge.gold { border-color: #f39c12; color: #f39c12; }
.tic-badge.blue { border-color: #3498db; color: #3498db; }
.tic-badge.green { border-color: #2ecc71; color: #2ecc71; }
.tic-badge.purple { border-color: #9b59b6; color: #9b59b6; }

.tic-report {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 25px;
    border-radius: 8px;
    line-height: 1.8;
    color: #2c3e50;
    margin-bottom: 20px;
}

.tic-report h4 {
    margin-top: 0;
    color: #34495e;
    font-size: 18px;
    margin-bottom: 15px;
}

.tic-share {
    text-align: center;
    margin-bottom: 25px;
}

.tic-share-text {
    background: #fdf6e3;
    border: 1px dashed #f1c40f;
    border-radius: 8px;
    padding: 15px;
    font-style: italic;
    color: #7f6000;
    margin-bottom: 12px;
}

.tic-actions {
    margin-top: 10px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
}

.tic-btn-secondary {
    background: #ecf0f1;
    color: #34495e;
}

.tic-btn-secondary:hover {
    background: #d5dbdb;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.tic-success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.tic-success-message.active {
    display: block;
    animation: ticFadeIn 0.5s;
}

.tic-premium-box {
    background: linear-gradient(135deg, #fdf6e3 0%, #fff 100%);
    border: 2px solid #f1c40f;
    border-radius: 10px;
    padding: 25px;
}

.tic-premium-box h4 {
    margin-top: 0;
    color: #b8860b;
}

.tic-premium-price {
    font-size: 0.8em;
    font-weight: 600;
    color: #8a6d00;
    background: #fff3cd;
    padding: 2px 10px;
    border-radius: 50px;
    white-space: nowrap;
}

.tic-premium-note {
    font-size: 13px;
    color: #95a5a6;
    text-align: center;
    margin-top: 10px;
}

.tic-premium-report {
    margin-top: 20px;
}

.tic-premium-report p {
    line-height: 1.8;
    color: #2c3e50;
    margin-bottom: 16px;
}

.tic-premium-report {
    margin-top: 20px;
}

.tic-premium-report h4 {
    color: #b8860b;
    margin-top: 24px;
    margin-bottom: 10px;
}

.tic-premium-report h4:first-child {
    margin-top: 0;
}

.tic-mentor-text p {
    line-height: 1.8;
    color: #2c3e50;
    margin-bottom: 14px;
}

.tic-habit-box {
    background: #fff8e1;
    border: 2px dashed #f1c40f;
    border-radius: 8px;
    padding: 18px;
}

.tic-habit-box p {
    margin: 0;
    line-height: 1.7;
    color: #5d4500;
}

.tic-reading-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.tic-reading-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0e6c8;
    color: #2c3e50;
}

.tic-encouragement {
    background: #f0f2ff;
    border-radius: 8px;
    padding: 18px;
    margin: 20px 0;
}

.tic-encouragement p {
    margin: 0;
    line-height: 1.7;
    color: #34495e;
    font-style: italic;
}

.tic-inline-error {
    color: #e74c3c;
    font-size: 14px;
}

.tic-loading-note {
    color: #7f8c8d;
    font-size: 14px;
    font-style: italic;
}

#ticHistoryResults {
    margin-top: 20px;
}

.tic-history-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

@media print {
    #ticFormCard, .tic-actions, .tic-premium-box .tic-form-group, #ticUnlockBtn, #ticHistoryCard, #ticShare {
        display: none !important;
    }
}

/* =====================================================
   TEACHER ARCHETYPE CARD
   ===================================================== */

.tic-archetype {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 16px;
    padding: 28px 24px;
    margin: 24px 0;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.tic-archetype::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 180px;
    height: 180px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

.tic-archetype-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 10px;
}

.tic-archetype-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 6px;
    color: #fff;
}

.tic-archetype-tagline {
    font-size: 15px;
    color: rgba(255,255,255,0.7);
    font-style: italic;
    margin-bottom: 16px;
}

.tic-archetype-desc {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255,255,255,0.85);
    max-width: 520px;
    margin: 0 auto;
    text-align: left;
}

/* =====================================================
   BLIND SPOT + CLASSROOM IMPACT REPORT SECTIONS
   ===================================================== */

.tic-blind-spot {
    background: #fff8e6;
    border-left: 4px solid #f39c12;
    border-radius: 0 8px 8px 0;
    padding: 16px 18px;
    font-size: 14px;
    line-height: 1.7;
    color: #5d4037;
    margin-bottom: 20px;
}

.tic-classroom-impact {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.tic-classroom-impact li {
    padding: 10px 14px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.tic-impact-positive {
    background: #f0faf4;
    border: 1px solid #b2dfdb;
    color: #1b5e3b;
}

.tic-impact-caution {
    background: #fff8e6;
    border: 1px solid #ffe082;
    color: #5d4037;
}

/* =====================================================
   GROWTH DASHBOARD (history view)
   ===================================================== */

.tic-trend-chart {
    margin: 12px 0 16px;
}

.tic-trend-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.tic-trend-date {
    width: 90px;
    flex-shrink: 0;
    font-size: 13px;
    color: #7f8c8d;
}

.tic-trend-bar-wrap {
    flex: 1;
    background: #f0f0f0;
    border-radius: 6px;
    height: 14px;
    overflow: hidden;
}

.tic-trend-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 6px;
}

.tic-trend-score {
    width: 32px;
    flex-shrink: 0;
    text-align: right;
    font-weight: 600;
    font-size: 13px;
    color: #2c3e50;
}

.tic-trend-note {
    font-size: 14px;
    color: #7f8c8d;
    font-style: italic;
}

.tic-trend-summary {
    font-size: 15px;
    margin: 8px 0 18px;
    color: #34495e;
}

.tic-delta-list {
    margin-bottom: 18px;
}

.tic-delta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.tic-delta-label {
    color: #34495e;
}

.tic-delta-up {
    color: #27ae60;
    font-weight: 600;
}

.tic-delta-down {
    color: #e74c3c;
    font-weight: 600;
}

.tic-delta-flat {
    color: #95a5a6;
    font-weight: 600;
}

.tic-growth-commentary {
    background: #f0f2ff;
    border-radius: 10px;
    padding: 18px;
    margin-top: 8px;
}

.tic-growth-commentary p {
    font-size: 14px;
    line-height: 1.7;
    color: #34495e;
    margin: 8px 0 0;
}

/* =====================================================
   CPD CERTIFICATE CTA
   ===================================================== */

.tic-cert-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #fdfbf6 0%, #f7f0e3 100%);
    border: 1px solid #e0d3b8;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 24px;
    box-sizing: border-box;
    max-width: 100%;
}

.tic-cert-cta-icon {
    font-size: 34px;
    flex-shrink: 0;
}

.tic-cert-cta-text {
    flex: 1 1 160px;
    min-width: 160px;
}

.tic-cert-cta-text h4 {
    margin: 0 0 4px;
    font-size: 16px;
    color: #2c3e50;
}

.tic-cert-cta-text p {
    margin: 0;
    font-size: 13px;
    color: #7f6a3f;
}

.tic-cert-cta .tic-btn {
    flex-shrink: 0;
    width: auto;
    white-space: nowrap;
}

.tic-cert-cta .tic-inline-error {
    width: 100%;
    flex-basis: 100%;
}

@media (max-width: 600px) {
    .tic-cert-cta {
        flex-direction: column;
        text-align: center;
    }
}
