.msd-v2,
.msd-v2 * {
    box-sizing: border-box;
}

.msd-v2 {
    --msd-bg: #05080f;
    --msd-bg-soft: #090d14;
    --msd-card: rgba(11, 15, 22, 0.92);
    --msd-card-2: rgba(255, 255, 255, 0.045);
    --msd-border: rgba(232, 166, 48, 0.22);
    --msd-border-soft: rgba(255, 255, 255, 0.11);
    --msd-gold: #f0ad36;
    --msd-gold-2: #ffd36c;
    --msd-text: #f7f1e8;
    --msd-muted: rgba(247, 241, 232, 0.72);
    background: radial-gradient(circle at top left, rgba(240, 173, 54, 0.08), transparent 36%), var(--msd-bg);
    color: var(--msd-text);
    overflow: hidden;
}

.msd-v2-container {
    width: min(100% - 48px, 1180px);
    margin: 0 auto;
}

.msd-v2-hero {
    position: relative;
    min-height: clamp(560px, 78vh, 760px);
    display: flex;
    align-items: center;
    background-image: var(--msd-hero-bg);
    background-size: cover;
    background-position: center;
    isolation: isolate;
}

.msd-v2-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(3, 6, 12, 0.96) 0%, rgba(3, 6, 12, 0.76) 42%, rgba(3, 6, 12, 0.48) 100%);
    z-index: -1;
}

.msd-v2-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -3;
}

.msd-v2-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(240, 173, 54, 0.12), transparent 34%), linear-gradient(180deg, rgba(5, 8, 15, 0.15), #05080f 98%);
    z-index: -1;
}

.msd-v2-hero-inner {
    padding: 110px 0 82px;
    max-width: 860px;
    margin-left: max(24px, calc((100vw - 1180px) / 2));
}

.msd-v2-hero-number,
.msd-v2-section-heading span,
.msd-v2-tab-nav-title,
.msd-v2-panel-heading span,
.msd-v2-snapshot-card span,
.msd-v2-content-box h3,
.msd-v2-related-card span {
    display: inline-block;
    color: var(--msd-gold);
    font-family: Inter, sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.msd-v2-hero h1 {
    max-width: 860px;
    margin: 18px 0 22px;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(48px, 7vw, 96px);
    line-height: 0.92;
    letter-spacing: -0.045em;
    color: #fff8ee;
    text-wrap: balance;
}

.msd-v2-hero-subtitle {
    max-width: 760px;
    font-size: clamp(17px, 2vw, 24px);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.86);
}

.msd-v2-hero-subtitle p {
    margin: 0;
}

.msd-v2-hero-tagline {
    margin-top: 26px;
    color: var(--msd-gold-2);
    font-size: 18px;
    font-weight: 800;
}

.msd-v2-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.msd-v2-btn,
.msd-v2-download,
.msd-v2-text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    border-radius: 999px;
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.msd-v2-btn:hover,
.msd-v2-download:hover,
.msd-v2-text-link:hover {
    transform: translateY(-2px);
}

.msd-v2-btn-gold,
.msd-v2-download {
    background: linear-gradient(135deg, #f4b044, #d99521);
    color: #080b10;
    border: 1px solid rgba(255, 211, 108, 0.45);
}

.msd-v2-btn-outline,
.msd-v2-text-link {
    color: var(--msd-gold-2);
    border: 1px solid rgba(240, 173, 54, 0.38);
    background: rgba(255, 255, 255, 0.03);
}

.msd-v2-snapshot-section,
.msd-v2-tabs-section,
.msd-v2-final-section,
.msd-v2-related-section {
    padding: clamp(56px, 7vw, 96px) 0;
}

.msd-v2-section-heading {
    margin-bottom: 26px;
}

.msd-v2-section-heading h2,
.msd-v2-panel-heading h2,
.msd-v2-final-card h2 {
    margin: 10px 0 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(34px, 4.4vw, 58px);
    line-height: 1;
    letter-spacing: -0.035em;
    color: #fff8ee;
}

.msd-v2-snapshot-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.msd-v2-snapshot-card,
.msd-v2-tabs-shell,
.msd-v2-final-card,
.msd-v2-related-card {
    border: 1px solid var(--msd-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.22);
}

.msd-v2-snapshot-card {
    min-height: 142px;
    padding: 22px;
    border-radius: 24px;
}

.msd-v2-snapshot-card strong {
    display: block;
    margin-top: 14px;
    color: #fff;
    font-size: 17px;
    line-height: 1.45;
    word-break: break-word;
}

.msd-v2-download {
    margin-top: 22px;
}

.msd-v2-tabs-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 22px;
    border-radius: 34px;
    padding: 22px;
    background: rgba(7, 10, 15, 0.82);
}

.msd-v2-tab-nav {
    position: sticky;
    top: 96px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--msd-border-soft);
}

.msd-v2-tab-nav-title {
    margin: 0 0 8px;
}

.msd-v2-tab-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 14px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-family: Inter, sans-serif;
    font-size: 15px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.msd-v2-tab-btn span {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: rgba(240, 173, 54, 0.12);
    color: var(--msd-gold-2);
    font-size: 12px;
}

.msd-v2-tab-btn.is-active {
    color: #fff;
    border-color: rgba(240, 173, 54, 0.34);
    background: linear-gradient(135deg, rgba(240, 173, 54, 0.16), rgba(255, 255, 255, 0.04));
}

.msd-v2-tab-panels {
    min-width: 0;
}

.msd-v2-tab-panel {
    display: none;
    min-height: 580px;
    padding: clamp(24px, 3.5vw, 42px);
    border-radius: 26px;
    border: 1px solid var(--msd-border-soft);
    background: rgba(255, 255, 255, 0.03);
}

.msd-v2-tab-panel.is-active {
    display: block;
}

.msd-v2-panel-heading {
    margin-bottom: 24px;
}

.msd-v2-panel-grid,
.msd-v2-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.msd-v2-content-box,
.msd-v2-metric-card {
    padding: 24px;
    border-radius: 22px;
    border: 1px solid var(--msd-border-soft);
    background: var(--msd-card-2);
}

.msd-v2-content-box h3 {
    margin: 0 0 14px;
}

.msd-v2-content-box img {
    max-width: 74px;
    max-height: 74px;
    object-fit: contain;
    margin-bottom: 14px;
}

.msd-v2-rich {
    color: var(--msd-muted);
    font-family: Inter, sans-serif;
    font-size: 16px;
    line-height: 1.75;
}

.msd-v2-rich p,
.msd-v2-rich ul,
.msd-v2-rich ol {
    margin: 0 0 14px;
}

.msd-v2-rich p:last-child,
.msd-v2-rich ul:last-child,
.msd-v2-rich ol:last-child {
    margin-bottom: 0;
}

.msd-v2-rich ul,
.msd-v2-rich ol {
    padding-left: 20px;
}

.msd-v2-rich li {
    margin: 6px 0;
}

.msd-v2-rich h1,
.msd-v2-rich h2,
.msd-v2-rich h3 {
    color: #fff8ee;
    font-family: 'Cormorant Garamond', serif;
    line-height: 1.08;
    margin: 18px 0 10px;
}

.msd-v2-rich hr {
    border: 0;
    border-top: 1px solid var(--msd-border-soft);
    margin: 18px 0;
}

.msd-v2-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.msd-v2-metric-card span,
.msd-v2-resource-list span {
    display: block;
    color: var(--msd-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.msd-v2-metric-card strong {
    display: block;
    margin: 10px 0;
    color: #fff;
    font-size: 28px;
}

.msd-v2-metric-card small {
    color: var(--msd-gold-2);
}

.msd-v2-media-stack {
    display: grid;
    gap: 22px;
}

.msd-v2-feature-image {
    width: 100%;
    border-radius: 24px;
    border: 1px solid var(--msd-border-soft);
}

.msd-v2-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.msd-v2-gallery-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid var(--msd-border-soft);
}

.msd-v2-resource-list {
    display: grid;
    gap: 12px;
}

.msd-v2-resource-list a {
    display: block;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--msd-border-soft);
    background: rgba(255, 255, 255, 0.035);
    color: #fff;
    text-decoration: none;
}

.msd-v2-final-section {
    padding-top: 0;
}

.msd-v2-final-card {
    max-width: 860px;
    margin: 0 auto;
    padding: clamp(32px, 5vw, 58px);
    border-radius: 34px;
    text-align: center;
}

.msd-v2-final-card .msd-v2-rich {
    max-width: 720px;
    margin: 0 auto 26px;
    color: #fff8ee;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.28;
}

.msd-v2-related-section {
    background: rgba(255, 255, 255, 0.02);
}

.msd-v2-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.msd-v2-related-card {
    padding: 24px;
    border-radius: 24px;
}

.msd-v2-related-card h3 {
    margin: 14px 0 18px;
    font-size: 24px;
    line-height: 1.15;
}

@media (max-width: 1100px) {
    .msd-v2-snapshot-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .msd-v2-tabs-shell {
        grid-template-columns: 260px minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .msd-v2-hero {
        min-height: auto;
    }

    .msd-v2-hero-inner {
        margin-left: auto;
        padding: 120px 0 70px;
    }

    .msd-v2-tabs-shell {
        grid-template-columns: 1fr;
        padding: 16px;
        border-radius: 26px;
    }

    .msd-v2-tab-nav {
        position: relative;
        top: auto;
        flex-direction: row;
        overflow-x: auto;
        padding: 12px;
        scrollbar-width: thin;
    }

    .msd-v2-tab-nav-title {
        display: none;
    }

    .msd-v2-tab-btn {
        min-width: 210px;
    }

    .msd-v2-tab-panel {
        min-height: auto;
    }

    .msd-v2-panel-grid,
    .msd-v2-mini-grid {
        grid-template-columns: 1fr;
    }

    .msd-v2-metric-grid,
    .msd-v2-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .msd-v2-container {
        width: min(100% - 30px, 1180px);
    }

    .msd-v2-hero::before {
        background: linear-gradient(180deg, rgba(3, 6, 12, 0.9), rgba(3, 6, 12, 0.86));
    }

    .msd-v2-hero-inner {
        padding: 110px 0 58px;
    }

    .msd-v2-hero h1 {
        font-size: clamp(42px, 14vw, 60px);
        line-height: 0.98;
    }

    .msd-v2-hero-subtitle {
        font-size: 16px;
    }

    .msd-v2-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .msd-v2-btn,
    .msd-v2-download {
        width: 100%;
    }

    .msd-v2-snapshot-grid,
    .msd-v2-metric-grid,
    .msd-v2-gallery-grid,
    .msd-v2-related-grid {
        grid-template-columns: 1fr;
    }

    .msd-v2-snapshot-card,
    .msd-v2-content-box,
    .msd-v2-metric-card {
        padding: 20px;
    }

    .msd-v2-tab-panel {
        padding: 20px;
        border-radius: 22px;
    }

    .msd-v2-tab-btn {
        min-width: 180px;
        font-size: 14px;
    }

    .msd-v2-rich {
        font-size: 15px;
    }
}


/* Related Moonshots card upgrade + snapshot cleanup */
.msd-v2-snapshot-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: stretch;
}

.msd-v2-snapshot-card {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.msd-v2-related-section {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(5, 8, 15, 0.96));
}

.msd-v2-related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.msd-v2-related-card {
    padding: 0;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(8, 14, 24, 0.98), rgba(6, 10, 17, 0.98));
    border-color: rgba(255, 255, 255, 0.13);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.msd-v2-related-card:hover {
    transform: translateY(-4px);
    border-color: rgba(240, 173, 54, 0.45);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.msd-v2-related-image {
    display: block;
    width: 100%;
    height: 190px;
    min-height: 190px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.msd-v2-related-image:hover {
    transform: none;
}

.msd-v2-related-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .35s ease;
}

.msd-v2-related-card:hover .msd-v2-related-image img {
    transform: scale(1.045);
}

.msd-v2-related-body {
    padding: 22px;
}

.msd-v2-related-card span {
    padding: 6px 9px;
    border-radius: 4px;
    color: #080b10;
    background: linear-gradient(135deg, var(--msd-gold-2), var(--msd-gold));
    font-size: 10px;
    letter-spacing: .08em;
}

.msd-v2-related-card h3 {
    margin: 20px 0 12px;
    color: #fff8ee;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(24px, 2.2vw, 32px);
    line-height: 1.08;
}

.msd-v2-related-card p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.78);
    font-family: Inter, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

.msd-v2-related-card .msd-v2-related-body > a {
    width: auto;
    min-height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--msd-gold-2);
    gap: 10px;
}

.msd-v2-related-card .msd-v2-related-body > a:hover {
    transform: translateX(3px);
}

.msd-v2-related-card .msd-v2-related-body > a em {
    font-style: normal;
    margin-left: 8px;
}

@media (max-width: 900px) {
    .msd-v2-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .msd-v2-related-image {
        height: 170px;
        min-height: 170px;
    }
}

@media (max-width: 640px) {
    .msd-v2-related-grid {
        grid-template-columns: 1fr;
    }

    .msd-v2-related-image {
        height: 210px;
        min-height: 210px;
    }
}


/* Detail page refinement: centered snapshot cards and listing-style related cards */
.msd-v2-snapshot-grid {
    align-items: stretch;
}

.msd-v2-snapshot-card {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 18px;
}

.msd-v2-snapshot-card span,
.msd-v2-snapshot-card strong {
    text-align: center;
}

.msd-v2-snapshot-card strong {
    max-width: 100%;
}

.msd-v2-related-card {
    display: flex;
    flex-direction: column;
}

.msd-v2-related-image,
.msd-v2-related-image:hover {
    display: block;
    width: 100%;
    height: 190px;
    min-height: 190px;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
    transform: none !important;
    box-shadow: none !important;
}

.msd-v2-related-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 0 !important;
}

.msd-v2-related-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px;
}

.msd-v2-related-card h3 {
    margin: 20px 0 12px;
    font-size: clamp(24px, 2vw, 30px);
    line-height: 1.08;
}

.msd-v2-related-card p {
    margin-bottom: 20px;
}

.msd-v2-related-card .msd-v2-related-body > a {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: fit-content;
    min-height: auto;
    margin-top: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--msd-gold-2);
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: transform .2s ease;
}

.msd-v2-related-card .msd-v2-related-body > a:hover {
    transform: translateX(3px);
}

@media (max-width: 900px) {
    .msd-v2-snapshot-card {
        min-height: 135px;
    }
}

@media (max-width: 640px) {
    .msd-v2-snapshot-card {
        min-height: auto;
        padding: 22px 18px;
    }
}
