/* Tabment */
div.module[type="tabment"] .tab-content div[data-tab] { display: none }
div.module[type="tabment"] .tab-content div[aria-hidden='false'] { display: block }

/* Article */
section.module[type="article"] { position: relative }
section.module[type="article"] .container { position: relative; max-width: 1080px; padding: 50px 0 80px 0 }
section.module[type="article"] .container .col-bookmark {
    position: sticky;
    top: 90px; bottom: 0;
    width: 240px;
    max-height: calc(100vh - 125px);
    max-height: calc(100dvh - 125px);
    margin: 5px 60px 2px 0;
    float: left;
    overflow-y: auto;
}

section.module[type="article"] .container .col-bookmark .toc li {
    display: block;
    border-left: 3px solid transparent;
    line-height: 1.4em;
    font-family: 'Maison Neue', sans-serif;
    font-size: .95rem;
    font-feature-settings: "liga" 1, "clig" 1, "calt" 1;
    padding: 0.1em 0 0 10px;
}

section.module[type="article"] .container .col-bookmark .toc li + li { margin-top: 20px }
section.module[type="article"] .container .col-bookmark .toc li:hover { cursor: pointer; border-left-color: #AAA; text-decoration: underline; text-underline-offset: 0.25em }
section.module[type="article"] .container .col-bookmark .toc li.active { border-left-color: #E76A15; font-weight: 700 }

section.module[type="article"] .container .col-content { width: 100%; max-width: calc(100% - 400px); float: left }
section.module[type="article"] .container .col-content h3 { font-size: 1.5rem; font-weight: 600; margin: 50px 0 20px 0 }
section.module[type="article"] .container .col-content p + p { margin-top: 20px }

@media (max-width: 1150px) {
    section.module[type="article"] .container { padding: 30px; margin: 0 }
    section.module[type="article"] .container .col-content { max-width: calc(100% - 300px) }
}

@media (max-width: 768px) {
    section.module[type="article"] .container { padding: 0 15px 50px 15px }
    section.module[type="article"] .container .col-bookmark { top: 50px; width: calc(100% + 30px); border-bottom: 1px solid #E4E4E4; background: #FFF; margin: 0 0 30px -15px; z-index: 995 }
    section.module[type="article"] .container .col-bookmark::before,
    section.module[type="article"] .container .col-bookmark::after { display: none; content: ''; position: absolute; top: 0; bottom: 0; width: 30px; height: 100%; z-index: 999 }
    section.module[type="article"] .container .col-bookmark::before { left: 0; background: linear-gradient(to right, #FFF, 80%, transparent) }
    section.module[type="article"] .container .col-bookmark::after { right: 0; background: linear-gradient(to left, #FFF, 80%, transparent) }
    section.module[type="article"] .container .col-bookmark.l-active::before { display: block }
    section.module[type="article"] .container .col-bookmark.r-active::after { display: block }

    section.module[type="article"] .container .col-bookmark .toc { white-space: nowrap; overflow-x: auto; overflow-y: hidden; -ms-overflow-style: none }
    section.module[type="article"] .container .col-bookmark .toc::-webkit-scrollbar { display: none }
    section.module[type="article"] .container .col-bookmark .toc li { display: inline-flex; flex-direction: column; align-items: center; border-left: 0; border-bottom: 3px solid transparent; line-height: 2em; font-size: .9rem; letter-spacing: -.01em; padding: .7em 0 .3em 0 }
    section.module[type="article"] .container .col-bookmark .toc li:hover { border-bottom-color: #AAA; text-decoration: none }
    section.module[type="article"] .container .col-bookmark .toc li::after { content: attr(data-text); content: attr(data-text) / ''; height: 0; font-weight: 700; visibility: hidden; overflow: hidden }
    section.module[type="article"] .container .col-bookmark .toc li.active { border-bottom-color: #E76A15 }
    section.module[type="article"] .container .col-bookmark .toc li:first-child { margin-left: 15px }
    section.module[type="article"] .container .col-bookmark .toc li:last-child { margin-right: 15px }
    section.module[type="article"] .container .col-bookmark .toc li + li { margin: 0 0 0 20px }
    section.module[type="article"] .container .col-content { max-width: 100%; float: left }
    section.module[type="article"] .container .col-content h3 { font-size: 1.15rem; margin: 30px 0 15px 0 }
}

div.module[type="specs"] .container { max-width: 1080px }

/* Lightbox */
div.module[type="lightbox"] {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5);
    padding: 30px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

div.module[type="lightbox"].centered {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: unset;
}

@media (prefers-color-scheme: dark) {
    div.module[type="lightbox"] { background-color: rgba(0, 0, 0, 0.5) }
}

div.module[type="lightbox"] .inner-content {
    position: relative;
    max-width: 768px;
    border-radius: 24px;
    background: #FFF;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 
                0 1px 3px rgba(0, 0, 0, 0.04);
    transform: scale(0.92) translateY(10px);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

div.module[type="lightbox"].active { opacity: 1; visibility: visible }
div.module[type="lightbox"].active .inner-content { transform: scale(1) translateY(0) }

div.module[type="lightbox"] header { display: flex; justify-content: flex-end; position: sticky; top: -31px; height: 0; background: unset; padding: unset; overflow: visible; z-index: 100; pointer-events: none }

div.module[type="lightbox"] .close-btn {
    cursor: pointer;
    display: flex;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #EEE;
    align-items: center;
    justify-content: center;
    margin: 16px 16px 0 0;
    transition: background-color 0.2s, transform 0.2s;
    pointer-events: auto;
}

div.module[type="lightbox"] .close-btn::before,
div.module[type="lightbox"] .close-btn::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 1.5px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 1px;
    transition: background-color 0.2s;
}

div.module[type="lightbox"] .close-btn::before { transform: rotate(45deg) }
div.module[type="lightbox"] .close-btn::after { transform: rotate(-45deg) }
div.module[type="lightbox"] .close-btn:hover { background-color: #DDD; color: rgba(0, 0, 0, 0.8) }
div.module[type="lightbox"] .close-btn:active { transform: scale(0.92) }

div.module[type="lightbox"] main { border-radius: 24px; padding: 32px; overflow: hidden }

@media (max-width: 768px) {
    div.module[type="lightbox"] { padding: 10px }
    div.module[type="lightbox"] header { top: -10px }
    div.module[type="lightbox"] main { padding: 28px 20px }
    div.module[type="lightbox"] .close-btn { margin: 10px 10px }
}

/* Accordion */
.module[type="accordion"] { font-family: 'Maison Neue', sans-serif }
.module[type="accordion"] details { border-bottom: 2px solid #DDD; padding: 25px 0 }
.module[type="accordion"] details:last-child { border-bottom: none }

.module[type="accordion"] summary {
    cursor: pointer;
    display: block;
    position: relative;
    font-size: .95rem;
    line-height: 1.4em;
    list-style: none;
    padding-right: 20px;
    margin-bottom: -2px;
    user-select: none;
}

.module[type="accordion"] summary:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2px }
.module[type="accordion"] summary::-webkit-details-marker { display: none }
.module[type="accordion"] summary::after { content: ""; position: absolute; top: 50%; right: 3px; border: solid #000; border-width: 0 0 1.5px 1.5px; padding: 5px; transform: translateY(-90%) rotate(-45deg) }
.module[type="accordion"] details[open] summary::after { transform: translateY(-30%) rotate(135deg) }

.module[type="accordion"] .inner { margin-top: 20px }
.module[type="accordion"] .inner p { color: #000; font-size: .95rem; line-height: 1.5em }

@media (max-width: 768px) {
    .module[type="accordion"] .inner { margin-top: 30px }
    .module[type="accordion"] .inner p { line-height: 1.6em }
}
