.elephant-page {
    --elephant-grass: #a9d86e;
    --elephant-leaf: #5fa85e;
    --elephant-cyan: #4fc6dc;
    --elephant-ivory: #efe7d0;
    --elephant-clay: #8a8376;
    color: var(--paper);
}

.elephant-hero {
    position: relative;
    min-height: 88vh;
    display: grid;
    align-items: end;
    overflow: hidden;
    isolation: isolate;
    padding: 8.8rem max(1.25rem, calc((100vw - var(--max)) / 2)) 7.7rem;
    background: #080d12;
}

.elephant-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -3;
    background:
        linear-gradient(90deg, rgba(8, 13, 18, 0.96), rgba(8, 13, 18, 0.58) 43%, rgba(8, 13, 18, 0.18)),
        linear-gradient(0deg, rgba(8, 13, 18, 0.92), rgba(8, 13, 18, 0.08) 52%),
        url("../../pics/minecraft-088-elephant-fabric-cover.png") center / cover no-repeat;
    transform: scale(1.02);
}

.elephant-hero-content {
    position: relative;
    z-index: 1;
    max-width: 50rem;
    text-shadow: 0 0.2rem 1.2rem rgba(0, 0, 0, 0.6);
}

.elephant-hero h1 {
    max-width: 11ch;
    margin: 0;
    font-size: clamp(3rem, 7vw, 6.45rem);
    line-height: 0.94;
    letter-spacing: 0;
}

.elephant-hero .hero-copy {
    max-width: 44rem;
    color: rgba(247, 244, 236, 0.9);
}

.elephant-hero .btn-primary,
.elephant-solid {
    color: #0e140b;
    background: var(--elephant-grass);
    border-color: var(--elephant-grass);
}

.elephant-hero .btn-primary:hover,
.elephant-solid:hover {
    background: #c2ef8a;
    border-color: #c2ef8a;
}

.elephant-hero .btn-secondary,
.elephant-ghost {
    color: var(--paper);
    border-color: rgba(239, 231, 208, 0.34);
    background: rgba(239, 231, 208, 0.09);
}

.elephant-strip {
    position: absolute;
    left: max(1.25rem, calc((100vw - var(--max)) / 2));
    right: max(1.25rem, calc((100vw - var(--max)) / 2));
    bottom: 1.45rem;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.elephant-strip span,
.elephant-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.52rem 0.78rem;
    border: 1px solid rgba(239, 231, 208, 0.22);
    border-radius: 4px;
    background: rgba(8, 13, 18, 0.68);
    backdrop-filter: blur(12px);
}

.elephant-overview-grid,
.elephant-learning-layout,
.elephant-split,
.elephant-video-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.94fr) minmax(18rem, 1.06fr);
    gap: 2rem;
    align-items: center;
}

.elephant-card-grid,
.elephant-step-grid,
.elephant-file-grid,
.elephant-debug-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.elephant-card,
.elephant-step,
.elephant-panel,
.elephant-file,
.elephant-debug {
    min-width: 0;
    padding: 1.18rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(239, 231, 208, 0.075), rgba(255, 255, 255, 0.025));
    box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, 0.22);
}

.elephant-card span,
.elephant-step span,
.elephant-file span,
.elephant-debug span {
    color: var(--elephant-grass);
    font-weight: 900;
}

.elephant-card h3,
.elephant-step h3,
.elephant-panel h3,
.elephant-file h3,
.elephant-debug h3 {
    margin: 0.35rem 0 0.55rem;
    font-size: 1.18rem;
    line-height: 1.25;
}

.elephant-card p,
.elephant-step p,
.elephant-panel p,
.elephant-file p,
.elephant-debug p {
    color: rgba(247, 244, 236, 0.76);
}

.elephant-figure {
    overflow: hidden;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.elephant-figure img {
    width: 100%;
    display: block;
    background: rgba(255, 255, 255, 0.02);
}

.elephant-figure figcaption {
    padding: 0.85rem 1rem;
    color: rgba(247, 244, 236, 0.68);
    font-size: 0.92rem;
}

.elephant-wide-figure {
    margin-top: 1.5rem;
}

.elephant-list {
    margin: 1rem 0 0;
    padding-left: 1.1rem;
}

.elephant-list li + li {
    margin-top: 0.52rem;
}

.elephant-note {
    margin: 1rem 0 0;
    padding: 1rem;
    color: rgba(247, 244, 236, 0.78);
    border-left: 4px solid var(--elephant-cyan);
    background: rgba(79, 198, 220, 0.08);
}

.elephant-callout {
    margin-top: 1.5rem;
    padding: 1.3rem;
    border: 1px solid rgba(169, 216, 110, 0.35);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(169, 216, 110, 0.13), rgba(239, 231, 208, 0.05)),
        rgba(255, 255, 255, 0.03);
}

.elephant-callout h3 {
    margin: 0 0 0.55rem;
}

.elephant-callout p {
    max-width: 58rem;
    margin: 0;
    color: rgba(247, 244, 236, 0.78);
}

.elephant-code-shell {
    max-width: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #090d10;
}

.elephant-code-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.elephant-code-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.35rem;
    padding: 0.38rem 0.72rem;
    color: rgba(247, 244, 236, 0.76);
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}

.elephant-code-tab[aria-selected="true"] {
    color: #0f150c;
    border-color: var(--elephant-grass);
    background: var(--elephant-grass);
}

.elephant-code-panel {
    display: none;
}

.elephant-code-panel.is-active {
    display: block;
    min-width: 0;
}

.elephant-code-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0.9rem;
    color: rgba(247, 244, 236, 0.76);
    border-bottom: 1px solid var(--line);
}

.elephant-copy-button {
    min-height: 2rem;
    padding: 0.24rem 0.62rem;
    color: var(--paper);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.elephant-code-shell pre {
    max-width: 100%;
    max-height: 36rem;
    overflow: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.elephant-code-shell code {
    display: block;
    min-width: max-content;
    white-space: pre;
}

.elephant-file-grid {
    margin-top: 1.25rem;
}

.elephant-path {
    display: block;
    max-width: 100%;
    margin-top: 0.75rem;
    padding: 0.45rem 0.5rem;
    color: var(--elephant-ivory);
    font-size: 0.9rem;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    border-radius: 4px;
    background: rgba(79, 198, 220, 0.1);
}

.elephant-final {
    background:
        linear-gradient(180deg, rgba(169, 216, 110, 0.08), rgba(8, 9, 12, 0)),
        #08090c;
}

@media (max-width: 940px) {
    .elephant-overview-grid,
    .elephant-learning-layout,
    .elephant-split,
    .elephant-video-layout,
    .elephant-card-grid,
    .elephant-step-grid,
    .elephant-file-grid,
    .elephant-debug-grid {
        grid-template-columns: 1fr;
    }

    .elephant-hero {
        min-height: 92vh;
        padding-bottom: 8.8rem;
    }

    .elephant-strip {
        bottom: 1rem;
    }
}

@media (max-width: 620px) {
    .elephant-hero {
        padding-top: 7rem;
    }

    .elephant-hero h1 {
        font-size: clamp(2.55rem, 14vw, 4rem);
    }

    .elephant-code-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .elephant-code-tab {
        flex: 1 1 100%;
    }
}
