* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --msmg-backdrop: #e8e0d3;
    --msmg-backdrop-soft: #f4f0e8;
    --msmg-surface: #ffffff;
    --msmg-edge-light: #fffdf9;
    --msmg-edge-mid: #e6ddd0;
    --msmg-edge-dark: #d0c5b4;
    --msmg-edge-deep: #baae9b;
    --msmg-shadow: rgba(134, 123, 108, 0.16);
}

.msmg-body {
    background-color: var(--msmg-backdrop);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1a1a1a;
}

.msmg-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.msmg-container-story {
    width: 100%;
    margin: 0;
    padding: 0;
}

.msmg-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    z-index: 1000;
}

.msmg-brand {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -1.5px;
    color: #000;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 3px;
    line-height: 1;
}

.msmg-brand:hover {
    color: #333;
}

.msmg-nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.msmg-nav a {
    text-decoration: none;
    color: #444;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 4px 0;
}

.msmg-nav a:hover {
    color: #000;
}

.msmg-section {
    margin-bottom: 50px;
}

.msmg-section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: #111;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Beveled Panel Style */
.msmg-beveled {
    background-color: var(--msmg-surface);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s;
    width: 100%;
    padding: 0px 0px 0px 0px;
}

/* Feature Story Widget */
.msmg-feature-story {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 30px;
    text-decoration: none;
    color: inherit;
}

.msmg-content-class {
    padding: 0px 20px 0px 20px;
}

@media (max-width: 900px) {
    .msmg-header {
        padding: 8px 0;
    }

    .msmg-brand {
        font-size: 26px;
        margin-right: 20px;
    }

    .msmg-nav {
        gap: 8px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding: 5px 0;
        scrollbar-width: none;
        /* Hide scrollbar for clean look */
    }

    .msmg-nav::-webkit-scrollbar {
        display: none;
    }

    .msmg-nav a {
        font-size: 10px;
        letter-spacing: 0.5px;
        flex: 0 0 auto;
    }
    
    .msmg-feature-image {
       margin-left: -3rem;
    }

    .msmg-story-image {
        margin-left: -3rem;
    }

    .msmg-beveled {
        padding: 0px 0px 0px 0px;
    }

    .msmg-beveled p {
        width: 100%;
    }

    .msmg-feature-content {
        padding: 40px 0px 0px 0px;
    }

    .feature-structure-class {
        margin-left: -2.4rem;
        display: flex;
    }
}

@media (max-width: 768px) {
    .msmg-feature-story {
        grid-template-columns: 1fr;
    }
}



.msmg-feature-image {
    width: calc(100% + 50px);
    height: 400px;
    object-fit: cover;
    background-color: #eee;
    margin-left: -2rem;
    padding: 0px 0px 0px 0px;
 
}

@media (max-width: 440px) {
    .msmg-feature-image {
        width: calc(100% + 60px);
        height: 400px;
        object-fit: cover;
        background-color: #eee;
        margin-left: -2rem;
    }
    
    .msmg-story-image {
        width: calc(100% + 60px);
        height: 100%;
        object-fit: cover;
        object-position: center center;
        background-color: #eee;
        margin-left: -2rem;
    }
}


.msmg-feature-content {
    padding: 40px 0px 0px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.msmg-feature-headline {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 15px;
    color: #000;
    align-items: center;
    justify-content: center;
    justify-self: center;
}

@media (max-width: 900px) {
    .msmg-feature-headline {
        white-space: wrap;
    }
}

.msmg-feature-excerpt {
    font-size: 17px;
    color: #444;
    line-height: 1.5;
    margin-bottom: 20px;
    align-items: center;
    justify-content: center;
}

/* Standard Story Widget */
.msmg-stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.msmg-story-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.msmg-story-card:hover {
    transform: translateY(-5px);
}

.msmg-story-image {
    width: calc(100% + 50px);
    height: 100%;
    object-fit: cover;
    object-position: center center;
    background-color: #eee;
    margin-left: -3rem;
}

.msmg-story-content {
    padding: 20px;
    flex: 1;
}

.msmg-story-headline {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
    margin-left: -1rem;
}

.msmg-story-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    margin-left: -1rem;
}

.msmg-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    background: var(--msmg-backdrop-soft);
    color: #7b7266;
    max-width: calc(100% - 0.8rem);
}

/* Story Detail Specific */
.msmg-story-header {
    display: flex;
    gap: 24px;
    margin-bottom: 30px;
    padding-bottom: 30px;
}

@media (max-width: 640px) {
    .msmg-story-header {
        flex-direction: column;
    }

    .msmg-viewer-image {
        width: calc(100% + 50px) !important;
        height: auto !important;

    }
}

.msmg-viewer-image {
    width: 500px;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    background-color: #eee;
}

.msmg-header-text {
    flex: 1;
    padding: 5px 0px 5px 0px;
}

.msmg-headline-main {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 10px;
    color: #000;
}

.msmg-meta {
    font-size: 13px;
    font-weight: 500;
    color: #666;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.msmg-excerpt-main {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
    font-style: italic;
    margin-bottom: -3rem;
}

.msmg-content {
    font-size: 18px;
    line-height: 1.6;
    color: #111;
    padding: 10px 20px 20px 20px;
    flex-direction: column;

}

.msmg-content p {
    margin-bottom: 20px;
}

.msmg-content-class {
    padding: 0px 20px 20px 20px;
}

.msmg-back-link {
    display: inline-block;
    margin-bottom: 20px;
    text-decoration: none;
    color: #7b7266;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
}

.msmg-back-link:hover {
    color: #000;
}

/* Footer & Utilities */
.msmg-flex-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

main {
    flex: 1;
}

.msmg-footer {
    padding: 60px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: #fff;
    margin-top: 40px;
}

.msmg-footer-brand {
    font-size: 24px;
    margin-bottom: 20px;
    text-decoration: none;
}

.msmg-footer-links {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.msmg-footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msmg-footer-heading {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.msmg-footer-link {
    text-decoration: none;
    color: #666;
    font-size: 14px;
}

.msmg-footer-link:hover {
    color: #000;
}

.msmg-footer-copy {
    color: #999;
    font-size: 12px;
    font-weight: 500;
}

.msmg-sticky-spacer {
    height: 60px;
}

.msmg-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
}

/* Live Election Button */
.msmg-live-banner {
    display: flex;
    justify-content: center;
    padding: 12px 0;
    background: transparent;
    border-bottom: none;
    position: sticky;
    top: 60px;
    /* height of header */
    z-index: 999;
}

.msmg-live-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    background: transparent;
    color: #000;
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-shadow: none;
}

.msmg-live-button:hover {
    transform: translateY(-1px);
    opacity: 0.88;
}

.msmg-pulse-dot {
    width: 10px;
    height: 10px;
    background: #ff0000;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    animation: msmg-pulse 1.5s infinite;
}

@keyframes msmg-pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255, 0, 0, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }
}

/* Election Page Styles */
.msmg-election-header {
    margin: 10px 0 30px;
    text-align: center;
}

.msmg-election-tabs {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--msmg-edge-mid);
    margin-top: 3rem;
}

.msmg-tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    position: relative;
}

.msmg-tab-btn.active {
    color: #000;
}

.msmg-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #000;
}

.msmg-tab-content {
    display: none;
}

.msmg-tab-content.active {
    display: block;
}

.msmg-beveled p {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0px 0px 0px 0px;

}

.msmg-home-beveled {
    background-color: var(--msmg-surface);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s;
    width: 100%;
    padding: 0px 0px 0px 10px;
}

.msmg-candidate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.msmg-candidate-card {
    background: var(--msmg-surface);
    border: 1px solid var(--msmg-edge-mid);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s;
}

.msmg-candidate-card:hover {
    transform: translateY(-4px);
}

.msmg-candidate-img-row {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
}

.msmg-candidate-img-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.msmg-candidate-img-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    background: linear-gradient(135deg, #efe7da 0%, #ddd2bf 100%);
    color: #4f4437;
    font-weight: 700;
}

.msmg-candidate-info {
    padding: 20px;
}

.msmg-candidate-name {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 4px;
}

.msmg-candidate-party {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.msmg-party-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
}

.msmg-party-D {
    color: #0044cc;
    background: #e6eeff;
}

.msmg-party-R {
    color: #cc0000;
    background: #ffe6e6;
}

.msmg-party-I {
    color: #666;
    background: #eee;
}

.msmg-candidate-race {
    font-size: 14px;
    font-weight: 600;
}

/* Info Pages (TOS, Privacy, About, Contact) */
.msmg-info-page {
    max-width: 800px;
    margin: 40px auto;
    padding: 60px;
    background: #fff;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 24px var(--msmg-shadow);
}

.msmg-info-title {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 40px;
    letter-spacing: -2px;
    line-height: 1;
}

.msmg-info-content {
    font-size: 18px;
    line-height: 1.7;
    color: #333;
}

.msmg-info-content h1, 
.msmg-info-content h2, 
.msmg-info-content h3 {
    color: #000;
    margin-top: 40px;
    margin-bottom: 20px;
}

.msmg-info-content h1 { font-size: 32px; font-weight: 800; border-bottom: 2px solid #000; padding-bottom: 10px; }
.msmg-info-content h2 { font-size: 24px; font-weight: 800; }
.msmg-info-content h3 { font-size: 20px; font-weight: 700; }

.msmg-info-content p {
    margin-bottom: 24px;
}

.msmg-info-content hr {
    margin: 40px 0;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.msmg-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

@media (max-width: 768px) {
    .msmg-info-page {
        padding: 30px 20px;
        margin: 20px 0;
        border-radius: 0;
    }
    
    .msmg-info-title {
        font-size: 36px;
    }
    
    .msmg-contact-grid {
        grid-template-columns: 1fr;
    }
}