/* ===========================
   Reset & Base Styles
   =========================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #f0f2f5;
    color: #1a1a2e;
    line-height: 1.6;
    min-height: 100vh;
}

/* ===========================
   App Container
   =========================== */

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===========================
   Header
   =========================== */

.app-header {
    background: white;
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e8eaed;
    flex-shrink: 0;
}

.header-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app-header h1 {
    color: #2563eb;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
}

.header-tagline {
    color: #6b7280;
    font-size: 14px;
    font-weight: 400;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Quota Badge */
.quota-badge {
    background: #d1fae5;
    color: #065f46;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.quota-badge.low {
    background: #fef3c7;
    color: #92400e;
}

.quota-badge.critical {
    background: #fee2e2;
    color: #991b1b;
}

/* Login Button */
.btn-login {
    background: white;
    color: #2563eb;
    border: 2px solid #2563eb;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-login:hover {
    background: #eff6ff;
}

/* ===========================
   Main Content
   =========================== */

.main-content {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 40px;
    display: flex;
    flex-direction: column;
}

/* ===========================
   Tone Tabs
   =========================== */

.tone-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.tone-tab {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.tone-tab:hover {
    color: #374151;
}

.tone-tab.active {
    color: #1a1a2e;
    font-weight: 600;
}

.tone-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #2563eb;
}

/* ===========================
   Editor Container
   =========================== */

.editor-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 20px;
    flex: 1;
    min-height: calc(72vh - 100px);
}

.editor-panel {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 500px;
}

.panel-header {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #f3f4f6;
}

.panel-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
}

.panel-title {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.success-check {
    color: #10b981;
    font-weight: bold;
}

.success-check.hidden {
    display: none;
}

.btn-icon {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    color: #6b7280;
    background: #f3f4f6;
}

/* Editor Textarea */
.editor-textarea {
    flex: 1;
    width: 100%;
    padding: 20px;
    border: none;
    font-size: 16px;
    font-family: inherit;
    line-height: 1.7;
    resize: none;
    background: transparent;
    min-height: 0;
}

.editor-textarea:focus {
    outline: none;
}

.editor-textarea::placeholder {
    color: #9ca3af;
}

/* Editor Output */
.editor-output {
    flex: 1;
    padding: 20px;
    font-size: 16px;
    line-height: 1.7;
    color: #1a1a2e;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
    min-height: 0;
}

.editor-output:empty::before {
    content: attr(placeholder);
    color: #9ca3af;
}

/* Panel Footer */
.panel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-top: 1px solid #f3f4f6;
}

.char-counter {
    font-size: 12px;
    color: #9ca3af;
    margin-left: auto;
}

.char-counter.warning {
    color: #f59e0b;
}

.char-counter.error {
    color: #ef4444;
}

.validation-error {
    font-size: 13px;
    color: #ef4444;
    font-weight: 500;
}

/* Output Actions */
.output-actions {
    justify-content: flex-end;
    gap: 12px;
}

.btn-copy,
.btn-export {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy {
    background: #2563eb;
    color: white;
    border: none;
}

.btn-copy:hover:not(:disabled) {
    background: #1d4ed8;
}

.btn-copy:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

.btn-export {
    background: white;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.btn-export:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #d1d5db;
}

.btn-export:disabled {
    color: #9ca3af;
    cursor: not-allowed;
}

/* ===========================
   Action Container
   =========================== */

.action-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.btn-rephrase {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-rephrase:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.btn-rephrase:disabled {
    background: #93c5fd;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-sparkle {
    font-size: 18px;
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 14px;
}

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

.loading-spinner {
    animation: spin 2s linear infinite;
}

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

/* ===========================
   Warnings Container
   =========================== */

.warnings-container {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.warnings-container.hidden {
    display: none;
}

.warning-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
}

.warning-item:last-child {
    margin-bottom: 0;
}

.warning-icon {
    color: #f59e0b;
    margin-right: 8px;
    font-weight: bold;
}

.warning-message {
    color: #92400e;
    font-size: 14px;
}

/* ===========================
   Footer
   =========================== */

.app-footer {
    text-align: center;
    padding: 16px 20px;
    color: #9ca3af;
    font-size: 13px;
    background: #f0f2f5;
    flex-shrink: 0;
}

.app-footer p {
    margin: 0;
}

/* ===========================
   Contact Us Button (Header)
   =========================== */

.btn-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-contact:hover {
    background: #e5e7eb;
    color: #374151;
}

/* ===========================
   Quick Feedback Buttons (Panel Header)
   =========================== */

.quick-feedback {
    display: flex;
    gap: 8px;
}

.quick-feedback.hidden {
    display: none;
}

.btn-feedback {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid;
}

.btn-helpful {
    background: #f0fdf4;
    color: #15803d;
    border-color: #86efac;
}

.btn-helpful:hover {
    background: #dcfce7;
    border-color: #4ade80;
}

.btn-helpful.selected {
    background: #15803d;
    color: white;
    border-color: #15803d;
}

.btn-improve {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.btn-improve:hover {
    background: #fee2e2;
    border-color: #f87171;
}

.btn-improve.selected {
    background: #b91c1c;
    color: white;
    border-color: #b91c1c;
}

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

.btn-feedback svg {
    flex-shrink: 0;
}

/* ===========================
   Modal
   =========================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close:hover {
    color: #1a1a2e;
    background: #f3f4f6;
}

.modal-body {
    padding: 24px;
}

.auth-step {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-step.hidden {
    display: none;
}

.auth-step p {
    color: #6b7280;
    font-size: 14px;
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: #2563eb;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.btn-primary {
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-link {
    background: none;
    border: none;
    color: #2563eb;
    text-decoration: underline;
    cursor: pointer;
    padding: 8px;
    font-size: 14px;
}

.btn-link:hover {
    color: #1d4ed8;
}

/* ===========================
   Toast Notifications
   =========================== */

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 300px;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    background: #10b981;
    color: white;
}

.toast.error {
    background: #ef4444;
    color: white;
}

.toast.warning {
    background: #f59e0b;
    color: white;
}

.toast.info {
    background: #3b82f6;
    color: white;
}

.toast-message {
    flex: 1;
    font-size: 14px;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0 0 0 10px;
}

/* ===========================
   Utility Classes
   =========================== */

.hidden {
    display: none !important;
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 900px) {
    .editor-container {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .editor-panel {
        min-height: 350px;
        height: auto;
    }
}

@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 16px;
        padding: 16px 20px;
        text-align: center;
    }

    .header-brand {
        align-items: center;
    }

    .app-header h1 {
        font-size: 20px;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }

    .main-content {
        padding: 20px;
    }

    .tone-tabs {
        justify-content: center;
        flex-wrap: wrap;
    }

    .tone-tab {
        padding: 10px 16px;
        font-size: 14px;
    }

    .output-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-copy,
    .btn-export {
        justify-content: center;
    }

    .btn-rephrase {
        padding: 14px 32px;
        font-size: 15px;
    }

    .toast {
        min-width: 250px;
    }

    .modal-content {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .app-header h1 {
        font-size: 22px;
    }

    .header-actions {
        flex-direction: column;
        gap: 8px;
    }

    .quota-badge {
        width: 100%;
        text-align: center;
    }

    .btn-login {
        width: 100%;
    }

    .tone-tab {
        padding: 8px 12px;
        font-size: 13px;
    }

    .panel-header-row {
        padding: 12px 16px;
    }

    .editor-textarea,
    .editor-output {
        padding: 16px;
        font-size: 15px;
    }

    .panel-footer {
        padding: 10px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .toast-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
    }
}

/* ===========================
   Feedback Modal
   =========================== */

.feedback-modal-content {
    max-width: 500px;
}

.feedback-intro {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.form-group .optional {
    color: #9ca3af;
    font-weight: 400;
}

.form-group .required {
    color: #ef4444;
}

.feedback-textarea {
    min-height: 120px;
    resize: vertical;
}

.textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.field-error {
    color: #ef4444;
    font-size: 12px;
}

.field-error.hidden {
    display: none;
}

/* Honeypot field - hidden from users */
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #e5e7eb;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.form-actions .btn-primary {
    flex: 1;
}

.btn-primary:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

/* Feedback Success State */
.feedback-success {
    text-align: center;
    padding: 20px 0;
}

.feedback-success.hidden {
    display: none;
}

.feedback-success .success-icon {
    width: 60px;
    height: 60px;
    background: #d1fae5;
    color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
}

.feedback-success h3 {
    color: #1a1a2e;
    font-size: 20px;
    margin-bottom: 12px;
}

.feedback-success p {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.feedback-success .btn-primary {
    width: auto;
    padding: 12px 32px;
}

/* Select dropdown styling */
select.input-field {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

/* Feedback link in footer */
#feedback-link {
    cursor: pointer;
}

/* Responsive feedback modal */
@media (max-width: 480px) {
    .feedback-modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-secondary,
    .form-actions .btn-primary {
        width: 100%;
    }
}

/* ===========================
   Segment Rephrase Popup
   Maps to LLD Section 22.3
   =========================== */

.segment-selection-enabled {
    cursor: text;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* Floating Rephrase Button */
.segment-rephrase-button {
    position: absolute;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transition: all 0.2s ease;
    animation: buttonFadeIn 0.15s ease-out;
}

.segment-rephrase-button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
}

.segment-rephrase-button:active {
    transform: translateY(0);
}

.segment-rephrase-button.hidden {
    display: none;
}

.segment-rephrase-button svg {
    flex-shrink: 0;
}

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

.editor-output {
    user-select: text;
    -webkit-user-select: text;
}

.editor-output[contenteditable="true"] {
    cursor: text;
    outline: none;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

.editor-output[contenteditable="true"]:focus {
    border-color: #3b82f6;
    background-color: #fafbff;
}

.editor-output[contenteditable="true"]:hover:not(:focus) {
    border-color: #e5e7eb;
}

.segment-selection-enabled::selection {
    background-color: #bfdbfe;
    color: #1e40af;
}

.segment-rephrase-popup {
    position: absolute;
    z-index: 1000;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    max-width: 400px;
    border: 1px solid #e5e7eb;
    animation: fadeIn 0.15s ease-out;
}

.segment-rephrase-popup.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 8px 8px 0 0;
}

.popup-title {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.popup-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}

.popup-close:hover {
    color: #374151;
}

.popup-content {
    padding: 12px;
}

.popup-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    color: #6b7280;
    font-size: 14px;
}

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

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.popup-alternatives {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.popup-alternatives.hidden {
    display: none;
}

.alternative-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.alternative-item:hover {
    background: #eff6ff;
    border-color: #3b82f6;
}

.alternative-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: #3b82f6;
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 50%;
    flex-shrink: 0;
}

.alternative-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.no-alternatives {
    padding: 16px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    font-style: italic;
}

.popup-error {
    padding: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #dc2626;
    font-size: 14px;
}

.popup-error.hidden {
    display: none;
}

/* Responsive popup */
@media (max-width: 480px) {
    .segment-rephrase-popup {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 60vh;
        overflow-y: auto;
    }
}

/* ===========================
   SEO Content Section
   =========================== */

.seo-content-section {
    margin-top: 12px;
    flex-shrink: 0;
}

.seo-details {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.seo-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.seo-toggle::-webkit-details-marker {
    display: none;
}

.seo-toggle h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.4;
}

.seo-toggle-icon {
    flex-shrink: 0;
    margin-left: 16px;
}

.seo-toggle-icon::after {
    content: '+';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 18px;
    font-weight: 500;
    transition: background 0.2s;
}

.seo-details[open] .seo-toggle-icon::after {
    content: '\2212';
    background: #eff6ff;
    color: #2563eb;
}

.seo-content-body {
    padding: 0 24px 28px;
    line-height: 1.7;
    color: #374151;
    font-size: 15px;
}

.seo-content-body h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 28px 0 12px;
}

.seo-content-body p {
    margin: 0 0 12px;
}

.seo-content-body ul,
.seo-content-body ol {
    margin: 0 0 12px;
    padding-left: 24px;
}

.seo-content-body li {
    margin-bottom: 6px;
}

.seo-content-body li p {
    margin: 4px 0 0;
}

/* Definition lists for benefits / audience */
.seo-benefits,
.seo-audience {
    margin: 0 0 12px;
}

.seo-benefits dt,
.seo-audience dt {
    font-weight: 600;
    color: #1a1a2e;
    margin-top: 14px;
}

.seo-benefits dt:first-child,
.seo-audience dt:first-child {
    margin-top: 0;
}

.seo-benefits dd,
.seo-audience dd {
    margin-left: 0;
    margin-bottom: 4px;
    color: #4b5563;
}

/* Numbered features list */
.seo-features > li {
    margin-bottom: 14px;
}

.seo-features > li > strong {
    color: #1a1a2e;
}

/* Steps list */
.seo-steps li {
    margin-bottom: 4px;
}

/* FAQ accordion */
.seo-faq {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.seo-faq details {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.seo-faq summary {
    padding: 14px 16px;
    font-weight: 500;
    color: #1a1a2e;
    cursor: pointer;
    background: #f9fafb;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s;
    font-size: 15px;
}

.seo-faq summary::-webkit-details-marker {
    display: none;
}

.seo-faq summary::after {
    content: '+';
    color: #6b7280;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
    margin-left: 12px;
}

.seo-faq details[open] summary {
    background: #eff6ff;
    border-bottom: 1px solid #e5e7eb;
}

.seo-faq details[open] summary::after {
    content: '\2212';
    color: #2563eb;
}

.seo-faq summary:hover {
    background: #f3f4f6;
}

.seo-faq details[open] summary:hover {
    background: #dbeafe;
}

.seo-faq details p {
    padding: 14px 16px;
    margin: 0;
    color: #4b5563;
}

/* CTA closing paragraph */
.seo-cta {
    font-weight: 500;
    color: #1a1a2e;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

/* SEO section responsive */
@media (max-width: 768px) {
    .seo-toggle h2 {
        font-size: 18px;
    }

    .seo-content-body {
        font-size: 14px;
    }

    .seo-content-body h3 {
        font-size: 16px;
    }

    .seo-faq summary {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .seo-toggle {
        padding: 16px;
    }

    .seo-toggle h2 {
        font-size: 16px;
    }

    .seo-content-body {
        padding: 0 16px 20px;
    }
}

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

.hero-block {
    padding: 20px 0 24px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.hero-headline {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.25;
    margin: 0 0 10px;
}

.hero-sub {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.6;
    margin: 0 0 16px;
    max-width: 640px;
}

.hero-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
}

.hero-bullets li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.hero-bullets li svg {
    color: #2563eb;
    flex-shrink: 0;
}

.hero-cta-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.30);
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.btn-hero-cta:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.42);
    transform: translateY(-1px);
}

.btn-hero-cta:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}

.hero-cta-note {
    font-size: 13px;
    color: #9ca3af;
    font-weight: 400;
}

.pretool-cta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .pretool-cta .btn-hero-cta {
        width: 100%;
        justify-content: center;
    }
    .pretool-cta .hero-cta-note {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .btn-hero-cta {
        width: 100%;
        justify-content: center;
        padding: 13px 24px;
    }
    .hero-cta-note {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hero-headline {
        font-size: 20px;
    }
    .hero-sub {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hero-block {
        padding: 14px 0 18px;
        margin-bottom: 16px;
    }
    .hero-headline {
        font-size: 18px;
    }
    .hero-bullets {
        gap: 8px 16px;
    }
}

/* ===========================
   Outcome Strip
   =========================== */

.outcome-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.outcome-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 500;
    color: #374151;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 5px 12px;
    white-space: nowrap;
}

.outcome-chip svg {
    color: #2563eb;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .outcome-chip {
        font-size: 12px;
        padding: 4px 10px;
    }
}

/* ===========================
   Tone Tab Hints
   =========================== */

.tone-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 20px 8px;
    line-height: 1.2;
}

.tone-hint {
    display: block;
    font-size: 11.5px;
    font-weight: 400;
    color: #9ca3af;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.tone-hint-label {
    font-weight: 600;
    color: #d1d5db;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.05em;
    margin-right: 2px;
}

.tone-tab.active .tone-hint {
    color: #6b7280;
}

.tone-tab.active .tone-hint-label {
    color: #93c5fd;
}

@media (max-width: 600px) {
    .tone-hint {
        display: none;
    }
    .tone-tab {
        padding: 12px 14px;
    }
}

/* ===========================
   Marketing Sections Wrapper
   =========================== */

.marketing-sections {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 12px;
}

/* Shared section heading */
.section-heading {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 8px;
    line-height: 1.3;
}

.section-subheading {
    font-size: 15px;
    color: #6b7280;
    margin: 0 0 20px;
    line-height: 1.5;
}

/* ===========================
   Before / After Examples
   =========================== */

.ba-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 28px 24px 24px;
    margin-bottom: 12px;
}

.ba-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 900px) {
    .ba-grid {
        grid-template-columns: 1fr;
    }
}

.ba-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ba-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 4px;
    padding: 3px 8px;
    align-self: flex-start;
}

.ba-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ba-col {
    flex: 1;
    min-width: 0;
}

.ba-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
}

.ba-before .ba-label {
    color: #9ca3af;
}

.ba-after .ba-label {
    color: #10b981;
}

.ba-before p {
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.5;
    margin: 0;
    text-decoration-line: none;
}

.ba-after p {
    font-size: 13px;
    color: #1a1a2e;
    line-height: 1.5;
    margin: 0;
    font-weight: 500;
}

.ba-divider {
    font-size: 16px;
    color: #d1d5db;
    padding-top: 18px;
    flex-shrink: 0;
    user-select: none;
}

/* ===========================
   Segment Rephrase Differentiator
   =========================== */

.differentiator-callout {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

.differentiator-callout::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #2563eb, #10b981);
    border-radius: 12px 0 0 12px;
}

.diff-icon {
    color: #2563eb;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 10px;
    border: 1px solid #bfdbfe;
}

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

.diff-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 6px;
}

.diff-content p {
    font-size: 14px;
    color: #4b5563;
    margin: 0;
    line-height: 1.6;
}

.diff-badge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #059669;
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    border-radius: 4px;
    padding: 4px 10px;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .differentiator-callout {
        flex-wrap: wrap;
        gap: 14px;
    }
    .diff-badge {
        order: -1;
    }
}

/* ===========================
   Use Cases Grid
   =========================== */

.uc-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 28px 24px 24px;
    margin-bottom: 12px;
}

.uc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 1000px) {
    .uc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .uc-grid {
        grid-template-columns: 1fr;
    }
}

.uc-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 16px;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.uc-card:hover {
    border-color: #bfdbfe;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.uc-icon {
    color: #2563eb;
    margin-bottom: 10px;
    display: flex;
}

.uc-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 6px;
}

.uc-card p {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* ===========================
   Trust / Testimonial Placeholders
   =========================== */

.trust-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 28px 24px 24px;
    margin-bottom: 12px;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 900px) {
    .trust-grid {
        grid-template-columns: 1fr;
    }
}

.trust-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.trust-card::before {
    content: '\201C';
    position: absolute;
    top: 12px;
    left: 16px;
    font-size: 40px;
    line-height: 1;
    color: #dbeafe;
    font-family: Georgia, serif;
}

.trust-quote {
    font-size: 14px;
    color: #374151;
    line-height: 1.65;
    margin: 0;
    padding-top: 20px;
    font-style: italic;
}

.trust-role {
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    margin: 0;
}

.trust-note {
    font-size: 11px;
    color: #d1d5db;
    margin: 0;
    font-style: italic;
}

/* ===========================
   Responsive adjustments for marketing sections
   =========================== */

@media (max-width: 768px) {
    .ba-section,
    .uc-section,
    .trust-section {
        padding: 20px 16px;
        border-radius: 10px;
    }

    .section-heading {
        font-size: 18px;
    }

    .differentiator-callout {
        padding: 18px 16px;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .ba-section,
    .uc-section,
    .trust-section {
        padding: 16px 12px;
    }

    .section-heading {
        font-size: 16px;
    }

    .ba-row {
        flex-direction: column;
        gap: 8px;
    }

    .ba-divider {
        display: none;
    }

    .ba-before {
        padding-bottom: 10px;
        border-bottom: 1px solid #e5e7eb;
    }
}

/* ===========================
   History Panel
   =========================== */

.history-panel {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.history-panel.hidden {
    display: none;
}

/* Header row */
.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #f3f4f6;
}

.history-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.history-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
}

.history-clear-btn {
    background: none;
    border: none;
    font-size: 12.5px;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.history-clear-btn:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* Entry list */
.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-entry {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 16px;
    row-gap: 6px;
    padding: 14px 20px;
    border-bottom: 1px solid #f9fafb;
    transition: background 0.12s;
}

.history-entry:last-child {
    border-bottom: none;
}

.history-entry:hover {
    background: #fafbfe;
}

/* Top row: tone badge + time */
.history-entry-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    grid-column: 1;
    grid-row: 1;
}

.history-tone-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 4px;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.history-tone-formal   { background: #f0fdf4; color: #15803d; border-color: #86efac; }
.history-tone-fluency  { background: #fff7ed; color: #c2410c; border-color: #fdba74; }
.history-tone-academic { background: #faf5ff; color: #7c3aed; border-color: #c4b5fd; }

.history-time {
    font-size: 12px;
    color: #9ca3af;
}

/* Snippet row */
.history-snippets {
    display: flex;
    align-items: baseline;
    gap: 8px;
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
}

.history-snippet {
    font-size: 13px;
    line-height: 1.5;
    color: #4b5563;
    margin: 0;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.history-snippet-input {
    color: #9ca3af;
}

.history-snippet-output {
    color: #1a1a2e;
    font-weight: 500;
}

.history-snippet-arrow {
    font-size: 13px;
    color: #d1d5db;
    flex-shrink: 0;
}

/* Restore button — spans both rows on the right */
.btn-history-restore {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    background: none;
    border: 1px solid #e5e7eb;
    color: #2563eb;
    font-size: 12.5px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.btn-history-restore:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}

/* Responsive */
@media (max-width: 600px) {
    .history-entry {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .btn-history-restore {
        grid-column: 1;
        grid-row: 3;
        width: fit-content;
    }

    .history-snippets {
        flex-direction: column;
        gap: 4px;
        white-space: normal;
    }

    .history-snippet {
        white-space: normal;
    }

    .history-snippet-arrow {
        display: none;
    }
}

/* ============================================================
   UX Polish — visual hierarchy, spacing, clarity
   Issues addressed: #1–#10
   ============================================================ */

/* --- #2 Reduce top empty space ----------------------------- */

.main-content {
    padding-top: 12px;
}

.hero-block {
    padding: 12px 0 16px;
    margin-bottom: 14px;
}

/* --- #3 Strengthen visual hierarchy — hero typography ------ */

.hero-headline {
    font-size: 26px;
    letter-spacing: -0.01em;
}

.hero-sub {
    font-size: 15px;
    color: #374151;
}

.hero-bullets li {
    font-size: 13.5px;
    color: #4b5563;
}

/* --- #4 Tone selector — darken inactive, clearer active ----- */

.tone-tab {
    color: #374151;          /* was #6b7280 — more readable */
}

.tone-tab:hover {
    color: #1a1a2e;
    background: #f9fafb;     /* subtle hover bg */
    border-radius: 6px 6px 0 0;
}

.tone-tab.active {
    background: #eff6ff;     /* subtle blue tint on active */
    border-radius: 6px 6px 0 0;
}

.tone-hint {
    color: #6b7280;          /* was #9ca3af */
    font-size: 11.5px;
}

.tone-hint-label {
    color: #9ca3af;          /* was #d1d5db — much more readable */
}

.tone-tab.active .tone-hint {
    color: #4b5563;
}

.tone-tab.active .tone-hint-label {
    color: #2563eb;
}

/* --- #5 Chips — secondary, non-competing weight ------------ */

.outcome-strip {
    margin-bottom: 12px;
}

.outcome-chip {
    font-size: 12px;
    font-weight: 400;
    color: #6b7280;
    background: transparent;
    border-color: #e5e7eb;
    padding: 4px 10px;
}

.outcome-chip svg {
    color: #9ca3af;          /* muted — chips support, not compete */
}

/* --- #6 Input placeholder — more readable ------------------ */

.editor-textarea::placeholder {
    color: #71717a;          /* was #9ca3af — higher contrast */
}

/* --- #7 & #8 Output empty state — centered + helpful ------- */

.editor-output:empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fafbfe;     /* very subtle blue-white tint */
}

.editor-output:empty::before {
    content: '✨';
    font-size: 26px;
    opacity: 0.35;
    display: block;
    line-height: 1;
}

/* Replace attr(placeholder) on ::before with ::after for text */
.editor-output:empty::after {
    content: attr(placeholder);
    color: #9ca3af;
    text-align: center;
    font-size: 14px;
    line-height: 1.7;
    max-width: 240px;
    font-style: italic;
}

/* --- #1 Primary CTA — more dominant when active ------------ */

.btn-rephrase {
    padding: 18px 60px;
    font-size: 17px;
    letter-spacing: 0.01em;
    box-shadow: 0 6px 22px rgba(37, 99, 235, 0.38);
}

.btn-rephrase:hover:not(:disabled) {
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.48);
    transform: translateY(-2px);
}

.btn-rephrase:disabled {
    background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
    box-shadow: none;
    cursor: not-allowed;
}

.action-container {
    margin-top: 4px;
    margin-bottom: 20px;
}

/* --- #9 Header utility — visually secondary ---------------- */

.quota-badge {
    font-size: 12.5px;
    padding: 6px 12px;
}

.btn-login {
    font-size: 13px;
    padding: 6px 16px;
}

.btn-contact {
    width: 34px;
    height: 34px;
}

/* --- #10 Sample fill button -------------------------------- */

.btn-sample {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid #bfdbfe;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #2563eb;
    cursor: pointer;
    padding: 2px 7px;
    margin-left: 8px;
    vertical-align: middle;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.btn-sample:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

/* Responsive adjustments for UX polish */
@media (max-width: 768px) {
    .hero-headline {
        font-size: 20px;
    }
    .btn-rephrase {
        padding: 16px 40px;
        font-size: 16px;
    }
    .main-content {
        padding-top: 10px;
    }
}

@media (max-width: 480px) {
    .hero-headline {
        font-size: 18px;
    }
    .btn-rephrase {
        padding: 15px 32px;
        font-size: 15px;
    }
}

/* ============================================================
   Feedback follow-up inline panel
   ============================================================ */

.feedback-followup {
    display: block;
    margin: 0 12px 12px;
    border-radius: 8px;
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    overflow: hidden;
}

.followup-inner {
    padding: 14px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.followup-prompt {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
}

.followup-optional {
    font-size: 11px;
    font-weight: 400;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Suggestion chips */
.followup-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.followup-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    color: #4b5563;
    background: #ffffff;
    border: 1px solid #d1d5db;
    cursor: pointer;
    transition: background 0.13s, border-color 0.13s, color 0.13s;
    white-space: nowrap;
}

.followup-chip:hover {
    background: #f0f4ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.followup-chip.followup-chip-active {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1d4ed8;
}

/* Comment textarea */
.followup-textarea {
    width: 100%;
    min-height: 60px;
    resize: vertical;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    color: #374151;
    background: #ffffff;
    font-family: inherit;
    line-height: 1.5;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.followup-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.followup-textarea::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* Action row */
.followup-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-followup-submit {
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    background: #2563eb;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-followup-submit:hover {
    background: #1d4ed8;
}

.btn-followup-skip {
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    background: transparent;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.btn-followup-skip:hover {
    background: #f3f4f6;
    color: #374151;
}

@media (max-width: 480px) {
    .followup-chips {
        gap: 5px;
    }
    .followup-chip {
        font-size: 11px;
        padding: 3px 8px;
    }
    .followup-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-followup-submit,
    .btn-followup-skip {
        text-align: center;
    }
}

/* ===========================
   Breadcrumb Navigation
   =========================== */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 13px;
}

.breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

.breadcrumb-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.breadcrumb-sep {
    color: #9ca3af;
    font-size: 12px;
}

.breadcrumb-current {
    color: #6b7280;
    font-weight: 400;
}

/* ===========================
   Hub Page
   =========================== */

.hub-main {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 48px 40px 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hub-hero {
    text-align: center;
    margin-bottom: 48px;
}

.hub-hero-headline {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
    line-height: 1.2;
}

.hub-hero-sub {
    font-size: 17px;
    color: #6b7280;
    line-height: 1.5;
}

.hub-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
}

.hub-tool-card {
    display: flex;
    gap: 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 28px 24px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.18s, border-color 0.18s, transform 0.18s;
}

.hub-tool-card:hover {
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.10);
    border-color: #bfdbfe;
    transform: translateY(-2px);
}

.hub-tool-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    background: #eff6ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
}

.hub-tool-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hub-tool-name {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.3;
}

.hub-tool-desc {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.55;
}

.hub-tool-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
    margin-top: 4px;
}

@media (max-width: 700px) {
    .hub-main {
        padding: 32px 20px 48px;
    }

    .hub-hero-headline {
        font-size: 28px;
    }

    .hub-tools-grid {
        grid-template-columns: 1fr;
    }

    .breadcrumb {
        font-size: 12px;
    }
}
