:root {
    --primary: #0d6efd;
    --primary-hover: #0b5ed7;
    --secondary: #6c757d;
    --bg: #f8f9fa;
    --text: #212529;
    --border: #dee2e6;
    --radius: 6px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    text-align: center;
}

.header h1 { font-size: 1.25rem; font-weight: 600; }
.header .subtitle { font-size: 0.875rem; color: var(--secondary); }

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

.landing {
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

.landing h2 { margin-bottom: 1rem; }
.landing p { margin-bottom: 1rem; color: var(--secondary); }

.progress-bar {
    background: var(--border);
    border-radius: var(--radius);
    height: 8px;
    margin-bottom: 2.0rem;
    position: relative;
}

.progress-fill {
    background: var(--primary);
    height: 100%;
    border-radius: var(--radius);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.75rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

h2 { margin-bottom: 1.5rem; font-size: 1.25rem; }

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.helper-text {
    display: block;
    font-size: 0.8125rem;
    color: var(--secondary);
    margin-bottom: 0.35rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(13,110,253,0.25);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.agreement-text {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    border: 1px solid var(--border);
    margin-bottom: 0.5rem;
}

.checkbox-label { margin-left: 0.5rem; }

.required { color: #dc3545; }

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.btn {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.15s ease;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover { background: var(--primary-hover); }

.btn-secondary {
    background: var(--secondary);
    color: #fff;
}

.btn-secondary:hover { background: #5a6268; }

.btn-large {
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
}

.complete {
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

.complete h2 { color: #198754; }
.complete p { margin-bottom: 1rem; color: var(--secondary); }

.honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.footer {
    text-align: center;
    padding: 2rem;
    color: var(--secondary);
    font-size: 0.75rem;
}

.section-conditional[style*="display: none"] { display: none; }

.option-group {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

.option-group legend {
    font-weight: 500;
    padding: 0 0.5rem;
    font-size: 0.9rem;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    cursor: pointer;
}

.option-label input[type="radio"],
.option-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    accent-color: var(--primary);
}

.sub-field {
    margin-bottom: 0.75rem;
}

.sub-field:last-child {
    margin-bottom: 0;
}

.sub-field label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.sub-field input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
}

.sub-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(13,110,253,0.25);
}

.sub-field select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
}

.sub-field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(13,110,253,0.25);
}

.file-upload-widget {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}

.file-upload-input {
    display: none;
}

.file-upload-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.file-upload-name {
    font-weight: 500;
    color: var(--text);
}

.file-upload-status {
    font-size: 0.8125rem;
    color: #198754;
}

.file-upload-widget:has(.file-upload-input:focus) {
    border-color: var(--primary);
}

.file-upload-widget .file-upload-name::before {
    content: "\1F4C4 ";
}

.file-upload-btn {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.5rem;
    transition: background 0.15s ease;
}

.file-upload-btn:hover {
    background: #e9ecef;
}

.error-page {
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

.form-error {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.error-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.error-page h2 {
    color: #dc3545;
    margin-bottom: 0.5rem;
}

.error-page p {
    color: var(--secondary);
    margin-bottom: 1.5rem;
}
