/* Build 0155: dedicated Buzzen History presentation. */
.buzzen-history-page {
    min-height: 55vh;
}

.buzzen-history-shell {
    width: 100%;
}

.buzzen-history-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(270px, .72fr);
    gap: 22px;
    align-items: stretch;
    margin-bottom: 18px;
    padding: 27px;
    overflow: hidden;
    background:
        radial-gradient(circle at 92% 8%, rgba(255, 210, 74, .20) 0, rgba(255, 210, 74, 0) 30%),
        linear-gradient(135deg, #ffffff 0%, #edf7fd 100%);
}

.buzzen-history-hero::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, #1b79bd 0%, #ffd24a 100%);
}

.buzzen-history-hero-copy {
    min-width: 0;
    padding: 3px 4px 3px 8px;
}

.buzzen-history-kicker {
    margin-bottom: 8px;
}

.buzzen-history-hero h1 {
    max-width: 760px;
    margin: 0 0 10px;
    color: #123d5c;
    font-size: clamp(31px, 3.25vw, 42px);
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.06;
}

.buzzen-history-hero-copy > p {
    max-width: 760px;
    margin: 0;
    color: #405c70;
    font-size: 16px;
    line-height: 1.72;
}

.buzzen-history-hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.buzzen-history-hero-points span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid rgba(27, 121, 189, .14);
    border-radius: var(--buzzen-radius-pill);
    background: rgba(255, 255, 255, .88);
    color: #31566d;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 5px 13px rgba(17, 71, 111, .04);
}

.buzzen-history-hero-points i {
    color: #1b79bd;
}

.buzzen-history-start {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    margin-top: 18px;
    padding: 9px 14px;
    border: 0;
    border-radius: var(--buzzen-radius-pill);
    background: #ffbf18;
    color: #153d5a;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 7px 16px rgba(146, 105, 0, .16);
}

.buzzen-history-start:hover,
.buzzen-history-start:focus-visible {
    background: #ffd04a;
    color: #0e3049;
}

.buzzen-history-hero-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 22px;
    overflow: hidden;
    border: 1px solid rgba(18, 61, 92, .16);
    border-radius: var(--buzzen-radius-md);
    background: linear-gradient(145deg, #103858 0%, #155c91 70%, #1b79bd 100%);
    color: #fff;
    box-shadow: var(--buzzen-shadow-elevated);
}

.buzzen-history-hero-panel::after {
    content: "";
    position: absolute;
    right: -36px;
    bottom: -48px;
    width: 125px;
    height: 125px;
    border-radius: 50%;
    background: rgba(255, 210, 74, .14);
}

.buzzen-history-hero-panel-icon {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    margin-bottom: 13px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--buzzen-radius-md);
    background: rgba(255, 255, 255, .10);
    color: #ffd24a;
    font-size: 22px;
}

.buzzen-history-hero-panel-label {
    position: relative;
    z-index: 1;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.buzzen-history-hero-panel > strong {
    position: relative;
    z-index: 1;
    color: #fff;
    font-family: var(--buzzen-font-heading);
    font-size: 23px;
    font-weight: 800;
    line-height: 1.1;
}

.buzzen-history-hero-panel > p {
    position: relative;
    z-index: 1;
    margin: 9px 0 0;
    color: rgba(255, 255, 255, .83);
    font-size: 14px;
    line-height: 1.58;
}

.buzzen-history-updated {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 5px;
    margin-top: 17px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .16);
}

.buzzen-history-updated span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 700;
}

.buzzen-history-updated b {
    color: #fff;
    font-size: 14px;
}

.buzzen-history-reading-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.buzzen-history-reading-layout > [hidden] {
    display: none !important;
}

.buzzen-history-reading-layout.has-history-toc {
    grid-template-columns: 245px minmax(0, 1fr);
}

.buzzen-history-toc-card {
    position: sticky;
    top: 82px;
    overflow: hidden;
    border: 1px solid rgba(34, 103, 154, .15);
    border-radius: var(--buzzen-radius-md);
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--buzzen-shadow-card);
}

.buzzen-history-toc-heading {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 15px 15px 13px;
    border-bottom: 1px solid #e5edf3;
    background: linear-gradient(135deg, #f5fbff 0%, #edf7fc 100%);
}

.buzzen-history-toc-heading > div {
    min-width: 0;
}

.buzzen-history-toc-heading .buzzen-v5-kicker {
    display: block;
    margin-bottom: 2px;
    font-size: 10px;
}

.buzzen-history-toc-heading h2 {
    margin: 0;
    color: #183f5d;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.1;
}

.buzzen-history-toc {
    display: grid;
    max-height: min(64vh, 600px);
    overflow-y: auto;
    padding: 8px;
    scrollbar-width: thin;
}

.buzzen-history-toc-link {
    position: relative;
    display: block;
    padding: 9px 10px 9px 13px;
    border-radius: 9px;
    color: #3d5f74;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.35;
    text-decoration: none;
}

.buzzen-history-toc-link::before {
    content: "";
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: 3px;
    width: 3px;
    border-radius: 999px;
    background: transparent;
}

.buzzen-history-toc-link:hover,
.buzzen-history-toc-link:focus-visible {
    background: #eef7fd;
    color: #12679e;
}

.buzzen-history-toc-link.is-active {
    background: linear-gradient(90deg, #edf7fd 0%, #f8fcff 100%);
    color: #0d6096;
}

.buzzen-history-toc-link.is-active::before {
    background: #f3b719;
}

.buzzen-history-toc-link.is-subsection {
    padding-left: 22px;
    color: #5b7383;
    font-size: 12.5px;
    font-weight: 700;
}

.buzzen-history-story-card {
    min-width: 0;
    overflow: hidden;
}

.buzzen-history-story-header {
    align-items: center;
}

.buzzen-history-story-header > div {
    min-width: 0;
}

.buzzen-history-story-header h2 {
    margin: 0;
    color: #123d5c;
    font-size: 23px;
    font-weight: 800;
    line-height: 1.12;
}

.buzzen-history-story-header p {
    max-width: 760px;
    margin: 4px 0 0;
    color: #60798b;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.5;
}

.buzzen-history-story-body {
    padding: 24px 26px 30px;
}

.buzzen-history-content {
    color: #38596f;
    font-size: 16px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.buzzen-history-content > :first-child {
    margin-top: 0 !important;
}

.buzzen-history-content > :last-child {
    margin-bottom: 0 !important;
}

.buzzen-history-content p,
.buzzen-history-content ul,
.buzzen-history-content ol,
.buzzen-history-content blockquote,
.buzzen-history-content table,
.buzzen-history-content pre {
    margin-bottom: 1.08rem;
}

.buzzen-history-content h1,
.buzzen-history-content h2,
.buzzen-history-content h3,
.buzzen-history-content h4 {
    scroll-margin-top: 92px;
    color: #173f5d;
}

.buzzen-history-content h2 {
    margin: 2rem 0 .8rem;
    padding-bottom: 9px;
    border-bottom: 1px solid #deebf3;
    font-size: 27px;
    font-weight: 800;
    line-height: 1.12;
}

.buzzen-history-content h3 {
    position: relative;
    margin: 1.9rem 0 .72rem;
    padding: 9px 12px 9px 17px;
    border-left: 4px solid #f3b719;
    border-radius: 0 10px 10px 0;
    background: linear-gradient(90deg, #f0f8fd 0%, rgba(240, 248, 253, 0) 94%);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.buzzen-history-content h4 {
    margin: 1.45rem 0 .55rem;
    color: #225b7f;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
}

.buzzen-history-content a {
    color: #12669b;
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.buzzen-history-content a:hover,
.buzzen-history-content a:focus-visible {
    color: #0b7ed8;
}

.buzzen-history-content blockquote {
    padding: 16px 18px;
    border-left: 4px solid #1b79bd;
    border-radius: 0 var(--buzzen-radius-sm) var(--buzzen-radius-sm) 0;
    background: #f3f9fd;
    color: #355a72;
}

/* Legacy stored gallery markup is preserved, but the presentation is modern. */
.buzzen-history-content .buzzen-gallery-container {
    max-width: 100%;
    margin: 0 0 1.8rem;
    padding: 0;
}

.buzzen-history-content .buzzen-gallery-container .row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
    margin: 0;
}

.buzzen-history-content .buzzen-gallery-container .row > div {
    width: auto;
    padding: 0;
}

.buzzen-history-content .buzzen-card {
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(34, 103, 154, .16);
    border-radius: var(--buzzen-radius-md);
    background: #fff;
    box-shadow: var(--buzzen-shadow-card);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.buzzen-history-content .buzzen-card:hover {
    transform: translateY(-2px);
    border-color: rgba(27, 121, 189, .30);
    box-shadow: var(--buzzen-shadow-elevated);
}

.buzzen-history-gallery-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #102d43;
}

.buzzen-history-gallery-link::after {
    content: "\f00e";
    position: absolute;
    right: 9px;
    bottom: 9px;
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 50%;
    background: rgba(7, 34, 53, .76);
    color: #fff;
    font-family: "Font Awesome 7 Free";
    font-size: 13px;
    font-weight: 900;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .16s ease, transform .16s ease;
}

.buzzen-history-gallery-link:hover::after,
.buzzen-history-gallery-link:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.buzzen-history-content .buzzen-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0;
    transition: transform .2s ease;
}

.buzzen-history-content .buzzen-card:hover .buzzen-thumb {
    transform: scale(1.025);
}

.buzzen-history-content .buzzen-caption {
    min-height: 55px;
    display: grid;
    place-items: center;
    padding: 10px 11px;
    border-top: 1px solid #e4edf3;
    color: #315a76;
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
}

.buzzen-history-content .buzzen-interview {
    margin-top: 1.2rem;
}

.buzzen-history-lightbox {
    width: min(1080px, calc(100vw - 34px));
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: #fff;
    overflow: visible;
}

.buzzen-history-lightbox::backdrop {
    background: rgba(3, 17, 27, .88);
    backdrop-filter: blur(3px);
}

.buzzen-history-lightbox-shell {
    position: relative;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    gap: 12px;
    align-items: center;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 18px;
    background: #071d2c;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
}

.buzzen-history-lightbox figure {
    min-width: 0;
    margin: 0;
    text-align: center;
}

.buzzen-history-lightbox img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: min(76vh, 820px);
    margin: 0 auto;
    border-radius: 10px;
    object-fit: contain;
}

.buzzen-history-lightbox figcaption {
    margin-top: 11px;
    color: rgba(255, 255, 255, .88);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.buzzen-history-lightbox button {
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .20);
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.buzzen-history-lightbox button:hover,
.buzzen-history-lightbox button:focus-visible {
    border-color: rgba(255, 210, 74, .70);
    background: rgba(255, 210, 74, .16);
    color: #ffd24a;
}

.buzzen-history-lightbox-close {
    position: absolute;
    z-index: 2;
    top: -14px;
    right: -14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.buzzen-history-lightbox-nav {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 17px;
}

@media (max-width: 991.98px) {
    .buzzen-history-hero,
    .buzzen-history-reading-layout.has-history-toc {
        grid-template-columns: 1fr;
    }

    .buzzen-history-toc-card {
        position: static;
    }

    .buzzen-history-toc {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: 310px;
        gap: 2px 8px;
    }

    .buzzen-history-content .buzzen-gallery-container .row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .buzzen-history-hero {
        gap: 16px;
        padding: 21px;
    }

    .buzzen-history-hero h1 {
        font-size: 31px;
    }

    .buzzen-history-story-body {
        padding: 20px 17px 24px;
    }

    .buzzen-history-content {
        font-size: 15.5px;
        line-height: 1.75;
    }

    .buzzen-history-content h2 {
        font-size: 24px;
    }

    .buzzen-history-content h3 {
        font-size: 20px;
    }

    .buzzen-history-lightbox-shell {
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        gap: 7px;
        padding: 12px;
    }

    .buzzen-history-lightbox-nav {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 575.98px) {
    .buzzen-history-hero {
        padding: 18px 16px 18px 19px;
    }

    .buzzen-history-hero-copy {
        padding-left: 4px;
    }

    .buzzen-history-hero-points {
        display: grid;
        grid-template-columns: 1fr;
    }

    .buzzen-history-hero-points span {
        width: fit-content;
        max-width: 100%;
    }

    .buzzen-history-hero-panel {
        padding: 18px;
    }

    .buzzen-history-toc {
        grid-template-columns: 1fr;
    }

    .buzzen-history-content .buzzen-gallery-container .row {
        grid-template-columns: 1fr;
    }

    .buzzen-history-lightbox {
        width: calc(100vw - 18px);
    }

    .buzzen-history-lightbox-shell {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .buzzen-history-lightbox-nav {
        position: absolute;
        z-index: 2;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(5, 31, 48, .78);
    }

    .buzzen-history-lightbox-prev {
        left: 16px;
    }

    .buzzen-history-lightbox-next {
        right: 16px;
    }

    .buzzen-history-lightbox-close {
        top: 8px;
        right: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .buzzen-history-content .buzzen-card,
    .buzzen-history-content .buzzen-thumb,
    .buzzen-history-gallery-link::after {
        transition: none;
    }
}
