.gallery-all-link { display: inline-flex; align-items: center; justify-content: center; gap: 12px; color: var(--accent-readable, var(--accent-hover)); font-weight: 600; font-size: 14px; }
.gallery-all-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.gallery-all-link .icon { width: 19px; height: 19px; flex: none; }
.gallery-browse-footer { display: flex; justify-content: center; margin-top: 32px; padding-bottom: 8px; }
.gallery-browse-button { min-height: 84px; min-width: min(430px, 100%); padding: 18px 26px; border: 0; border-radius: 20px; font-size: 20px; font-weight: 600; gap: 30px; text-align: start; box-shadow: 0 8px 22px rgba(var(--accent-rgb), .18); }
.gallery-browse-labels { display: grid; gap: 5px; }
.gallery-browse-labels strong { font-weight: 600; }
.gallery-browse-labels > span { color: inherit; opacity: .88; font-size: 12px; font-weight: 400; line-height: 1.6; }
.gallery-browse-button > .icon { width: 40px; height: 40px; flex: none; padding: 8px; border-radius: 50%; background: #ffffff24; }
.gallery-empty .gallery-all-link { margin: 16px; }
.directory-intro-band { background: #eef3ff; }
:root[data-appearance="dark"] .directory-intro-band { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.directory-hero { --directory-art-size: 340px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 34%); align-items: center; gap: clamp(24px, 4vw, 56px); padding-block: 52px 46px; }
.directory-hero h1 { margin: 12px 0 20px; font-family: var(--headline-font); font-size: calc((clamp(30px, 3.5vw, 46px)) * var(--site-heading-scale)); line-height: 1.25; font-weight: 800; letter-spacing: -1.1px; text-wrap: balance; }
.directory-hero .eyebrow { color: var(--accent-readable, var(--accent-hover)); }
.directory-lead { max-width: 850px; color: var(--ink); font-size: 16px; line-height: 1.9; margin: 0; }
.directory-art { width: min(100%, var(--directory-art-size)); aspect-ratio: 1; justify-self: center; }
.directory-art img { display: block; width: 100%; max-width: 100%; height: auto; }
.directory-guide { padding-block: 70px 56px; }
.directory-guide > h2 { font-family: var(--headline-font); font-size: calc((clamp(25px, 3vw, 32px)) * var(--site-heading-scale)); font-weight: 800; margin: 14px 0 16px; line-height: 1.4; }
.directory-guide-intro { max-width: 80ch; margin: 0 0 32px; color: var(--ink); font-size: 15px; line-height: 1.9; }
.directory-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.directory-guide-grid article { border-top: 1px solid var(--line); padding-top: 24px; display: flex; flex-direction: column; align-items: start; }
.directory-step { color: var(--accent-readable, var(--accent-hover)); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.directory-guide-grid h3 { margin: 12px 0 14px; font-size: 18px; line-height: 1.6; }
.directory-guide-grid p { margin: 0 0 22px; font-size: 15px; color: var(--muted); line-height: 1.9; }
.directory-guide-links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: auto; }
.directory-guide-links a, .directory-related a { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-readable, var(--accent-hover)); font-size: 14px; }
.directory-guide-links a:hover, .directory-related a:hover { text-decoration: underline; text-underline-offset: 4px; }
.directory-guide-links .icon, .directory-related .icon { width: 16px; height: 16px; flex: none; }
.directory-related { padding-block: 28px 50px; border-top: 1px solid var(--line); }
.directory-related h2 { font-size: 18px; margin: 0 0 20px; }
.directory-related > div { display: flex; flex-wrap: wrap; gap: 16px 30px; }
:root[data-font="noto-kufi-arabic"] .directory-hero h1 { letter-spacing: normal; line-height: 1.8; }
:root[data-font="noto-kufi-arabic"] :is(.directory-lead, .directory-guide-intro, .directory-guide-grid p) { font-size: 14px; line-height: 2.2; }
:root[data-font="noto-kufi-arabic"] :is(.directory-guide > h2, .directory-guide-grid h3, .directory-related h2) { line-height: 2; }
[dir="rtl"] :is(.gallery-all-link, .gallery-browse-button, .directory-guide-links, .directory-related) .icon { transform: scaleX(-1); }
@media (max-width: 760px) {
    .gallery-all-link { font-size: 12px; gap: 8px; }
    .gallery-browse-button { width: 100%; max-width: 430px; min-width: 0; padding-inline: 20px; gap: 16px; font-size: 18px; }
    .directory-page .directory-intro-band { margin-bottom: 12px; }
    .directory-page .directory-hero { min-height: 0; grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "lead" "art"; grid-template-rows: auto; gap: 18px; padding-block: 28px; }
    .directory-hero-copy { display: contents; }
    .directory-hero-copy > .eyebrow { display: none; }
    .directory-hero h1 { grid-area: title; align-self: center; margin: 0; font-size: calc(clamp(36px, 9.5vw, 42px) * var(--site-heading-scale)); line-height: 1.2; letter-spacing: -.8px; text-wrap: balance; }
    .directory-page .directory-art { display: block; grid-area: art; width: min(85%, var(--directory-art-size)); justify-self: center; align-self: center; }
    .directory-lead { grid-area: lead; text-wrap: pretty; }
    .directory-page .gallery-finder { padding-top: 4px; }
    .directory-page .gallery-heading { min-height: 64px; padding-block: 8px; }
    .directory-page .gallery-heading h2 { font-size: calc(22px * var(--site-heading-scale)); }
    :root[data-font="noto-kufi-arabic"] .directory-hero h1 { font-size: calc(clamp(30px, 8vw, 36px) * var(--site-heading-scale)); line-height: 1.65; }
    .directory-guide { padding-block: 44px 32px; }
    .directory-guide-grid { grid-template-columns: 1fr; gap: 26px; }
    .directory-guide > h2 { margin-bottom: 20px; }
}

/* The New tools expander shares the All tools CTA shape with a distinct navy blue accent. */

/* Three quiet, illustrated stories below the homepage tool collections. */
.home-features {
    padding-block: 72px 24px;
    scroll-margin-top: 96px;
}
.home-features-heading {
    margin-bottom: 44px;
    text-align: center;
}
.home-features-eyebrow,
.home-feature-eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.home-features-eyebrow {
    margin-bottom: 16px;
    color: var(--muted);
}
.home-features-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: calc(clamp(32px, 3.5vw, 46px) * var(--site-heading-scale));
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.045em;
    text-wrap: balance;
}
.home-features-list {
    display: grid;
    gap: 24px;
}
.home-feature {
    --feature-panel: #f4f6fa;
    --feature-accent: #265ec7;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    min-height: 438px;
    padding: 38px 64px;
    border-radius: 28px;
    background: var(--feature-panel);
}
.home-feature-convert {
    --feature-panel: #edf3fc;
}
.home-feature-convert .home-feature-copy {
    grid-column: 2;
    grid-row: 1;
}
.home-feature-convert .home-feature-visual {
    grid-column: 1;
    grid-row: 1;
}
.home-feature-scan {
    --feature-panel: #f3f5f8;
}
.home-feature-copy {
    min-width: 0;
    max-width: 440px;
}
.home-feature-eyebrow {
    margin-bottom: 18px;
    color: var(--feature-accent);
}
.home-feature h3 {
    margin: 0;
    color: var(--ink);
    font-size: calc(clamp(32px, 3.1vw, 43px) * var(--site-heading-scale));
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.04em;
    text-wrap: balance;
}
.home-feature h3 span {
    display: block;
    color: var(--feature-accent);
}
.home-feature-copy p {
    max-width: 43ch;
    margin: 22px 0 20px;
    color: #596476;
    font-size: 16px;
    line-height: 1.75;
    text-wrap: pretty;
}
.home-feature-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 25px;
}
.home-feature-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    color: var(--feature-accent);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}
.home-feature-links .icon {
    flex: none;
    width: 17px;
    height: 17px;
}
.home-feature-links a:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
}
.home-feature-links a:focus-visible {
    border-radius: 4px;
    outline: 2px solid currentColor;
    outline-offset: 5px;
}
[dir="rtl"] .home-features-heading h2,
[dir="rtl"] .home-feature h3,
[dir="rtl"] .home-features-eyebrow,
[dir="rtl"] .home-feature-eyebrow {
    letter-spacing: normal;
}
[dir="rtl"] .home-feature-links .icon {
    transform: scaleX(-1);
}
:root[data-font="noto-kufi-arabic"] .home-feature h3 {
    font-size: calc(clamp(28px, 2.5vw, 36px) * var(--site-heading-scale));
    line-height: 1.65;
}
:root[data-font="noto-kufi-arabic"] .home-feature-copy p {
    font-size: 14px;
    line-height: 2.2;
}
:root[data-font="noto-kufi-arabic"] .home-features-heading h2 {
    line-height: 1.7;
}
.home-feature-visual {
    display: grid;
    place-items: center;
    min-width: 0;
    direction: ltr;
}
.home-feature-visual .app-guide-illustration {
    display: block;
    width: min(100%, 400px);
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
}
:root[data-appearance="dark"] .home-feature {
    --feature-panel: #192330;
    --feature-accent: #94bbff;
}
:root[data-appearance="dark"] .home-feature-convert {
    --feature-panel: #1c2b42;
}
:root[data-appearance="dark"] .home-feature-scan {
    --feature-panel: #1b2635;
}
:root[data-appearance="dark"] .home-feature-copy p {
    color: #bdc8d8;
}
@media (max-width: 1000px) {
    .home-feature {
        gap: 28px;
        padding: 38px;
    }
}
@media (max-width: 680px) {
    .home-features {
        padding-block: 44px 12px;
    }
    .home-features-heading {
        margin-bottom: 28px;
    }
    .home-feature {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
        min-height: 0;
        padding: 30px 26px;
        border-radius: 22px;
    }
    .home-feature-convert .home-feature-copy,
    .home-feature-convert .home-feature-visual {
        grid-column: auto;
        grid-row: auto;
    }
    .home-feature-copy {
        max-width: none;
    }
    .home-feature-visual .app-guide-illustration {
        width: min(100%, 260px);
    }
}

/* The ordinary grid remains the fallback and the expanded browse-all view. */
.home-new-tools.new-tools-hero {
    margin-block: 48px 8px;
    padding-block: 54px 38px;
    background: #edf3ff;
}
.new-tools-hero .new-tools-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 34px;
}
.new-tools-intro {
    max-width: 740px;
    min-width: 0;
}
.new-tools-eyebrow {
    margin: 0 0 14px;
    color: var(--accent-readable, var(--accent-hover));
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.new-tools-heading h2 {
    margin: 0;
    color: var(--ink);
    font-family: var(--headline-font);
    font-size: calc(clamp(32px, 3.3vw, 44px) * var(--site-heading-scale));
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.04em;
    text-wrap: balance;
}
.new-tools-description {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
    text-wrap: pretty;
}
.new-tools-carousel {
    position: relative;
}
.new-tools-controls {
    position: absolute;
    inset-inline: 0;
    top: 50%;
    z-index: 2;
    pointer-events: none;
}
.new-tools-controls[hidden] {
    display: none;
}
.new-tools-range {
    color: var(--muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    direction: ltr;
    white-space: nowrap;
}
.new-tools-controls button {
    position: absolute;
    top: 0;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    padding: 13px;
    border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
    border-radius: 50%;
    background: var(--surface);
    color: var(--accent);
    box-shadow: 0 4px 16px #19376b24;
    pointer-events: auto;
}
#new-tools-previous {
    inset-inline-start: -68px;
}
#new-tools-next {
    inset-inline-end: -68px;
}
.new-tools-controls button:hover:not(:disabled) {
    background: var(--accent-soft);
    border-color: var(--accent);
}
.new-tools-controls button:disabled {
    background: var(--surface);
    border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
    color: var(--accent);
    box-shadow: none;
    opacity: 1;
    cursor: default;
}
.new-tools-controls button:focus-visible,
.new-tools-more:focus-visible,
.home-new-tools #new-tool-gallery:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}
.new-tools-controls .icon {
    width: 24px;
    height: 24px;
    color: inherit;
}
#new-tools-previous .icon,
[dir="rtl"] #new-tools-next .icon {
    transform: rotate(180deg);
}
[dir="rtl"] #new-tools-previous .icon {
    transform: none;
}
.new-tools-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 22px;
    margin-top: 22px;
}
.new-tools-footer:not(:has(> :not([hidden]))) {
    display: none;
}
.new-tools-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    max-width: 100%;
    margin-inline-start: auto;
    padding: 4px 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--accent-readable, var(--accent-hover));
    font: 600 15px/1.5 var(--font-body);
    text-align: end;
    box-shadow: none;
}
.new-tools-more[hidden] {
    display: none;
}
.new-tools-more strong {
    font: inherit;
    min-width: 0;
}
.new-tools-more:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
}
.new-tools-more .icon {
    flex-shrink: 0;
    width: 17px;
    height: 17px;
    transform: rotate(90deg);
}
.new-tools-more[aria-expanded="true"] .icon {
    transform: rotate(-90deg);
}
:root[data-appearance="dark"] .home-new-tools.new-tools-hero {
    background: #1c293e;
}
[dir="rtl"] .new-tools-heading h2 {
    letter-spacing: normal;
}
[dir="rtl"] .new-tools-eyebrow {
    letter-spacing: normal;
}
:root[data-font="noto-kufi-arabic"] .new-tools-heading h2 {
    line-height: 1.7;
}
.home-page .home-new-tools #new-tool-gallery[data-carousel="true"] {
    --new-carousel-items: var(--new-carousel-columns, 3);
    --new-carousel-gap: 22px;
    --new-carousel-peek: 56px;
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    /* A partial next card makes horizontal scrolling visible without extra copy. */
    grid-auto-columns: calc((100% - var(--new-carousel-peek) - var(--new-carousel-items) * var(--new-carousel-gap)) / var(--new-carousel-items));
    gap: var(--new-carousel-gap);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Reserve space for the existing hover shadow inside the scrollport. */
    padding-block: 4px 24px;
    margin-block: -4px -24px;
    border-radius: 24px;
}
.home-page .home-new-tools #new-tool-gallery[data-carousel="true"]::-webkit-scrollbar {
    display: none;
}
.home-page .home-new-tools #new-tool-gallery[data-carousel="true"] > .tool-card {
    scroll-snap-align: start;
}
/* Keep full-size cards; move navigation below when the outer gutters are too narrow. */
@media (max-width: 1279px) {
    .new-tools-carousel {
        display: flex;
        flex-direction: column;
    }
    .new-tools-controls {
        position: static;
        order: 1;
        display: flex;
        justify-content: space-between;
        gap: 16px;
        margin-block-start: 20px;
    }
    .new-tools-controls button {
        position: static;
        transform: none;
    }
}
@media (max-width: 1020px) {
    .home-page .home-new-tools #new-tool-gallery[data-carousel="true"] {
        --new-carousel-items: min(2, var(--new-carousel-columns, 3));
    }
}
@media (max-width: 680px) {
    .home-new-tools.new-tools-hero {
        margin-block-start: 32px;
        padding-block: 36px 24px;
    }
    .new-tools-hero .new-tools-heading {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
        margin-bottom: 24px;
    }
    .new-tools-controls button {
        width: 44px;
        height: 44px;
        padding: 10px;
    }
    .home-page .home-new-tools #new-tool-gallery[data-carousel="true"] {
        --new-carousel-items: 1;
        --new-carousel-gap: 16px;
        --new-carousel-peek: 32px;
    }
}

/* Typography-led gallery with decorative artwork. */
.home-page { --headline-font: var(--font-body); --home-section-title-size: 34px; --home-section-title-weight: 700; --home-overview-gap: 66px; --collection-hero-height: 450px; background: #fdfdfd; }
.home-hero h1, .home-section-heading h2, .tool-card h3 { font-family: var(--headline-font); }
.home-page .site-header { background: #fdfdfd; }
.home-hero-band { background: #edf3ff; }
.home-hero-band, .directory-intro-band { margin-bottom: 28px; }
.home-hero, .directory-hero { min-height: var(--collection-hero-height); }
:root[data-appearance="dark"] .home-hero-band { background: #1c293e; }
.home-hero { position: relative; display: grid; grid-template-columns: 1.04fr 1fr; align-items: center; gap: 20px; padding: 36px 0 40px; isolation: isolate; }
.hero-copy { min-width: 0; position: relative; z-index: 1; text-align: center; }
.home-hero h1 { font-size: calc((clamp(44px, 5.2vw, 72px)) * var(--site-heading-scale)); font-weight: 800; line-height: 1.12; letter-spacing: -3.8px; margin: 0 0 25px; }
.hero-title-main { font-size: .82em; font-weight: 800; letter-spacing: -.045em; }
.home-hero h1 > span { display: inline-block; color: var(--accent); font-size: .74em; letter-spacing: -.025em; word-spacing: .08em; text-wrap: balance; }
.home-lead { margin: 0 auto; color: var(--muted); font-family: inherit; font-size: 15px; line-height: 1.8; text-wrap: pretty; }
.home-cta { display: flex; width: fit-content; margin-top: 27px; margin-inline: auto; min-width: 240px; min-height: 64px; padding-block: 12px; padding-inline: 24px; justify-content: center; gap: 20px; border-radius: 18px; font-size: 17px; font-weight: 700; box-shadow: 0 8px 20px rgba(var(--accent-rgb), .13); }
.home-cta > .icon { width: 36px; height: 36px; flex-shrink: 0; padding: 8px; color: inherit; background: #ffffff24; border-radius: 50%; }
.home-cta:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; }
.home-assurance { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 12px; margin-top: 18px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.home-assurance > span { display: inline-flex; align-items: center; gap: 6px; }
.home-assurance > span + span::before { content: ""; width: 3px; height: 3px; margin-inline-end: 6px; border-radius: 50%; background: currentColor; flex: none; }
.hero-studio { position: relative; min-width: 0; width: 85%; justify-self: center; aspect-ratio: 540 / 440; }
.hero-art { display: block; width: 100%; height: 100%; object-fit: contain; }
.home-section-heading { text-align: center; margin-bottom: 28px; }
.home-section-heading h2 { margin: 0; font-size: calc((var(--home-section-title-size)) * var(--site-heading-scale)); font-weight: var(--home-section-title-weight); line-height: 1.35; letter-spacing: -.7px; }
.home-faq > div { min-width: 0; }
.home-faq .answers-intro h2 { text-align: start; font-family: var(--headline-font); font-size: calc((var(--home-section-title-size)) * var(--site-heading-scale)); line-height: 1.35; font-weight: var(--home-section-title-weight); letter-spacing: -.7px; text-wrap: balance; }
.home-faq-grid h3 { margin: 0; font: inherit; }
.home-faq-grid summary .icon { flex: none; }
.home-faq-grid summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
.home-faq-grid details p { margin-inline: 0 25px; }
.home-usecases a:focus-visible, .home-faq-links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 3px; }
.home-usecases { padding-block: 56px 24px; }
.home-usecases .home-section-heading p { max-width: 65ch; margin: 16px auto 0; color: var(--muted); font-size: 15px; line-height: 1.9; text-wrap: pretty; }
.home-faq-links { padding-block: 0 24px; gap: 10px 24px; }
.home-usecases, .home-how, .home-promise, .home-faq { scroll-margin-top: 96px; }
:root[data-font="noto-kufi-arabic"] .home-usecases .home-section-heading p { font-size: 14px; line-height: 2.2; }
:root[data-font="noto-kufi-arabic"] .home-faq .answers-intro h2 { font-size: calc((var(--home-section-title-size)) * var(--site-heading-scale)); line-height: 2; letter-spacing: normal; }
:root[data-font="noto-kufi-arabic"] .home-faq p { color: var(--muted); font-size: 14px; line-height: 2.2; }
.home-tools { scroll-margin-top: 96px; }
.home-new-tools { padding-block: 32px 20px; }
/* A fading rule and outlined sparkle gently separate the New tools section. */
.home-new-divider { display: flex; align-items: center; gap: 20px; width: min(640px, 100%); margin: 0 auto 18px; color: color-mix(in srgb, var(--muted) 65%, var(--line)); direction: ltr; }
.home-new-divider::before, .home-new-divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(to right, transparent, currentColor); }
.home-new-divider::after { transform: rotate(180deg); }
.home-new-divider > .icon { width: 24px; height: 24px; flex: none; stroke-width: 1; }
.home-new-tools > .gallery-heading { margin-bottom: 28px; }
.gallery-finder { padding: 12px 0 0; margin-bottom: 36px; border: 1px solid transparent; border-radius: 26px; background: transparent; }
:root[data-appearance="dark"] .gallery-finder { background: transparent; }
.gallery-heading { display: grid; align-items: center; min-height: 60px; text-align: center; }
.gallery-heading h2 { font-family: var(--headline-font); color: var(--ink); font-size: calc((26px) * var(--site-heading-scale)); font-weight: 700; line-height: 1.5; letter-spacing: -.4px; margin: 0; text-wrap: balance; }
.gallery-heading h2 strong { font-weight: 700; color: var(--accent); }
.tool-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.gallery-controls { position: relative; }
.gallery-navigation { --gallery-tab-gap: 18px; display: flex; width: fit-content; max-width: 100%; margin: 12px auto 0; gap: var(--gallery-tab-gap); }
.gallery-navigation-link { position: relative; }
.gallery-navigation-link { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 54px; padding: 10px 18px; border-radius: 12px; color: var(--ink); background: transparent; font-size: 16px; font-weight: 600; line-height: 1.5; text-align: center; }
.gallery-navigation-link > .icon { width: 20px; height: 20px; flex: none; color: var(--accent); }
.gallery-navigation-link:hover { background: var(--canvas); }
.gallery-navigation-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent-readable, var(--accent-hover)); }
.gallery-navigation-link[aria-current="page"] > .icon { color: inherit; }
.gallery-navigation-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gallery-navigation-count { margin-inline-start: 4px; padding: 1px 5px; border-radius: 5px; background: var(--accent); color: #fff; font-size: 10px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.gallery-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; max-width: 800px; min-height: 54px; margin: 28px auto 0; }
.gallery-layout { display: flex; gap: 3px; padding: 4px; border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line)); border-radius: 12px; background: var(--surface); }
.gallery-layout button { display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); }
.gallery-layout button:hover { color: var(--accent); background: var(--accent-soft); }
.gallery-layout button[aria-pressed="true"] { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--accent-soft); }
.gallery-layout button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gallery-layout .icon { width: 20px; height: 20px; }
.gallery-search-status { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.gallery-search { display: flex; align-items: center; gap: 10px; min-height: 54px; min-width: 0; padding: 4px 14px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line)); border-radius: 12px; box-shadow: 0 2px 8px rgba(var(--accent-rgb), .03); }
.gallery-search > .icon { width: 22px; height: 22px; flex: none; color: var(--accent-readable, var(--accent-hover)); }
.gallery-search input { border: 0; outline: none; padding: 0; background: transparent; min-width: 0; width: 100%; font-size: 16px; line-height: 1.5; }
.gallery-search input::-webkit-search-cancel-button { appearance: none; }
#gallery-clear { display: grid; place-items: center; flex: 0 0 44px; height: 44px; padding: 0; border-radius: 9px; }
#gallery-clear .icon { width: 19px; height: 19px; color: var(--muted); }
#gallery-clear:hover { background: var(--canvas); }
#gallery-controls .gallery-search:focus-within { border-color:var(--accent); outline:none; box-shadow:0 0 0 1px var(--accent); }
.gallery-finder:not(:has(.gallery-controls:not([hidden]))) { padding-bottom: 12px; }
.gallery-empty { padding: 40px; border: 1px dashed #d9d5cc; border-radius: 18px; text-align: center; }.gallery-empty h3 { margin: 0; }.gallery-empty p { color: var(--muted); }
/* Shared stacked cards for Popular, All Tools, categories and search. */
.tool-card { display: flex; flex-direction: column; min-width: 0; padding: 27px 26px 22px; border: 1px solid color-mix(in srgb,var(--accent) 22%,var(--line)); border-radius: 24px; background: var(--card-bg); overflow: hidden; color: var(--ink); transition: box-shadow .22s ease, border-color .22s ease, background-color .18s ease; }
.tool-card-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; min-height: 68px; }
.tool-card h3 { font-size: 29px; letter-spacing: -.9px; font-weight: 700; line-height: 1.16; margin: 0; text-wrap: balance; overflow-wrap: anywhere; }
.card-arrow { display: grid; place-items: center; width: 35px; height: 35px; margin-top: 2px; border: 1px solid color-mix(in srgb,var(--accent) 20%,var(--line)); background: transparent; border-radius: 50%; flex-shrink: 0; color: var(--art-ink); transition: background .22s ease, color .22s ease, border-color .22s ease; }
.card-arrow .icon { width: 18px; height: 18px; }
.card-compact-icon, .card-compact-chevron { display: none; }
/* A fixed-height decorative region can skip offscreen rendering without shifting text. */
.tool-card-art { position: relative; height: 168px; flex-shrink: 0; margin: 16px -15px 12px; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; direction: ltr; content-visibility: auto; overflow-clip-margin: 8px; }
.tool-illustration { display: block; width: 100%; max-width: 310px; height: 100%; color: var(--art-ink); overflow: visible; }
.art-color, .art-number, .art-letters, .art-stamp, .art-dimension { fill: var(--art-ink); }
.art-stroke { stroke: var(--art-ink); }
.art-tint { fill: var(--art-tint); }
.art-lines { fill: none; stroke: #cdd3dc; stroke-width: 3; stroke-linecap: round; }
.art-number { font: 700 35px var(--font-body); letter-spacing: -2px; }
.art-number-large { font-size: 54px; }
.art-letters { font: 700 56px var(--font-body); letter-spacing: -3px; }
.art-stamp { font: 700 36px var(--font-body); letter-spacing: 5px; }
.art-dimension { font: 700 12px var(--font-body); }
.tool-card-description { margin: 8px 0 0; font-size: 13px; line-height: 1.75; color: #505867; text-wrap: pretty; }
.tool-card:focus-visible { outline: 3px solid var(--accent-hover); outline-offset: -3px; }
/* Shared card and compact layouts for collections and global search results. */
.gallery-art-effects { position: absolute; pointer-events: none; }
/* One accent treatment across Popular, All Tools, categories and search. */
:is(#tool-gallery, #new-tool-gallery) .tool-card:is(:hover,:focus-visible) { background:color-mix(in srgb,var(--accent) 6%,var(--surface)); border-color:color-mix(in srgb,var(--accent) 45%,var(--line)); }
:is(#tool-gallery, #new-tool-gallery) .tool-card-art { --art-ink:#000; --art-tint:#cbd5e1; }
:is(#tool-gallery, #new-tool-gallery) .tool-illustration:not([data-art-style="accent"]) { filter:url(#gallery-art-blue); }
:is(#tool-gallery, #new-tool-gallery) .art-lines { stroke:#9ca8ba; }
:is(#tool-gallery, #new-tool-gallery) .art-main > rect[fill="white"]:not(.art-stroke) { stroke:#bec7d5; stroke-width:1; }
:root[data-gallery-layout="compact"] :is(#tool-gallery, #new-tool-gallery) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
:root[data-gallery-layout="compact"] :is(#tool-gallery, #new-tool-gallery) .tool-card { display: flex; flex-direction: column; gap: 0; justify-content: center; min-height: 64px; padding: 16px 18px; border-radius: 13px; }
:root[data-gallery-layout="compact"] :is(#tool-gallery, #new-tool-gallery) .tool-card-heading { align-self: stretch; display:grid; grid-template-columns:24px minmax(0,1fr) 18px; align-items:center; min-height:0; gap:12px; }
:root[data-gallery-layout="compact"] :is(#tool-gallery, #new-tool-gallery) .card-compact-icon { display:grid; place-items:center; width:24px; height:24px; color:var(--accent); }
:root[data-gallery-layout="compact"] :is(#tool-gallery, #new-tool-gallery) .card-compact-icon .icon { width:22px; height:22px; }
:root[data-gallery-layout="compact"] :is(#tool-gallery, #new-tool-gallery) .tool-card h3 { color: var(--ink); font-size: 16px; font-weight: 600; line-height: 1.5; letter-spacing: normal; text-wrap: pretty; }
:root[data-gallery-layout="compact"] :is(#tool-gallery, #new-tool-gallery) :is(.tool-card-art, .tool-card-description, .card-arrow) { display: none; }
:root[data-gallery-layout="compact"] :is(#tool-gallery, #new-tool-gallery) .card-compact-chevron { display: grid; place-items: center; flex: none; width: 18px; height: 18px; color: var(--accent); }
:root[data-gallery-layout="compact"] :is(#tool-gallery, #new-tool-gallery) .card-compact-chevron .icon { width: 18px; height: 18px; }
:root[dir="rtl"][data-gallery-layout="compact"] :is(#tool-gallery, #new-tool-gallery) .card-compact-chevron { transform: scaleX(-1); }
:root[data-gallery-layout="compact"][data-font="noto-kufi-arabic"] :is(#tool-gallery, #new-tool-gallery) .tool-card h3 { font-size: 14px; line-height: 2; }
@media (hover: hover) {
    .tool-card:hover { box-shadow: 0 12px 25px #26344d0e; }
    .tool-card:hover .card-arrow { color: white; background: var(--art-ink); border-color: var(--art-ink); }
}
.home-promise { margin-block: 0 60px; padding: 38px 44px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 29%); gap: 35px; align-items: center; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.promise-copy { min-width: 0; }
.home-promise h2 { font-family: var(--headline-font); font-size: calc((var(--home-section-title-size)) * var(--site-heading-scale)); letter-spacing: -.7px; margin: 0 0 16px; font-weight: var(--home-section-title-weight); line-height: 1.35; text-wrap: balance; }
.home-promise p { font-size: 14px; color: var(--muted); margin: 0 0 12px; max-width: 650px; line-height: 1.8; }
.promise-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--accent-readable, var(--accent-hover)); font-size: 13px; font-weight: 600; }
.promise-link .icon { width: 18px; height: 18px; }
.promise-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.promise-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.promise-art { --promise-stroke: color-mix(in srgb, var(--accent) 32%, var(--line)); color: var(--accent); direction: ltr; }
.promise-art svg { display: block; width: 100%; height: auto; }
.home-how { padding-block: 60px 70px; }
[dir="rtl"] .home-cta > .icon, [dir="rtl"] .card-arrow > .icon, [dir="rtl"] .promise-link > .icon { transform: scaleX(-1); }
[dir="rtl"] .home-hero h1, [dir="rtl"] .tool-card h3 { letter-spacing: 0; }
[dir="rtl"] .hero-title-main { letter-spacing: normal; }
:root[data-font="noto-kufi-arabic"] .hero-title-main { font-weight: 700; }
[dir="rtl"] .home-hero h1 > span { letter-spacing: normal; word-spacing: normal; }
:root[data-font="noto-kufi-arabic"] .home-hero h1 { font-size: calc((clamp(34px, 4.1vw, 52px)) * var(--site-heading-scale)); line-height: 2; margin-block: 0 15px; }
:root[data-font="noto-kufi-arabic"] .home-lead { color: var(--muted); font-size: 13px; line-height: 2.2; }
:root[data-font="noto-kufi-arabic"] .home-page { --headline-font: var(--font-body); --home-section-title-size: 26px; --home-section-title-weight: 700; }
:root[data-font="noto-kufi-arabic"] .gallery-heading h2 { font-size: calc((22px) * var(--site-heading-scale)); line-height: 2.2; letter-spacing: normal; }
:root[data-font="noto-kufi-arabic"] .tool-card h3 { font-size: 23px; font-weight: 700; line-height: 2; }
:root[data-font="noto-kufi-arabic"] .tool-card-description { font-size: 14px; line-height: 2.2; }
:root[data-font="noto-kufi-arabic"] .home-hero h1, :root[data-font="noto-kufi-arabic"] .home-section-heading h2 { font-weight: 700; letter-spacing: 0; }
:root[data-font="noto-kufi-arabic"] .home-promise h2 { line-height: 2; letter-spacing: 0; }
:root[data-font="noto-kufi-arabic"] .home-promise p { font-size: 14px; line-height: 2.2; }
:root[data-font="noto-kufi-arabic"] .home-section-heading h2 { line-height: 2; }
@media (max-width: 1020px) { .home-page { --collection-hero-height: 520px; }.tool-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 681px) and (max-width: 1020px) {
    :root[data-gallery-layout="compact"] :is(#tool-gallery, #new-tool-gallery) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .home-page { --home-overview-gap: 55px; }
    .home-hero { padding-block: 36px 40px; gap: 5px; }.home-hero h1 { font-size: calc((49px) * var(--site-heading-scale)); letter-spacing: -2.5px; }
    .home-assurance { gap: 7px 12px; }
    .home-promise { padding: 30px; gap: 22px; }
}
@media (max-width: 680px) {
    .home-page { --home-overview-gap: 34px; --home-section-title-size: 24px; --collection-hero-height: 680px; }
    :root[data-font="noto-kufi-arabic"] .home-page { --home-section-title-size: 24px; }
    .gallery-finder { border-radius: 20px; }
    .gallery-heading { min-height: 64px; }
    .gallery-heading h2 { font-size: calc((22px) * var(--site-heading-scale)); }
    :root[data-font="noto-kufi-arabic"] .gallery-heading h2 { font-size: calc((20px) * var(--site-heading-scale)); }
    .gallery-navigation { --gallery-tab-gap: 12px; }
    .gallery-navigation-link, .gallery-category-picker > summary { padding: 8px 10px; gap: 5px; font-size: 12px; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); border-radius: 12px; background: var(--surface); }
    .gallery-navigation-link[aria-current="page"], .gallery-category-picker[data-category-active="true"] > summary { border-color: color-mix(in srgb, var(--accent) 65%, var(--line)); background: var(--accent-soft); }
    .gallery-navigation-link > .icon, .gallery-category-picker > summary > .icon:first-child { display: none; }
    .gallery-navigation-count { display: none; }
    .gallery-search { padding-inline: 10px; gap: 8px; }
    .gallery-search-row { gap: 8px; }
    .gallery-category-picker > summary > .icon:last-child { width: 14px; height: 14px; }
    .home-hero { grid-template-columns: minmax(0, 1fr); padding-block: 36px var(--home-overview-gap); gap: 16px; text-align: center; }
    .home-hero h1 { font-size: calc((clamp(43px, 11.5vw, 61px)) * var(--site-heading-scale)); letter-spacing: -2.5px; margin: 0 0 18px; }
    .home-lead { font-size: 14px; }
    .home-assurance { flex-direction: row; font-size: 11px; gap: 6px 12px; }.home-cta { margin-top: 22px; }
    .hero-studio { width: min(85%, 331.5px); margin-inline: auto; }
    .tool-cards { grid-template-columns: 1fr; gap: 20px; }.home-section-heading { margin-bottom: 22px; }
    .tool-card { padding: 24px; }.tool-card-heading { min-height: 0; }.tool-card-art { height: 166px; margin-block: 16px 12px; }
    :root[data-gallery-layout="compact"] :is(#tool-gallery, #new-tool-gallery) { grid-template-columns: 1fr; gap: 10px; }
    .home-promise { padding: 26px 24px; margin-bottom: 40px; grid-template-columns: minmax(0, 1fr); gap: 15px; }
    .promise-art { width: 170px; justify-self: center; grid-row: 1; }
    .home-how { padding-block: 40px 45px; }.home-how .steps { gap: 25px; }
    :root[data-font="noto-kufi-arabic"] .home-hero h1 { font-size: calc((clamp(30px, 8.5vw, 38px)) * var(--site-heading-scale)); }
}

@media (prefers-reduced-motion: reduce) { .tool-card, .card-arrow { transition: none; } }
@media (max-width:540px) {
    .gallery-navigation { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:min(100%,420px); row-gap:6px; }
}
@media (max-width: 480px) {
    .gallery-search-row { grid-template-columns: minmax(0, 1fr) auto; }
    .gallery-layout { justify-self: end; }
}
@media (max-width: 360px) { .home-page { --collection-hero-height: 800px; } }

/* Share the same desktop hero ad spacing across all tool collections. */
@media(min-width:1024px){
    :is(.home-hero-band, .directory-intro-band):has(+ .home-hero-ad){margin-block-end:0}
    .home-page .home-hero-ad{padding-block:20px}
}

/* Converter shortcuts sit below the shared illustrated-card content. */
.tool-card-hub { display: flex; flex-direction: column; gap: 0; }
.tool-card-main { display: block; color: inherit; }
:root[data-gallery-layout="compact"] .tool-card-main { display: block; }
.tool-card-main:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.tool-card-shortcut { display: flex; align-items: stretch; gap: 8px; margin-top: auto; padding-top: 18px; }
.tool-card-shortcut label { flex: 1; min-width: 0; }
.tool-card-shortcut select { width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; border: 2px solid color-mix(in srgb,var(--accent) 65%,var(--line)); border-radius: 10px; color: var(--ink); background: color-mix(in srgb,var(--accent) 12%,var(--surface)); font: inherit; font-size: 14px; font-weight: 400; cursor: pointer; }
.tool-card-shortcut select:hover { background: color-mix(in srgb,var(--accent) 18%,var(--surface)); }
.tool-card-shortcut select optgroup { font-style: normal; font-weight: 600; }
.tool-card-shortcut select option, .tool-card-shortcut select option:checked, .tool-card-shortcut selectedcontent { font-style: normal; font-weight: 400; }
.tool-card-shortcut select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tool-card[hidden] { display: none; }
:root[data-gallery-layout="compact"] .tool-card-shortcut { padding-top: 12px; }
