:root {
    --color-primary: #2f5d50;
    --color-primary-light: #e8f1ee;
    --color-card-bg: #f6fbf9;
    --color-text: #1f2622;
    --color-muted: #5b6660;
    --color-border: #dde3e0;
    --shadow-card: 0 1px 2px rgba(31, 38, 34, 0.04), 0 8px 24px rgba(47, 93, 80, 0.06);
    --shadow-card-hover: 0 2px 4px rgba(31, 38, 34, 0.05), 0 14px 32px rgba(47, 93, 80, 0.10);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    color: var(--color-text);
    background: #fafbfa;
    line-height: 1.55;
}

.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.site-header {
    border-bottom: 1px solid var(--color-border);
    background: #fff;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
}

.brand {
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    font-size: 1.1rem;
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-header nav a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
}

.nav-cta {
    background: var(--color-primary);
    color: #fff !important;
    padding: 0.4rem 0.9rem;
    border-radius: 7px;
    transition: opacity 0.15s ease;
}

.nav-cta:hover { opacity: 0.9; }

.nav-user {
    color: var(--color-muted);
    font-weight: 600;
    font-size: 0.9rem;
}

.nav-logout-form {
    display: inline;
    margin: 0;
}

.nav-link-button {
    background: none;
    border: none;
    padding: 0;
    color: var(--color-text);
    font-weight: 600;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
}

.nav-link-button:hover {
    color: var(--color-primary);
}

main.container {
    padding: 2.5rem 1.25rem 3rem;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.muted { color: var(--color-muted); }

.auth-switch {
    margin-top: 1.25rem;
}

.button {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    padding: 0.65rem 1.4rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    margin-top: 1rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.button:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(47, 93, 80, 0.22);
}

.button-ghost {
    background: #fff;
    color: var(--color-primary);
    border: 1px solid var(--color-border);
}

.button-ghost:hover {
    background: var(--color-primary-light);
    box-shadow: none;
}

.how-it-works {
    margin-top: 2.5rem;
}

.how-it-works ol {
    padding-left: 1.25rem;
}

.how-it-works li {
    margin-bottom: 0.5rem;
}

/* Flash messages */
.messages {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
}

.message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border: 1px solid var(--color-border);
}

/* Assessment wizard */
.wizard-progress-wrap {
    margin-bottom: 1.75rem;
}

.wizard-progress-track {
    background: var(--color-primary-light);
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

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

.wizard-step-label {
    margin: 0.5rem 0 0;
    font-size: 0.82rem;
    color: var(--color-muted);
    font-weight: 600;
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    gap: 0.75rem;
}

.wizard-actions-left,
.wizard-actions-right {
    display: flex;
    gap: 0.75rem;
}

.form-section {
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #ffffff 0%, var(--color-card-bg) 100%);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s ease;
}

.form-section:hover {
    box-shadow: var(--shadow-card-hover);
}

.form-section legend {
    font-weight: 700;
    color: var(--color-primary);
    padding: 0 0.4rem;
}

.section-help {
    color: var(--color-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0.25rem 0 1.1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px dashed var(--color-border);
}

.form-field {
    margin-bottom: 0.9rem;
}

.form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.92rem;
}

.form-field input:not([type="radio"]):not([type="checkbox"]),
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: 7px;
    font-size: 0.95rem;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field input:not([type="radio"]):not([type="checkbox"]):focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(47, 93, 80, 0.12);
}

/* 16PF radio scale */
.form-field ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.4rem;
}

.form-field ul li {
    flex: 1;
}

.form-field ul li label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    font-weight: 400;
    font-size: 0.72rem;
    color: var(--color-muted);
    text-align: center;
    cursor: pointer;
    padding: 0.5rem 0.3rem;
    border: 1px solid var(--color-border);
    border-radius: 7px;
    background: #fff;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.form-field ul li label:hover {
    border-color: var(--color-primary);
}

.form-field ul li input[type="radio"] {
    margin: 0 0 0.2rem;
}

.form-field ul li:has(input[type="radio"]:checked) label {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-light);
}

.help-text {
    color: var(--color-muted);
    font-size: 0.82rem;
    margin: 0.2rem 0 0;
}

.field-error {
    color: #b3261e;
    font-size: 0.85rem;
}

/* Results page */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.results-header h1 {
    margin: 0;
}

.results-header .button {
    margin-top: 0;
}

.dimension-scores { margin-bottom: 2.5rem; }

.holland-code {
    margin-bottom: 2.5rem;
}

.holland-letters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.holland-letter-card {
    flex: 1;
    min-width: 140px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, var(--color-card-bg) 100%);
    box-shadow: var(--shadow-card);
    text-align: center;
}

.holland-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.holland-letter-card strong {
    display: block;
    margin-bottom: 0.3rem;
}

.holland-letter-card p {
    font-size: 0.82rem;
    color: var(--color-muted);
    margin: 0;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.bar-label { width: 130px; font-weight: 600; }

.bar-track {
    flex: 1;
    background: var(--color-primary-light);
    border-radius: 999px;
    overflow: hidden;
    height: 14px;
}

.bar-fill {
    background: var(--color-primary);
    height: 100%;
    transition: width 0.4s ease;
}

.bar-value { width: 40px; text-align: right; font-variant-numeric: tabular-nums; }

.career-card {
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #ffffff 0%, var(--color-card-bg) 100%);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.career-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.career-card h3 {
    margin-top: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dimension-tag {
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--color-primary-light);
    color: var(--color-primary);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.sector-tag {
    background: #eef1f7;
    color: #44546b;
}

.career-card h4 {
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 1.25rem 0;
    color: var(--color-muted);
    font-size: 0.85rem;
}
