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

html {
    overflow-x: clip;
    background: #fff;
}

body {
    margin: 0;
}

body.home-page {
    --app-font-family: "Inter", system-ui, sans-serif;
    --app-font-weight-regular: 400;
    --app-font-weight-bold: 700;
    --app-font-weight-extra-bold: 800;
    --app-type-landing-h1-size: 32px;
    --app-type-landing-h1-line: 32px;
    --app-type-landing-h2-size: 22px;
    --app-type-landing-h2-line: 24px;
    --app-type-body-size: 16px;
    --app-type-body-line: 20px;
    --app-type-control-size: 14px;
    --app-type-control-line: 16px;
    --app-type-caption-size: 12px;
    --app-type-caption-line: 14px;
    --app-letter-spacing: -0.7px;
    --app-page-inline: clamp(14px, 4.071cqi, 18px);
    --app-page-top: clamp(22px, 6.107cqi, 28px);
    --landing-h1-copy-gap: clamp(24px, 7.111cqi, 32px);
    --landing-copy-gap: clamp(20px, 5.333cqi, 24px);
    --landing-copy-cta-gap: clamp(24px, 6.222cqi, 28px);
    width: var(--app-logical-width, min(100%, 450px));
    max-width: none;
    min-height: var(--app-logical-height, 100svh);
    margin-inline: auto;
    overflow-x: clip;
    container-name: home-frame;
    container-type: inline-size;
    background: #fff;
    color: #000;
    font-family: var(--app-font-family);
    font-size: var(--app-type-body-size);
    font-weight: var(--app-font-weight-regular);
    line-height: var(--app-type-body-line);
    letter-spacing: var(--app-letter-spacing);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    zoom: var(--app-scale, 1);
}

.home-main {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    width: 100%;
    min-height: var(--app-logical-height, 100svh);
    padding: max(var(--app-page-top), env(safe-area-inset-top))
        var(--app-page-inline)
        max(14px, env(safe-area-inset-bottom));
}

.home-hero {
    align-self: start;
    display: grid;
    gap: 0;
    width: 100%;
    padding-block: clamp(24px, 8cqi, 36px);
    text-align: left;
}

.home-title,
.home-copy p,
.superhuman-footer p {
    margin: 0;
}

.home-page .app-type-landing-h1 {
    color: #e13333;
    font-family: var(--app-font-family);
    font-size: var(--app-type-landing-h1-size);
    font-weight: var(--app-font-weight-extra-bold);
    line-height: var(--app-type-landing-h1-line);
    text-transform: uppercase;
}

.home-page .app-type-landing-h2 {
    font-family: var(--app-font-family);
    font-size: var(--app-type-landing-h2-size);
    font-weight: var(--app-font-weight-extra-bold);
    line-height: var(--app-type-landing-h2-line);
    text-transform: uppercase;
}

.home-page .app-type-body {
    font-family: var(--app-font-family);
    font-size: var(--app-type-body-size);
    font-weight: var(--app-font-weight-regular);
    line-height: var(--app-type-body-line);
}

.home-page .app-type-control {
    font-family: var(--app-font-family);
    font-size: var(--app-type-control-size);
    font-weight: var(--app-font-weight-regular);
    line-height: var(--app-type-control-line);
}

.home-page .app-type-caption,
.home-page .app-type-caption :where(a, p) {
    font-family: var(--app-font-family);
    font-size: var(--app-type-caption-size);
    font-weight: var(--app-font-weight-regular);
    line-height: var(--app-type-caption-line);
}

.home-copy {
    display: grid;
    gap: var(--landing-copy-gap);
    margin: var(--landing-h1-copy-gap) 0 var(--landing-copy-cta-gap);
}

.home-actions {
    display: grid;
    gap: 8px;
}

.home-start-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    border: 1px solid #000;
    border-radius: 12px;
    padding: 10px 18px;
    background: #000;
    color: #fff;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    touch-action: manipulation;
}

.home-sign-in-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    border: 1px solid #000;
    border-radius: 12px;
    padding: 10px 18px;
    background: #fff;
    color: #000;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    touch-action: manipulation;
}

.home-preview {
    min-width: 0;
    margin: 0;
}

.home-preview img {
    display: block;
    width: 100%;
    height: auto;
}

/* Let the final card fade out to suggest the rest of the results below. */
.home-preview--factors .product-phone {
    display: flow-root;
    overflow: clip;
    padding-bottom: 0;
    -webkit-mask-image: linear-gradient(#000 calc(100% - 44px), transparent);
    mask-image: linear-gradient(#000 calc(100% - 44px), transparent);
}

.home-preview--factors img {
    margin-bottom: -12px;
}

.home-features {
    display: grid;
    gap: 80px;
    margin: 48px 0 32px;
}

.home-feature {
    display: grid;
    min-width: 0;
    gap: 16px;
}

.home-feature p,
.home-feature-title {
    margin: 0;
}

.home-feature-title {
    overflow-wrap: anywhere;
}

.home-disclaimer {
    margin: 32px 0 0;
    color: #6b6b6b;
}

@supports (corner-shape: squircle) {
    .home-start-button,
    .home-sign-in-link {
        corner-shape: squircle;
    }
}

.home-start-button:focus-visible,
.home-sign-in-link:focus-visible,
.superhuman-footer a:focus-visible {
    outline: 3px solid #000;
    outline-offset: 3px;
}

.superhuman-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-items: stretch;
    gap: 8px;
    width: 100%;
    border-top: 0;
    padding-top: 0;
    color: #6b6b6b;
    text-align: left;
}

.superhuman-footer p {
    min-width: 0;
    white-space: nowrap;
}

.superhuman-footer-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    white-space: nowrap;
}

.superhuman-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    color: inherit;
    text-align: center;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

@media (hover: hover) {
    .home-start-button:hover {
        background: #222;
    }

    .superhuman-footer a:hover {
        color: #e13333;
    }
}

/* Preserve physical touch targets when the shared frame scales below 360px. */
.home-start-button,
.home-sign-in-link {
    min-height: max(48px, calc(44px / var(--app-scale, 1)));
}
