html:has(> body[data-page="in"]) {
    background:
        radial-gradient(900px 420px at 50% -140px, var(--brand-soft), transparent 72%) no-repeat,
        var(--page);
}

body {
    padding-top: 28px;
}

.home-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 16px;
    max-width: none;
    margin-bottom: 64px;
}

.brand {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 1px;
    margin: 0;
    font-size: 22px;
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1;
}

.brand img {
    display: block;
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.home-notice {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
}

.home-notice a {
    margin: 0;
}

.home-description {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: 30em;
    margin: 64px 0 0;
    color: var(--text);
    font-size: clamp(22px, 2.6vw, 28px);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.45;
    word-break: keep-all;
    text-wrap: balance;
}

.home-description a {
    display: flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    margin: 28px 0 0;
    color: var(--brand);
    font-size: 15px;
    font-weight: 550;
    letter-spacing: 0;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
}

.home-description a::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-top: 1px;
    border-top: 1.75px solid currentColor;
    border-right: 1.75px solid currentColor;
    transform: rotate(45deg);
    transition: transform 200ms var(--ease);
}

.home-description a:hover {
    color: var(--brand);
}

.home-description a:hover::after {
    transform: translateX(3px) rotate(45deg);
}

.home-section {
    margin-top: 56px;
}

.home-section .section-title {
    margin-top: 0;
}

.subtitles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.subtitles--clients {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.myButton {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 72px;
    margin: 0;
    padding: 20px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.45;
    text-align: left;
    text-decoration: none;
    overflow-wrap: anywhere;
    cursor: pointer;
    transition: border-color 200ms var(--ease), background-color 200ms var(--ease), box-shadow 200ms var(--ease), transform 200ms var(--ease);
}

.myButton b {
    min-width: 0;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.myButton:hover,
.myButton:focus-visible {
    border-color: var(--border-strong);
    background: var(--surface-hover);
    box-shadow: var(--shadow-md);
    color: var(--text);
    transform: translateY(-2px);
}

.myButton:active {
    border-color: var(--border-strong);
    background: var(--surface-active);
    transform: translateY(0) scale(.992);
}

.myButton:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.rule-picker > .myButton[aria-expanded="true"],
#shareBtn:has(.share-popover.active) {
    border-color: var(--border-strong);
    background: var(--surface-hover);
    box-shadow: var(--shadow-sm), var(--ring);
    transform: none;
}

.subtitles > a:not(#shareBtn)::after {
    content: "";
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    margin-right: 3px;
    border-top: 1.5px solid var(--subtle);
    border-right: 1.5px solid var(--subtle);
    opacity: .6;
    transform: rotate(45deg);
    transition: transform 200ms var(--ease), border-color 200ms var(--ease), opacity 200ms var(--ease);
}

.subtitles > a:not(#shareBtn):hover::after {
    border-color: var(--text);
    opacity: 1;
    transform: translateX(3px) rotate(45deg);
}

.client-card {
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    min-height: 144px;
    padding: 22px;
}

.client-card > img {
    display: block;
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-soft);
    object-fit: contain;
    transition: transform 200ms var(--ease);
}

.client-card > img[src*="/IMG/app-"] {
    padding: 0;
    border-radius: 11px;
    object-fit: cover;
}

.client-card:hover > img {
    transform: scale(1.05);
}

.subtitles > a.client-card::after {
    position: absolute;
    top: 26px;
    right: 22px;
}

.client-card .rule-chevron {
    position: absolute;
    top: 25px;
    right: 23px;
    margin: 0;
}

.rule-picker > .myButton.client-card[aria-expanded="true"] .rule-chevron {
    top: 29px;
    margin: 0;
}

#shareBtn.client-card b {
    min-height: 0;
}

.rule-picker {
    position: relative;
    min-width: 0;
}

.rule-picker:focus-within {
    z-index: 3;
}

.rule-picker > .myButton {
    height: 100%;
}

.rule-chevron {
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    margin: -4px 3px 0 0;
    overflow: hidden;
    border-right: 1.5px solid var(--subtle);
    border-bottom: 1.5px solid var(--subtle);
    color: transparent;
    font-size: 0;
    transform: rotate(45deg);
    transition: transform 200ms var(--ease), border-color 200ms var(--ease);
}

.rule-picker > .myButton:hover .rule-chevron {
    border-color: var(--text);
}

.rule-picker > .myButton[aria-expanded="true"] .rule-chevron {
    margin-top: 4px;
    border-color: var(--text);
    transform: rotate(225deg);
}

.rule-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 10;
    box-sizing: border-box;
    width: max-content;
    min-width: 100%;
    max-width: calc(100vw - 36px);
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-popover);
    animation: pop-in 160ms var(--ease);
}

.rule-options[hidden] {
    display: none;
}

.rule-options a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 450;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 140ms var(--ease), color 140ms var(--ease);
}

.rule-options a + a {
    margin-top: 2px;
}

.rule-options a:hover {
    background: var(--surface-active);
    color: var(--text);
}

.rule-options a:focus-visible {
    outline: none;
    background: var(--surface-active);
    box-shadow: inset 0 0 0 1.5px var(--focus);
    color: var(--text);
}

#shareBtn {
    position: relative;
}

#shareBtn:focus-within {
    z-index: 3;
}

.share-popover {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    z-index: 10;
    box-sizing: border-box;
    width: max-content;
    max-width: calc(100vw - 36px);
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-popover);
    cursor: default;
}

.share-popover.active {
    display: block;
    animation: pop-in 160ms var(--ease);
}

.share-flex {
    display: flex;
    align-items: center;
    gap: 6px;
}

.s-btn-img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-soft);
    cursor: pointer;
    transition: border-color 140ms var(--ease), background-color 140ms var(--ease), transform 140ms var(--ease);
}

.s-btn-img:hover {
    border-color: var(--border-strong);
    background: var(--surface-active);
}

.s-btn-img:active {
    transform: scale(.96);
}

.s-btn-img img {
    display: block;
    width: 30px;
    height: 30px;
}

.arrow-down {
    position: absolute;
    top: 100%;
    left: 24px;
    width: 10px;
    height: 10px;
    margin-top: -5px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    transform: rotate(45deg);
}

@keyframes pop-in {
    from { opacity: 0; transform: translateY(4px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
    .subtitles--clients {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    body {
        padding-top: 20px;
    }

    .home-header {
        margin-bottom: 52px;
    }

    .home-description {
        margin-top: 44px;
        font-size: 21px;
        line-height: 1.5;
    }

    .home-description a {
        margin-top: 22px;
    }

    .home-section {
        margin-top: 44px;
    }

    .subtitles,
    .subtitles--clients {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .myButton {
        min-height: 64px;
        padding: 16px;
        border-radius: 16px;
        font-size: 14px;
    }

    .client-card {
        gap: 18px;
        min-height: 120px;
        padding: 16px;
    }

    .subtitles > a.client-card::after {
        top: 22px;
        right: 16px;
    }

    .client-card .rule-chevron {
        top: 21px;
        right: 17px;
    }

    .rule-picker > .myButton.client-card[aria-expanded="true"] .rule-chevron {
        top: 25px;
    }

    .share-popover {
        right: 0;
        left: auto;
    }

    .arrow-down {
        right: 24px;
        left: auto;
    }
}

@media (hover: none) {
    .myButton:hover {
        box-shadow: var(--shadow-sm);
        transform: none;
    }
}
