.resource-launcher {
    align-items: flex-end;
    background: rgba(15, 23, 42, 0.48);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 16px;
    position: fixed;
    z-index: 10150;
}

.resource-launcher.is-open {
    display: flex;
}

.notebook-card[data-resource-launcher-pilot="true"] {
    appearance: none;
    font: inherit;
    text-align: left;
    width: 100%;
}

.resource-launcher [hidden] {
    display: none !important;
}

.resource-launcher__backdrop {
    inset: 0;
    position: absolute;
}

.resource-launcher__sheet {
    background: #fff;
    border: 1px solid rgba(255, 90, 46, 0.18);
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
    max-height: calc(100dvh - 32px);
    max-width: 520px;
    overflow: auto;
    padding: 22px;
    padding-bottom: max(22px, env(safe-area-inset-bottom));
    position: relative;
    width: min(100%, 520px);
}

.resource-launcher__header {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.resource-launcher__eyebrow {
    color: #10b981;
    font-size: 0.78rem;
    font-weight: 800;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.resource-launcher__header h2 {
    color: #111827;
    font-size: 1.55rem;
    line-height: 1.2;
    margin: 0;
}

.resource-launcher__icon-btn {
    align-items: center;
    background: #f3f4f6;
    border: 0;
    border-radius: 50%;
    color: #4b5563;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.resource-launcher__provider {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    padding: 14px;
}

.resource-launcher__provider-icon {
    align-items: center;
    background: #ecfdf5;
    border-radius: 50%;
    color: #059669;
    display: inline-flex;
    flex: 0 0 auto;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.resource-launcher__provider span,
.resource-launcher__provider strong {
    display: block;
}

.resource-launcher__provider div > span {
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.resource-launcher__provider strong {
    color: #111827;
}

.resource-launcher__notice {
    color: #4b5563;
    line-height: 1.55;
    margin: 16px 0;
}

.resource-launcher__actions {
    display: grid;
    gap: 10px;
}

.resource-launcher__btn {
    align-items: center;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 800;
    gap: 9px;
    justify-content: center;
    min-height: 48px;
    padding: 12px 16px;
}

.resource-launcher__btn:disabled {
    cursor: wait;
    opacity: 0.62;
}

.resource-launcher__btn--primary {
    background: linear-gradient(135deg, #ff5a2e 0%, #10b981 100%);
    color: #fff;
}

.resource-launcher__btn--secondary {
    background: #f3f4f6;
    color: #374151;
}

.resource-launcher__help-link {
    background: transparent;
    border: 0;
    color: #ea580c;
    cursor: pointer;
    display: block;
    font: inherit;
    font-weight: 800;
    margin: 14px auto 0;
    min-height: 44px;
}

.resource-launcher__help h3,
.resource-launcher__report-heading h3 {
    color: #111827;
    font-size: 1.08rem;
    margin: 0 0 8px;
}

.resource-launcher__help ol {
    color: #374151;
    line-height: 1.55;
    margin: 0 0 12px;
    padding-left: 22px;
}

.resource-launcher__help p,
.resource-launcher__report-heading p {
    color: #6b7280;
    line-height: 1.5;
    margin: 0 0 16px;
}

.resource-launcher__error {
    align-items: flex-start;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    color: #9a3412;
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    padding: 14px;
}

.resource-launcher__error p {
    line-height: 1.45;
    margin: 0;
}

.resource-launcher__report-heading {
    align-items: flex-start;
    display: flex;
    gap: 12px;
}

.resource-launcher__report-heading > i {
    color: #10b981;
    font-size: 1.35rem;
    margin-top: 2px;
}

.resource-launcher__report-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.resource-launcher__report-grid button {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #374151;
    cursor: pointer;
    font: inherit;
    font-weight: 750;
    min-height: 46px;
    padding: 10px;
}

body.resource-launcher-open {
    overflow: hidden;
}

@media (min-width: 769px) {
    .resource-launcher {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .resource-launcher {
        padding: 0;
    }

    .resource-launcher__sheet {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        max-height: min(88dvh, 720px);
        padding: 20px;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .resource-launcher *,
    .resource-launcher *::before,
    .resource-launcher *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

.resource-interstitial-page {
    align-items: center;
    background: #f7f8fa;
    color: #111827;
    display: flex;
    font-family: Arial, Helvetica, sans-serif;
    justify-content: center;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
}

.resource-interstitial {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    max-width: 460px;
    padding: 28px 22px;
    text-align: center;
    width: 100%;
}

.resource-interstitial__logo {
    height: 64px;
    margin-bottom: 12px;
    object-fit: contain;
    width: 96px;
}

.resource-interstitial__eyebrow {
    color: #10b981;
    font-size: 0.78rem;
    font-weight: 800;
    margin: 0 0 5px;
    text-transform: uppercase;
}

.resource-interstitial h1 {
    font-size: 1.5rem;
    line-height: 1.25;
    margin: 0;
}

.resource-interstitial__provider {
    color: #6b7280;
    font-weight: 700;
    margin: 6px 0 18px;
}

.resource-interstitial__notice,
.resource-interstitial__help {
    color: #4b5563;
    line-height: 1.55;
    margin: 0 0 18px;
}

.resource-interstitial__help {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-top: 12px;
    padding: 13px;
    text-align: left;
}

.resource-interstitial__actions {
    display: grid;
    gap: 10px;
}

.resource-interstitial__btn {
    align-items: center;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 800;
    justify-content: center;
    min-height: 48px;
    padding: 12px 16px;
    text-decoration: none;
}

.resource-interstitial__btn--primary {
    background: linear-gradient(135deg, #ff5a2e 0%, #10b981 100%);
    color: #fff;
}

.resource-interstitial__btn--secondary {
    background: #f3f4f6;
    color: #374151;
}

.resource-interstitial__back {
    background: transparent;
    border: 0;
    color: #6b7280;
    cursor: pointer;
    font: inherit;
    font-weight: 750;
    margin-top: 18px;
    min-height: 44px;
}

.resource-interstitial__error {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    color: #9a3412;
    line-height: 1.5;
    padding: 14px;
}
