:root {
    --ink: #0a0a0a;
    --parchment: #f5f5f4;
    --stone: #57534e;
    --sage: #4d7c0f;
    --hairline: 1px solid var(--stone);
    --font-serif: 'Source Serif 4', serif;
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--parchment);
    color: var(--ink);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    -webkit-font-smoothing: antialiased;
}

.site-container {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 60vh;
}

.hidden {
    display: none !important;
}

.section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
    flex-grow: 1;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Hero --- */
.emblem-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emblem-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    mix-blend-mode: multiply;
}

.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background-color: var(--sage);
    filter: blur(25px);
    opacity: 0.15;
    z-index: 1;
    border-radius: 50%;
}

.confidence-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--stone);
    margin-bottom: 2.5rem;
    text-transform: lowercase;
    letter-spacing: 0.02em;
}

.title {
    font-family: var(--font-serif);
    font-size: 2.25rem;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--ink);
}

.subtitle {
    font-size: 1rem;
    color: var(--stone);
    max-width: 480px;
    margin: 0 auto 3rem auto;
}

/* --- Buttons --- */
button {
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.btn-primary {
    background-color: var(--ink);
    color: var(--parchment);
    border: 1px solid var(--ink);
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 99px;
}

.btn-primary:hover:not(:disabled) {
    background-color: transparent;
    color: var(--ink);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: transparent;
    color: var(--stone);
    border: var(--hairline);
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 99px;
}

.btn-secondary:hover {
    color: var(--ink);
    border-color: var(--ink);
}

/* --- Survey Elements --- */
#survey-section {
    position: relative;
    width: 100%;
    align-items: flex-start;
    text-align: left;
    padding-top: 3rem;
}

.corner-pill {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border: var(--hairline);
    border-radius: 99px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--stone);
}

.corner-pill svg {
    color: var(--sage);
}

.progress-indicator {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--stone);
    margin-bottom: 2rem;
}

#survey-form {
    width: 100%;
}

.page {
    width: 100%;
    min-height: 250px;
}

.question {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 2.5rem;
    color: var(--ink);
}

.optional-label {
    font-size: 0.85rem;
    color: var(--stone);
    margin-top: -2rem;
    margin-bottom: 2rem;
}

/* Likert Scale */
.likert-group {
    width: 100%;
    margin-bottom: 3rem;
}

.likert-labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--stone);
    margin-bottom: 1rem;
    text-transform: lowercase;
}

.likert-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.likert-options::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 1px;
    background-color: var(--stone);
    opacity: 0.3;
    z-index: 0;
}

.likert-options label {
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.likert-options input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: var(--hairline);
    background-color: var(--parchment);
    color: var(--stone);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.likert-options label:hover .circle {
    border-color: var(--ink);
    color: var(--ink);
}

.likert-options input[type="radio"]:checked + .circle {
    background-color: var(--sage);
    border-color: var(--sage);
    color: var(--parchment);
    transform: scale(1.1);
}

/* Textarea */
.textarea-wrapper {
    width: 100%;
    position: relative;
    margin-bottom: 3rem;
}

textarea {
    width: 100%;
    height: 140px;
    background-color: transparent;
    border: var(--hairline);
    border-radius: 8px;
    padding: 1rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--ink);
    resize: none;
    outline: none;
    transition: border-color 0.2s;
}

textarea:focus {
    border-color: var(--ink);
}

textarea::placeholder {
    color: rgba(87, 83, 78, 0.5);
}

.char-count {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--stone);
    pointer-events: none;
}

/* Nav Controls */
.nav-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: var(--hairline);
}

.nav-controls button:last-child {
    margin-left: auto;
}

/* --- Thank You --- */
#thank-you-section {
    text-align: center;
}

.final-msg {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--ink);
    margin-bottom: 1rem;
}

.faint-msg {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--stone);
    opacity: 0.6;
    letter-spacing: 0.05em;
    text-transform: lowercase;
}

/* Error Toast */
.error-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--ink);
    color: var(--parchment);
    padding: 12px 24px;
    border-radius: 99px;
    font-size: 0.875rem;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-family: var(--font-sans);
}

/* Powered By */
#wbx-powered-by-slot {
    margin-top: 4rem;
    width: 100%;
}

@media (max-width: 600px) {
    .circle {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    .title {
        font-size: 1.8rem;
    }
    .question {
        font-size: 1.4rem;
    }
    .likert-labels {
        font-size: 0.65rem;
    }
}