/* =====================================================================
   CleanPDF – site.css  (v3, 28 Oct 2026)
   The ONE global stylesheet, loaded first on every page.
   1. Foundation (variables, reset, layout, tool cards, footer, content)
   2. Compress PDF tool component (.cpt, .cpa)
   3. Design system: header, buttons, upload zones (keep last)
   Page stylesheets (assets/css/pages/*.css) only hold rules unique to one tool.
   ===================================================================== */

/* ===================================================== 1. FOUNDATION */

:root {
    --primary: #e53e3e;
    --primary-dark: #c53030;
    --primary-light: #feb2b2;
    --secondary: #4a5568;
    --success: #38a169;
    --error: #e53e3e;
    --gray-50: #f9fafb;
    --gray-100: #f7fafc;
    --gray-200: #edf2f7;
    --gray-300: #e2e8f0;
    --gray-400: #cbd5e0;
    --gray-500: #a0aec0;
    --gray-600: #2d3748;
    --gray-700: #4a5568;
    --gray-800: #2d3748;
    --gray-900: #1a202c;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
    --nav-blue-light: #bee3f8;
    --nav-blue-medium: #90cdf4;
    --nav-blue-dark: #4299e1;
    --nav-blue-darker: #3182ce;
    --nav-text-light: #2c5282;
    --nav-text-dark: #1a365d;
}

.security-alert {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #e6fffa;
    border: 1px solid #4fd1c5;
    border-radius: 0.5rem;
    font-weight: 600;
    color: #38a169;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background-color: var(--gray-50);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.main {
    flex: 1;
    padding: 2rem 0;
}

.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 1100px;
    margin: 0 auto;
}

.tools {
    padding: 3rem 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tool-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.tool-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.tool-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--gray-900);
}

.tool-description {
    color: black;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    line-height: 1.4;
}

.tool-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #2d3748;
    font-weight: 700;
}

.tool-card p {
    color: #2d3748;
    line-height: 1.6;
    font-size: 0.95rem;
}

.how-it-works {
    padding: 1rem 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: black;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.step-description {
    color: var(--gray-600);
}

.features {
    padding: 3rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.breadcrumb {
    display: inline-block;
    color: var(--gray-600);
    text-decoration: none;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

.breadcrumb:hover {
    color: var(--primary);
}

.page-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
}

.upload-section {
    margin-bottom: 1rem;
}

.drop-zone {
    border: 3px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    text-align: center;
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.drop-zone:hover,
.drop-zone:focus {
    border-color: var(--primary);
    background: var(--gray-50);
}

.drop-zone.drag-over {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: scale(1.02);
}

.drop-zone-icon {
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.drop-zone-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.files-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.files-header {
    margin-bottom: 1.5rem;
}

.files-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.files-hint {
    color: var(--gray-600);
    font-size: 0.95rem;
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 2px solid var(--gray-200);
    cursor: move;
    transition: var(--transition);
    animation: fadeIn 0.3s ease;
}

.file-item:hover {
    border-color: var(--primary);
}

.file-item.sortable-ghost {
    opacity: 0.4;
}

.file-drag-handle {
    color: var(--gray-400);
    cursor: grab;
}

.file-drag-handle:active {
    cursor: grabbing;
}

.file-thumbnail {
    width: 60px;
    height: 80px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.file-thumbnail canvas {
    max-width: 100%;
    max-height: 100%;
}

.file-thumbnail-placeholder {
    color: var(--gray-400);
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.file-details {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.file-remove {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.file-remove:hover {
    background: var(--gray-100);
}

.split-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.split-options {
    margin-bottom: 2rem;
}

.split-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.split-method {
    cursor: pointer;
    display: block;
}

.split-method input[type="radio"] {
    display: none;
}

.split-method-content {
    padding: 1.5rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    transition: var(--transition);
}

.split-method input:checked + .split-method-content {
    border-color: var(--primary);
    background: var(--gray-50);
}

.split-method-content h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.split-method-content p {
    font-size: 0.95rem;
    color: var(--gray-600);
}

.pages-preview {
    margin-bottom: 2rem;
}

.pages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.pages-actions {
    display: flex;
    gap: 0.5rem;
}

.pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.page-item {
    position: relative;
    background: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    animation: fadeIn 0.3s ease;
}

.page-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.page-item.selected {
    border-color: var(--primary);
    background: var(--gray-50);
}

.page-item.sortable-ghost {
    opacity: 0.4;
}

.page-number {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--gray-900);
    color: var(--white);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

.page-checkbox {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
}

.page-delete {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--error);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
    z-index: 10;
}

.page-item:hover .page-delete {
    opacity: 1;
}

.page-delete:hover {
    background: var(--primary-dark);
}

.page-thumbnail-wrapper {
    width: 100%;
    aspect-ratio: 0.707;
    background: var(--gray-100);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-thumbnail-wrapper canvas {
    max-width: 100%;
    max-height: 100%;
}

.rearrange-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.rearrange-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.toolbar-actions {
    display: flex;
    gap: 0.5rem;
}

.rearrange-hint {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-900);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

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

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

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

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.processing-section {
    text-align: center;
    padding: 4rem 2rem;
}

.processing-content {
    max-width: 500px;
    margin: 0 auto;
}

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

.processing-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.processing-text {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.success-section {
    text-align: center;
    padding: 0.25rem 0.30rem;
}

.success-content {
    max-width: 500px;
    margin: 0 auto;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}

.success-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.success-text {
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.error-section {
    text-align: center;
    padding: 4rem 2rem;
}

.error-content {
    max-width: 500px;
    margin: 0 auto;
}

.error-icon {
    width: 80px;
    height: 80px;
    background: var(--error);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}

.error-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.error-text {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.error-tips {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: left;
    margin-bottom: 2rem;
}

.error-tips-title {
    font-weight: 600;
    margin-bottom: 1rem;
}

.error-tips-list {
    list-style-position: inside;
    color: var(--gray-600);
}

.error-tips-list li {
    margin-bottom: 0.5rem;
}

.footer {
    background: var(--gray-900);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

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

.footer-subsection {
    margin-bottom: 1.5rem;
}

.footer-subsection:last-child {
    margin-bottom: 0;
}

.footer-subsection h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.footer-copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.converter-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

.upload-area {
    border: 3px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    background: var(--white);
    transition: var(--transition);
    margin-bottom: 2rem;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: var(--gray-50);
}

.upload-icon {
    font-size: 3rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.file-input {
    display: none;
}

.preview-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--white);
}

.preview-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--error);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.remove-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.controls {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

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

.control-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-800);
}

.select-control,
.input-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
}

.select-control:focus,
.input-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dimension-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.dimension-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dimension-input input {
    flex: 1;
}

.aspect-ratio-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.ratio-btn {
    padding: 0.5rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
}

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

.tool-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

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

.crop-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.editor-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.editor-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-top: 2rem;
}

.editor-main {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.editor-preview {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 1rem;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--gray-300);
}

#imagePreview {
    max-width: 100%;
    max-height: 500px;
    display: none;
}

.controls-panel {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    height: fit-content;
}

.preview-info {
    text-align: center;
    margin-top: 1rem;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.spinner-small {
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 0 auto 1rem;
}

.supported-formats {
    text-align: center;
    color: var(--gray-600);
    margin-top: 1rem;
    font-size: 0.9rem;
}

.related-tools-section {
    margin: 3rem 0;
    padding: 2rem;
    background: #f7fafc;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.related-tools-title {
    text-align: center;
    color: #2d3748;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    justify-items: center;
}

.modern-btn {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    height: 42px;
    font-weight: 600;
    background: linear-gradient(135deg, #4299e1, #2b6cb0);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 16px rgba(66, 153, 225, 0.4);
    text-decoration: none;
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.modern-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(66, 153, 225, 0.5);
    background: linear-gradient(135deg, #2b6cb0, #2c5282);
}

.modern-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(66, 153, 225, 0.4);
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.drop-zone:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 4px;
}

@media (max-width: 768px) {
  .hero-title {
      font-size: 2rem;
  }
  .hero-subtitle {
      font-size: 1rem;
  }
  .page-title {
      font-size: 2rem;
  }
  .tool-card {
      padding: 1.5rem;
  }
  .pages-grid {
      grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  .files-list {
      gap: 0.75rem;
  }
  .file-item {
      flex-wrap: wrap;
  }
  .footer-content {
      grid-template-columns: 1fr 1fr;
      gap: 1.5rem;
  }
  .footer-section:first-child {
      grid-column: 1 / -1;
  }
  .editor-layout {
      grid-template-columns: 1fr;
  }
  .dimension-controls {
      grid-template-columns: 1fr;
  }
  .aspect-ratio-buttons {
      grid-template-columns: repeat(2, 1fr);
  }
  .crop-controls {
      grid-template-columns: 1fr;
  }
  .upload-area {
      padding: 2rem 1rem;
  }
  .related-tools-section {
      padding: 1.5rem;
  }
  .modern-btn {
      max-width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
      padding: 0 1rem;
  }
  .hero-title {
      font-size: 1.75rem;
  }
  .pages-grid {
      grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  .action-buttons {
      flex-direction: column;
  }
  .btn {
      width: 100%;
  }
  .footer-content {
      grid-template-columns: 1fr;
      gap: 1.5rem;
  }
  .footer-section {
      text-align: center;
  }
  .footer-subsection {
      margin-bottom: 1rem;
  }
  .converter-container,
  .editor-container {
      padding: 1rem 0;
  }
  .controls-panel {
      padding: 1rem;
  }
  .aspect-ratio-buttons {
      grid-template-columns: 1fr;
  }
}

.unified-box {
    border: 3px dashed #d1d9e6;
    border-radius: 12px;
    background: white;
    transition: border-color 0.3s, background-color 0.3s;
    margin: 2rem auto;
    max-width: 900px;
    padding: 0 1rem;
}

.unified-box.dragover {
    border-color: #4a7bff;
    background-color: #f0f5ff;
}

.unified-content {
    padding: 3rem 2rem;
    text-align: center;
}

.unified-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #6c757d;
}

.unified-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #212529;
}

.unified-subtitle {
    color: #6c757d;
    margin-bottom: 25px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.unified-helper {
    font-size: 13px;
    color: #718096;
    margin-top: 8px;
}

.preview-grid-container {
    padding: 1.5rem;
    display: none;
}

.compatibility-note {
    background: #f0f9ff;
    border: 1px solid #7dd3fc;
    border-radius: 6px;
    padding: 12px;
    margin-top: 15px;
    font-size: 14px;
    color: #0369a1;
}

@media (max-width: 768px) {
  .unified-content {
      padding: 2rem 1rem;
  }
  .unified-box {
      margin: 1rem auto;
  }
}

.content-section {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.content-section h2 {
    color: #2d3748;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.content-section h3 {
    color: #4a5568;
    font-size: 1.3rem;
    margin: 2rem 0 1rem 0;
}

.content-section p {
    line-height: 1.7;
    margin-bottom: 1.2rem;
    color: #4a5568;
}

.content-section ul,
.content-section ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.content-section li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    color: #4a5568;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #4a7bff;
}

.faq-item {
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 20px;
}

.faq-question {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.faq-answer {
    color: #4a5568;
}

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

.modern-button {
    position: relative;
    overflow: hidden;
}

.modern-button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.modern-button:hover::before {
    width: 300px;
    height: 300px;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.convert-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(66, 153, 225, 0.5);
}

.download-btn:hover {
    transform: translateY(-2px);
}

#downloadBtn:hover {
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
}

#downloadZipBtn:hover {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

#downloadIndividualBtn:hover {
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
}

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

#imageGrid::-webkit-scrollbar {
    width: 8px;
}

#imageGrid::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

#imageGrid::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

#imageGrid::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

#clearBtn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

.compressor-container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.drop-zone {
    position: relative;
    border: 2px dashed #4299e1;
    border-radius: 12px;
    padding: 20px 10px;
    text-align: center;
    background-color: #f8fafc;
    transition: all 0.3s ease;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.drop-zone.drag-over {
    background-color: #ebf8ff;
    border-color: #2b6cb0;
    transform: scale(1.01);
}

#fileInput {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.preview-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5;
}

.file-icon {
    font-size: 50px;
    margin-bottom: 10px;
}

.control-group {
    margin: 2rem auto;
    max-width: 400px;
}

#download-section {
    margin-top: 2rem;
    padding: 2rem;
    border: 2px solid #c6f6d5;
    background: #f0fff4;
    border-radius: 0.5rem;
    display: none;
    text-align: center;
}

.spinner {
    border: 3px solid rgba(66, 153, 225, 0.2);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border-left-color: #4299e1;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

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

.trust-box {
    max-width: 800px;
    margin: 0 auto 1.5rem;
    padding: 1rem;
    background-color: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 0.5rem;
    text-align: center;
}

.trust-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    font-weight: 600;
    color: #166534;
}

.trust-bullets li {
    margin: 6px 0;
}

.seo-content {
    max-width: 1100px;
    margin: 2rem auto;
    line-height: 1.7;
    color: #4a5568;
}

.seo-content h2 {
    color: #2d3748;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.seo-content h3 {
    color: #2d3748;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.seo-content p {
    margin-bottom: 1rem;
}

.seo-content ul,
.seo-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.seo-content li {
    margin-bottom: 0.5rem;
}

.faq-item {
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    padding: 1rem;
    background: #edf2f7;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    padding: 1rem;
    background: white;
    display: none;
}

.info-box {
    background: #f0fff4;
    border-left: 4px solid #38a169;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.warning-box {
    background: #fffaf0;
    border-left: 4px solid #ed8936;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.professional-box {
    background: #f0f9ff;
    border-left: 4px solid #0ea5e9;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.archival-box {
    background: #faf5ff;
    border-left: 4px solid #8b5cf6;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.technical-box {
    background: #fef7ff;
    border-left: 4px solid #c026d3;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

/* ===================================================== 2. COMPRESS TOOL */

/* CleanPDF – shared PDF compressor component (.cpt) */

.cpt {
    --cpt-ink: #1a202c;
    --cpt-muted: #4a5568;
    --cpt-soft: #718096;
    --cpt-line: #e2e8f0;
    --cpt-bg: #ffffff;
    --cpt-tint: #ebf8ff;
    --cpt-blue: #3182ce;
    --cpt-blue-dark: #2b6cb0;
    --cpt-red: #e53e3e;
    --cpt-red-dark: #c53030;
    --cpt-green: #2f855a;
    --cpt-green-bg: #f0fff4;
    --cpt-amber: #975a16;
    --cpt-amber-bg: #fffaf0;
    max-width: 760px;
    margin: 1.25rem auto 2rem;
    padding: 1.5rem;
    background: var(--cpt-bg);
    border: 1px solid var(--cpt-line);
    border-radius: 16px;
    box-shadow: 0 10px 30px -12px rgba(26, 32, 44, 0.18);
    color: var(--cpt-ink);
    font-size: 1rem;
    line-height: 1.5;
    box-sizing: border-box;
}

.cpt *,
.cpt *::before,
.cpt *::after {
    box-sizing: border-box;
}

.cpt [hidden] {
    display: none !important;
}

/* drop zone */

.cpt-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 190px;
    padding: 1.5rem 1rem;
    text-align: center;
    border: 2px dashed #90cdf4;
    border-radius: 12px;
    background: #f7fbff;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.cpt-drop:hover,
.cpt-drop:focus-visible,
.cpt-drop.is-over {
    border-color: var(--cpt-blue);
    background: var(--cpt-tint);
    outline: none;
}

.cpt-drop svg {
    width: 46px;
    height: 46px;
    color: var(--cpt-blue);
}

.cpt-drop-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--cpt-ink);
}

.cpt-drop-btn {
    display: inline-block;
    margin-top: .35rem;
    padding: .65rem 1.4rem;
    border-radius: 999px;
    background: var(--cpt-red);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
}

.cpt-drop-sub {
    margin: .25rem 0 0;
    font-size: .875rem;
    color: var(--cpt-soft);
}

/* chosen file */

.cpt-file {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .85rem 1rem;
    border: 1px solid var(--cpt-line);
    border-radius: 12px;
    background: #f7fafc;
}

.cpt-file svg {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    color: var(--cpt-red);
}

.cpt-file-meta {
    flex: 1 1 auto;
    min-width: 0;
}

.cpt-file-name {
    display: block;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cpt-file-size {
    display: block;
    font-size: .875rem;
    color: var(--cpt-muted);
}

.cpt-link {
    background: none;
    border: 0;
    padding: .25rem .1rem;
    color: var(--cpt-blue-dark);
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

/* options */

.cpt-options {
    margin: 1.25rem 0 0;
    padding: 0;
    border: 0;
}

.cpt-options legend {
    padding: 0;
    margin-bottom: .5rem;
    font-weight: 700;
    font-size: .95rem;
}

.cpt-seg {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .4rem;
}

.cpt-seg label {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: .45rem .3rem;
    text-align: center;
    border: 1.5px solid var(--cpt-line);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    font-size: .92rem;
    line-height: 1.2;
}

.cpt-seg label small {
    display: block;
    margin-top: .15rem;
    font-weight: 400;
    font-size: .75rem;
    color: var(--cpt-soft);
}

.cpt-seg input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cpt-seg label:has(input:checked) {
    border-color: var(--cpt-blue);
    background: var(--cpt-tint);
    color: var(--cpt-blue-dark);
}

.cpt-seg label:has(input:focus-visible) {
    outline: 2px solid var(--cpt-blue);
    outline-offset: 2px;
}

.cpt-seg label.is-checked {
    border-color: var(--cpt-blue);
    background: var(--cpt-tint);
    color: var(--cpt-blue-dark);
}

.cpt-target {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-top: .9rem;
}

.cpt-target label {
    font-weight: 600;
    font-size: .92rem;
    margin-right: .25rem;
}

.cpt-target input,
.cpt-target select {
    height: 44px;
    padding: 0 .7rem;
    border: 1.5px solid #cbd5e0;
    border-radius: 8px;
    font: inherit;
    font-size: 1rem;
    color: var(--cpt-ink);
    background: #fff;
}

.cpt-target input {
    width: 110px;
}

.cpt-target input:focus,
.cpt-target select:focus {
    outline: none;
    border-color: var(--cpt-blue);
    box-shadow: 0 0 0 3px rgba(49,130,206,.18);
}

.cpt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    flex-basis: 100%;
}

.cpt-chip {
    padding: .3rem .7rem;
    border: 1px solid var(--cpt-line);
    border-radius: 999px;
    background: #fff;
    font: inherit;
    font-size: .82rem;
    color: var(--cpt-muted);
    cursor: pointer;
}

.cpt-chip:hover,
.cpt-chip.is-active {
    border-color: var(--cpt-blue);
    color: var(--cpt-blue-dark);
    background: var(--cpt-tint);
}

.cpt-hint {
    margin: .75rem 0 0;
    font-size: .875rem;
    color: var(--cpt-muted);
}

/* buttons */

.cpt-go {
    display: block;
    width: 100%;
    margin-top: 1.25rem;
    padding: .95rem 1rem;
    border: 0;
    border-radius: 10px;
    background: var(--cpt-red);
    color: #fff;
    font: inherit;
    font-size: 1.08rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .05s;
}

.cpt-go:hover:not(:disabled) {
    background: var(--cpt-red-dark);
}

.cpt-go:active:not(:disabled) {
    transform: translateY(1px);
}

.cpt-go:disabled {
    background: #cbd5e0;
    color: #fff;
    cursor: not-allowed;
}

.cpt-go.is-secondary {
    background: #2d3748;
}

.cpt-go.is-secondary:hover:not(:disabled) {
    background: #1a202c;
}

/* progress */

.cpt-progress {
    margin-top: 1.25rem;
}

.cpt-bar {
    height: 10px;
    border-radius: 999px;
    background: var(--cpt-line);
    overflow: hidden;
}

.cpt-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--cpt-blue), #805ad5);
    transition: width .2s;
}

.cpt-status {
    margin: .5rem 0 0;
    font-size: .9rem;
    color: var(--cpt-muted);
    text-align: center;
}

/* result */

.cpt-result {
    margin-top: 1.25rem;
}

.cpt-sizes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
}

.cpt-size {
    padding: .75rem .5rem;
    border: 1px solid var(--cpt-line);
    border-radius: 10px;
    text-align: center;
    background: #fff;
}

.cpt-size span {
    display: block;
    font-size: .8rem;
    color: var(--cpt-soft);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.cpt-size strong {
    display: block;
    font-size: 1.25rem;
}

.cpt-size.is-good {
    background: var(--cpt-green-bg);
    border-color: #9ae6b4;
}

.cpt-size.is-good strong {
    color: var(--cpt-green);
}

.cpt-checks {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: grid;
    gap: .4rem;
}

.cpt-checks li {
    display: flex;
    gap: .55rem;
    align-items: flex-start;
    font-size: .92rem;
    color: var(--cpt-muted);
}

.cpt-checks li::before {
    content: "";
    flex: 0 0 18px;
    height: 18px;
    margin-top: 2px;
    border-radius: 50%;
    background: #c6f6d5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%232f855a'%3E%3Cpath d='M8.1 13.6 4.5 10l-1.2 1.2 4.8 4.8L17 7.1l-1.2-1.2z'/%3E%3C/svg%3E") center/14px no-repeat;
}

.cpt-checks li.is-warn::before {
    background: #feebc8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23975a16'%3E%3Cpath d='M9 4h2v8H9zm0 10h2v2H9z'/%3E%3C/svg%3E") center/14px no-repeat;
}

.cpt-checks strong {
    color: var(--cpt-ink);
}

.cpt-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    margin-top: 1rem;
}

.cpt-actions .cpt-go {
    width: auto;
    flex: 1 1 260px;
    margin-top: 0;
}

.cpt-note {
    margin-top: 1rem;
    padding: .9rem 1rem;
    border-radius: 10px;
    background: var(--cpt-amber-bg);
    border: 1px solid #fbd38d;
    font-size: .92rem;
    color: #744210;
}

.cpt-note p {
    margin: 0 0 .6rem;
}

.cpt-note .cpt-go {
    margin-top: .4rem;
}

.cpt-error {
    margin: 1rem 0 0;
    padding: .8rem 1rem;
    border-radius: 10px;
    background: #fff5f5;
    border: 1px solid #feb2b2;
    color: #9b2c2c;
    font-size: .92rem;
}

.cpt-error a {
    color: #9b2c2c;
    font-weight: 700;
}

.cpt-privacy {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .35rem 1.1rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
    font-size: .82rem;
    color: var(--cpt-soft);
}

.cpt-privacy li::before {
    content: "✓ ";
    color: var(--cpt-green);
    font-weight: 700;
}

@media (max-width: 560px) {
  .cpt {
      padding: 1rem;
      border-radius: 12px;
      margin-top: .75rem;
  }
  .cpt-drop {
      min-height: 160px;
  }
  .cpt-seg {
      grid-template-columns: repeat(2, 1fr);
  }
  .cpt-sizes strong {
      font-size: 1.05rem;
  }
}

/* ---------- compress landing-page article (.cpa) ---------- */

.cp-head {
    text-align: center;
    max-width: 820px;
    margin: .5rem auto 0;
}

.cp-head h1 {
    margin: .25rem 0 .5rem;
    font-size: clamp(1.6rem, 3.6vw, 2.3rem);
    line-height: 1.2;
    color: #1a202c;
}

.cp-head p {
    margin: 0 auto;
    max-width: 680px;
    font-size: 1.08rem;
    color: #4a5568;
}

.cpa {
    max-width: 820px;
    margin: 0 auto 2.5rem;
    color: #2d3748;
    font-size: 1.02rem;
    line-height: 1.7;
}

.cpa h2 {
    margin: 2.4rem 0 .75rem;
    font-size: 1.5rem;
    line-height: 1.3;
    color: #1a202c;
}

.cpa h3 {
    margin: 1.4rem 0 .4rem;
    font-size: 1.12rem;
    color: #1a202c;
}

.cpa p {
    margin: 0 0 1rem;
}

.cpa ul,
.cpa ol {
    margin: 0 0 1rem;
    padding-left: 1.35rem;
}

.cpa li {
    margin: .3rem 0;
}

.cpa a {
    color: #2b6cb0;
}

.cpa .cpa-answer {
    padding: 1rem 1.15rem;
    border-left: 4px solid #3182ce;
    background: #ebf8ff;
    border-radius: 0 10px 10px 0;
}

.cpa .cpa-answer p:last-child {
    margin-bottom: 0;
}

.cpa table {
    width: 100%;
    border-collapse: collapse;
    margin: .5rem 0 .5rem;
    font-size: .95rem;
    background: #fff;
}

.cpa th,
.cpa td {
    padding: .6rem .7rem;
    border: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

.cpa th {
    background: #f7fafc;
    font-weight: 700;
}

.cpa td.num,
.cpa th.num {
    text-align: right;
    white-space: nowrap;
}

.cpa .cpa-table {
    overflow-x: auto;
}

.cpa .cpa-cap {
    font-size: .85rem;
    color: #718096;
    margin: .25rem 0 1rem;
}

.cpa .cpa-links {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: .5rem 0 1rem;
    padding: 0;
    list-style: none;
}

.cpa .cpa-links a {
    display: inline-block;
    padding: .4rem .85rem;
    border: 1px solid #bee3f8;
    border-radius: 999px;
    background: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: .92rem;
}

.cpa .cpa-links a:hover {
    background: #ebf8ff;
}

.cpa .cpa-faq h3 {
    margin-top: 1.25rem;
}

.cpa .cpa-updated {
    font-size: .85rem;
    color: #718096;
}

/* ===================================================== 3. DESIGN SYSTEM */

/* =====================================================================
   CleanPDF design system (v3) — header, buttons, upload zones.
   These rules unify the many legacy tool templates into one look.
   Visual properties of buttons/upload zones use !important on purpose:
   legacy page stylesheets and scripts style them in many different ways.
   ===================================================================== */

:root {
    --brand: #e53e3e;
    --brand-dark: #c53030;
    --brand-soft: #fff5f5;
    --accent: #3182ce;
    --accent-dark: #2b6cb0;
    --accent-soft: #ebf8ff;
    --accent-line: #90cdf4;
    --ink: #1a202c;
    --ink-2: #2d3748;
    --muted: #4a5568;
    --soft: #718096;
    --line: #e2e8f0;
    --surface: #ffffff;
    --page-bg: #f7f9fc;
    --ok: #2f855a;
    --ok-soft: #f0fff4;
    --header-h: 64px;
    --r-sm: 8px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 18px;
    --shadow-card: 0 10px 30px -14px rgba(26, 32, 44, .22);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--page-bg);
    padding-top: var(--header-h);
}

[hidden] {
    display: none !important;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ------------------------------------------------------------------ Header (desktop) */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    height: var(--header-h);
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    backdrop-filter: saturate(160%) blur(8px);
}

.site-header-inner {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    margin-right: 12px;
    text-decoration: none;
}

.brand img {
    width: 36px;
    height: 36px;
    display: block;
}

.brand span {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.01em;
    color: #2c5282;
    white-space: nowrap;
}

.main-nav {
    flex: 1 1 auto;
    min-width: 0;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: static;
    height: var(--header-h);
    display: flex;
    align-items: center;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: var(--r-sm);
    background: transparent;
    font: 600 .95rem/1 var(--font);
    color: var(--ink-2);
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, color .15s;
}

.nav-link:hover,
.nav-item.open > .nav-link,
.nav-item:focus-within > .nav-link {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.nav-caret {
    width: 16px;
    height: 16px;
    transition: transform .15s;
}

.nav-item.open .nav-caret {
    transform: rotate(180deg);
}

.nav-cta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font: 700 .95rem/1 var(--font);
    white-space: nowrap;
    text-decoration: none;
    transition: background-color .15s;
}

.nav-cta:hover {
    background: var(--brand-dark);
    color: #fff;
}

/* mega menus */

.mega {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px -18px rgba(16, 24, 40, .28);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .15s, transform .15s, visibility 0s linear .15s;
}

.nav-item.open > .mega,
.nav-item.has-mega:hover > .mega,
.nav-item.has-mega:focus-within > .mega {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity .15s, transform .15s;
}

.mega-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 24px 8px;
    display: grid;
    gap: 8px 24px;
}

.mega-inner.mega-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.mega-inner.mega-2 {
    grid-template-columns: repeat(2, minmax(0, 220px));
}

.mega-inner.mega-3 {
    grid-template-columns: repeat(3, minmax(0, 220px));
}

.mega-head {
    margin: 0 0 6px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--soft);
}

.mega-col a {
    display: block;
    padding: 6px 8px;
    margin: 0 -8px;
    border-radius: 6px;
    font-size: .93rem;
    line-height: 1.3;
    color: var(--ink-2);
    text-decoration: none;
    white-space: nowrap;
}

.mega-col a:hover {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.mega-all {
    display: block;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 24px 18px;
    font-weight: 600;
    font-size: .9rem;
    color: var(--accent-dark);
    text-decoration: none;
}

.mega-all:hover {
    text-decoration: underline;
}

@media (max-width: 1140px) {
  .site-header-inner {
      padding: 0 16px;
      gap: 6px;
  }
  .nav-link {
      padding: 0 10px;
      font-size: .92rem;
  }
  .brand span {
      font-size: 1.2rem;
  }
  .mega-inner.mega-5 {
      gap: 8px 16px;
  }
  .mega-col a {
      font-size: .88rem;
  }
}

/* ------------------------------------------------------------------ Header (mobile) */

.mobile-header {
    display: none;
}

@media (max-width: 899px) {
  body {
      padding-top: 0;
  }
  .desktop-header {
      display: none !important;
  }
  .mobile-header {
      display: block;
      position: sticky;
      top: 0;
      z-index: 1200;
      background: #fff;
      border-bottom: 1px solid var(--line);
      box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  }
}

.mobile-bar {
    height: 56px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px 0 16px;
}

.mobile-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
    text-decoration: none;
}

.mobile-logo img {
    width: 30px;
    height: 30px;
    display: block;
}

.mobile-logo span {
    font-size: 1.15rem;
    font-weight: 800;
    color: #2c5282;
}

.m-cta {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    text-decoration: none;
    white-space: nowrap;
}

.m-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}

.m-toggle svg {
    width: 26px;
    height: 26px;
}

.m-toggle:hover {
    background: var(--accent-soft);
}

#mobileNav {
    display: none;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    border-top: 1px solid var(--line);
    background: #fff;
    padding-bottom: 12px;
}

#mobileNav.open {
    display: block;
}

#mobileNav .m-link,
.m-acc {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 50px;
    padding: 0 18px;
    border: 0;
    border-bottom: 1px solid #f1f4f8;
    background: #fff;
    text-align: left;
    font: 600 1rem/1.2 var(--font);
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
}

.m-acc .nav-caret {
    width: 18px;
    height: 18px;
}

.m-acc[aria-expanded="true"] .nav-caret {
    transform: rotate(180deg);
}

.m-panel {
    display: none;
    padding: 4px 18px 12px;
    background: #f9fbfd;
    border-bottom: 1px solid #f1f4f8;
}

.m-panel.open {
    display: block;
    max-height: none;
}

.m-head {
    margin: 12px 0 4px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--soft);
}

#mobileNav .m-panel a {
    display: block;
    padding: 9px 0;
    font-size: .97rem;
    color: var(--ink-2);
    text-decoration: none;
    border: 0;
    min-height: 0;
}

#mobileNav .m-panel a.m-all {
    color: var(--accent-dark);
    font-weight: 600;
}

@media (max-width: 380px) {
  .m-cta {
      display: none;
  }
}

/* ------------------------------------------------------------------ Buttons */

/* Primary: main actions (convert, compress, merge, download) */

body :is(.btn-primary, .modern-button.convert-btn, .modern-button.download-btn, .convert-btn, .download-btn,
         .img-conv-primary-btn, .btn-zip, .cpt-go, .ui-btn-primary) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 48px;
    padding: .8rem 1.6rem !important;
    border: 0 !important;
    border-radius: var(--r-md) !important;
    background: var(--brand) !important;
    color: #fff !important;
    font: 700 1rem/1.2 var(--font) !important;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 6px 16px -8px rgba(229, 62, 62, .65) !important;
    transition: background-color .15s, transform .05s, box-shadow .15s;
}

body :is(.btn-primary, .modern-button.convert-btn, .modern-button.download-btn, .convert-btn, .download-btn,
         .img-conv-primary-btn, .btn-zip, .cpt-go, .ui-btn-primary):hover:not(:disabled) {
    background: var(--brand-dark) !important;
    transform: none;
}

body :is(.btn-primary, .modern-button.convert-btn, .modern-button.download-btn, .convert-btn, .download-btn,
         .img-conv-primary-btn, .btn-zip, .cpt-go, .ui-btn-primary):active:not(:disabled) {
    transform: translateY(1px);
}

body :is(.btn, .modern-button, .img-conv-primary-btn, .btn-zip, .cpt-go, .ui-btn-primary, .ui-btn):disabled,
body :is(.btn, .modern-button).disabled {
    background: #cbd5e0 !important;
    color: #fff !important;
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: 1 !important;
}

body .cpt-go.is-secondary {
    background: #2d3748 !important;
    box-shadow: none !important;
}

/* Secondary: supporting actions */

body :is(.btn-secondary, .img-conv-btn-ghost, .change-files-btn, .apply-target-btn, .ui-btn-secondary) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 42px;
    padding: .6rem 1.15rem !important;
    border: 1.5px solid #cbd5e0 !important;
    border-radius: var(--r-md) !important;
    background: #fff !important;
    color: var(--ink-2) !important;
    font: 600 .95rem/1.2 var(--font) !important;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none !important;
    transition: border-color .15s, color .15s, background-color .15s;
}

body :is(.btn-secondary, .img-conv-btn-ghost, .change-files-btn, .apply-target-btn, .ui-btn-secondary):hover:not(:disabled) {
    border-color: var(--accent) !important;
    color: var(--accent-dark) !important;
    background: var(--accent-soft) !important;
    transform: none;
}

body .btn.btn-small {
    min-height: 36px;
    padding: .4rem .9rem !important;
    font-size: .875rem !important;
}

body .btn.btn-large {
    min-height: 52px;
    padding: .9rem 2rem !important;
    font-size: 1.05rem !important;
}

body .btn:not(.btn-primary):not(.btn-secondary) {
    border: 1.5px solid #cbd5e0;
    background: #fff;
    color: var(--ink-2);
    border-radius: var(--r-md);
    font-weight: 600;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Upload pill: the "Select file" button that sits inside an upload zone */

body :is(.modern-button.upload-btn, .upload-btn, .ui-drop-btn, .cpt-drop-btn) {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 44px;
    margin: .5rem auto 0 !important;
    padding: .65rem 1.5rem !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--brand) !important;
    color: #fff !important;
    font: 700 1rem/1.2 var(--font) !important;
    cursor: pointer;
    box-shadow: 0 6px 16px -8px rgba(229, 62, 62, .7) !important;
    transition: background-color .15s;
}

body :is(.modern-button.upload-btn, .upload-btn, .ui-drop-btn, .cpt-drop-btn):hover {
    background: var(--brand-dark) !important;
    transform: none !important;
}

body :is(.modern-button.upload-btn, .upload-btn, .ui-drop-btn) svg {
    width: 18px;
    height: 18px;
}

/* Small clear/remove buttons inside tools */

body :is(#clearBtn, #unifiedClearBtn, #clearAllBtn) {
    padding: .45rem .9rem !important;
    border: 1.5px solid #fed7d7 !important;
    border-radius: var(--r-sm) !important;
    background: #fff !important;
    color: #c53030 !important;
    font: 600 .875rem/1.2 var(--font) !important;
    cursor: pointer;
}

body :is(#clearBtn, #unifiedClearBtn, #clearAllBtn):hover {
    background: var(--brand-soft) !important;
}

/* Option toggles and preset chips used by image tools */

body .tool-btn {
    padding: .55rem 1rem;
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    background: #fff;
    color: var(--ink-2);
    font-weight: 600;
    cursor: pointer;
}

body .tool-btn.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-dark);
}

body .ratio-btn {
    padding: .35rem .8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: .85rem;
    cursor: pointer;
}

body .ratio-btn:hover,
body .ratio-btn.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-dark);
}

/* ------------------------------------------------------------------ Upload zones */

/* One look for every tool: dashed light-blue zone, upload icon, title, red pill, short hint. */

body :is(.ui-drop, .drop-zone, .unified-box, .img-conv-drop, .upload-card #dropZone, .cpt-drop, .upload-zone, #upload-zone, .drag-drop-area, .pdf-ocr-wrap .drop-zone) {
    position: relative;
    border: 2px dashed var(--accent-line) !important;
    border-radius: var(--r-lg) !important;
    background: #f7fbff !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}

body :is(.ui-drop, .drop-zone, .unified-box, .img-conv-drop, .upload-card #dropZone, .upload-zone):hover,
body :is(.ui-drop, .drop-zone, .unified-box, .img-conv-drop, .upload-card #dropZone, .upload-zone):focus-visible,
body :is(.ui-drop, .drop-zone, .unified-box, .img-conv-drop, .upload-card #dropZone, .upload-zone):is(.drag-over, .dragover, .is-over, .drag-active, .active) {
    border-color: var(--accent) !important;
    background: var(--accent-soft) !important;
    transform: none !important;
}

body :is(.ui-drop, .drop-zone, .upload-card #dropZone, .img-conv-drop) {
    display: block;
    padding: 2rem 1.25rem !important;
    text-align: center;
}

body .unified-box {
    max-width: 900px;
    margin: 1.5rem auto !important;
    padding: 0 !important;
    background: #fff !important;
}

body .unified-box .unified-content {
    padding: 2.25rem 1.25rem !important;
    text-align: center;
}

.ui-drop-inner,
.unified-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
}

.ui-drop-icon,
body .unified-icon svg {
    width: 48px;
    height: 48px;
    color: var(--accent);
}

body .unified-icon {
    font-size: 0 !important;
    line-height: 0;
    margin: 0 0 .35rem !important;
    color: var(--accent) !important;
}

.ui-drop-title,
body .unified-title {
    margin: .25rem 0 0 !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    line-height: 1.3;
    color: var(--ink) !important;
}

body .unified-subtitle {
    margin: .15rem auto .25rem !important;
    max-width: 520px;
    font-size: .95rem !important;
    color: var(--muted) !important;
}

.ui-drop-sub,
body .unified-helper {
    margin: .45rem 0 0 !important;
    font-size: .85rem !important;
    color: var(--soft) !important;
}

body .unified-box .compatibility-note {
    margin: 1rem auto 0 !important;
    max-width: 560px;
    text-align: left;
    font-size: .85rem;
    border-radius: var(--r-sm);
}

/* Card that hosts an upload zone (PDF-to-image family) */

body .upload-card {
    padding: 1.25rem !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--r-xl) !important;
    background: #fff !important;
    box-shadow: var(--shadow-card) !important;
}

body .upload-card.is-empty .upload-card-head {
    display: none !important;
}

/* File-selected state for legacy drop zones */

body .drop-zone .preview-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
}

body .drop-zone .preview-content .file-icon {
    font-size: 2rem;
}

body .drop-zone.has-file,
body .ui-drop.has-file {
    padding: .9rem 1.25rem !important;
}

body .ui-drop.has-file .ui-drop-icon,
body .ui-drop.has-file .ui-drop-title,
body .ui-drop.has-file .ui-drop-sub {
    display: none;
}

body .ui-drop.has-file .ui-drop-btn {
    margin-top: 0 !important;
}

/* Trust / security notes: one quiet style */

body :is(.security-alert, .trust-box) {
    max-width: 860px;
    margin: 0 auto 1.25rem !important;
    padding: .7rem 1rem !important;
    border: 1px solid #c6f6d5 !important;
    border-radius: var(--r-md) !important;
    background: var(--ok-soft) !important;
    color: #276749 !important;
    font-weight: 600 !important;
    font-size: .92rem !important;
    text-align: center;
}

body .trust-bullets {
    list-style: none;
    margin: 0;
    padding: 0;
    font-weight: 600;
    color: #276749;
}

body .trust-bullets li {
    margin: 2px 0;
}

/* Page title block used by tool pages */

body .page-header {
    margin-bottom: 1.25rem;
    text-align: center;
}

body .page-title {
    font-size: clamp(1.6rem, 3.4vw, 2.3rem);
    line-height: 1.2;
    color: var(--ink);
    margin-bottom: .5rem;
}

body .page-subtitle {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.05rem;
    color: var(--muted);
}

body .breadcrumb a {
    color: var(--accent-dark);
}

/* Upload zone width and layout, all templates */

body :is(.ui-drop, .drop-zone, .upload-zone, #upload-zone, .img-conv-drop, .qrr-drop) {
    width: 100%;
    max-width: 860px;
    margin-left: auto !important;
    margin-right: auto !important;
}

body .upload-button-container {
    display: block;
    text-align: center;
    margin: 0 0 1.25rem;
}

body .upload-button-container > .ui-drop {
    display: block;
    width: 100%;
}

body .ui-drop .ui-drop-btn,
body .drop-zone .ui-drop-btn {
    pointer-events: none;
}

/* the whole zone is the click target */

body label.ui-drop .ui-drop-btn {
    pointer-events: auto;
}

body :is(.upload-preview-card, .qrr-drop) {
    border: 2px dashed var(--accent-line) !important;
    border-radius: var(--r-lg) !important;
    background: #f7fbff !important;
    box-shadow: none !important;
}

body .upload-preview-card:hover,
body .qrr-drop:hover,
body .qrr-drop.is-over,
body .qrr-drop.dragover {
    border-color: var(--accent) !important;
    background: var(--accent-soft) !important;
}

body .upload-instructions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    padding: 2.25rem 1.25rem !important;
    text-align: center;
}

body .upload-instructions .upload-icon {
    font-size: 0 !important;
    line-height: 0;
    margin: 0 0 .35rem !important;
}

body .upload-instructions .upload-icon svg {
    width: 48px;
    height: 48px;
    color: var(--accent);
}

body .unified-header h2 {
    font-size: 1.15rem !important;
}

/* QR reader */

body .qrr-drop .qrr-btn:not(.qrr-btn-alt) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: .65rem 1.5rem !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--brand) !important;
    color: #fff !important;
    font: 700 1rem/1.2 var(--font) !important;
    box-shadow: 0 6px 16px -8px rgba(229,62,62,.7) !important;
}

body .qrr-btn-alt,
body .qrr-mode-btn {
    min-height: 40px;
    padding: .5rem 1rem !important;
    border: 1.5px solid #cbd5e0 !important;
    border-radius: var(--r-md) !important;
    background: #fff !important;
    color: var(--ink-2) !important;
    font: 600 .92rem/1.2 var(--font) !important;
    box-shadow: none !important;
}

body .qrr-mode-btn.active {
    border-color: var(--accent) !important;
    background: var(--accent-soft) !important;
    color: var(--accent-dark) !important;
}

/* ---------- Mobile overflow guards ----------
   body is a flex column; children with "margin: auto" would otherwise size to their widest content
   and push the page wider than the phone screen. */
:where(body > main, body > section, body > article, body > .container, body > .main-container) { width: 100%; min-width: 0; }
fieldset { min-width: 0; }
img, video, canvas { max-width: 100%; }
pre, code { overflow-wrap: anywhere; }
pre { white-space: pre-wrap; }
@media (max-width: 760px) {
    main table, article table, .seo-content table, .content-section table, table.comparison-table {
        display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
    }
    h1, h2, h3, p, li { overflow-wrap: anywhere; }
}

/* ---------- Upload-zone icons: immune to page-level "zone svg" rules ---------- */
body .ui-drop-inner > svg.ui-drop-icon { display: block; width: 48px !important; height: 48px !important; margin: 0 0 .35rem !important; color: var(--accent) !important; }
body .ui-drop-btn svg { display: inline-block !important; flex: none; width: 16px !important; height: 16px !important; margin: 0 !important; color: currentColor !important; }

/* ---------- Consistent page headings on phones ---------- */
@media (max-width: 600px) {
    body main h1, body .page-title { font-size: clamp(1.55rem, 7vw, 2rem) !important; line-height: 1.2 !important; }
}

/* Small helper line under an upload zone */
body .tool-note { max-width: 860px; margin: .6rem auto 0 !important; text-align: center; font-size: .85rem !important; color: var(--soft) !important; }

/* QR reader: same pill button as every other upload zone */
body .qrr-drop .qrr-btn:not(.qrr-btn-alt) { width: auto !important; min-height: 44px; padding: .65rem 1.4rem !important; border-radius: 999px !important; }

/* ---------- Large-file safety notes (site.js) ---------- */
.safe-note { position: relative; max-width: 860px; margin: .9rem auto; padding: .85rem 2.6rem .85rem 1rem; border: 1px solid var(--accent-line); border-radius: var(--r-md); background: var(--accent-soft); color: #2a4365; font-size: .92rem; line-height: 1.5; text-align: left; }
.safe-note.is-warn { border-color: #f6ad55; background: #fffaf0; color: #7b341e; }
.safe-note p { margin: 0 0 .2rem; }
.safe-note a { color: inherit; text-decoration: underline; }
.safe-btn { margin: .5rem .5rem 0 0; min-height: 40px; padding: .45rem 1rem; border: 1px solid #cbd5e0; border-radius: var(--r-md); background: #fff; color: #2d3748; font: inherit; font-weight: 600; cursor: pointer; }
.safe-btn.is-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.safe-btn.is-primary:hover { background: var(--brand-dark); }
.safe-close { position: absolute; top: .35rem; right: .45rem; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.safe-close:hover { background: rgba(0, 0, 0, .06); }
