body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: #f4f7fc;
    color: #1b2330;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* small horizontal padding so fixed navbar doesn't hide content edges on very small screens */
@media (max-width: 420px) {
    .page-wrapper {
        padding-left: 8px;
        padding-right: 8px;
    }
}

.content {
    flex: 1;
    padding-top: 72px; /* space for fixed navbar on mobile */
}

.container {
    width: min(100%, 520px);
    max-width: 960px;
    margin: 40px auto 20px;
    background: white;
    padding: 32px;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    text-align: center;
}

h1 {
    color: #1e3a8a;
    margin-bottom: 20px;
    font-size: clamp(1.8rem, 2.3vw, 2.4rem);
}

p {
    color: #4b5563;
    line-height: 1.7;
}

input,
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    margin-top: 10px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 16px;
    background: #f9fafb;
    box-sizing: border-box;
}

button,
.button,
a.button-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 14px 18px;
    margin-top: 18px;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

button:hover,
.button:hover,
a.button-link:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.link-btn {
    display: block;
    text-decoration: none;
    margin-top: 15px;
    color: #2563eb;
    font-weight: 600;
}

/* ensure button-like links occupy full width on small screens */
.button-link {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 10px 0;
}

.navbar {
    background: #1e3a8a;
    padding: 14px 20px;
    color: white;
    text-align: center;
    font-size: clamp(1.3rem, 2.2vw, 2rem);
    font-weight: bold;
    letter-spacing: 0.02em;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 999;
}

.footer {
    background: #0f172a;
    color: #cbd5e1;
    text-align: center;
    padding: 18px 20px;
    font-size: 0.92rem;
    line-height: 1.6;
    width: 100%;
    box-sizing: border-box;
}

.footer a {
    color: #7dd3fc;
    text-decoration: none;
}

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

/* Better footer behavior on small screens */
.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    white-space: normal;
}

.footer > * {
    max-width: 980px;
}

.footer-inner {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    color: #cbd5e1;
}

.footer-inner div {
    margin: 0;
}

@media (max-width: 480px) {
    .footer {
        flex-direction: column;
        padding: 12px 14px;
        text-align: center;
    }

    .footer a {
        display: inline-block;
        word-break: break-word;
    }

    /* ensure main content doesn't butt up against footer */
    .container {
        margin-bottom: 18px;
    }
}

.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    text-align: left;
}

.data-table th,
.data-table td {
    padding: 14px 12px;
    border: 1px solid #e2e8f0;
}

.data-table th {
    background: #eef2ff;
    color: #1e3a8a;
}

.question-card {
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    text-align: left;
    background: #ffffff;
}

.question-card p {
    margin-bottom: 14px;
}

.radio-group label {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
    color: #1f2937;
}

.radio-group input {
    margin-right: 10px;
}

.card {
    padding: 22px;
    margin-bottom: 20px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    text-align: left;
}

.card h3 {
    margin-top: 0;
    color: #1e3a8a;
}

@media (max-width: 680px) {
    .container {
        width: 100%;
        margin: 20px auto;
        padding: 20px;
    }

    button,
    .button,
    a.button-link {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 14px 16px;
    }

    .footer {
        font-size: 0.85rem;
    }
}

/* Extra small screens tweaks */
@media (max-width: 420px) {
    .container {
        margin: 14px auto;
        padding: 16px;
        border-radius: 12px;
    }

    h1 {
        font-size: 1.4rem;
    }

    .question-card {
        padding: 14px;
    }

    .radio-group label {
        font-size: 14px;
    }

    .navbar {
        padding: 12px 14px;
        font-size: 1rem;
    }

    .footer {
        padding: 12px;
        font-size: 0.82rem;
    }
}
   