/* shadcn/ui 風アコーディオン。
   Markdown では <div class="smooth-accordion" markdown> 内に ??? details を並べる。 */
.md-typeset .smooth-accordion {
    --smooth-accordion-border: rgba(255, 255, 255, 0.1);
    --smooth-accordion-fg: #fafafa;
    --smooth-accordion-muted: #a1a1aa;
    width: 100%;
    margin: 1.5rem 0;
    color: var(--smooth-accordion-fg);
    background: transparent !important;
}

.md-typeset .smooth-accordion details,
.md-typeset .smooth-accordion details.note {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--smooth-accordion-border) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit;
    font-size: 0.8rem !important;
    overflow: visible;
    transition: none;
}

.md-typeset .smooth-accordion details:focus-within,
.md-typeset .smooth-accordion details.note:focus-within {
    box-shadow: none !important;
}

.md-typeset .smooth-accordion details > summary {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 !important;
    padding: 0.8rem 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--smooth-accordion-fg);
    font-size: 0.875em;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
    list-style: none;
    outline-offset: 4px;
    transition: color 0.15s ease;
}

.md-typeset .smooth-accordion details > summary::-webkit-details-marker {
    display: none;
}

.md-typeset .smooth-accordion details > summary::before {
    content: none !important;
    display: none !important;
    background: transparent !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
}

.md-typeset .smooth-accordion details > summary::after {
    content: "";
    position: static !important;
    inset: auto !important;
    display: block;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin: 0 !important;
    border: 0 !important;
    background-color: currentColor !important;
    color: inherit !important;
    opacity: 0.72;
    transform: rotate(0deg);
    transition:
        transform 0.2s ease,
        opacity 0.15s ease;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.md-typeset .smooth-accordion details > summary:hover {
    text-decoration: underline;
    text-underline-offset: 0.25rem;
}

.md-typeset .smooth-accordion details > summary:hover::after {
    opacity: 1;
}

.md-typeset .smooth-accordion details[data-state="open"] > summary::after,
.md-typeset .smooth-accordion:not([data-smooth-accordion-ready]) details[open] > summary::after {
    transform: rotate(180deg);
}

.md-typeset .smooth-accordion details > .smooth-accordion__content {
    margin-top: 0;
    margin-bottom: 0 !important;
    color: var(--smooth-accordion-muted);
    font-size: 0.875em;
    line-height: 1.55;
    background: transparent !important;
    overflow: hidden;
    will-change: height;
}

.md-typeset .smooth-accordion details > .smooth-accordion__content[data-state="closed"] {
    height: 0;
}

.md-typeset .smooth-accordion .smooth-accordion__content-inner {
    padding-bottom: 0.8rem;
}

.md-typeset .smooth-accordion .smooth-accordion__content-inner > :first-child {
    margin-top: 0;
}

.md-typeset .smooth-accordion .smooth-accordion__content-inner > :last-child {
    margin-bottom: 0;
}

.md-typeset .smooth-accordion details > :not(summary):not(.smooth-accordion__content) {
    margin-top: 0;
    margin-bottom: 0.8rem !important;
    color: var(--smooth-accordion-muted);
    font-size: 0.875em;
    line-height: 1.55;
    background: transparent !important;
}

.md-typeset .smooth-accordion details > :not(summary):not(.smooth-accordion__content):last-child {
    margin-bottom: 0.8rem !important;
}

@keyframes smooth-accordion-down {
    from {
        height: 0;
    }
    to {
        height: var(--smooth-accordion-content-height);
    }
}

@keyframes smooth-accordion-up {
    from {
        height: var(--smooth-accordion-content-height);
    }
    to {
        height: 0;
    }
}
