/* Complete DeepL-Style CSS - Replace your entire styles.css with this */

:root {
    --bg-white: #FFFFFF;
    --secondary-lavender: #C5B0CD;
    --accent-teal: #415E72;
    --primary-navy: #17313E;
    --text-light: #6B7280;
    --text-dark: #1F2937;
    --border-light: #E5E7EB;
    --success-green: #10B981;
    --error-red: #EF4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-white);
    color: var(--primary-navy);
    line-height: 1.6;
}

/* Utility Classes */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-left { text-align: left; }

/* Header */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--secondary-lavender);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    height: 40px;
    border-radius: 6px;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--accent-teal);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary-navy);
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    background: transparent;
}

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

.btn-primary {
    background: var(--accent-teal);
    color: var(--bg-white);
    border-color: var(--accent-teal);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-navy);
    border-color: var(--primary-navy);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    color: var(--accent-teal);
    border-color: var(--secondary-lavender);
}

.btn-outline:hover:not(:disabled) {
    background: var(--secondary-lavender);
    border-color: var(--accent-teal);
    color: var(--primary-navy);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
}

/* Hero Section with Survey */
.hero {
    background: linear-gradient(135deg, var(--bg-white) 0%, rgba(197, 176, 205, 0.1) 100%);
    padding: 3rem 2rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    max-width: 600px;
    width: 100%;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 0.5rem;
    line-height: 1.2;
    text-align: center;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--accent-teal);
    margin-bottom: 2rem;
    line-height: 1.5;
    text-align: center;
}

/* Survey Styles */
.hero-survey {
    background: var(--bg-white);
    border: 1px solid var(--secondary-lavender);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.survey-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-navy);
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-navy);
    font-size: 0.9rem;
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--secondary-lavender);
    border-radius: 6px;
    font-size: 1rem;
    color: var(--primary-navy);
    background-color: var(--bg-white);
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-select:focus {
    outline: none;
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px rgba(65, 94, 114, 0.1);
}

.slider-container {
    margin: 1rem 0;
}

.confidence-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--secondary-lavender);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.confidence-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-teal);
    cursor: pointer;
    border: 2px solid var(--bg-white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.confidence-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-teal);
    cursor: pointer;
    border: 2px solid var(--bg-white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--accent-teal);
}

.slider-labels span:nth-child(2) {
    font-weight: 600;
    color: var(--primary-navy);
    background: var(--secondary-lavender);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    min-width: 2rem;
    text-align: center;
}

.scale-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
}

.scale-options {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.scale-label {
    font-size: 0.75rem;
    color: var(--accent-teal);
    font-weight: 500;
}

.radio-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.radio-option input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--secondary-lavender);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.radio-option input[type="radio"]:checked {
    border-color: var(--accent-teal);
    background-color: var(--accent-teal);
    box-shadow: inset 0 0 0 4px var(--bg-white);
}

.radio-option label {
    font-size: 0.75rem;
    color: var(--primary-navy);
    cursor: pointer;
}

/* DeepL-Style Writing Interface */
.writing-section {
    padding: 0;
    min-height: 100vh;
    background: #f8f9fa;
}

.deepl-container {
    max-width: 1400px;
    margin: 0 auto;
    height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Control Bar */
.control-bar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.editor-title h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-navy);
}

.word-count {
    display: flex;
    gap: 2rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Main Editor */
.deepl-editor {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    overflow: hidden;
}

.editor-panel {
    display: flex;
    flex-direction: column;
    background: var(--bg-white);
    border-right: 1px solid var(--border-light);
}

.editor-panel:last-child {
    border-right: none;
}

.panel-header {
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    background: #fafbfc;
    flex-shrink: 0;
}

.panel-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-navy);
}

.editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* FIXED: Matching padding for both sides */
.deepl-textarea {
    width: 100%;
    height: 100%;
    padding: 1.25rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
    line-height: 1.6;
    font-family: inherit;
    resize: none;
    background: var(--bg-white);
    color: var(--primary-navy);
}

.deepl-textarea::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

/* FIXED: Improved text with same padding as left side */
.improved-text {
    flex: 1;
    padding: 1.25rem 1.5rem;
    background: var(--bg-white);
    overflow-y: auto;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--primary-navy);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.improved-text-content {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--primary-navy);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.suggestion-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-light);
    text-align: center;
}

.suggestion-placeholder svg {
    margin-bottom: 1rem;
}

/* FIXED: DeepL-Style Change Highlighting with proper underlines and colors */
.text-change {
    position: relative;
    cursor: help;
    transition: all 0.2s ease;
    border-radius: 2px;
    padding: 1px 2px;
    margin: 0 1px;
}

/* Substitution — word replaced with a different word */
.text-change.substitution {
    background-color: rgba(251, 146, 60, 0.12);
    color: #c2410c;
    border-bottom: 2px solid rgba(234, 88, 12, 0.5);
}

/* Deletion — word removed by the AI */
.text-change.deletion {
    background-color: rgba(239, 68, 68, 0.08);
    color: #9ca3af;
    text-decoration: line-through;
    text-decoration-color: rgba(239, 68, 68, 0.6);
    text-decoration-thickness: 1px;
}

/* Insertion — new word added by the AI */
.text-change.insertion {
    background-color: rgba(16, 185, 129, 0.12);
    color: #065f46;
    border-bottom: 2px solid rgba(16, 185, 129, 0.5);
}

.text-change:hover {
    filter: brightness(0.93);
    cursor: pointer;
}

/* After user decision */
.text-change.accepted {
    background: rgba(16, 185, 129, 0.18);
    border-bottom-color: #10b981;
    text-decoration: none;
    color: inherit;
    opacity: 1;
}

.text-change.rejected {
    background: rgba(107, 114, 128, 0.08);
    border: none;
    color: var(--text-secondary, #6b7280);
    text-decoration: none;   /* original word shown normally — no strikethrough */
    opacity: 0.65;
}

/* Deletion rejected = user keeps the word → remove strikethrough, restore normal appearance */
.text-change.deletion.rejected {
    text-decoration: none;
    color: var(--text-primary, #374151);
    background-color: transparent;
    border: none;
    opacity: 1;
}

/* Deletion accepted = user agrees to delete → keep struck-through */
.text-change.deletion.accepted {
    background-color: rgba(239, 68, 68, 0.06);
    border: none;
    text-decoration: line-through;
    text-decoration-color: rgba(239, 68, 68, 0.5);
    color: #9ca3af;
    opacity: 0.7;
}

/* Insertion rejected = user removes the added word → strike it through */
.text-change.insertion.rejected {
    text-decoration: line-through;
    text-decoration-color: rgba(107, 114, 128, 0.6);
    color: #9ca3af;
    background-color: transparent;
    border: none;
    opacity: 0.65;
}

/* Tooltip handled by #ds-tooltip global element via JS (see initGlobalTooltip in app.js) */

/* Sentence-level deletion — entire sentence was removed */
.text-change.sentence-deletion {
    display: inline-block;
    width: 100%;
    background-color: rgba(239, 68, 68, 0.06);
    border-left: 3px solid rgba(239, 68, 68, 0.45);
    padding: 3px 8px;
    margin: 2px 0;
    color: #9ca3af;
    text-decoration: line-through;
    text-decoration-color: rgba(239, 68, 68, 0.5);
    border-radius: 0 4px 4px 0;
    box-sizing: border-box;
}

/* Sentence-level insertion — entirely new sentence added */
.text-change.sentence-insertion {
    display: inline-block;
    width: 100%;
    background-color: rgba(16, 185, 129, 0.07);
    border-left: 3px solid rgba(16, 185, 129, 0.5);
    padding: 3px 8px;
    margin: 2px 0;
    color: #065f46;
    border-radius: 0 4px 4px 0;
    box-sizing: border-box;
}

/* Panel Actions */
.panel-actions {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-light);
    background: #fafbfc;
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
    align-items: center;
}

.panel-actions .btn {
    flex: 1;
}

/* Color legend in right panel header */
.change-legend {
    display: none; /* shown via JS when improved text is loaded */
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--text-secondary, #6b7280);
    white-space: nowrap;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-dot.substitution {
    background-color: rgba(251, 146, 60, 0.7);
}

.legend-dot.insertion {
    background-color: rgba(16, 185, 129, 0.6);
}

.legend-dot.deletion {
    background-color: rgba(156, 163, 175, 0.7);
}

/* Panel header — only flex on the right panel */
.suggestion-panel .panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.original-panel .panel-header {
    display: block;
}

/* Icon-only button (for future use) */
.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 6px;
    color: #6b7280;
    display: flex;
    align-items: center;
    transition: background 0.15s ease, color 0.15s ease;
}
.icon-btn:hover:not(:disabled) {
    background: var(--secondary-lavender);
    color: var(--accent-teal);
}
.icon-btn:disabled {
    opacity: 0.35;
    cursor: default;
}
.icon-btn .material-icons-round {
    font-size: 18px;
}

/* Sync link in word-count bar — subtle, no underline */
.sync-link {
    font-size: 0.75rem;
    color: #9ca3af;
    text-decoration: none;
    margin-left: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
}
.sync-link:hover {
    color: var(--accent-teal);
    opacity: 1;
}
.sync-link:active {
    opacity: 0.7;
}

/* Feature cards icons (Material Icons, single colour) */
.feature-icon {
    margin-bottom: 0.75rem;
    color: var(--accent-teal);
}
.feature-icon .material-icons-round {
    font-size: 1.75rem;
}

/* Condition Switcher */
.condition-switcher {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.75rem;
}

.condition-label {
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Segmented toggle group — iOS-style pill */
.cond-toggle-group {
    display: inline-flex;
    background: #e5e7eb;
    border-radius: 20px;
    padding: 4px;
    gap: 0;
}

.cond-btn {
    background: transparent;
    border: none;
    border-radius: 16px;
    padding: 0.35rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cond-btn:hover:not(.active) {
    color: var(--primary-navy);
    background: rgba(255,255,255,0.4);
}

.cond-btn.active {
    background: #ffffff;
    color: var(--accent-teal);
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ── AI level picker in survey ─────────────────────────────────────────────── */
.ai-level-picker {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
    align-items: stretch;
}

.level-option {
    flex: 1;
    cursor: pointer;
    position: relative;
    display: flex;
}

.level-option input[type="radio"] {
    display: none;
    width: 0;
    height: 0;
}

.level-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 0.5rem;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    background: #fff;
    transition: all 0.15s ease;
    text-align: center;
    flex: 1;
}

.level-option input:checked + .level-card {
    border-color: var(--accent-teal);
    background: rgba(32, 178, 170, 0.05);
    box-shadow: 0 0 0 1px var(--accent-teal);
}

.level-option:hover .level-card {
    border-color: var(--accent-teal);
}

.level-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-navy);
    margin-bottom: 0.2rem;
}

.level-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.condition-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    font-size: 1rem;
    opacity: 0.7;
    transition: all 0.2s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.condition-toggle:hover {
    opacity: 1;
    background: var(--secondary-lavender);
    transform: rotate(90deg);
}

/* Feedback Popup */
.feedback-popup {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: var(--bg-white);
    border: 1px solid var(--secondary-lavender);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-width: 300px;
    animation: slideInUp 0.3s ease-out;
}

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

.feedback-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-navy);
    margin-bottom: 0.5rem;
}

.feedback-content p {
    font-size: 0.875rem;
    color: var(--accent-teal);
    margin-bottom: 1rem;
}

.rating-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.rating-btn {
    background: rgba(197, 176, 205, 0.2);
    border: 1px solid var(--secondary-lavender);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.2s ease;
}

.rating-btn:hover {
    background: var(--accent-teal);
    border-color: var(--accent-teal);
    transform: scale(1.1);
}

/* Declined screen — full viewport overlay */
.declined-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: #f9fafb;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
}

.declined-content {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border: 1px solid var(--border-light, #e5e7eb);
    border-radius: 12px;
    padding: 3rem 2.5rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
}

.declined-icon {
    margin-bottom: 1.25rem;
}

.declined-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-navy, #1e3a5f);
    margin-bottom: 1rem;
}

.declined-content p {
    font-size: 0.9rem;
    color: var(--text-secondary, #6b7280);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.declined-content .btn {
    margin-top: 1.5rem;
    align-self: center;
}

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-navy);
    color: var(--bg-white);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

.cookie-consent:not(.hidden) {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-content p {
    font-size: 0.875rem;
    line-height: 1.5;
    flex: 1;
}

.privacy-link {
    color: var(--secondary-lavender);
    text-decoration: underline;
}

.privacy-link:hover {
    color: var(--bg-white);
}

.cookie-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--secondary-lavender);
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-navy);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--accent-teal);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.modal-close:hover {
    background: rgba(197, 176, 205, 0.2);
    color: var(--primary-navy);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-navy);
    margin: 1rem 0 0.5rem 0;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.25rem;
    color: var(--accent-teal);
}

.modal-body p {
    color: var(--accent-teal);
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: rgba(197, 176, 205, 0.1);
    border-top: 1px solid var(--secondary-lavender);
    margin-top: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-navy);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-section a {
    display: block;
    color: var(--accent-teal);
    text-decoration: none;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--primary-navy);
}

.footer-logo {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid var(--secondary-lavender);
    padding: 1.5rem 2rem;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--accent-teal);
}

/* Loading states */
.btn.loading {
    opacity: 0.7;
    cursor: wait;
}

.btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .deepl-editor {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
    }
    
    .editor-panel {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }
    
    .editor-panel:last-child {
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
    }
    
    .nav {
        display: none;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .control-bar {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .deepl-textarea,
    .improved-text {
        padding: 1rem;
    }
    
    .panel-actions {
        padding: 1rem;
    }
    
    .condition-switcher {
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .feedback-popup {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
    
    .scale-options {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .scale-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
}

/* Study info block — shown at top of survey card */
.study-info-block {
    background: #f0f7ff;
    border-left: 3px solid #415e72;
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.25rem;
    margin-bottom: 1.75rem;
    font-size: 0.85rem;
    color: #374151;
    line-height: 1.55;
}

.study-info-block h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #17313e;
    margin-bottom: 0.6rem;
}

.study-info-block p {
    margin-bottom: 0.5rem;
}

.study-info-block p:last-child {
    margin-bottom: 0;
}

.study-info-block ul {
    margin: 0.4rem 0 0.6rem 1.25rem;
}

.study-info-block li {
    margin-bottom: 0.3rem;
}

.study-info-block a {
    color: #415e72;
    text-decoration: underline;
}

/* Focus and accessibility */
.btn:focus,
.deepl-textarea:focus,
.form-select:focus,
.confidence-slider:focus,
input:focus,
button:focus {
    outline: 2px solid var(--accent-teal);
    outline-offset: 2px;
}