/* Mobile-first responsive CSS for Simple Adder */
:root {
    --bg: #f4f6f8;
    --card-bg: #ffffff;
    --text: #0f172a;
    --muted: #6b7280;
    --accent: #2563eb;
}

html,
body {
    height: 100%;
}

/* Title (mobile defaults) */
#appTitle {
    margin: 12px 0 10px;
    font-weight: 700;
    color: #111827;
    text-align: center;
    letter-spacing: 0.2px;
    line-height: 1.2;
    max-width: 820px;
    padding: 0 12px;
    font-size: 20px;
    /* mobile size */
}

#subtitle {
    margin: 4px 0 12px;
    color: #6b7280;
    text-align: center;
    font-size: 13px;
    max-width: 760px;
    padding: 0 12px;
}

/* Card (width only; visual styling handled in main.js)
   main.js now applies background, padding, border-radius, box-shadow, and text color */
#app {
    width: 100%;
    max-width: 420px;
}

#result {
    margin: 12px 0 8px;
    font-size: 32px;
    /* mobile size */
}

#app p {
    font-size: 15px;
    min-height: 1.2em;
}

#app p+p {
    margin-top: 4px;
}

/* Controls (stacked on mobile) */
.controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    justify-content: center;
}

#num1 {
    width: 100%;
}

/* visual focus styles are handled in main.js inline */

/* Tablet and up */
@media (min-width: 421px) {
    #app {
        padding: 24px;
    }

    #appTitle {
        font-size: 22px;
        margin-bottom: 18px;
    }

    #subtitle {
        font-size: 14px;
        margin-bottom: 18px;
    }

    #result {
        font-size: 36px;
    }

    .controls {
        flex-direction: row;
        align-items: center;
    }

    #num1 {
        width: 200px;
        margin-right: 12px;
    }
}

/* Desktop */
@media (min-width: 721px) {
    #app {
        min-width: 300px;
        max-width: 420px;
        padding: 28px;
    }

    #appTitle {
        font-size: 26px;
        margin-top: 28px;
        margin-bottom: 20px;
    }

    #result {
        font-size: 40px;
    }
}

/* Set explicit min-width for larger screens to keep the card readable */
/* (Duplicate block removed - desktop sizing already handled above) */