.face-editor-public {
    overflow-wrap: anywhere;
}

.face-editor-public--hero {
    display: block;
    padding-block: clamp(1.5rem, 3vw, 2.5rem);
}

.face-editor-public__hero-copy,
.face-editor-public__hero-examples,
.face-editor-public__feature-copy,
.face-editor-public__feature-examples,
.face-editor-public__use-case-examples {
    min-width: 0;
}

.face-editor-public__hero-examples {
    width: min(100%, 520px);
    justify-self: center;
}

.face-editor-public__hero-copy > p:not(.public-eyebrow) {
    margin-block: 0.9rem;
}

.face-editor-public__hero-examples,
.face-editor-public__feature-examples,
.face-editor-public__use-case-examples,
.face-editor-public__example-item {
    margin: 0;
}

.face-editor-public__hero-examples > figcaption,
.face-editor-public__feature-examples > figcaption,
.face-editor-public__use-case-examples > figcaption {
    color: var(--color-ink);
    font-weight: 800;
    line-height: 1.4;
}

.face-editor-public__hero-examples > figcaption {
    margin-top: 0.75rem;
}

.face-editor-public__feature-examples > figcaption {
    margin-top: 0.75rem;
}

.face-editor-public__use-case-examples > figcaption {
    margin-top: 0.75rem;
}

.face-editor-public__hero-pair,
.face-editor-public__use-case-pair,
.face-editor-public__feature-image-grid {
    display: grid;
    position: relative;
    min-width: 0;
    gap: clamp(0.45rem, 1.5vw, 0.8rem);
}

.face-editor-public__hero-pair,
.face-editor-public__use-case-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.face-editor-public__feature-image-grid--hair {
    grid-template-columns: minmax(0, 1fr) 1.5rem minmax(0, 2fr);
    align-items: start;
    gap: clamp(0.45rem, 1.5vw, 0.8rem);
}

.face-editor-public__feature-image-grid--skin,
.face-editor-public__feature-image-grid--expression {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.face-editor-public__proof-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.45rem, 1.5vw, 0.8rem);
    min-width: 0;
    padding: 0.45rem;
    border: var(--border-soft);
    border-radius: 0.75rem;
    background: rgb(255 234 244 / 28%);
}

.face-editor-public__example-item {
    display: grid;
    min-width: 0;
    gap: 0.4rem;
}

.face-editor-public__example-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    min-width: 0;
    overflow: hidden;
    border: var(--border-soft);
    border-radius: 0.65rem;
}

.face-editor-public__example-frame img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: center;
}

.face-editor-public__image-label {
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
    z-index: 2;
    display: inline-block;
    max-width: calc(100% - 0.9rem);
    padding: 0.2rem 0.45rem;
    border: 1px solid rgb(255 255 255 / 70%);
    border-radius: 999px;
    color: var(--color-ink);
    background: rgb(255 253 246 / 92%);
    font-size: 0.7rem;
    font-weight: 900;
    line-height: 1.3;
    overflow-wrap: anywhere;
    pointer-events: none;
}

.face-editor-public__image-label--result {
    color: var(--color-primary-dark);
    background: rgb(255 234 244 / 94%);
}

.face-editor-public__proof-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    margin: 0;
    border: 1px solid var(--color-support);
    border-radius: 50%;
    color: var(--color-ink);
    background: var(--color-paper);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.face-editor-public__feature-image-grid--hair > .face-editor-public__example-item:first-child {
    grid-column: 1;
    grid-row: 1;
}

.face-editor-public__feature-image-grid--hair > .face-editor-public__proof-arrow {
    position: static;
    top: auto;
    left: auto;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    transform: none;
}

.face-editor-public__feature-image-grid--hair > .face-editor-public__proof-results {
    grid-column: 3;
    grid-row: 1;
}

.face-editor-public__example-item > figcaption {
    color: var(--color-copy);
    font-size: 0.8rem;
    line-height: 1.4;
    text-align: center;
    overflow-wrap: anywhere;
}

.face-editor-public__example-note {
    display: block;
    margin-top: 0.65rem;
    color: var(--color-copy);
    font-size: 0.78rem;
    line-height: 1.5;
}

.face-editor-public__example-tag {
    display: block;
    margin-top: 0.35rem;
    color: var(--color-copy);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.4;
}

.face-editor-public--use-cases > .public-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.face-editor-public--use-cases > .public-grid > .public-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.face-editor-public__use-case-examples {
    margin-bottom: 1rem;
}

.face-editor-public--features > .public-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.face-editor-public--features > .public-grid > .public-card:nth-child(-n + 3) {
    grid-column: 1 / -1;
}

.face-editor-public--features > .public-grid > .public-card:nth-child(1),
.face-editor-public--features > .public-grid > .public-card:nth-child(2),
.face-editor-public--features > .public-grid > .public-card:nth-child(3) {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: start;
    gap: clamp(1rem, 3vw, 2rem);
}

@media (max-width: 1050px) {
    .face-editor-public--use-cases > .public-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .face-editor-public--features > .public-grid > .public-card:nth-child(1),
    .face-editor-public--features > .public-grid > .public-card:nth-child(2),
    .face-editor-public--features > .public-grid > .public-card:nth-child(3) {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .face-editor-public--hero {
        grid-template-columns: 1fr;
    }

    .face-editor-public--use-cases > .public-grid {
        grid-template-columns: 1fr;
    }

    .face-editor-public--features > .public-grid {
        grid-template-columns: 1fr;
    }

    .face-editor-public--features > .public-grid > .public-card:nth-child(1),
    .face-editor-public--features > .public-grid > .public-card:nth-child(2),
    .face-editor-public--features > .public-grid > .public-card:nth-child(3) {
        grid-template-columns: 1fr;
    }

    .face-editor-public__feature-image-grid--hair {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1.5rem auto;
        row-gap: 0.5rem;
    }

    .face-editor-public__feature-image-grid--hair > .face-editor-public__example-item:first-child {
        grid-column: 1;
        grid-row: 1;
        justify-self: center;
        width: calc((100% - clamp(0.45rem, 1.5vw, 0.8rem)) / 2);
    }

    .face-editor-public__feature-image-grid--hair > .face-editor-public__proof-results {
        grid-column: 1;
        grid-row: 3;
        width: 100%;
    }

    .face-editor-public__feature-image-grid--hair > .face-editor-public__proof-arrow {
        grid-column: 1;
        grid-row: 2;
        transform: rotate(90deg);
    }
}

@media (max-width: 380px) {
    .face-editor-public__use-case-pair,
    .face-editor-public__feature-image-grid--skin,
    .face-editor-public__feature-image-grid--expression {
        grid-template-columns: 1fr;
        row-gap: 2rem;
    }

    .face-editor-public__feature-image-grid--hair {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1.5rem auto;
        row-gap: 0.5rem;
    }

    .face-editor-public__use-case-pair > .face-editor-public__example-item,
    .face-editor-public__feature-image-grid--skin > .face-editor-public__example-item,
    .face-editor-public__feature-image-grid--expression > .face-editor-public__example-item,
    .face-editor-public__feature-image-grid--hair > .face-editor-public__example-item {
        width: min(100%, 180px);
        justify-self: center;
    }

    .face-editor-public__feature-image-grid--hair > .face-editor-public__example-item:first-child {
        grid-column: auto;
        width: min(100%, 180px);
    }

    .face-editor-public__feature-image-grid--hair > .face-editor-public__proof-results {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .face-editor-public__feature-image-grid--hair > .face-editor-public__proof-results > .face-editor-public__example-item {
        width: min(100%, 180px);
        justify-self: center;
    }

    .face-editor-public__use-case-pair > .face-editor-public__proof-arrow,
    .face-editor-public__feature-image-grid--skin > .face-editor-public__proof-arrow,
    .face-editor-public__feature-image-grid--expression > .face-editor-public__proof-arrow {
        transform: translate(-50%, -50%) rotate(90deg);
    }
}

.face-editor-public--hero .face-editor-public__hero-copy {
    width: 100%;
}

.face-editor-public--hero .face-editor-public__hero-copy > .public-lead {
    max-width: 74ch;
}

.face-editor-public--hero .face-editor-public__hero-body {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: start;
    gap: clamp(1.25rem, 3vw, 2rem);
    margin-top: clamp(1.25rem, 2.5vw, 2rem);
}

.face-editor-public--hero .face-editor-public__hero-workspace {
    width: min(100%, 460px);
    justify-self: center;
}

.face-editor-public--hero .face-editor-public__hero-workspace > .face-editor-hero-tool {
    margin-top: 0;
}

.face-editor-public--hero .face-editor-public__hero-workspace > .public-muted {
    margin-block: 0.75rem 0;
}

.face-editor-public--hero .face-editor-public__hero-examples {
    display: grid;
    width: min(100%, 590px);
    justify-self: center;
    padding: clamp(0.75rem, 1.5vw, 1.25rem);
    border: var(--border-soft);
    border-radius: 1rem;
    background: rgb(255 253 246 / 88%);
}

@media (max-width: 900px) {
    .face-editor-public--hero .face-editor-public__hero-body {
        grid-template-columns: 1fr;
    }

    .face-editor-public--hero .face-editor-public__hero-examples {
        order: 1;
    }

    .face-editor-public--hero .face-editor-public__hero-workspace {
        width: min(100%, 590px);
        order: 2;
    }
}

.face-editor-hero-tool {
    display: grid;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem;
    border: var(--border-soft);
    border-radius: 1rem;
    color: var(--color-ink);
    background: var(--color-panel);
}

.face-editor-hero-tool h2 {
    margin: 0;
    color: var(--color-ink);
    font-size: 1rem;
}

.face-editor-hero-tool__group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    min-width: 0;
    margin: 0;
    padding: 0.5rem;
    border: var(--border-soft);
    border-radius: 0.75rem;
}

.face-editor-hero-tool__group > legend {
    grid-column: 1 / -1;
    padding: 0 0.25rem;
    color: var(--color-ink);
    font-size: 0.78rem;
    font-weight: 900;
}

.face-editor-hero-tool__group > .face-editor-hero-tool__field {
    grid-column: 1 / -1;
}

.face-editor-hero-tool__field {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
}

.face-editor-hero-tool__field > span {
    color: var(--color-ink);
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.3;
}

.face-editor-hero-tool input,
.face-editor-hero-tool select,
.face-editor-hero-tool textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: var(--border-soft);
    border-radius: 0.6rem;
    color: var(--color-ink);
    background: var(--color-paper);
    font: inherit;
}

.face-editor-hero-tool input[type="file"] {
    padding: 0.4rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.face-editor-hero-tool input[type="text"],
.face-editor-hero-tool select,
.face-editor-hero-tool textarea {
    padding: 0.4rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.face-editor-hero-tool textarea {
    resize: vertical;
}

.face-editor-hero-tool__field small,
.face-editor-hero-tool__note {
    color: var(--color-copy);
    font-size: 0.72rem;
    line-height: 1.4;
}

.face-editor-hero-tool .face-editor-hero-tool__feature-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.face-editor-hero-tool__feature-choice {
    display: block;
    min-width: 0;
    padding: 0.35rem 0.4rem;
    border: var(--border-soft);
    border-radius: 0.6rem;
    color: var(--color-copy);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.face-editor-hero-tool__feature-input:checked + .face-editor-hero-tool__feature-choice {
    border-color: var(--color-primary-dark);
    color: var(--color-ink);
    background: var(--color-muted);
}

.face-editor-hero-tool__feature-input:focus-visible + .face-editor-hero-tool__feature-choice {
    outline: 2px solid var(--color-support);
    outline-offset: 2px;
}

.face-editor-hero-tool__preset-panel {
    display: none;
    grid-column: 1 / 3;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    min-width: 0;
    padding-top: 0.2rem;
}

.face-editor-hero-tool__feature-input[value="skin"]:checked ~ .face-editor-hero-tool__preset-panel[data-feature="skin"],
.face-editor-hero-tool__feature-input[value="hairstyle"]:checked ~ .face-editor-hero-tool__preset-panel[data-feature="hairstyle"],
.face-editor-hero-tool__feature-input[value="hair_color"]:checked ~ .face-editor-hero-tool__preset-panel[data-feature="hair_color"],
.face-editor-hero-tool__feature-input[value="expression"]:checked ~ .face-editor-hero-tool__preset-panel[data-feature="expression"],
.face-editor-hero-tool__feature-input[value="age_impression"]:checked ~ .face-editor-hero-tool__preset-panel[data-feature="age_impression"],
.face-editor-hero-tool__feature-input[value="slim_face"]:checked ~ .face-editor-hero-tool__preset-panel[data-feature="slim_face"] {
    display: grid;
}

.face-editor-hero-tool__compact-settings {
    display: grid;
    grid-column: 3 / 4;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

.face-editor-hero-tool__details {
    min-width: 0;
    border-top: var(--border-soft);
}

.face-editor-hero-tool__details summary {
    padding-top: 0.7rem;
    color: var(--color-ink);
    font-size: 0.78rem;
    font-weight: 900;
    cursor: pointer;
}

.face-editor-hero-tool__details > .face-editor-hero-tool__field {
    padding-top: 0.7rem;
}

.face-editor-hero-tool__note {
    margin: 0;
}

.face-editor-hero-tool__login-form {
    display: grid;
    gap: 0.6rem;
}

.face-editor-hero-tool__login-form .site-button {
    width: 100%;
    margin: 0;
}

.face-editor-hero-tool input:focus-visible,
.face-editor-hero-tool select:focus-visible,
.face-editor-hero-tool textarea:focus-visible,
.face-editor-hero-tool summary:focus-visible {
    outline: 2px solid var(--color-support);
    outline-offset: 2px;
}

@media (max-width: 520px) {
    .face-editor-hero-tool {
        padding: 0.75rem;
    }

    .face-editor-hero-tool__preset-panel,
    .face-editor-hero-tool__compact-settings {
        grid-template-columns: 1fr;
    }

    .face-editor-hero-tool__preset-panel {
        grid-column: 1 / 2;
    }

    .face-editor-hero-tool__compact-settings {
        grid-column: 2 / 3;
    }

    .face-editor-hero-tool__feature-group {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
