html {
    box-sizing: border-box;
}

/* Global CLS guard: paired with width/height attributes on <img> so the HTML
   height never stretches a width-constrained image (global RJL rule). */
img {
    height: auto;
}

:root {
    --brand-red: #CB0000;
    --brand-red-light: #ff4d4d;
    --brand-accent: #FF002A;
    --bg-base: #ffffff;
    --bg-soft: #f6f8fb;
    --bg-soft-alt: #eef3f9;
    --border-soft: #e2e8f0;
    /* New colorful diagonal gradient (TL->BR) using softened brand palette */
    --bg-gradient: linear-gradient(135deg,
        #fff5f5 0%,           /* very light red tint */
        #ffe8cc 22%,          /* warm light gold */
        #ffd84d 38%,          /* brand-inspired yellow accent */
        #ffb3c1 55%,          /* soft pink (transition from yellow to red family) */
        #f597e2 72%,          /* pink -> magenta bridge */
        #e4ccff 88%,          /* light violet (ties to outline/purple) */
        #ffffff 100%          /* fade to white for readability bottom-right */
    );
}

*, *:before, *:after {
    box-sizing: inherit;
}

.group:after {
    content: "";
    display: table;
    clear: both;
}

body {
    padding: 0;
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Primary visible page heading */
.site-title {
        font-size: clamp(1.7rem, 1.1rem + 1.6vw, 2.55rem);
        text-align: center;
        font-weight: 800;
        line-height: 1.1;
        margin: 8px 12px 30px;
        letter-spacing: .5px;
        position: relative;
        color: var(--brand-red);
        background: linear-gradient(90deg,var(--brand-red) 0%, var(--brand-red-light) 60%, var(--brand-accent) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent; /* fallback handled by @supports below */
        text-shadow: 0 1px 2px rgba(0,0,0,0.12);
}

@supports not ((background-clip: text) or (-webkit-background-clip: text)) {
    .site-title { color: var(--brand-red); }
}

.site-title:after {
        content: "";
        display: block;
        width: 140px;
        height: 5px;
        margin: 14px auto 0;
        border-radius: 3px;
        background: linear-gradient(90deg,var(--brand-red) 0%, var(--brand-accent) 100%);
        box-shadow: 0 2px 6px -1px rgba(203,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.4) inset;
}

/* Responsive top logo image */
#logoImage {
        display: block;
        width: 100%;          /* Fill available width but constrain by max-width */
        max-width: 600px;      /* Original intended size */
        height: auto;
        margin: 0 auto 8px;
        image-rendering: -webkit-optimize-contrast;
}

@media (max-width: 640px) {
    #logoImage { max-width: 92%; margin: 0 auto 4px; }
}

@media only screen and (max-width: 600px) {
    .site-title { margin: 0 8px 18px; font-size: 1.55rem; }
}

.logo {
    display: block;
    width: 282px;
    height: 202px;
    background-image: url(/fakenewsmaker-logo.png);
    text-indent: -9999px;
    margin: 0 auto;
    background-size: contain;
	background-repeat: no-repeat;
}

.container {
    width: 100%;
    max-width: 1700px;
    margin: 15px auto 20px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    box-shadow: 0 4px 18px -6px rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.08);
    padding: 26px 46px 34px;
}

.intro {
    width: 30%;
    padding-right: 20px;
    display: inline-block;
    text-align: center;
    vertical-align: top;
}

/* .intro__text previously empty; removed for cleanliness */

.build-form {
    text-align: left;
}

.build-form__item {
    display: inline-block;
    width: 100%;
    /* margin-bottom: 10px; */
}

.build-form__label {
    font-weight: 700;
    display: block;
    font-size: 110%;
    margin-bottom: 4px;
}

.build-form input[type="text"] {
    width: 100%;
    margin-bottom: 5px;
    padding: 10px;
}

.build-form fieldset {
    border: none;
    padding: 0;
    margin-bottom: 10px;
}

.build-form__radio {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
    font-size: 16px;
}

.select {
    max-width: 400px;
    width: 100%;
    padding: 10px;
}

.disclaimer {
    font-size: 13px;
}

.main {
    display: inline-block;
    width: 70%;
    vertical-align:top;
    text-align: center;
}

.main {
    display: inline-block;
    width: 70%;
    vertical-align:top;
    text-align: center;
}

.byon-canvas {
    width: 100% !important;
    height: auto;
}

.byon-canvas[data-ratio="square"] {
    max-width: 640px;
}


.byon-canvas[data-ratio="portrait"] {
    max-width: 447px;
}

/* .share-row had no declarations; placeholder removed */

.button {
    padding: 12px;
    border-radius: 4px;
    background: #222;
    font-weight: 400;
    color: #fff;
    display: inline-block;
    font-size: 115%;
    margin: 10px 5px;
    box-shadow: inset 0 -4px 12px 2px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    vertical-align: top;
    border: 0;
    font-family: 'Roboto', sans-serif;
}

.button:hover {
    box-shadow: inset 0 4px 12px 2px rgba(0, 0, 0, 0.1);
}

.button--download {
    background: #002EAD;
    color: #FFFFFF;
}

.upload-response:not(:empty) {
    margin-bottom: 10px;
}


footer {
    padding: 12px;
    color: #fff;
    font-size: 120%;
    background-color: #CB0000;
    border-radius: 4px;
    box-shadow: inset 0 -4px 12px 2px rgba(0, 0, 0, 0.2);
}

footer a {
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media only screen and (max-width: 980px) {
    .intro {
        width: 35%;
        padding: 20px;
    }


    .intro__text {
        font-size: 90%;
    }

    .main {
        width: 65%;
        padding-right: 20px;
    }

    .container { padding: 24px 36px 30px; }

    .logo {
        width: 150px;
        height: 135px;
    }

}

@media only screen and (max-width: 800px) {
    .container {
        margin: 10px auto;
    padding: 20px 24px 26px;
    }

    .intro {
        width: 100%;
        padding: 10px;
    }

    .intro__text {
        margin-top: 0;
    }

    .logo {
        float: left;
        margin-right: 20px;
        margin-bottom: 20px;
        width: 100px;
        height: 90px;
    }

    .main {
        width: 100%;
        padding: 0;
    }

    .build-form__item {
        width: 48%;
    }

    .build-form__item:first-of-type {
        margin-right: 4%;
    }

    .button {
        padding: 8px;
        font-size: 100%;
        margin: 5px;
    }

    footer {
        margin: 5px;
        padding: 8px;
        font-size: 90%;
        text-align: center;
    }
}


@media only screen and (max-width: 400px) {

    .build-form__item {
        width: 100%;
    }

    .build-form__item:first-of-type {
        margin-right: 0;
    }

    .container { padding: 18px 18px 22px; }
}