/* ======================================
   BASELINE FOR FORM STYLING
   - No utility classes to memorize
   - Flexbox is applied automatically
   ====================================== */

/* Match main site: padding/borders count inside width, fixes overflow */
* {
    box-sizing: border-box;
}

/* Page layout — matched to main site styles.css */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #aaa4ff;
    color: #333;
    line-height: 1.6;
}

h1,
h2,
legend {
    margin-bottom: 0.5rem;
    font-weight: bold;
}

p {
    margin: 0 0 1rem;
}

header {
    background-color: #6f00ff;
    border-radius: 6px;
    color: white;
    padding: 1rem;
    text-align: center;
    margin: 1rem auto 0;
    max-width: 800px;
}

header h1,
header p {
    text-align: center;
}

footer {
    background-color: white;
    border-radius: 6px;
    padding: 1rem;
    text-align: center;
    margin: 1rem auto;
    max-width: 800px;
}

footer a {
    color: #0055aa;
    text-decoration: none;
}

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

main.container {
    display: flex;
    justify-content: center;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

/* Card wrapper for form */
.card {
    background-color: white;
    border-radius: 6px;
    padding: 1rem 1rem 2rem;
    margin: 1rem 0;
    flex: 1;
}

/* Form layout */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

fieldset {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

label {
    font-size: 0.95rem;
    margin-right: 1rem;
}

/* Label stacked above its input */
.field-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.field-row input {
    width: 100%;
}

input,
textarea,
button {
    font: inherit;
}

input,
textarea {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0.5rem;
}

.textarea {
    min-height: 100px;
}

.radio-group {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
}

/* Radio to the left of its text */
.radio-group label {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-right: 0;
}
.radio-group label input {
    margin: 0.5rem; 
}

.actions {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    background-color: #00aa63;
    color: white;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    background-color: #003f7f;
}

/* Helpers */
.muted {
    color: #6b7280;
}

.field-row--top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}


