@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #2e2e2e;
    background-color: #635e3b;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 16px;
    background: #ffffff;
    min-height: 100vh;
}

/* ── Header ── */
.header {
    text-align: left;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2e2e2e;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.header p {
    color: #6b7280;
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.8;
    margin: 0;
}

/* ── Progress ── */
.progress-container {
    margin-bottom: 16px;
}

.progress-info {
    display: flex;
    justify-content: center;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 6px;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 3px;
    background: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #635e3b;
    transition: width 0.4s ease;
    border-radius: 2px;
}

/* ── Question ── */
.question-container {
    background: #ffffff;
    padding: 0;
    margin-bottom: 16px;
}

.question-axis-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #635e3b;
    background: #f5f0e8;
    border: 1px solid #e5ddd1;
    border-radius: 4px;
    padding: 3px 10px;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.question-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2e2e2e;
    margin-bottom: 20px;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

/* ── Likert Scale ── */
.likert-scale {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.likert-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    gap: 14px;
    user-select: none;
}

.likert-option:hover {
    border-color: #635e3b;
    background: #faf9f6;
}

.likert-option.selected {
    border-color: #635e3b;
    background: #f5f0e8;
}

.likert-radio-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.likert-option.selected .likert-radio-dot {
    border-color: #635e3b;
    background: #635e3b;
}

.likert-option.selected .likert-radio-dot::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    display: block;
}

.likert-value-badge {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.likert-option.selected .likert-value-badge {
    background: #635e3b;
    color: white;
}

.likert-label-text {
    font-size: 0.9rem;
    color: #374151;
    font-weight: 500;
    flex: 1;
    line-height: 1.4;
}

.likert-option.selected .likert-label-text {
    color: #2e2e2e;
    font-weight: 600;
}

/* ── Navigation ── */
.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.nav-btn:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.nav-btn.prev {
    background: #f3f4f6;
    color: #6b7280;
}

.nav-btn.prev:hover:not(:disabled) {
    background: #e5e7eb;
}

.nav-btn.next {
    background: #635e3b;
    color: white;
}

.nav-btn.next:hover:not(:disabled) {
    background: #574f35;
}

/* ── Results ── */
.results-container {
    max-width: 1000px;
}

.pattern-reveal-card {
    text-align: center;
    padding: 32px 24px;
    background: linear-gradient(135deg, #f5f0e8 0%, #ede8dc 100%);
    border-radius: 16px;
    margin-bottom: 24px;
    border: 1px solid #e5ddd1;
}

.pattern-reveal-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    color: #635e3b;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.pattern-reveal-name {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2e2e2e;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 16px;
}

.pattern-reveal-desc {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto;
}

/* Axis score bars */
.axis-scores-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

.axis-card {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

.axis-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.axis-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2e2e2e;
}

.axis-card-range {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

.axis-bar {
    width: 100%;
    height: 8px;
    background: rgba(226, 232, 240, 0.6);
    border-radius: 6px;
    margin-bottom: 6px;
    overflow: hidden;
}

.axis-bar-fill {
    height: 100%;
    border-radius: 6px;
    background: #635e3b;
    transition: width 0.8s ease;
}

.axis-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #9ca3af;
}

/* Confirmation box */
.insights-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.insights-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2e2e2e;
    margin-bottom: 12px;
}

.website-link {
    margin-top: 16px;
    padding: 16px;
    background: #ffffff;
    border: 2px solid #635e3b;
    border-radius: 8px;
    text-align: center;
}

.website-link a {
    color: #635e3b;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.website-link a:hover {
    color: #574f35;
    text-decoration: underline;
}

.website-link p {
    margin: 6px 0 0 0;
    font-size: 0.85rem;
    color: #6b7280;
}

/* Context box */
.context-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-left: 4px solid #635e3b;
    border-radius: 6px;
    padding: 12px;
    margin-top: 16px;
    position: relative;
}

.context-box p {
    font-size: 0.8rem;
    color: #495057;
    line-height: 1.3;
    margin: 0;
    font-style: italic;
}

/* Submitting spinner */
.submitting-state {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 3px solid #e5e7eb;
    border-top-color: #635e3b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error state */
.error-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    color: #991b1b;
    font-size: 0.9rem;
}

/* ── Footer ── */
.footer {
    background: #f5f0e8;
    color: #8b6914;
    text-align: center;
    padding: 20px 16px;
    margin-top: 24px;
    border-top: 1px solid #e5ddd1;
}

.footer p {
    margin: 0 0 12px 0;
    font-size: 0.85rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
}

.social-links a {
    color: #8b6914;
    font-size: 1.3rem;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 6px;
}

.social-links a:hover {
    color: #635e3b;
}

/* ── Form Inputs ── */
.form-field {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #2e2e2e;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
    color: #2e2e2e;
}

.form-input:focus {
    border-color: #635e3b;
}

.form-input.error {
    border-color: #ef4444;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .container { padding: 24px 16px; }
    .header { margin-bottom: 30px; padding-bottom: 15px; }
    .header h1 { font-size: 2.2rem; }
    .progress-container { margin-bottom: 20px; }
    .question-text { font-size: 1.1rem; }
    .pattern-reveal-name { font-size: 1.7rem; }
    .likert-option { padding: 10px 12px; gap: 10px; }
}
