/* ==========================================================================
   BoxFree — Reference-grade image studio
   A minimalist, professional design system for two tools: resize + cutout.
   Monochrome-forward · one indigo accent · teal tool tint · mono numerics.
   ========================================================================== */

:root {
    /* Ink + neutrals */
    --ink: #0c0c0e;
    --ink-2: #2a2a30;
    --muted: #6b6b73;
    --faint: #9a9aa2;
    --paper: #ffffff;
    --panel: #fafafa;
    --panel-2: #f4f4f5;
    --line: #ececee;
    --line-2: #e2e2e5;
    --line-3: #d4d4d8;

    /* Accents — used sparingly */
    --accent: #4f46e5;          /* indigo — primary actions, focus, resize tool */
    --accent-press: #4338ca;
    --accent-tint: #eef0fe;
    --accent-tint-2: #e4e6fd;
    --teal: #0d9488;            /* background tool identity */
    --teal-tint: #e6f5f3;
    --teal-tint-2: #d6eeeb;

    /* Dark canvas stage */
    --stage: #18181b;
    --stage-2: #202024;
    --stage-line: #2c2c31;
    --stage-ink: #e7e7ea;
    --stage-muted: #8d8d96;

    /* Status */
    --good: #16a34a;
    --bad: #dc2626;

    --radius-xs: 8px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-xs: 0 1px 2px rgba(12, 12, 14, .05);
    --shadow-sm: 0 1px 2px rgba(12, 12, 14, .04), 0 8px 24px rgba(12, 12, 14, .05);
    --shadow-md: 0 12px 40px rgba(12, 12, 14, .09);
    --shadow-lg: 0 30px 80px rgba(12, 12, 14, .14);

    --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background: var(--paper);
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: -.011em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
svg { display: block; }
[hidden] { display: none !important; }

::selection { background: var(--accent-tint-2); }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }

.shell {
    width: min(1200px, calc(100% - 48px));
    margin-inline: auto;
}

/* ── Eyebrow / kicker ─────────────────────────────────────────────────── */
.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.eyebrow > span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-tint);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid transparent;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    transition: border-color .25s var(--ease), background .25s var(--ease);
}

.site-nav.is-scrolled {
    border-color: var(--line);
    background: rgba(255, 255, 255, .85);
}

.site-nav__inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.03em;
}

.brand__mark {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--ink);
}

.brand__mark svg { width: 19px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.site-nav__links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-link {
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 600;
    transition: color .2s var(--ease), background .2s var(--ease);
}

.nav-link:hover { color: var(--ink); background: var(--panel-2); }
.nav-link.is-active { color: var(--ink); background: var(--panel-2); }

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 9px;
    color: #fff;
    background: var(--ink);
    font-size: 13px;
    font-weight: 600;
    transition: transform .2s var(--ease), opacity .2s var(--ease);
}

.nav-cta:hover { transform: translateY(-1px); opacity: .9; }
.nav-cta span { font-family: var(--mono); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.button {
    position: relative;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -.01em;
    transition: transform .18s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), opacity .2s var(--ease);
}

.button svg { width: 17px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.button--large { min-height: 50px; padding: 0 22px; font-size: 14.5px; }
.button--small { min-height: 38px; padding: 0 14px; font-size: 12.5px; }
.button--full { width: 100%; min-height: 46px; padding: 0 18px; }

.button--primary { color: #fff; background: var(--accent); box-shadow: var(--shadow-xs); }
.button--primary:hover { background: var(--accent-press); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(79, 70, 229, .25); }

.button--dark { color: #fff; background: var(--ink); }
.button--dark:hover { transform: translateY(-1px); opacity: .92; }

.button--lime { color: #fff; background: var(--teal); }
.button--lime:hover { transform: translateY(-1px); background: #0b8278; }

.button--ghost { border-color: var(--line-3); background: var(--paper); color: var(--ink); }
.button--ghost:hover { border-color: var(--ink); transform: translateY(-1px); }

.button--soft { border-color: var(--line-2); background: var(--paper); color: var(--ink); }
.button--soft:hover { border-color: var(--line-3); background: var(--panel); }

.button:disabled,
.button.is-disabled { opacity: .4; pointer-events: none; box-shadow: none; }

.button-spinner {
    width: 13px; height: 13px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.button-spinner--dark { border-color: rgba(12, 12, 14, .25); border-top-color: var(--ink); }

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

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    position: relative;
    padding: 92px 0 64px;
    overflow: hidden;
}

.hero__glow { display: none; }

.hero__grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(520px, 1.05fr);
    gap: 64px;
    align-items: center;
}

.hero__copy { max-width: 560px; }

.hero h1 {
    margin: 22px 0 22px;
    font-size: clamp(46px, 5.6vw, 76px);
    line-height: .98;
    letter-spacing: -.045em;
    font-weight: 700;
}

.hero h1 span { color: var(--accent); }
.hero h1 br + span,
.hero h1 span { display: inline; }

.hero__lead {
    max-width: 480px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin-top: 26px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
}

.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row svg { width: 16px; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ── Hero product mock — a faithful miniature of the real editor ──────── */
.product-preview {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-lg);
    background: var(--paper);
    box-shadow: var(--shadow-lg);
}

.product-preview__topbar {
    min-height: 44px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
    color: var(--faint);
    font-family: var(--mono);
    font-size: 11px;
}

.preview-dots { display: flex; gap: 6px; }
.preview-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-3); }

.preview-status { justify-self: end; display: flex; align-items: center; gap: 6px; color: var(--muted); }
.preview-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px rgba(22, 163, 74, .15); }

.product-preview__body { display: grid; grid-template-columns: 150px 1fr; min-height: 392px; }

.preview-sidebar { padding: 18px 14px; border-right: 1px solid var(--line); background: var(--panel); }

.preview-label {
    display: block;
    margin: 0 0 8px;
    color: var(--faint);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.preview-fields { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 5px; margin-bottom: 20px; }
.preview-fields b,
.preview-select {
    padding: 8px;
    border: 1px solid var(--line-2);
    border-radius: 6px;
    background: var(--paper);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
}
.preview-fields i { color: var(--faint); font-size: 10px; font-style: normal; }

.preview-select { display: flex; justify-content: space-between; margin-bottom: 22px; }

.preview-range { position: relative; height: 3px; margin-top: 14px; border-radius: 3px; background: var(--line-2); }
.preview-range::before { content: ""; position: absolute; inset: 0 28% 0 0; border-radius: 3px; background: var(--accent); }
.preview-range i {
    position: absolute; top: 50%; left: 72%;
    width: 12px; height: 12px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: var(--shadow-xs);
    transform: translate(-50%, -50%);
}

.preview-quality { display: flex; justify-content: space-between; margin-top: 9px; color: var(--faint); font-family: var(--mono); font-size: 9px; }
.preview-quality b { color: var(--ink); }

.preview-stage {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 22px;
    background: var(--stage);
    background-image:
        linear-gradient(var(--stage-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--stage-line) 1px, transparent 1px);
    background-size: 26px 26px;
}

.preview-image {
    position: relative;
    flex: 1;
    overflow: hidden;
    border-radius: 6px;
    background: linear-gradient(145deg, #c8b6f6, #8a6ef0 55%, #4f46e5);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}

.preview-orb { position: absolute; border-radius: 50%; filter: blur(4px); }
.preview-orb--one { width: 170px; height: 170px; top: -40px; right: -30px; background: rgba(255, 255, 255, .22); }
.preview-orb--two { width: 150px; height: 150px; bottom: -70px; left: -50px; background: rgba(13, 148, 136, .55); }

.preview-subject,
.remove-visual__subject {
    position: absolute;
    left: 50%;
    bottom: -4%;
    width: 44%;
    height: 80%;
    border-radius: 48% 48% 20% 20% / 28% 28% 15% 15%;
    background: #1e1b29;
    transform: translateX(-50%);
}
.preview-subject::before,
.remove-visual__subject::before {
    content: ""; position: absolute; z-index: 2; top: -8%; left: 24%;
    width: 52%; aspect-ratio: 1; border-radius: 46% 46% 50% 50%; background: #e0b48c;
}
.preview-subject::after,
.remove-visual__subject::after {
    content: ""; position: absolute; z-index: 3; top: -13%; left: 18%;
    width: 64%; height: 28%; border-radius: 55% 55% 42% 42%; background: #1b1722;
}

.crop-corner { position: absolute; width: 16px; height: 16px; border-color: #fff; border-style: solid; }
.crop-corner--tl { top: 9px; left: 9px; border-width: 2px 0 0 2px; }
.crop-corner--tr { top: 9px; right: 9px; border-width: 2px 2px 0 0; }
.crop-corner--bl { bottom: 9px; left: 9px; border-width: 0 0 2px 2px; }
.crop-corner--br { right: 9px; bottom: 9px; border-width: 0 2px 2px 0; }

.preview-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; color: var(--stage-muted); font-family: var(--mono); font-size: 10px; }
.preview-footer b { padding: 8px 13px; border-radius: 7px; color: #fff; background: var(--accent); font-family: "Manrope", sans-serif; font-size: 11px; }

/* ==========================================================================
   Section heading
   ========================================================================== */
.section-heading {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 64px;
    align-items: end;
    margin-bottom: 44px;
}

.section-heading h2,
.guide-section h2,
.faq-section h2,
.privacy-section h2 {
    margin: 16px 0 0;
    font-size: clamp(32px, 3.8vw, 50px);
    line-height: 1.02;
    letter-spacing: -.04em;
    font-weight: 700;
}

.section-heading > p { margin: 0 0 4px; color: var(--muted); font-size: 15px; line-height: 1.6; }

/* ==========================================================================
   Tools section — the two reference tools
   ========================================================================== */
.tools-section { padding: 88px 0 96px; background: var(--paper); border-top: 1px solid var(--line); }

.tool-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.feature-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-xl);
    background: var(--paper);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}

.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-3); }

.feature-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 26px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.feature-card__meta span:first-child {
    width: 26px; height: 26px;
    display: grid; place-items: center;
    border-radius: 7px;
    color: var(--accent);
    background: var(--accent-tint);
}
.feature-card--lime .feature-card__meta span:first-child { color: var(--teal); background: var(--teal-tint); }

.feature-card__visual {
    position: relative;
    height: 280px;
    margin: 0 26px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--stage);
    background-image:
        linear-gradient(var(--stage-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--stage-line) 1px, transparent 1px);
    background-size: 24px 24px;
}

.resize-visual { display: grid; place-items: center; }

.resize-visual__frame { position: absolute; border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 4px; }
.resize-visual__frame--back { width: 56%; height: 58%; top: 21%; left: 13%; opacity: .4; }
.resize-visual__frame--front {
    width: 46%; height: 74%; top: 13%; right: 15%;
    border: 1.5px solid var(--accent);
    background: linear-gradient(150deg, rgba(79, 70, 229, .35), rgba(79, 70, 229, .1));
    box-shadow: 0 18px 50px rgba(79, 70, 229, .35);
}
.resize-visual__frame--front span {
    position: absolute; top: 50%; left: 50%;
    color: #fff; font-size: 26px; font-weight: 700; letter-spacing: -.02em;
    transform: translate(-50%, -50%);
}
.resize-visual__frame--front i { position: absolute; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: var(--accent); }
.resize-visual__frame--front i:nth-of-type(1) { top: -5px; left: -5px; }
.resize-visual__frame--front i:nth-of-type(2) { top: -5px; right: -5px; }
.resize-visual__frame--front i:nth-of-type(3) { right: -5px; bottom: -5px; }

.resize-visual__size,
.remove-visual__chip {
    position: absolute;
    bottom: 16px;
    left: 16px;
    padding: 7px 11px;
    border-radius: 8px;
    color: var(--stage-ink);
    background: rgba(0, 0, 0, .5);
    border: 1px solid var(--stage-line);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.remove-visual { overflow: hidden; }
.checkerboard,
.checker-stage {
    background-color: #1f1f23;
    background-image:
        linear-gradient(45deg, #2a2a30 25%, transparent 25%),
        linear-gradient(-45deg, #2a2a30 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #2a2a30 75%),
        linear-gradient(-45deg, transparent 75%, #2a2a30 75%);
    background-size: 22px 22px;
    background-position: 0 0, 0 11px, 11px -11px, -11px 0;
}
.checkerboard { position: absolute; inset: 0 0 0 48%; }

.remove-visual__subject { z-index: 2; width: 36%; height: 72%; }

.remove-visual__wipe { position: absolute; z-index: 3; inset: 0 auto 0 48%; border-left: 1.5px solid var(--teal); }
.remove-visual__wipe::after {
    content: ""; position: absolute; top: 50%; left: -9px;
    width: 18px; height: 18px;
    border: 2px solid var(--teal);
    border-radius: 50%;
    background: #fff;
}
.remove-visual__wipe span {
    position: absolute; top: 12px; right: 10px;
    padding: 5px 8px; border-radius: 6px;
    color: var(--stage-ink); background: rgba(0, 0, 0, .55);
    font-family: var(--mono); font-size: 9px; font-weight: 600;
}

.remove-visual__chip { z-index: 5; right: 16px; left: auto; }

.feature-card__content { display: flex; flex: 1; flex-direction: column; padding: 30px 28px 28px; }

.feature-card__content h3 {
    margin: 0;
    font-size: clamp(26px, 2.6vw, 34px);
    line-height: 1.06;
    letter-spacing: -.035em;
    font-weight: 700;
}

.feature-card__content p { max-width: 440px; margin: 14px 0 20px; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* capability spec list inside cards */
.feature-spec { display: grid; gap: 0; margin: 0 0 24px; }
.feature-spec li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-top: 1px solid var(--line);
    color: var(--ink-2);
    font-size: 13px;
    list-style: none;
}
.feature-spec li svg { width: 15px; flex: 0 0 auto; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature-card--lime .feature-spec li svg { stroke: var(--teal); }
.feature-spec li b { margin-left: auto; color: var(--faint); font-family: var(--mono); font-size: 11px; font-weight: 500; }

.feature-card__link {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 18px;
    border-top: 1px solid var(--line-2);
    font-size: 13.5px;
    font-weight: 600;
}
.feature-card__link b {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: 50%;
    color: #fff; background: var(--ink);
    transition: transform .2s var(--ease);
}
.feature-card:hover .feature-card__link b { transform: translate(2px, -2px); }

/* ==========================================================================
   Stats / reference strip
   ========================================================================== */
.stat-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    margin-top: 64px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--line-2);
}
.stat-strip > div { padding: 28px 24px; background: var(--paper); }
.stat-strip dt { font-family: var(--mono); font-size: clamp(26px, 3vw, 38px); font-weight: 600; letter-spacing: -.03em; }
.stat-strip dd { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; }
.stat-unit { font-size: .5em; vertical-align: .35em; margin-left: 2px; color: var(--muted); }

/* ==========================================================================
   Use cases — minimal SEO content grid
   ========================================================================== */
.usecases { padding: 88px 0; background: var(--paper); border-top: 1px solid var(--line); }
.usecases__grid {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 64px;
}
.usecases__grid li {
    display: flex;
    gap: 14px;
    padding: 20px 0;
    border-top: 1px solid var(--line-2);
}
.usecases__grid li svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin-top: 2px;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.usecases__grid li:nth-child(even) svg { stroke: var(--teal); }
.usecases__grid li strong { display: block; font-size: 15px; letter-spacing: -.015em; }
.usecases__grid li span { display: block; margin-top: 4px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

/* ==========================================================================
   Closing CTA band
   ========================================================================== */
.cta-band { padding: 96px 0; background: var(--ink); color: #fff; text-align: center; }
.cta-band h2 {
    margin: 0 auto;
    font-size: clamp(32px, 4.2vw, 54px);
    line-height: 1.04;
    letter-spacing: -.04em;
    font-weight: 700;
    text-wrap: balance;
}
.cta-band p { margin: 18px auto 0; max-width: 44ch; color: rgba(255, 255, 255, .64); font-size: 16px; }
.cta-band__actions { justify-content: center; margin-top: 30px; }
.button--light { color: var(--ink); background: #fff; }
.button--light:hover { transform: translateY(-1px); opacity: .9; }

/* ==========================================================================
   Privacy section — quiet, minimal
   ========================================================================== */
.privacy-section { padding: 84px 0; background: var(--ink); color: #fff; }
.privacy-section__grid {
    display: grid;
    grid-template-columns: 72px 1.3fr .9fr;
    gap: 40px;
    align-items: center;
}
.privacy-icon {
    width: 64px; height: 64px;
    display: grid; place-items: center;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, .04);
}
.privacy-icon svg { width: 32px; stroke: #fff; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.privacy-section .section-kicker { color: var(--faint); }
.privacy-section h2 { margin-top: 12px; }
.privacy-section p { margin: 0; color: rgba(255, 255, 255, .66); font-size: 15px; line-height: 1.65; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { padding: 40px 0; color: rgba(255, 255, 255, .55); background: var(--ink); border-top: 1px solid rgba(255, 255, 255, .08); }
.site-footer__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; }
.brand--footer { color: #fff; }
.brand--footer .brand__mark { color: var(--ink); background: #fff; }
.site-footer p { margin: 0; font-size: 12px; }
.site-footer__links { justify-self: end; display: flex; align-items: center; gap: 18px; font-size: 12px; font-weight: 500; }
.site-footer__links span { font-family: var(--mono); font-size: 11px; }
.site-footer__links a:hover { color: #fff; }

/* ==========================================================================
   Editor page — hero
   ========================================================================== */
.editor-page { min-height: 80vh; }
.editor-hero { padding: 40px 0 28px; }

.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.back-link:hover { color: var(--ink); }

.editor-hero__grid {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 48px;
    align-items: end;
    margin-top: 28px;
}

.editor-hero h1,
.directory-heading h1 {
    margin: 16px 0 14px;
    font-size: clamp(40px, 5vw, 60px);
    line-height: 1;
    letter-spacing: -.045em;
    font-weight: 700;
}

.editor-hero__grid > div > p { max-width: 640px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

.tool-switcher {
    padding: 16px 18px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-md);
    background: var(--paper);
    box-shadow: var(--shadow-xs);
    transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.tool-switcher:hover { transform: translateY(-2px); border-color: var(--accent); }
.tool-switcher span { display: block; margin-bottom: 8px; color: var(--faint); font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.tool-switcher strong { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }

.editor-section { padding: 0 0 64px; }

.editor-shell {
    overflow: hidden;
    border: 1px solid var(--line-3);
    border-radius: var(--radius-lg);
    background: var(--paper);
    box-shadow: var(--shadow-md);
}

.editor-loading { min-height: 520px; display: grid; place-items: center; align-content: center; gap: 14px; color: var(--muted); font-size: 13px; }
.editor-loading span { width: 28px; height: 28px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .75s linear infinite; }

/* ── Editor tool bar ──────────────────────────────────────────────────── */
.editor-tool__bar {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 18px;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
}
.editor-tool__bar > div { min-width: 0; display: flex; align-items: center; gap: 10px; }
.editor-tool__bar strong { font-size: 13px; letter-spacing: -.01em; }
.editor-tool__bar div > span:last-child {
    max-width: 320px; overflow: hidden;
    color: var(--muted); font-family: var(--mono); font-size: 11px;
    text-overflow: ellipsis; white-space: nowrap;
}

.status-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.status-dot--lime { background: var(--teal); box-shadow: 0 0 0 3px var(--teal-tint); }

.editor-bar-actions, .canvas-actions, .upload-zone__actions { display: flex; align-items: center; gap: 8px; }

.text-button, .mini-action {
    border: 0; padding: 4px 8px; border-radius: 7px;
    background: transparent; color: var(--muted);
    font-size: 12px; font-weight: 600;
    transition: color .2s var(--ease), background .2s var(--ease);
}
.text-button:not(:disabled):hover { color: var(--ink); background: var(--panel-2); }
.text-button:disabled, .mini-action:disabled { opacity: .4; cursor: default; }

.pro-badge {
    padding: 4px 8px;
    border-radius: 6px;
    color: var(--accent);
    background: var(--accent-tint);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .08em;
}
.pro-badge--lime { color: var(--teal); background: var(--teal-tint); }

/* ==========================================================================
   Editor workspace
   ========================================================================== */
.editor-workspace { display: grid; grid-template-columns: 340px minmax(0, 1fr); min-height: 640px; }
.editor-workspace--pro { grid-template-columns: 372px minmax(0, 1fr); min-height: 760px; }

.control-panel { padding: 18px; border-right: 1px solid var(--line); background: var(--panel); }
.control-panel--pro {
    max-height: 760px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: var(--line-3) transparent;
    scrollbar-width: thin;
}
.control-panel--pro::-webkit-scrollbar { width: 6px; }
.control-panel--pro::-webkit-scrollbar-thumb { border-radius: 99px; background: var(--line-3); }

/* ── Upload zone ──────────────────────────────────────────────────────── */
.upload-zone {
    min-height: 168px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 22px;
    border: 1.5px dashed var(--line-3);
    border-radius: var(--radius-md);
    text-align: center;
    background: var(--paper);
    cursor: pointer;
    transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.upload-zone:hover, .upload-zone.is-dragging { border-color: var(--accent); background: var(--accent-tint); transform: translateY(-1px); }
.upload-zone--lime:hover, .upload-zone--lime.is-dragging { border-color: var(--teal); background: var(--teal-tint); }

.upload-zone__icon { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 10px; color: var(--accent); background: var(--accent-tint); }
.upload-zone--lime .upload-zone__icon { color: var(--teal); background: var(--teal-tint); }
.upload-zone__icon svg { width: 19px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.upload-zone strong { font-size: 13px; }
.upload-zone small { margin: 4px 0 14px; color: var(--muted); font-size: 11px; }

/* ── Control sections ─────────────────────────────────────────────────── */
.controls { margin-top: 8px; }
.controls[aria-disabled="true"] { opacity: .5; }

.control-section { padding: 18px 0 6px; border-top: 1px solid var(--line); }
.control-section:first-child { border-top: 0; }
.control-section__title { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.control-section__title > span {
    width: 22px; height: 22px;
    display: grid; place-items: center;
    border-radius: 6px;
    color: var(--accent); background: var(--accent-tint);
    font-family: var(--mono); font-size: 10px; font-weight: 600;
}
.editor-tool:has(.status-dot--lime) .control-section__title > span { color: var(--teal); background: var(--teal-tint); }
.control-section__title strong { font-size: 12px; letter-spacing: -.01em; }

.control-block { margin-bottom: 16px; }
.control-block > label,
.control-label-row label,
.background-detail > label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.control-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.control-label-row > span,
.control-label-row > strong { margin-bottom: 8px; font-family: var(--mono); font-size: 11px; }
.control-label-row > span { color: var(--faint); }
.control-label-row > strong { color: var(--ink); font-weight: 600; }

.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* inputs */
.select-input, .dimension-row > div, .color-field, .color-picker-row {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-xs);
    color: var(--ink);
    background: var(--paper);
    font-size: 12.5px;
    font-weight: 500;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.select-input { padding: 0 12px; outline: 0; cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%236b6b73' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center; background-size: 12px; padding-right: 30px;
}
.select-input:focus, .dimension-row > div:focus-within, .color-picker-row:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-tint);
}
.editor-tool:has(.status-dot--lime) .select-input:focus,
.editor-tool:has(.status-dot--lime) .dimension-row > div:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-tint); }

.dimension-row { display: grid; grid-template-columns: 1fr 38px 1fr; gap: 8px; align-items: center; }
.dimension-row > div { display: flex; align-items: center; padding: 0 10px; }
.dimension-row > div span { color: var(--faint); font-family: var(--mono); font-size: 10px; font-weight: 600; }
.dimension-row input {
    min-width: 0; width: 100%;
    border: 0; padding: 0 0 0 8px; outline: 0;
    background: transparent;
    font-family: var(--mono); font-size: 12.5px; font-weight: 600;
}

.ratio-lock {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-xs);
    background: var(--paper);
    color: var(--muted);
    transition: all .2s var(--ease);
}
.ratio-lock svg { width: 15px; stroke: currentColor; stroke-width: 1.7; }
.ratio-lock.is-active { color: #fff; border-color: var(--accent); background: var(--accent); }

.segmented-control { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border: 1px solid var(--line-2); border-radius: var(--radius-xs); background: var(--panel-2); }
.segmented-control button { min-height: 34px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 600; transition: all .15s var(--ease); }
.segmented-control button.is-active { color: var(--ink); background: var(--paper); box-shadow: var(--shadow-xs); }

.scale-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: -4px 0 16px; }
.scale-chips button { min-height: 32px; border: 1px solid var(--line-2); border-radius: 7px; color: var(--muted); background: var(--paper); font-family: var(--mono); font-size: 11px; font-weight: 600; transition: all .15s var(--ease); }
.scale-chips button:not(:disabled):hover { color: var(--accent); border-color: var(--accent); }

/* aspect-ratio quick chips (new) */
.ratio-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.ratio-chips button { min-height: 30px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); background: var(--paper); font-family: var(--mono); font-size: 11px; font-weight: 600; transition: all .15s var(--ease); }
.ratio-chips button:not(:disabled):hover { color: var(--accent); border-color: var(--accent); }
.ratio-chips button.is-active { color: #fff; background: var(--accent); border-color: var(--accent); }

.focal-grid { width: 96px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 5px; border: 1px solid var(--line-2); border-radius: var(--radius-xs); background: var(--paper); }
.focal-grid button { aspect-ratio: 1; border: 0; border-radius: 4px; background: var(--panel-2); transition: all .15s var(--ease); }
.focal-grid button:not(:disabled):hover { background: var(--accent-tint); }
.focal-grid button.is-active { background: var(--accent); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .6); }

.crop-controls { position: relative; display: grid; grid-template-columns: 110px 1fr; column-gap: 14px; }
.crop-controls > .control-label-row:first-child { grid-column: 1 / -1; }
.crop-controls .focal-grid { grid-row: span 2; }
.crop-controls .zoom-label { align-self: end; }
.crop-controls.is-muted { opacity: .4; pointer-events: none; }

.transform-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 16px; }
.transform-actions button {
    min-width: 0; min-height: 60px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
    border: 1px solid var(--line-2); border-radius: var(--radius-xs);
    color: var(--muted); background: var(--paper);
    font-size: 9.5px; font-weight: 600;
    transition: all .15s var(--ease);
}
.transform-actions button:not(:disabled):hover,
.transform-actions button.is-active { color: var(--ink); border-color: var(--accent); background: var(--accent-tint); }
.transform-actions svg { width: 17px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#resize-rotate-right svg { transform: scaleX(-1); }

/* color fields */
.color-field, .color-picker-row { display: flex; align-items: center; gap: 9px; padding: 0 10px; }
input[type="color"] { width: 26px; height: 26px; flex: 0 0 auto; border: 0; padding: 0; border-radius: 6px; overflow: hidden; background: transparent; cursor: pointer; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 1px solid var(--line-2); border-radius: 5px; }
.color-field span, .color-picker-row span { font-family: var(--mono); font-size: 11px; font-weight: 600; }
.color-picker-row small { margin-left: auto; color: var(--faint); font-size: 10px; }

.mini-action { display: inline-flex; align-items: center; gap: 5px; color: var(--teal); }
.mini-action:hover { background: var(--teal-tint); }
.mini-action svg { width: 13px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* range sliders — minimal: neutral track, accent thumb */
.range-input {
    width: 100%; height: 4px; display: block; appearance: none;
    border-radius: 99px; outline: none;
    background: var(--line-2);
}
.range-input::-webkit-slider-thumb {
    width: 16px; height: 16px; appearance: none;
    border: 3px solid #fff; border-radius: 50%;
    background: var(--accent);
    box-shadow: var(--shadow-xs), 0 0 0 1px var(--line-2);
    cursor: pointer; transition: transform .12s var(--ease);
}
.range-input::-webkit-slider-thumb:hover { transform: scale(1.12); }
.range-input::-moz-range-thumb { width: 16px; height: 16px; border: 3px solid #fff; border-radius: 50%; background: var(--accent); cursor: pointer; }
.range-input--lime::-webkit-slider-thumb { background: var(--teal); }
.range-input--lime::-moz-range-thumb { background: var(--teal); }
.range-hints { display: flex; justify-content: space-between; margin-top: 8px; color: var(--faint); font-family: var(--mono); font-size: 9.5px; }
.control-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

/* toggle */
.toggle-row {
    min-height: 52px;
    display: flex; align-items: center; justify-content: space-between; gap: 15px;
    margin: 0 0 12px; padding: 9px 12px;
    border: 1px solid var(--line-2); border-radius: var(--radius-xs);
    background: var(--paper); cursor: pointer;
}
.toggle-row span strong, .toggle-row span small { display: block; }
.toggle-row span strong { font-size: 11px; }
.toggle-row span small { margin-top: 3px; color: var(--muted); font-size: 9.5px; }
.toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-row > i { position: relative; width: 34px; height: 20px; flex: 0 0 auto; border-radius: 99px; background: var(--line-3); transition: background .2s var(--ease); }
.toggle-row > i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-xs); transition: transform .2s var(--ease); }
.toggle-row input:checked + i { background: var(--accent); }
.toggle-row input:checked + i::after { transform: translateX(14px); }

.target-size-row {
    min-height: 42px;
    display: flex; align-items: center; gap: 10px;
    margin: -4px 0 14px; padding: 0 12px;
    border: 1px solid var(--accent); border-radius: var(--radius-xs);
    background: var(--accent-tint);
}
.target-size-row input { min-width: 0; width: 90px; border: 0; outline: 0; background: transparent; font-family: var(--mono); font-size: 12px; font-weight: 600; }
.target-size-row span { color: var(--muted); font-family: var(--mono); font-size: 11px; }

/* brush + background mode */
.brush-toolbar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 16px; }
.brush-toolbar button {
    min-height: 60px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
    border: 1px solid var(--line-2); border-radius: var(--radius-xs);
    color: var(--muted); background: var(--paper);
    font-size: 9.5px; font-weight: 600;
    transition: all .15s var(--ease);
}
.brush-toolbar button:not(:disabled):hover { border-color: var(--teal); color: var(--ink); }
.brush-toolbar button.is-active { color: var(--teal); border-color: var(--teal); background: var(--teal-tint); }
.brush-toolbar svg { width: 17px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.background-mode-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-bottom: 14px; }
.background-mode-grid button {
    min-width: 0; min-height: 62px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
    border: 1px solid var(--line-2); border-radius: var(--radius-xs);
    color: var(--muted); background: var(--paper);
    font-size: 8.5px; font-weight: 600;
    transition: all .15s var(--ease);
}
.background-mode-grid button:not(:disabled):hover { border-color: var(--teal); }
.background-mode-grid button.is-active { color: var(--ink); border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal-tint); }

.swatch { width: 22px; height: 22px; display: block; border: 1px solid var(--line-3); border-radius: 6px; }
.swatch--transparent {
    background-color: #fff;
    background-image: linear-gradient(45deg, #d4d4d8 25%, transparent 25%), linear-gradient(-45deg, #d4d4d8 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #d4d4d8 75%), linear-gradient(-45deg, transparent 75%, #d4d4d8 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0;
}
.swatch--white { background: #fff; }
.swatch--color { background: linear-gradient(135deg, var(--teal), var(--accent)); }
.swatch--blur { background: radial-gradient(circle, #fff 0, #aab8e6 30%, #6d7bc4 70%); filter: blur(.5px); }
.swatch--image { background: linear-gradient(155deg, var(--teal) 0 40%, var(--accent) 40%); }

.background-detail { margin-bottom: 14px; }
.inline-upload {
    width: 100%; min-height: 42px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    overflow: hidden;
    border: 1px dashed var(--line-3); border-radius: var(--radius-xs);
    background: var(--paper);
    font-size: 11px; font-weight: 600;
    text-overflow: ellipsis; white-space: nowrap;
    transition: border-color .2s var(--ease);
}
.inline-upload:hover { border-color: var(--teal); }
.inline-upload svg { width: 16px; flex: 0 0 auto; stroke: currentColor; stroke-width: 1.6; }

/* ==========================================================================
   Canvas panel
   ========================================================================== */
.canvas-panel { min-width: 0; display: grid; grid-template-rows: 48px minmax(440px, 1fr) 78px; background: var(--stage); }
.canvas-panel--pro { grid-template-rows: 52px minmax(550px, 1fr) 86px; }

.canvas-panel__top {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    padding: 0 18px;
    border-bottom: 1px solid var(--stage-line);
    background: var(--stage-2);
    color: var(--stage-muted);
    font-family: var(--mono); font-size: 10px; font-weight: 500;
    letter-spacing: .06em; text-transform: uppercase;
}
.canvas-actions { justify-content: flex-end; }

.tool-chip { padding: 5px 9px; border-radius: 6px; color: var(--teal); background: var(--teal-tint); font-family: var(--mono); font-size: 9px; letter-spacing: .04em; }
.canvas-panel__top #resize-preview-meta,
.canvas-panel__top #remove-preview-meta { color: var(--stage-ink); }

.canvas-stage {
    position: relative;
    min-width: 0; min-height: 440px;
    display: grid; place-items: center;
    overflow: auto;
    padding: 36px;
    background:
        radial-gradient(circle at 1px 1px, var(--stage-line) 1px, transparent 0);
    background-size: 28px 28px;
    background-color: var(--stage);
}
.canvas-panel--pro .canvas-stage { min-height: 550px; }

.canvas-stage canvas {
    max-width: 100%;
    max-height: 520px;
    width: auto; height: auto;
    background: transparent;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 20px 50px rgba(0, 0, 0, .5);
    cursor: crosshair;
    transition: max-height .15s var(--ease);
}

.canvas-empty { display: flex; flex-direction: column; align-items: center; color: var(--stage-muted); text-align: center; }
.canvas-empty svg { width: 36px; margin-bottom: 16px; stroke: var(--stage-muted); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.canvas-empty strong { color: var(--stage-ink); font-size: 13px; }
.canvas-empty span { margin-top: 5px; font-size: 11px; }

.canvas-panel__footer {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 0 18px;
    border-top: 1px solid var(--stage-line);
    background: var(--stage-2);
}
.canvas-panel__footer > div { min-width: 0; }
.canvas-panel__footer--stats { min-height: 86px; }

.export-stats { display: flex; align-items: center; gap: 26px; }
.export-stats > div { min-width: 84px; }
.export-stats > div:first-child { max-width: 240px; }
.export-stats span, .export-stats strong { display: block; }
.export-stats span { margin: 0 0 5px; color: var(--stage-muted); font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.export-stats strong { max-width: 220px; overflow: hidden; color: var(--stage-ink); font-family: var(--mono); font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

.canvas-panel__footer .button { min-height: 40px; flex: 0 0 auto; padding: 0 16px; }

/* floating zoom + compare controls on the stage */
.stage-toolbar {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border: 1px solid var(--stage-line);
    border-radius: 999px;
    background: rgba(24, 24, 27, .82);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.stage-toolbar button {
    min-width: 30px; height: 30px;
    display: grid; place-items: center;
    padding: 0 8px;
    border: 0; border-radius: 999px;
    color: var(--stage-ink); background: transparent;
    font-family: var(--mono); font-size: 12px; font-weight: 600;
    transition: background .15s var(--ease);
}
.stage-toolbar button:hover { background: rgba(255, 255, 255, .1); }
.stage-toolbar button svg { width: 15px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stage-toolbar .stage-zoom-value { min-width: 50px; text-align: center; pointer-events: none; }
.stage-toolbar .sep { width: 1px; height: 18px; margin: 0 3px; background: var(--stage-line); }

.compare-button {
    display: inline-flex; align-items: center; gap: 6px;
    border: 0; padding: 7px 11px; border-radius: 999px;
    color: var(--stage-ink); background: rgba(255, 255, 255, .08);
    border: 1px solid var(--stage-line);
    font-size: 10px; font-weight: 600;
}
.compare-button:hover { background: rgba(255, 255, 255, .14); }
.compare-button svg { width: 13px; stroke: currentColor; stroke-width: 1.6; }

/* brush cursor that follows the pointer */
.brush-cursor {
    position: absolute;
    z-index: 7;
    border: 1.5px solid #fff;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(0, 0, 0, .4);
    pointer-events: none;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}
.canvas-stage--brush canvas.is-brushing { cursor: none; touch-action: none; }
.canvas-stage--brush canvas { touch-action: none; }

/* draggable focal point on the resizer canvas */
.focal-handle {
    position: absolute;
    z-index: 6;
    width: 26px; height: 26px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: rgba(79, 70, 229, .22);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 2px 10px rgba(0, 0, 0, .45);
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.focal-handle::after {
    content: "";
    position: absolute; top: 50%; left: 50%;
    width: 5px; height: 5px;
    margin: -2.5px;
    border-radius: 50%;
    background: #fff;
}

.canvas-hint {
    position: absolute;
    z-index: 6;
    top: 14px; left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--stage-line);
    background: rgba(24, 24, 27, .8);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: var(--stage-muted);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .02em;
    pointer-events: none;
}

/* ==========================================================================
   Editor trust strip + guides + faq
   ========================================================================== */
.editor-trust { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 24px; padding-top: 20px; color: var(--muted); font-size: 12px; font-weight: 500; }
.editor-trust span { display: inline-flex; align-items: center; gap: 7px; }
.editor-trust svg { width: 15px; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.guide-section, .faq-section { padding: 84px 0; border-top: 1px solid var(--line); }
.faq-section { background: var(--panel); }
.guide-grid, .faq-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 88px; }

.guide-steps { list-style: none; margin: 0; padding: 0; }
.guide-steps li { display: grid; grid-template-columns: 40px 1fr; gap: 20px; padding: 22px 0; border-top: 1px solid var(--line-2); }
.guide-steps > li:last-child { border-bottom: 1px solid var(--line-2); }
.guide-steps > li > span { color: var(--accent); font-family: var(--mono); font-size: 13px; font-weight: 600; }
.guide-steps h3 { margin: 0 0 6px; font-size: 16px; letter-spacing: -.02em; font-weight: 700; }
.guide-steps p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.faq-list details { border-top: 1px solid var(--line-2); }
.faq-list details:last-child { border-bottom: 1px solid var(--line-2); }
.faq-list summary { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 28px; cursor: pointer; font-size: 14.5px; font-weight: 600; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary span { color: var(--accent); font-size: 22px; font-weight: 300; }
.faq-list details p { max-width: 620px; margin: -4px 40px 22px 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* ==========================================================================
   Directory / all-tools
   ========================================================================== */
.directory-page { min-height: 72vh; padding: 56px 0 96px; }
.directory-heading { margin: 44px 0; }
.directory-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.directory-card {
    min-height: 320px;
    display: flex; flex-direction: column;
    padding: 32px;
    border: 1px solid var(--line-2); border-radius: var(--radius-xl);
    background: var(--paper);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.directory-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-3); }
.directory-card > span { color: var(--accent); font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.directory-card:nth-child(2) > span { color: var(--teal); }
.directory-card h2 { margin: 28px 0 14px; font-size: 30px; line-height: 1.06; letter-spacing: -.035em; font-weight: 700; }
.directory-card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.directory-card b { margin-top: auto; padding-top: 22px; font-size: 13px; font-weight: 600; }

/* ==========================================================================
   404 / search (minimal restyle of legacy markup)
   ========================================================================== */
.error-page, .search-page { min-height: 68vh; padding: 72px 0; }
.error-page .container, .search-page .container { width: min(820px, calc(100% - 48px)); margin-inline: auto; text-align: center; }
.container--narrow { width: min(620px, calc(100% - 48px)) !important; }
.error-hero__code { font-family: var(--mono); font-size: clamp(64px, 14vw, 120px); font-weight: 600; color: var(--line-3); letter-spacing: -.04em; }
.error-hero__title, .page-header__title { margin: 8px 0 14px; font-size: clamp(32px, 5vw, 52px); line-height: 1; letter-spacing: -.04em; font-weight: 700; }
.error-hero__desc { max-width: 460px; margin: 0 auto; color: var(--muted); font-size: 15px; }
.error-search, .search-form-section { margin: 32px 0; }
.error-search__label { color: var(--muted); font-size: 13px; }
.search-input-wrap { position: relative; max-width: 480px; margin: 12px auto 0; }
.search-input-wrap__icon { position: absolute; top: 50%; left: 16px; transform: translateY(-50%); color: var(--faint); }
.search-input { width: 100%; min-height: 52px; padding: 0 16px 0 48px; border: 1px solid var(--line-2); border-radius: var(--radius-md); background: var(--paper); font-size: 15px; outline: 0; }
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.section__title { margin: 40px 0 18px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.grid--tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.card--tool { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 22px; border: 1px solid var(--line-2); border-radius: var(--radius-md); background: var(--paper); text-align: left; transition: transform .2s var(--ease), border-color .2s var(--ease); }
.card--tool:hover { transform: translateY(-3px); border-color: var(--accent); }
.card__icon { font-size: 22px; }
.card__title { margin: 4px 0 0; font-size: 15px; font-weight: 700; }
.card__desc { margin: 0; color: var(--muted); font-size: 13px; }
.card__category-badge { margin-top: 8px; color: var(--faint); font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.error-actions, .empty-state__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 10px; font-size: 14px; font-weight: 600; border: 1px solid transparent; transition: transform .18s var(--ease), background .2s var(--ease); }
.btn--primary { color: #fff; background: var(--accent); }
.btn--primary:hover { background: var(--accent-press); transform: translateY(-1px); }
.btn--secondary { border-color: var(--line-3); background: var(--paper); }
.btn--secondary:hover { border-color: var(--ink); }
.btn--lg { min-height: 52px; padding: 0 24px; }
.empty-state { padding: 40px 0; text-align: center; }
.empty-state__icon { font-size: 38px; }
.empty-state__title { margin: 12px 0 6px; font-size: 22px; font-weight: 700; }
.empty-state__text { color: var(--muted); font-size: 14px; }
.search-meta { margin: 24px 0; color: var(--muted); font-size: 14px; }
.suggestions { margin-top: 48px; }

/* ==========================================================================
   Toasts
   ========================================================================== */
.toast-region { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: 8px; }
.toast {
    max-width: 320px;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--radius-sm);
    opacity: 0;
    color: #fff;
    background: var(--ink);
    box-shadow: var(--shadow-lg);
    font-size: 12.5px;
    font-weight: 500;
    transform: translateY(8px);
    transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.toast--error { background: var(--bad); }
.toast.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
    .hero__grid { grid-template-columns: 1fr; gap: 52px; }
    .hero__copy { max-width: 680px; }
    .product-preview { width: min(100%, 680px); margin-inline: auto; }
    .stat-strip { grid-template-columns: repeat(2, 1fr); }
    .privacy-section__grid { grid-template-columns: 64px 1fr; }
    .privacy-section__grid > p { grid-column: 2; }
    .editor-workspace, .editor-workspace--pro { grid-template-columns: 320px minmax(0, 1fr); }
    .guide-grid, .faq-grid { gap: 52px; }
}

@media (max-width: 860px) {
    .shell { width: min(calc(100% - 36px), 720px); }
    .site-nav__inner { min-height: 62px; }
    .site-nav__links { display: none; }
    .hero { padding: 60px 0 56px; }
    .hero h1 { font-size: clamp(42px, 12vw, 64px); }
    .product-preview__body { grid-template-columns: 120px 1fr; min-height: 320px; }
    .preview-sidebar { padding: 14px 11px; }
    .preview-stage { padding: 16px; }
    .section-heading { grid-template-columns: 1fr; gap: 22px; }
    .tool-cards, .directory-grid { grid-template-columns: 1fr; }
    .privacy-section__grid { grid-template-columns: 1fr; gap: 24px; }
    .privacy-section__grid > p { grid-column: auto; }
    .site-footer__inner { grid-template-columns: 1fr; text-align: center; }
    .site-footer .brand, .site-footer__links { justify-self: center; }
    .editor-hero { padding-top: 28px; }
    .editor-hero__grid { grid-template-columns: 1fr; gap: 26px; margin-top: 26px; }
    .tool-switcher { max-width: 300px; }
    .editor-workspace, .editor-workspace--pro { grid-template-columns: 1fr; }
    .control-panel { border-right: 0; border-bottom: 1px solid var(--line); }
    .control-panel--pro { max-height: none; overflow: visible; }
    .canvas-panel { grid-template-rows: 48px minmax(400px, 1fr) 78px; }
    .canvas-panel--pro { grid-template-rows: 52px minmax(420px, 1fr) auto; }
    .canvas-stage { min-height: 400px; }
    .guide-grid, .faq-grid { grid-template-columns: 1fr; gap: 44px; }
    .usecases__grid { grid-template-columns: 1fr; column-gap: 0; }
}

@media (max-width: 560px) {
    .shell { width: calc(100% - 32px); }
    .brand { font-size: 16px; }
    .nav-cta span { display: none; }
    .hero__actions { display: grid; }
    .hero__actions .button { width: 100%; }
    .trust-row { gap: 10px 16px; }
    .product-preview { display: none; }
    .stat-strip { grid-template-columns: 1fr 1fr; }
    .stat-strip > div { padding: 22px 18px; }
    .tools-section { padding: 64px 0; }
    .feature-card__visual { height: 220px; margin: 0 16px; }
    .feature-card__meta { padding: 18px; }
    .feature-card__content { padding: 24px 20px; }
    .privacy-section { padding: 64px 0; }
    .site-footer__links { flex-wrap: wrap; justify-content: center; }
    .editor-hero h1, .directory-heading h1 { font-size: 40px; }
    .editor-shell { border-radius: var(--radius-md); }
    .editor-tool__bar { padding: 0 14px; }
    .editor-tool__bar div > span:last-child { display: none; }
    .control-panel { padding: 14px; }
    .control-grid { grid-template-columns: 1fr; }
    .background-mode-grid { grid-template-columns: repeat(3, 1fr); }
    .transform-actions { grid-template-columns: repeat(2, 1fr); }
    .pro-badge, .tool-chip { display: none; }
    .upload-zone__actions { width: 100%; justify-content: center; }
    .canvas-stage { min-height: 340px; padding: 22px; }
    .canvas-stage canvas { max-height: 380px; }
    .canvas-panel__footer--stats { min-height: auto; align-items: stretch; flex-direction: column; justify-content: center; padding-block: 14px; gap: 14px; }
    .canvas-panel__footer .button { width: 100%; }
    .export-stats { width: 100%; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; }
    .export-stats > div { min-width: 0; }
    .export-stats strong { max-width: 100%; }
    .canvas-actions > span:not(.tool-chip) { display: none; }
    .guide-section, .faq-section { padding: 64px 0; }
}

@media (max-width: 1180px) {
    .background-mode-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 1080px) and (min-width: 861px) {
    .background-mode-grid { grid-template-columns: repeat(3, 1fr); }
    .export-stats { gap: 16px; }
    .export-stats > div { min-width: 68px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
