.founder-stories {
    background: #f0f4f8;
}

.founder-stories-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
    background: #d9e2ec;
    border-radius: 6px;
}

.founder-stories-tab {
    min-height: 64px;
    padding: 10px 12px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #334e68;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    cursor: pointer;
}

.founder-stories-tab[aria-selected="true"] {
    background: #fff;
    color: #0369a1;
    box-shadow: 0 1px 4px rgba(16, 42, 67, 0.14);
}

.founder-stories-tab-count {
    display: inline-block;
    margin-left: 5px;
    color: #627d98;
    font-size: 13px;
    font-weight: 500;
}

.founder-stories-tab:focus-visible,
.founder-story-photo:focus-visible,
.founder-gallery button:focus-visible {
    outline: 3px solid #0ea5e9;
    outline-offset: 3px;
}

.founder-stories-panel[hidden],
.founder-gallery button[hidden] {
    display: none;
}

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

.founder-story-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #d9e2ec;
    border-radius: 6px;
    background: #fff;
}

.founder-story-photo {
    position: relative;
    display: block;
    overflow: hidden;
    background: #d9e2ec;
}

.founder-story-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    transition: transform 180ms ease;
}

.founder-story-photo:hover img {
    transform: scale(1.025);
}

.founder-story-count {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 5px 8px;
    border-radius: 4px;
    background: rgba(16, 42, 67, 0.9);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.founder-story-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
}

.founder-story-tag,
.founder-story-meta {
    color: #486581;
    font-size: 12px;
    line-height: 1.5;
}

.founder-story-title {
    color: #102a43;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.founder-story-description {
    flex: 1;
    color: #486581;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.founder-story-meta {
    padding-top: 10px;
    border-top: 1px solid #e6edf2;
}

.founder-gallery {
    width: min(1040px, calc(100vw - 24px));
    max-width: none;
    max-height: calc(100dvh - 24px);
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: #fff;
    color: #102a43;
    box-shadow: 0 24px 64px rgba(16, 42, 67, 0.28);
}

.founder-gallery::backdrop {
    background: rgba(7, 25, 40, 0.82);
}

.founder-gallery-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
}

.founder-gallery-heading {
    min-width: 0;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.founder-gallery-close,
.founder-gallery-arrow {
    display: grid;
    flex: none;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.founder-gallery-close {
    background: #f0f4f8;
    color: #243b53;
}

.founder-gallery-stage {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: center;
    background: #102a43;
}

.founder-gallery-stage.is-single {
    grid-template-columns: minmax(0, 1fr);
}

.founder-gallery-arrow {
    justify-self: center;
    background: #243b53;
    color: #fff;
}

.founder-gallery-arrow:hover,
.founder-gallery-close:hover {
    background: #0369a1;
    color: #fff;
}

.founder-gallery-image {
    display: block;
    min-width: 0;
    width: 100%;
    height: auto;
    max-height: min(67dvh, 680px);
    object-fit: contain;
}

.founder-gallery-footer {
    padding: 14px 20px 18px;
}

.founder-gallery-counter {
    color: #0369a1;
    font-size: 13px;
    font-weight: 700;
}

.founder-gallery-description {
    margin-top: 7px;
    color: #486581;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

@media (max-width: 800px) {
    .founder-stories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .founder-stories-tab {
        min-height: 76px;
        padding: 8px 5px;
        font-size: 13px;
    }

    .founder-stories-tab-count {
        display: block;
        margin: 2px 0 0;
        font-size: 12px;
    }

    .founder-stories-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .founder-gallery-header {
        padding: 12px;
    }

    .founder-gallery-heading {
        font-size: 16px;
    }

    .founder-gallery-stage {
        grid-template-columns: 38px minmax(0, 1fr) 38px;
    }

    .founder-gallery-arrow {
        width: 34px;
        height: 38px;
    }

    .founder-gallery-image {
        max-height: min(55dvh, 520px);
    }

    .founder-gallery-footer {
        padding: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .founder-story-photo img {
        transition: none;
    }
}
