#pills-tab {
    width: fit-content;
    max-width: 100%;
    gap: 8px !important;
    padding: 6px;
    border: 1px solid #d4e2e6;
    border-radius: 30px;
    background: #f1f6f8;
}
#pills-tab .nav-item { min-width: 0; flex: 1 1 auto; }
#pills-tab .btn {
    display: inline-flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #5e6872;
    font: 700 14px/22px "Manrope", sans-serif;
    white-space: normal;
    overflow-wrap: anywhere;
    box-shadow: none;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
#pills-tab .btn.active {
    border-color: transparent;
    background: linear-gradient(110deg, #00a6a6, #35c5bd);
    color: #fff;
    box-shadow: 0 4px 12px rgb(0 135 135 / 12%);
}
#pills-tab .btn:focus-visible,
#pills-tabContent > .tab-pane:focus-visible,
#pills-tabContent .text-content a:focus-visible,
#files a:focus-visible {
    outline: 2px solid #009f9f;
    outline-offset: 4px;
}
#pills-tabContent {
    min-width: 0;
    color: #5e6872;
    font: 400 16px/1.65 "Manrope", sans-serif;
}
#pills-tabContent > .tab-pane {
    padding: 32px;
    border: 1px solid #d4e2e6;
    border-radius: 24px;
    background: #fafcfd;
    box-shadow: 0 12px 30px rgb(6 45 59 / 7%);
    overflow-wrap: anywhere;
}
#description,
#character {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scrollbar-color: #9dc9cc #edf4f6;
}
#pills-tabContent .text-content {
    display: flow-root;
    min-width: 0;
    color: inherit;
    font: inherit;
}
#pills-tabContent .text-content p { margin: 0 0 16px; color: inherit; font: inherit; }
#pills-tabContent .text-content :is(h2, h3, h4) {
    margin: 28px 0 16px;
    color: #061d2b;
    font-family: "Manrope", sans-serif;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.025em;
}
#pills-tabContent .text-content h2 { font-size: 28px; }
#pills-tabContent .text-content h3 { font-size: 24px; }
#pills-tabContent .text-content h4 { font-size: 20px; }
#pills-tabContent .text-content :is(h2, h3, h4):first-child { margin-top: 0; }
#pills-tabContent .text-content :is(strong, b) { color: #061d2b; font-weight: 700; }
#pills-tabContent .text-content a:not(.btn) { color: #009f9f; border-bottom-color: #b8dedf; text-decoration: none; }
#pills-tabContent .text-content :is(ul, ol) { margin: 0 0 20px; }
#pills-tabContent .text-content :is(ul, ol) li { padding-left: 24px; margin-bottom: 10px; }
#pills-tabContent .text-content ul li::before { top: .65em; left: 3px; width: 6px; height: 6px; background: #009f9f; }
#pills-tabContent .text-content ol li::before { left: 0; color: #009f9f; }
#pills-tabContent .text-content > :last-child,
#pills-tabContent .text-content :is(td, th) > :last-child { margin-bottom: 0; }

/* Normalize legacy generated copy without changing its markup. */
#pills-tabContent #spalah-content,
#pills-tabContent #spalah-content > think_text {
    display: flow-root;
    color: #5e6872;
    font: 400 16px/1.65 "Manrope", sans-serif;
}
#pills-tabContent #spalah-content p {
    margin: 0 0 20px;
    color: inherit;
    font: inherit;
}
/* A single bold wrapper is used for entire generated paragraphs. */
#pills-tabContent #spalah-content p > :is(strong, b):only-child {
    color: inherit;
    font-weight: inherit;
}
#pills-tabContent #spalah-content :is(h2, h3, h4) > :is(strong, b) {
    color: inherit;
    font-weight: inherit;
}
#pills-tabContent #spalah-content li > p:last-child,
#pills-tabContent #spalah-content > :last-child,
#pills-tabContent #spalah-content > think_text > :last-child {
    margin-bottom: 0;
}

#pills-tabContent .text-content table {
    width: 100%;
    min-width: 0;
    border: 1px solid #d4e2e6;
    border-spacing: 0;
    border-collapse: separate;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}
#pills-tabContent .text-content table:has(tr > :nth-child(5)) { min-width: 800px; }
#pills-tabContent .text-content :is(th, td) {
    padding: 14px 16px;
    border: 0;
    border-right: 1px solid #dce5e9;
    border-bottom: 1px solid #dce5e9;
    vertical-align: middle;
    overflow-wrap: normal;
    color: #5e6872;
    font: 400 14px/22px "Manrope", sans-serif;
}
#character .text-content :is(th, td) { min-width: 72px; }
#character .text-content :is(th, td):first-child { min-width: 200px; }
#pills-tabContent .text-content tr > :last-child { border-right: 0; }
#pills-tabContent .text-content tr:last-child > :is(th, td) { border-bottom: 0; }
#pills-tabContent .text-content th { background: #e5f3f3; color: #061d2b; font-weight: 700; }
#pills-tabContent .text-content td:first-child { color: #061d2b; font-weight: 600; }
#pills-tabContent .text-content tbody tr:nth-child(even) > td { background: #f1f6f8; }

#files .row { --bs-gutter-x: 16px; --bs-gutter-y: 16px; }
#files .row > div { display: flex; min-width: 0; }
#files a {
    display: flex !important;
    width: 100%;
    min-height: 80px;
    align-items: center;
    gap: 14px;
    padding: 18px 20px !important;
    border: 1px solid #d4e2e6 !important;
    border-radius: 18px !important;
    background: #fff;
    color: #061d2b !important;
    font: 600 15px/22px "Manrope", sans-serif;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: border-color .2s ease, box-shadow .2s ease;
}
#files a > span {
    display: inline-flex !important;
    min-width: 46px;
    min-height: 40px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 8px !important;
    border-radius: 10px !important;
    background: #e2f3f4 !important;
    color: #009f9f !important;
    font: 700 12px/16px "Manrope", sans-serif;
}
#files a::after {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-left: auto;
    background: #009f9f;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v12m-5-5 5 5 5-5M5 16v5h14v-5' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    content: "";
}
#videos .iframe {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 16px;
    background: #061d2b;
}
@media (hover: hover) and (pointer: fine) {
    #pills-tab .btn:not(.active):hover { border-color: #d4e2e6; background: #fff; color: #009f9f; }
    #pills-tabContent .text-content a:not(.btn):hover { border-bottom-color: #009f9f; }
    #files a:hover { border-color: #009f9f !important; box-shadow: 0 6px 18px rgb(6 45 59 / 8%); }
}
@media (max-width: 767.98px) {
    #pills-tab { width: 100%; gap: 6px !important; border-radius: 24px; }
    #pills-tab .btn { padding-inline: 16px; }
    #pills-tabContent > .tab-pane { padding: 20px; border-radius: 20px; }
    #pills-tabContent .text-content h2 { font-size: 24px; }
    #pills-tabContent .text-content h3 { font-size: 22px; }
    #pills-tabContent .text-content :is(th, td) { padding: 12px; }
    #files a { min-height: 76px; gap: 12px; padding: 16px !important; }
}
@media (prefers-reduced-motion: reduce) {
    #pills-tab .btn, #files a { transition: none; }
}
