/* ===================================
   Design Tokens
   Quiet-professional system: neutral surfaces, one blue accent,
   ink-black primary actions, hairline borders instead of heavy shadows.
   =================================== */
:root {
    color-scheme: light;

    /* Accent - links, focus, active states, sliders */
    --primary: #2f6feb;
    --primary-dark: #2456c0;
    --primary-light: #6a9bf5;
    --primary-soft: rgba(47, 111, 235, 0.10);
    --secondary: #6d5bd0;
    --accent: #0f9d76;
    --accent-dark: #0b7a5c;

    /* Ink - primary buttons read as near-black, not coloured */
    --ink: #0b0d10;
    --ink-hover: #22262d;
    --on-ink: #ffffff;

    /* Surfaces */
    --background: #ffffff;
    --surface: #fafafa;
    --surface-2: #f4f4f5;
    --surface-3: #e4e4e7;

    /* Text - secondary sits at 7.4:1, tertiary at 4.6:1 on white */
    --text: #09090b;
    --text-secondary: #52525b;
    --text-tertiary: #71717a;

    --border: #e4e4e7;
    --border-light: #f1f1f3;
    --border-strong: #d4d4d8;

    --success: #0f9d76;
    --warning: #b45309;
    --error: #dc2626;
    --info: #2f6feb;

    /* Spacing - 4px grid */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Typography - Inter when present locally, else the platform UI face */
    --font-sans: 'Inter var', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI Variable Text',
        'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Consolas, 'Liberation Mono', monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: clamp(2.25rem, 1.2rem + 4.4vw, 3.5rem);

    /* Elevation - restrained; borders carry most of the separation */
    --shadow-sm: 0 1px 2px rgba(9, 9, 11, 0.05);
    --shadow-md: 0 1px 2px rgba(9, 9, 11, 0.04), 0 4px 12px rgba(9, 9, 11, 0.06);
    --shadow-lg: 0 2px 4px rgba(9, 9, 11, 0.04), 0 12px 28px rgba(9, 9, 11, 0.08);
    --shadow-xl: 0 4px 8px rgba(9, 9, 11, 0.04), 0 24px 48px rgba(9, 9, 11, 0.10);
    --shadow-2xl: 0 8px 16px rgba(9, 9, 11, 0.06), 0 32px 64px rgba(9, 9, 11, 0.14);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.25rem;
    --radius-full: 9999px;

    --transition-fast: 140ms cubic-bezier(0.2, 0, 0.2, 1);
    --transition-base: 220ms cubic-bezier(0.2, 0, 0.2, 1);
    --transition-slow: 320ms cubic-bezier(0.2, 0, 0.2, 1);

    /* Layout */
    --container: 1120px;
    --tap: 44px;

    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* Dark Mode - neutral charcoal rather than navy */
[data-theme="dark"] {
    color-scheme: dark;

    --primary: #6a9bf5;
    --primary-dark: #4f86ef;
    --primary-light: #93b7f8;
    --primary-soft: rgba(106, 155, 245, 0.14);

    --ink: #f4f4f5;
    --ink-hover: #d9d9de;
    --on-ink: #09090b;

    --background: #0b0c0e;
    --surface: #131518;
    --surface-2: #1c1f23;
    --surface-3: #2a2e34;

    --text: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-tertiary: #8a8a93;

    --border: #26292e;
    --border-light: #1c1f23;
    --border-strong: #3a3f46;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 12px 28px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 4px 8px rgba(0, 0, 0, 0.45), 0 24px 48px rgba(0, 0, 0, 0.55);
    --shadow-2xl: 0 8px 16px rgba(0, 0, 0, 0.5), 0 32px 64px rgba(0, 0, 0, 0.6);
}

/* ===================================
   Reset & Base Styles
   =================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scrollbar-gutter: stable;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv02' 1, 'cv03' 1, 'cv04' 1, 'cv11' 1;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    letter-spacing: -0.021em;
    line-height: 1.15;
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

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

img {
    height: auto;
}

button {
    font-family: inherit;
    cursor: pointer;
}

a {
    color: inherit;
}

::selection {
    background: var(--primary-soft);
    color: var(--text);
}

/* One consistent focus ring everywhere */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) {
    outline: none;
}

/* Skip link for keyboard and screen-reader users */
.skip-link {
    position: absolute;
    left: var(--space-md);
    top: -100px;
    z-index: var(--z-tooltip);
    padding: var(--space-sm) var(--space-lg);
    background: var(--ink);
    color: var(--on-ink);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-md);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===================================
   Utility Classes
   =================================== */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.hidden {
    display: none !important;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    min-height: var(--tap);
    padding: 0.625rem var(--space-lg);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: -0.005em;
    text-decoration: none;
    white-space: nowrap;
    /* colour-only transitions keep hover from shifting layout */
    transition: background-color var(--transition-fast), border-color var(--transition-fast),
        color var(--transition-fast), box-shadow var(--transition-fast);
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--ink-hover);
}

.btn-secondary {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--surface-3);
}

.btn-secondary-outline {
    background: var(--background);
    color: var(--text);
    border-color: var(--border-strong);
}

.btn-secondary-outline:hover {
    background: var(--surface-2);
    border-color: var(--text-tertiary);
}

.btn-large {
    min-height: 3rem;
    padding: 0.8125rem var(--space-xl);
    font-size: var(--text-base);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===================================
   Header
   =================================== */
.header {
    position: sticky;
    top: 0;
    background: color-mix(in srgb, var(--background) 82%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: var(--z-sticky);
}

[data-theme="dark"] .header {
    background: color-mix(in srgb, var(--background) 78%, transparent);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-md) 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: var(--text-xl);
}

.logo-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logo-icon {
    font-size: var(--text-3xl);
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    padding: 0 var(--space-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 500;
    transition: color var(--transition-fast);
}

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

/* ===================================
   Hero Section
   =================================== */
.hero {
    position: relative;
    padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem);
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: var(--text-5xl);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.035em;
    margin-bottom: var(--space-lg);
}

.hero-subtitle {
    font-size: var(--text-lg);
    line-height: 1.65;
    color: var(--text-secondary);
    max-width: 60ch;
    margin: 0 auto var(--space-2xl);
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.hero-badges {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.375rem 0.75rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-secondary);
}

/* Hero Background Animation */
.hero-bg {
    display: none;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.hero-shape-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.hero-shape-2 {
    width: 200px;
    height: 200px;
    background: var(--secondary);
    top: 60%;
    right: 10%;
    animation-delay: 5s;
}

.hero-shape-3 {
    width: 150px;
    height: 150px;
    background: var(--accent);
    bottom: 20%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* ===================================
   Features Section
   =================================== */
.features {
    padding: var(--space-3xl) 0;
    background: var(--surface);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-title {
    font-size: clamp(1.625rem, 1rem + 2.2vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.028em;
    margin-bottom: var(--space-md);
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

.feature-card {
    padding: var(--space-xl);
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.feature-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-md);
}

.feature-title {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===================================
   How It Works Section
   =================================== */
.how-it-works {
    padding: var(--space-3xl) 0;
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-md);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    font-weight: 700;
}

.step-title {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.step-description {
    color: var(--text-secondary);
}

.step-arrow {
    font-size: var(--text-3xl);
    color: var(--primary);
}

.cta-section {
    text-align: center;
}

/* ===================================
   FAQ Section
   =================================== */
.faq {
    padding: var(--space-3xl) 0;
    background: var(--surface);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-xl);
}

.faq-item {
    padding: var(--space-lg);
    background: var(--background);
    border-radius: var(--radius-lg);
}

.faq-question {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.faq-answer {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===================================
   Footer
   =================================== */
.footer {
    padding: var(--space-3xl) 0 var(--space-xl);
    background: var(--surface-2);
}

/* Two children: the brand block and the link grid */
.footer-content {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
    max-width: 32ch;
}

.footer-description {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.65;
}

/* The three link columns sit side by side */
.footer-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-xl) var(--space-lg);
}

.footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
}

.footer-heading {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: var(--space-sm);
}

.footer-link {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    text-align: center;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

/* ===================================
   App Page Styles
   =================================== */
.app-page {
    background: var(--surface);
    min-height: 100vh;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background: color-mix(in srgb, var(--background) 85%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--border);
    /* .header-content already supplies the vertical padding; adding more here
       made the app header 16px taller than the landing one */
    padding: 0;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--tap);
    height: var(--tap);
    padding: 0;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--surface-2);
    transform: scale(1.1);
}

.app-main {
    padding: var(--space-2xl) 0;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.section-content {
    max-width: 900px;
    margin: 0 auto;
}

.section-nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

/* ===================================
   Drop Zone
   =================================== */
.drop-zone {
    border: 3px dashed var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl);
    text-align: center;
    transition: all var(--transition-base);
    background: var(--background);
}

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

.drop-zone-icon {
    font-size: 4rem;
    margin-bottom: var(--space-md);
}

.drop-zone-title {
    font-size: var(--text-2xl);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.drop-zone-text {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.drop-zone-hint {
    margin-top: var(--space-lg);
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

/* ===================================
   Image Preview
   =================================== */
.image-preview-container {
    margin-top: var(--space-2xl);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.preview-title {
    font-size: var(--text-xl);
    font-weight: 600;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface-2);
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: var(--space-xs);
    right: var(--space-xs);
    width: 28px;
    height: 28px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: var(--text-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.preview-item:hover .preview-remove {
    opacity: 1;
}

/* ===================================
   Dimension Selection
   =================================== */
.dimension-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    border-bottom: 2px solid var(--border);
}

.tab-btn {
    padding: var(--space-md) var(--space-lg);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    margin-bottom: -2px;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.dimension-input-group {
    display: flex;
    align-items: flex-end;
    gap: var(--space-md);
    padding: var(--space-xl);
    background: var(--background);
    border-radius: var(--radius-lg);
}

.input-group {
    flex: 1;
}

.input-group label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 500;
    font-size: var(--text-sm);
}

.input-group input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    background: var(--background);
    color: var(--text);
    transition: border-color var(--transition-fast);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.input-separator {
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--text-tertiary);
    padding-bottom: var(--space-sm);
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-md);
}

.preset-card {
    padding: var(--space-lg);
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.preset-card:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
}

.preset-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    color: white;
}

.preset-icon {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-sm);
}

.preset-name {
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.preset-size {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

.preset-card.selected .preset-size {
    color: rgba(255, 255, 255, 0.9);
}

.platform-section {
    margin-bottom: var(--space-2xl);
}

.platform-name {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.selected-dimensions-container {
    margin-top: var(--space-2xl);
    padding: var(--space-xl);
    background: var(--background);
    border-radius: var(--radius-lg);
}

.selected-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.selected-dimensions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.dimension-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
}

.dimension-tag-remove {
    background: transparent;
    border: none;
    color: white;
    font-size: var(--text-lg);
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background var(--transition-fast);
}

.dimension-tag-remove:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===================================
   Processing
   =================================== */
.processing-container {
    text-align: center;
    padding: var(--space-3xl);
    background: var(--background);
    border-radius: var(--radius-xl);
}

.processing-animation {
    margin-bottom: var(--space-2xl);
}

.spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border: 6px solid var(--surface-2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.processing-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.progress-bar-container {
    max-width: 500px;
    margin: 0 auto;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--surface-2);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width var(--transition-base);
    width: 0%;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* ===================================
   Results
   =================================== */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2xl);
}

.results-actions {
    display: flex;
    gap: var(--space-md);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.result-item {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.result-item:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.result-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.result-info {
    padding: var(--space-md);
}

.result-name {
    font-weight: 600;
    font-size: var(--text-sm);
    margin-bottom: var(--space-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-size {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-bottom: var(--space-sm);
}

.result-download {
    width: 100%;
    padding: var(--space-sm);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 600;
    transition: background var(--transition-fast);
}

.result-download:hover {
    background: var(--primary-dark);
}

/* ===================================
   Toast Notification
   =================================== */
.toast {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    padding: var(--space-md) var(--space-lg);
    background: var(--surface-2);
    color: var(--text);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-tooltip);
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: var(--success);
    color: white;
}

.toast.error {
    background: var(--error);
    color: white;
}

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

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: var(--text-3xl);
    }

    .hero-cta {
        flex-direction: column;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        flex-direction: column;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

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

    .nav-link {
        display: none;
    }

    .dimension-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .input-separator {
        text-align: center;
    }

    .results-header {
        flex-direction: column;
        gap: var(--space-md);
    }

    .results-actions {
        width: 100%;
        flex-direction: column;
    }

    .processing-stats {
        flex-direction: column;
        gap: var(--space-md);
    }

    .crop-preview-content {
        width: 95%;
        max-width: none;
    }

    .modal-footer {
        flex-direction: column;
        gap: var(--space-md);
    }

    .modal-footer-actions {
        width: 100%;
        flex-direction: column;
    }
}

/* ===================================
   Crop Preview Modal
   =================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1;
}

.modal-content {
    position: relative;
    background: var(--background);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 2;
}

.crop-preview-content {
    max-width: 1000px;
}

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

.modal-title {
    font-size: var(--text-xl);
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--surface);
    border-radius: 50%;
    font-size: var(--text-2xl);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--surface-2);
    color: var(--text);
    transform: rotate(90deg);
}

.modal-body {
    padding: var(--space-xl);
    overflow-y: auto;
    flex: 1;
}

.crop-preview-info {
    display: flex;
    gap: var(--space-xl);
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: var(--surface);
    border-radius: var(--radius-md);
}

.crop-info-item {
    display: flex;
    gap: var(--space-sm);
}

.crop-info-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.crop-info-value {
    color: var(--primary);
    font-weight: 600;
}

.crop-canvas-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto var(--space-lg);
    background: var(--surface-2);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.crop-preview-canvas {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 500px;
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Clip the infinite shadow */
    pointer-events: none;
}

.crop-frame {
    position: absolute;
    /* Subtle white border for visibility */
    border: 1px solid rgba(255, 255, 255, 0.5);
    /* Dark overlay to clearly show photo area vs background */
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75);
    pointer-events: all;
    cursor: move;
}

.crop-handle {
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--primary);
    border: 3px solid white;
    border-radius: 50%;
    pointer-events: all;
    cursor: grab;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.crop-handle:active {
    cursor: grabbing;
}

.crop-handle-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.crop-handle-center::before {
    content: '✥';
    color: white;
    font-size: var(--text-2xl);
    font-weight: bold;
}

.crop-handle-nw,
.crop-handle-ne,
.crop-handle-sw,
.crop-handle-se {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.crop-handle-nw {
    top: -10px;
    left: -10px;
    cursor: nwse-resize;
}

.crop-handle-ne {
    top: -10px;
    right: -10px;
    cursor: nesw-resize;
}

.crop-handle-sw {
    bottom: -10px;
    left: -10px;
    cursor: nesw-resize;
}

.crop-handle-se {
    bottom: -10px;
    right: -10px;
    cursor: nwse-resize;
}

.crop-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--surface);
    border-radius: var(--radius-md);
}

.crop-tools-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.tool-group {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.tool-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.btn-group {
    display: flex;
    background: var(--background);
    border-radius: var(--radius-md);
    padding: 2px;
    border: 1px solid var(--border);
}

.btn-tool {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    transition: all 0.2s;
}

.btn-tool:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

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

.zoom-controls {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--background);
    padding: 4px 8px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.btn-tool.small {
    width: 24px;
    height: 24px;
    font-size: var(--text-md);
}

#zoom-slider {
    width: 100px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

#zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s;
}

#zoom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

#zoom-value {
    min-width: 45px;
    text-align: right;
    font-size: var(--text-sm);
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.crop-mode-toggle label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    user-select: none;
}

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

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.modal-footer-actions {
    display: flex;
    gap: var(--space-sm);
}

/* ===================================
   Watermark Step
   =================================== */
.wm-switch {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-left: auto;
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: border-color var(--transition-fast);
}

.wm-switch:hover {
    border-color: var(--primary);
}

.wm-switch input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.wm-layout {
    display: grid;
    grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
    gap: var(--space-xl);
    align-items: start;
}

/* Preview pane */
.wm-preview-pane {
    position: sticky;
    top: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.wm-preview-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    min-height: 220px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.wm-preview-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}

.wm-preview-meta {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}

.wm-preview-select {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
}

.wm-preview-select label {
    color: var(--text-secondary);
    white-space: nowrap;
}

.wm-preview-select select {
    flex: 1;
    min-width: 0;
}

.wm-preview-note {
    font-size: var(--text-xs);
    line-height: 1.5;
    color: var(--text-tertiary);
}

/* Controls */
.wm-controls {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: opacity var(--transition-base);
}

.wm-controls.wm-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.wm-type-tabs {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-xs);
    background: var(--surface-2);
    border-radius: var(--radius-md);
}

.wm-type-btn {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.wm-type-btn:hover {
    color: var(--text);
}

.wm-type-btn.active {
    background: var(--primary);
    color: #ffffff;
}

.wm-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.wm-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.wm-field > label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text);
}

.wm-value {
    float: right;
    font-weight: 600;
    color: var(--primary);
}

.wm-hint {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.wm-field textarea,
.wm-field select,
.wm-preview-select select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: var(--text-sm);
    background: var(--background);
    color: var(--text);
    transition: border-color var(--transition-fast);
}

.wm-field textarea {
    resize: vertical;
    line-height: 1.5;
}

.wm-field textarea:focus,
.wm-field select:focus,
.wm-preview-select select:focus {
    outline: none;
    border-color: var(--primary);
}

.wm-field input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
    cursor: pointer;
}

.wm-field input[type="color"] {
    width: 100%;
    height: 2.6rem;
    padding: 2px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--background);
    cursor: pointer;
}

.wm-field-row {
    display: flex;
    gap: var(--space-md);
}

.wm-field-row .wm-field {
    flex: 1;
    min-width: 0;
}

.wm-field-row .wm-field-narrow {
    flex: 0 0 8rem;
}

.wm-field-row .wm-field-color {
    flex: 0 0 5rem;
}

/* Logo picker */
.wm-logo-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--surface-2);
    border-radius: var(--radius-md);
}

.wm-logo-thumb {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-xs);
}

.wm-logo-meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-width: 0;
    flex: 1;
}

.wm-logo-meta > span {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wm-logo-actions {
    display: flex;
    gap: var(--space-sm);
}

.wm-logo-actions .btn {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-sm);
}

/* Position picker */
.wm-position-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.wm-position-grid {
    display: grid;
    grid-template-columns: repeat(3, 2rem);
    grid-template-rows: repeat(3, 2rem);
    gap: 4px;
    padding: 4px;
    background: var(--surface-2);
    border-radius: var(--radius-md);
}

.wm-pos {
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.wm-pos:hover {
    border-color: var(--primary-light);
}

.wm-pos.active {
    background: var(--primary);
    border-color: var(--primary);
}

.wm-pos-tile {
    padding: var(--space-sm) var(--space-lg);
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
}

.wm-pos-tile.active {
    color: #ffffff;
}

.wm-field-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-light);
}

.wm-check {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    cursor: pointer;
}

.wm-check input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.wm-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

@media (max-width: 860px) {
    .wm-layout {
        grid-template-columns: 1fr;
    }

    .wm-preview-pane {
        position: static;
    }

    .wm-controls {
        padding: var(--space-lg);
    }

    /* Font gets its own row; weight and colour share the next one. Without an
       explicit basis the font select collapses to nothing next to the two
       fixed-width fields. */
    .wm-field-row {
        flex-wrap: wrap;
        gap: var(--space-sm) var(--space-md);
    }

    .wm-field-row > .wm-field {
        flex: 1 1 100%;
    }

    .wm-field-row .wm-field-narrow {
        flex: 1 1 6rem;
    }

    .wm-field-row .wm-field-color {
        flex: 0 0 6rem;
    }

    .wm-actions {
        flex-direction: column-reverse;
    }

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

/* ===================================
   Output Settings Panel
   Shared by the crop/resize tool and the watermark studio
   =================================== */
.ws-output {
    margin-top: var(--space-xl);
    padding: var(--space-xl);
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.ws-output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

.ws-output-title {
    font-size: var(--text-lg);
    font-weight: 600;
}

.ws-output-header .btn {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-sm);
}

.ws-output-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    align-items: start;
}

.ws-output-grid input[type="text"] {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: var(--text-sm);
    background: var(--background);
    color: var(--text);
    transition: border-color var(--transition-fast);
}

.ws-output-grid input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

@media (max-width: 860px) {
    .ws-output {
        padding: var(--space-lg);
    }
}

/* ===================================
   Tool Picker (landing page)
   =================================== */
.tools {
    padding: var(--space-3xl) 0;
    background: var(--surface);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-lg);
}

.tool-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-xl);
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
}

.tool-card:hover {
    border-color: var(--text-tertiary);
    box-shadow: var(--shadow-md);
}

.tool-icon {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-md);
}

.tool-title {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.tool-description {
    flex: 1;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.tool-link {
    font-weight: 600;
    color: var(--primary);
}

/* ===================================
   Mode Switch (inside the app)
   =================================== */
.mode-switch {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.mode-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-lg);
    text-align: left;
    text-decoration: none;
    color: inherit;
    font-family: inherit;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mode-card:hover {
    border-color: var(--primary-light);
}

.mode-card.active {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, var(--background));
}

.mode-icon {
    font-size: var(--text-2xl);
}

.mode-name {
    font-weight: 600;
    font-size: var(--text-base);
}

.mode-card.active .mode-name {
    color: var(--primary);
}

.mode-desc {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: 1.5;
}

@media (max-width: 860px) {
    .mode-switch {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .mode-card {
        padding: var(--space-md);
    }
}

/* ===================================
   Icon System
   Inline SVG, 24px grid, stroke follows currentColor
   =================================== */
.ico {
    width: 1.25rem;
    height: 1.25rem;
    flex: none;
}

.logo-icon .ico {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary);
}

.feature-icon,
.tool-icon,
.mode-icon,
.preset-icon,
.drop-zone-icon {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
}

.feature-icon .ico,
.tool-icon .ico {
    width: 1.75rem;
    height: 1.75rem;
    color: var(--primary);
}

.mode-icon .ico {
    width: 1.5rem;
    height: 1.5rem;
}

.mode-card.active .mode-icon .ico {
    color: var(--primary);
}

.preset-icon .ico {
    width: 2rem;
    height: 2rem;
    color: var(--text-tertiary);
}

.preset-card:hover .preset-icon .ico,
.preset-card.selected .preset-icon .ico {
    color: var(--primary);
}

.drop-zone-icon .ico {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--text-tertiary);
}

.theme-icon {
    display: inline-flex;
}

.theme-icon .ico {
    width: 1.125rem;
    height: 1.125rem;
}

.theme-icon .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-icon .icon-sun {
    display: block;
}

[data-theme="dark"] .theme-icon .icon-moon {
    display: none;
}

.theme-toggle:hover {
    background: var(--surface-3);
    color: var(--text);
}

/* ===================================
   Advertising Slots
   Every slot reserves its height up front so filling it cannot
   push content around (no layout shift).
   =================================== */
.ad-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    margin: var(--space-2xl) auto;
    width: 100%;
}

.ad-slot::before {
    content: 'Advertisement';
    align-self: center;
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.ad-slot-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background: var(--surface-2);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    color: var(--text-tertiary);
    font-size: var(--text-xs);
}

/* Leaderboard: 320x100 on phones, 728x90 from tablet up */
.ad-leaderboard .ad-slot-inner {
    height: 100px;
    max-width: 320px;
}

/* In-content rectangle */
.ad-rectangle .ad-slot-inner {
    height: 250px;
    max-width: 300px;
}

/* Compact strip used between app steps */
.ad-strip {
    margin: var(--space-xl) auto;
}

.ad-strip .ad-slot-inner {
    height: 100px;
    max-width: 320px;
}

@media (min-width: 768px) {

    .ad-leaderboard .ad-slot-inner,
    .ad-strip .ad-slot-inner {
        height: 90px;
        max-width: 728px;
    }

    .ad-rectangle .ad-slot-inner {
        height: 280px;
        max-width: 336px;
    }
}

/* Keep ads out of the way while the user is mid-task */
.section:not(.active) .ad-slot {
    display: none;
}

/* ===================================
   Partners
   =================================== */
.partners {
    padding: var(--space-2xl) 0;
    border-top: 1px solid var(--border);
}

.partners-title {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    text-align: center;
    margin-bottom: var(--space-lg);
}

.partners-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm) var(--space-md);
}

.partner-link {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    padding: var(--space-sm) var(--space-lg);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    transition: background-color var(--transition-fast), color var(--transition-fast),
        border-color var(--transition-fast);
}

.partner-link:hover {
    background: var(--surface-3);
    border-color: var(--border-strong);
    color: var(--text);
}

/* ===================================
   Content Pages (about, contact, terms, ...)
   =================================== */
.page {
    padding: var(--space-3xl) 0 var(--space-2xl);
}

.page-header {
    max-width: 46rem;
    margin: 0 auto var(--space-2xl);
}

.page-eyebrow {
    display: block;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.page-title {
    font-size: clamp(2rem, 1.3rem + 2.6vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-md);
}

.page-lead {
    font-size: var(--text-lg);
    line-height: 1.65;
    color: var(--text-secondary);
}

.prose {
    max-width: 46rem;
    margin: 0 auto;
    font-size: var(--text-base);
    line-height: 1.75;
    color: var(--text-secondary);
}

.prose h2 {
    font-size: var(--text-2xl);
    color: var(--text);
    margin: var(--space-2xl) 0 var(--space-sm);
}

.prose h3 {
    font-size: var(--text-lg);
    color: var(--text);
    margin: var(--space-xl) 0 var(--space-xs);
}

.prose p,
.prose ul,
.prose ol {
    margin-bottom: var(--space-md);
}

.prose ul,
.prose ol {
    padding-left: 1.25rem;
}

.prose li {
    margin-bottom: var(--space-xs);
}

.prose a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose strong {
    color: var(--text);
    font-weight: 600;
}

.prose .updated {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.faq-list {
    max-width: 46rem;
    margin: 0 auto;
}

.faq-list details {
    border-bottom: 1px solid var(--border);
    padding: var(--space-md) 0;
}

.faq-list summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    min-height: var(--tap);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

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

.faq-list summary::after {
    content: '+';
    font-size: var(--text-xl);
    font-weight: 400;
    color: var(--text-tertiary);
}

.faq-list details[open] summary::after {
    content: '\2212';
}

.faq-list details p {
    padding-top: var(--space-sm);
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 404 */
.notfound {
    text-align: center;
    padding: var(--space-4xl) 0;
}

.notfound-code {
    font-size: clamp(4rem, 3rem + 8vw, 7rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 1;
    color: var(--surface-3);
}

.notfound-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-xl);
}

/* ===================================
   Mobile Refinements
   =================================== */
@media (max-width: 767px) {
    .container {
        padding: 0 var(--space-md);
    }

    .logo-text {
        font-size: var(--text-base);
        white-space: nowrap;
    }

    .hero {
        padding-bottom: var(--space-lg);
    }

    .ad-slot {
        margin: var(--space-xl) auto;
    }

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

    .nav .nav-link {
        display: none;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-cta .btn {
        width: 100%;
    }

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

    .steps {
        flex-direction: column;
    }

    .step-arrow {
        display: none;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-lg);
    }

    .results-header,
    .preview-header,
    .selected-header {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .results-actions {
        width: 100%;
    }

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

    .dimension-input-group {
        flex-wrap: wrap;
        padding: var(--space-md);
    }

    .preset-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .dimension-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .dimension-tabs::-webkit-scrollbar {
        display: none;
    }

    .section-nav {
        flex-wrap: wrap;
    }
}

/* Modals need to stay usable on short screens */
@media (max-height: 700px) {
    .modal-content {
        max-height: 96vh;
    }
}

/* ===================================
   Header Actions & Mobile Navigation
   =================================== */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex: none;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: var(--tap);
    height: var(--tap);
    padding: 0;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    transition: background-color var(--transition-fast);
}

.nav-toggle:hover {
    background: var(--surface-3);
}

.nav-toggle .ico {
    width: 1.25rem;
    height: 1.25rem;
}

.nav-toggle .icon-close {
    display: none;
}

.nav-toggle[aria-expanded="true"] .icon-menu {
    display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
    display: block;
}

/* The header needs to anchor the dropdown panel */
.header,
.app-header {
    position: sticky;
    top: 0;
}

.header .container,
.app-header .container {
    position: relative;
}

@media (max-width: 767px) {

    .nav-toggle {
        display: inline-flex;
    }

    /* Inline nav becomes a panel hanging off the bottom of the header */
    .nav {
        position: absolute;
        top: calc(100% + var(--space-sm));
        left: var(--space-md);
        right: var(--space-md);
        z-index: var(--z-dropdown);
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-xs);
        padding: var(--space-sm);
        background: var(--background);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
    }

    .nav.open {
        display: flex;
        animation: nav-in 160ms cubic-bezier(0.2, 0, 0.2, 1);
    }

    /* The desktop rule hides nav links on small screens; inside the panel they
       are the whole point, so bring them back. */
    .nav .nav-link {
        display: flex;
        align-items: center;
        min-height: var(--tap);
        padding: 0 var(--space-md);
        border-radius: var(--radius-md);
        color: var(--text);
        font-size: var(--text-base);
        font-weight: 500;
    }

    .nav .nav-link:hover,
    .nav .nav-link:focus-visible {
        background: var(--surface-2);
    }

    .nav .nav-cta {
        width: 100%;
        margin-top: var(--space-xs);
    }

    .header-content {
        padding: var(--space-sm) 0;
    }

    .ws-header-actions {
        gap: var(--space-sm);
    }
}

@keyframes nav-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Wide phones in landscape get the inline nav back rather than a panel */
@media (max-width: 767px) and (min-width: 600px) {
    .nav {
        left: auto;
        min-width: 15rem;
    }
}

/* ===================================
   Touch Targets
   Keyed off pointer type rather than width: a small window on a desktop
   still has a mouse, a large tablet still has fingers.
   =================================== */
@media (pointer: coarse) {

    /* A 16px-tall track is very hard to grab with a thumb */
    input[type="range"] {
        height: 2.75rem;
    }

    .wm-type-btn {
        min-height: var(--tap);
    }

    .wm-position-grid {
        grid-template-columns: repeat(3, 2.5rem);
        grid-template-rows: repeat(3, 2.5rem);
    }

    .wm-pos-tile {
        min-height: 2.5rem;
    }

    .dimension-tag {
        min-height: 3rem;
        padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-md);
    }

    .dimension-tag-remove {
        width: 2.5rem;
        height: 2.5rem;
    }

    /* Without hover the remove button was invisible on touch devices,
       which made it impossible to drop a single image from the batch. */
    .preview-remove {
        opacity: 1;
        width: 2rem;
        height: 2rem;
    }

    .result-download,
    .wm-check,
    .faq-list summary {
        min-height: var(--tap);
    }

    .footer-link {
        min-height: 2.5rem;
    }
}

/* Scaling a 44px button on hover reads as jitter; the colour change is enough */
.theme-toggle:hover {
    background: var(--surface-3);
    transform: none;
}

/* The drop zone eats a lot of vertical space on a phone */
@media (max-width: 767px) {
    .drop-zone {
        padding: var(--space-xl) var(--space-md);
    }

    .drop-zone-title {
        font-size: var(--text-lg);
    }

    .wm-position-wrap {
        flex-wrap: wrap;
    }

    .wm-field-inline {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }

    .wm-field-inline .btn {
        width: 100%;
    }

    .ws-output-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   Segmented Control
   =================================== */
.seg {
    display: flex;
    gap: var(--space-xs);
    padding: var(--space-xs);
    background: var(--surface-2);
    border-radius: var(--radius-md);
}

.seg-btn {
    flex: 1;
    min-height: 2.25rem;
    padding: var(--space-xs) var(--space-sm);
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.seg-btn:hover {
    color: var(--text);
}

.seg-btn.active {
    background: var(--background);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

/* Number input with a trailing unit */
.input-suffix {
    display: flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--background);
    overflow: hidden;
}

.input-suffix:focus-within {
    border-color: var(--primary);
}

.input-suffix input {
    flex: 1;
    min-width: 0;
    padding: var(--space-sm) var(--space-md);
    border: none;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: var(--text-sm);
}

.input-suffix input:focus {
    outline: none;
}

.input-unit {
    padding: 0 var(--space-md);
    color: var(--text-tertiary);
    font-size: var(--text-sm);
    font-weight: 500;
}

@media (pointer: coarse) {
    .seg-btn {
        min-height: 2.5rem;
    }

    .input-suffix input {
        min-height: 2.5rem;
    }
}

/* ===================================
   Favicon Generator
   =================================== */
.fav-preview-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: center;
    gap: var(--space-lg);
    padding: var(--space-sm);
}

.fav-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.fav-preview canvas {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    /* keep tiny icons crisp instead of blurred by the browser */
    image-rendering: pixelated;
    background:
        linear-gradient(45deg, var(--surface-3) 25%, transparent 25%) 0 0/12px 12px,
        linear-gradient(-45deg, var(--surface-3) 25%, transparent 25%) 0 6px/12px 12px,
        linear-gradient(45deg, transparent 75%, var(--surface-3) 75%) 6px -6px/12px 12px,
        linear-gradient(-45deg, transparent 75%, var(--surface-3) 75%) -6px 0/12px 12px;
}

.fav-preview figcaption {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.code-block {
    margin: 0;
    padding: var(--space-md);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    line-height: 1.7;
    color: var(--text);
    overflow-x: auto;
    white-space: pre;
}

.wm-field input[type="text"] {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: var(--text-sm);
    background: var(--background);
    color: var(--text);
}

.wm-field input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

/* Current page in the nav */
.nav-link[aria-current="page"] {
    color: var(--text);
    font-weight: 600;
}

@media (min-width: 768px) {
    .nav-link[aria-current="page"] {
        position: relative;
    }

    .nav-link[aria-current="page"]::after {
        content: '';
        position: absolute;
        left: var(--space-sm);
        right: var(--space-sm);
        bottom: 0.5rem;
        height: 2px;
        border-radius: 2px;
        background: var(--primary);
    }
}

@media (max-width: 767px) {
    .nav .nav-link[aria-current="page"] {
        background: var(--primary-soft);
        color: var(--primary);
    }
}

/* ===================================
   Sticky Header Clearance
   --header-h is measured by nav.js; the value here is only a fallback for
   the first paint.
   =================================== */
:root {
    --header-h: 4.75rem;
}

/* The preview pane sticks below the header, not underneath it */
.wm-preview-pane {
    top: calc(var(--header-h) + var(--space-md));
    max-height: calc(100vh - var(--header-h) - var(--space-xl));
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Anchor jumps must not land behind the header either */
section[id],
[id^="tab-"],
h2[id],
h3[id] {
    scroll-margin-top: calc(var(--header-h) + var(--space-md));
}

/* ===================================
   Partnership Page
   =================================== */
.partner-hero {
    padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem);
    text-align: center;
}

.partner-hero .page-eyebrow {
    margin-bottom: var(--space-md);
}

.partner-hero-title {
    font-size: clamp(2rem, 1.1rem + 3.8vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.08;
    margin-bottom: var(--space-lg);
}

.partner-hero-lead {
    max-width: 46rem;
    margin: 0 auto var(--space-2xl);
    font-size: var(--text-lg);
    line-height: 1.65;
    color: var(--text-secondary);
}

.partner-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-md);
    max-width: 46rem;
    margin: 0 auto var(--space-md);
    padding: var(--space-lg);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
}

.partner-stat {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.partner-stat-value {
    font-size: var(--text-3xl);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--primary);
    line-height: 1;
}

.partner-stat-label {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.partner-stats-note {
    max-width: 46rem;
    margin: 0 auto var(--space-2xl);
    font-size: var(--text-sm);
    line-height: 1.6;
    color: var(--text-tertiary);
}

.partner-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
}

.partner-section {
    padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.partner-section-alt {
    background: var(--surface);
    border-block: 1px solid var(--border);
}

.partner-section .section-header {
    max-width: 44rem;
    margin: 0 auto var(--space-2xl);
    text-align: center;
}

/* Cards */
.partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-lg);
}

.partner-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.partner-card {
    padding: var(--space-xl);
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
}

.partner-card-icon {
    display: inline-flex;
    margin-bottom: var(--space-md);
    color: var(--primary);
}

.partner-card-icon .ico {
    width: 1.75rem;
    height: 1.75rem;
}

.partner-card-title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.partner-card-text {
    color: var(--text-secondary);
    line-height: 1.65;
    font-size: var(--text-sm);
}

/* Tables */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--background);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
    min-width: 36rem;
}

.data-table th,
.data-table td {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.data-table th {
    background: var(--surface-2);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table td {
    color: var(--text-secondary);
}

.data-table .num {
    white-space: nowrap;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.table-note {
    margin-top: var(--space-md);
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    text-align: center;
}

.table-note a {
    color: var(--primary);
}

.addon-title {
    margin: var(--space-2xl) 0 var(--space-md);
    font-size: var(--text-lg);
    font-weight: 600;
    text-align: center;
}

/* Pricing */
.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    /* equal heights so the three CTAs line up */
    align-items: stretch;
}

.price-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: var(--space-xl);
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
}

.price-card-featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.price-tag {
    position: absolute;
    top: calc(-1 * var(--space-sm));
    left: var(--space-xl);
    padding: 0.2rem 0.6rem;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
}

.price-name {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.price-summary {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    min-height: 2.6em;
}

.price-amount {
    font-size: var(--text-3xl);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-lg);
    line-height: 1.1;
}

.price-period {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-tertiary);
    letter-spacing: 0;
    margin-left: var(--space-xs);
}

.price-list {
    flex: 1;
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.price-list li {
    position: relative;
    padding-left: 1.5rem;
    font-size: var(--text-sm);
    line-height: 1.55;
    color: var(--text-secondary);
}

.price-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 0.75rem;
    height: 0.4rem;
    border-left: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    transform: rotate(-45deg);
}

.price-cta {
    width: 100%;
}

/* Audience */
.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-lg);
}

.audience-item {
    padding-left: var(--space-md);
    border-left: 2px solid var(--border-strong);
}

.audience-name {
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.audience-text {
    font-size: var(--text-sm);
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Contact */
.partner-contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-2xl);
    align-items: start;
}

.partner-contact .section-title {
    text-align: left;
}

.trust-list {
    list-style: none;
    padding: 0;
    margin: var(--space-xl) 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.trust-list li {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding-left: var(--space-md);
    border-left: 2px solid var(--primary);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
}

.trust-list strong {
    color: var(--text);
    font-weight: 600;
}

.contact-direct {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.contact-direct a {
    color: var(--primary);
}

.contact-direct .btn {
    margin-left: var(--space-sm);
    color: var(--text);
}

.partner-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-xl);
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
}

.form-title {
    font-size: var(--text-lg);
    font-weight: 600;
}

.partner-form input[type="text"],
.partner-form input[type="email"],
.partner-form input[type="tel"],
.partner-form textarea,
.partner-form select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: var(--text-sm);
    background: var(--background);
    color: var(--text);
    transition: border-color var(--transition-fast);
}

.partner-form textarea {
    resize: vertical;
    line-height: 1.6;
}

.partner-form input:focus,
.partner-form textarea:focus,
.partner-form select:focus {
    outline: none;
    border-color: var(--primary);
}

.req {
    color: var(--error);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
}

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

.form-note {
    font-size: var(--text-xs);
    line-height: 1.6;
    color: var(--text-tertiary);
}

@media (max-width: 860px) {
    .partner-contact {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .partner-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-lg) var(--space-md);
    }

    .partner-hero-cta {
        flex-direction: column;
    }

    .partner-hero-cta .btn {
        width: 100%;
    }

    .price-summary {
        min-height: 0;
    }

    .contact-direct .btn {
        display: block;
        margin: var(--space-md) 0 0;
    }
}

@media (pointer: coarse) {
    .partner-form input,
    .partner-form select,
    .partner-form textarea {
        min-height: 2.75rem;
    }
}

.partners-cta {
    margin-top: var(--space-lg);
    text-align: center;
    font-size: var(--text-sm);
}

.partners-cta a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.partners-cta a:hover {
    color: var(--primary);
}

/* ===================================
   Compress tool
   =================================== */
.cmp-presets {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-light);
}

.cmp-presets-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-size: var(--text-sm);
    font-weight: 500;
}

.cmp-presets-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.cmp-preset {
    min-height: var(--tap);
    padding: var(--space-sm) var(--space-lg);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast),
        color var(--transition-fast);
}

.cmp-preset:hover {
    background: var(--surface-3);
    color: var(--text);
}

.cmp-preset.active {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
}

.cmp-summary {
    margin-bottom: var(--space-lg);
    font-size: var(--text-lg);
    font-weight: 600;
}

.cmp-summary-label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    margin-right: var(--space-sm);
}

#cmp-summary {
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

/* ===================================
   OG image generator
   =================================== */
.og-canvas {
    display: block;
    width: 100%;
    height: auto;
    max-width: 520px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}
