
.col-centered {
    margin-left: auto;
    margin-right: auto;
    left: 0;
    right: 0;
}

.chapters-bar {
    opacity: 0;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

/* Mobile/Tablet: slide from top */
@media (max-width: 1023px) {
    .chapters-bar {
        transform: translateY(-100%);
    }
    .chapters-bar--visible {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Desktop: slide from bottom */
@media (min-width: 1024px) {
    .chapters-bar {
        transform: translateY(100%);
    }
    .chapters-bar--visible {
        transform: translateY(0);
        opacity: 1;
    }
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Roman numeral bubbles (recidivism timeline) */
.recidivism-numeral {
    font-family: 'Cinzel', serif;
    font-weight: 600;
}

/* Recidivism people blend effect */
.recidivism-person {
    mix-blend-mode: difference;
}

.recidivism-person svg path {
    fill: #ffffff;
}

.bubble-fill {
    transition: height 0.1s linear;
}

.recidivism-numeral div {
    transition: clip-path 0.1s linear;
}

@keyframes monthFlip {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 0;
        transform: translateY(-10px) scale(0.8);
    }
    51% {
        opacity: 0;
        transform: translateY(10px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.month-flip {
    animation: monthFlip 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

/* ------------------------------------------------------------
   Mobile chapters hamburger + fullscreen overlay (phones only)
   ------------------------------------------------------------ */

/* Base hamburger button (phones) */
#chapters-hamburger {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

/* Use higher specificity so this overrides the base ID rule */
#chapters-hamburger.chapters-hamburger--visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.chapters-hamburger-icon {
    position: relative;
    width: 18px;
    height: 14px;
    display: inline-block;
}

.chapters-hamburger-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 999px;
    background: #ffffff;
    transition: transform 0.25s ease, top 0.25s ease, opacity 0.2s ease;
}

.chapters-hamburger-line:nth-child(1) {
    top: 3px;
}

.chapters-hamburger-line:nth-child(2) {
    top: 9px;
}

.chapters-hamburger--open .chapters-hamburger-line:nth-child(1) {
    top: 6px;
    transform: rotate(45deg);
}

.chapters-hamburger--open .chapters-hamburger-line:nth-child(2) {
    top: 6px;
    transform: rotate(-45deg);
}

/* Mobile fullscreen overlay */
#chapters-mobile-overlay {
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px) scale(0.96);
    transition: opacity 0.35s ease-out, transform 0.35s ease-out;
}

/* Use higher specificity so this overrides the base ID rule */
#chapters-mobile-overlay.chapters-mobile-overlay--visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Only show hamburger/overlay on mobile + tablet; hide on desktop */
@media (min-width: 1024px) {
    #chapters-hamburger,
    #chapters-mobile-overlay {
        display: none;
    }
}

/* Slightly scale up overlay typography and buttons on tablets */
@media (min-width: 768px) and (max-width: 1023px) {
    #chapters-mobile-overlay .chapters-mobile-button {
        padding-top: 0.9rem;
        padding-bottom: 0.9rem;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    #chapters-mobile-overlay h2 {
        font-size: 1.6rem;
    }

    #chapters-mobile-overlay span,
    #chapters-mobile-overlay p {
        font-size: 0.8rem;
    }
}

/* ------------------------------------------------------------
   Chapter selection state (desktop bar + mobile overlay)
   ------------------------------------------------------------ */

.chapters-bar-button,
.chapters-mobile-button {
    cursor: pointer !important;
    transition: background-color 0.4s ease, color 0.4s ease,
        box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Desktop bar: minimal text tabs with a top indicator */
.chapters-bar-button {
    position: relative;
    padding: 1.05rem 0.9rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.45);
    background: transparent;
    flex-shrink: 0;
}

.chapters-bar-list {
    position: relative;
}

.chapters-bar-indicator {
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: #ffffff;
    pointer-events: none;
    opacity: 0;
}

.chapters-bar-indicator--ready {
    opacity: 1;
    transition: transform 0.5s cubic-bezier(0.65, 0, 0.2, 1),
        width 0.5s cubic-bezier(0.65, 0, 0.2, 1);
}

.chapters-bar-button .chapter-index {
    margin-right: 0.5rem;
    color: rgba(255, 255, 255, 0.3);
}

.chapters-bar-button:hover {
    color: #ffffff;
}

.chapters-bar-button.chapter-active {
    color: #ffffff;
}

.chapters-bar-button.chapter-active .chapter-index {
    color: rgba(255, 255, 255, 0.6);
}

/* Mobile/tablet overlay active */
.chapters-mobile-button.chapter-active {
    background-color: #ffffff;
    border-color: transparent;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.35);
    color: #000000;
}

.chapters-mobile-button.chapter-active span {
    color: #000000 !important;
}

.chapter-index {
    letter-spacing: 0.08em !important;
}

/* Minimal link styling for inline text links */
section[data-visual-section-id="visual-section-3"] p a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    text-decoration-color: rgba(255, 255, 255, 0.4);
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

section[data-visual-section-id="visual-section-3"] p a:hover {
    color: rgba(255, 255, 255, 1);
    text-decoration-color: rgba(255, 255, 255, 0.8);
}

.opportunity-count {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.1em;
    min-width: 6ch;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* Hide additional face items on mobile */
.js-face-hidden-mobile {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 767px) {
    .js-face-hidden-mobile {
        display: none;
    }

    .js-face-hidden-mobile.js-face-revealed {
        display: block;
        animation: fadeInUp 0.6s ease-out forwards;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Face image fade-in animation */
.js-face-image {
    transition: opacity 0.7s ease-in-out;
}

.js-face-image.js-face-image--visible {
    opacity: 1;
}

.js-face-skeleton {
    transition: opacity 0.5s ease-out;
}

.js-face-skeleton.js-face-skeleton--hidden {
    opacity: 0;
    pointer-events: none;
}

/* Racial profiling car animation */
.racial-profiling-car {
    position: absolute;
    top: 50%;
    left: -40px;
    margin-top: -19.25px;
    width: 38.5px;
    height: 38.5px;
    opacity: 1;
    color: #111827;
    transform-origin: 50% 50%;
    pointer-events: none;
}

.racial-profiling-car--searched {
    color: #dc2626;
}

.racial-counter {
    display: inline-block;
}

@keyframes racialCounterBump {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    40% {
        transform: scale(1.15);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.racial-counter--bump {
    animation: racialCounterBump 0.35s ease-out;
}

/* Sentencing visual */
.sentencing-bar {
    position: relative;
    width: 100%;
    height: 3.5rem;
    background: #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.sentencing-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 0%;
    background: #000000;
    transition: background-color 0.3s ease;
}

.sentencing-bar-fill--released {
    background: #22c55e;
}

.sentencing-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sentencing-bar-text--visible {
    opacity: 1;
}

.sentencing-check-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

/* Execution visual */
.execution-person {
    position: absolute;
    top: 50%;
    left: -40px;
    width: 32px;
    height: 32px;
    margin-top: -16px;
    color: #111827;
    pointer-events: none;
    transform-origin: 50% 50%;
}

.execution-person svg {
    display: block;
    width: 100%;
    height: 100%;
}

.execution-person--executed {
    color: #dc2626;
}

.execution-counter {
    display: inline-block;
}

@keyframes executionCounterBump {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    40% {
        transform: scale(1.15);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.execution-counter--bump {
    animation: executionCounterBump 0.35s ease-out;
}

/* Coerced labor quote "paper" */
.coerced-paper {
    margin-top: 1.75rem;
    margin-bottom: 1.75rem;
    padding: 1.5rem 1.75rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.14);
}

.coerced-paper-quote {
    font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #111827;
}

.coerced-paper-attrib {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(17, 24, 39, 0.6);
}

/* Forced Labor Worker Animation */
.forced-labor-worker-icon {
    transition: transform 0.1s ease;
}

@keyframes workerBounce {
    0% { transform: translateY(0) scale(1); }
    25% { transform: translateY(-3px) scale(1.1); }
    50% { transform: translateY(0) scale(1); }
    75% { transform: translateY(-2px) scale(1.05); }
    100% { transform: translateY(0) scale(1); }
}

.forced-labor-worker-icon--animate {
    animation: workerBounce 0.4s ease-out;
}

/* Commissary Scroll Animation */
.commissary-scroll-container {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
}

.commissary-scroll-track {
    display: flex;
    gap: 1rem;
    will-change: transform;
}

.commissary-item {
    flex-shrink: 0;
    width: 150px;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.commissary-item-label {
    font-size: 0.875rem;
    color: rgba(0, 0, 0, 0.7);
    line-height: 1.3;
}

.commissary-item-price {
    font-size: 1.125rem;
    font-weight: 600;
    color: #000000;
    font-variant-numeric: tabular-nums;
}

@media (min-width: 768px) {
    .commissary-item {
        width: 180px;
        padding: 1.25rem;
    }
    
    .commissary-item-label {
        font-size: 1rem;
    }
    
    .commissary-item-price {
        font-size: 1.25rem;
    }
}

/* Citation modal animations */
.citation-modal {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.citation-modal.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}