/* ============================================================
   psurvey — survey flow
   The pre-identity tunnel: context → 20 questions → mid-journey
   pauses → save-results identity capture.
   Shipped pages: /context.php, /question.php, /midjourney.php,
                  /save-results.php
   ============================================================ */

/* ============================================================
   Context (Frame 2)
   ============================================================ */

.context-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 28px 4px 24px;
}

.context-body .section-label {
    margin-bottom: 4px;
}

.context-prompt {
    font-family: var(--title);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.25;
    /* Frame 2 prompt is mixed-case, not the uppercase of standard h1 */
    text-transform: none;
    letter-spacing: 0.01em;
    color: var(--ink);
    margin-top: 8px;
    margin-bottom: 14px;
}

.context-note {
    font-size: 13px;
    color: var(--ink-soft);
    line-height: 1.55;
    margin-bottom: 22px;
}

.context-input {
    width: 100%;
    height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-family: var(--body);
    font-size: 14px;
    color: var(--ink);
    outline: none;
    background: var(--bg);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.context-input:focus {
    border-color: var(--green-main);
    box-shadow: 0 0 0 3px var(--green-faint);
}
.context-input::placeholder {
    color: var(--ink-light);
    font-style: italic;
}

.context-hint {
    margin-top: 6px;
    font-size: 11px;
    color: var(--ink-light);
}

.context-examples {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.context-examples .chip {
    font-family: var(--body);
    font-size: 11px;
    color: var(--ink-mid);
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 5px 10px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.context-examples .chip:hover,
.context-examples .chip:focus {
    background: var(--green-faint);
    border-color: var(--green-pale);
    color: var(--ink);
    outline: none;
}

.form-error {
    margin-top: 14px;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 6px;
    background: var(--yellow-faint);
    border-left: 3px solid var(--yellow-main);
    color: var(--ink-mid);
}

/* ============================================================
   Question (Frame 3) — 7-dot paired-pole scale
   ============================================================ */

/* The shared t2-header chrome (progress bar + back link + counter) lives
   in main.css now so midjourney.php can reuse it. This file only carries
   the question-specific body styles. */

/* ===== Question body ===== */
.q-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 14px 0 16px;
}

.q-attr-label { margin-bottom: 6px; }

.q-stem {
    font-family: var(--title);
    font-weight: 700;
    font-size: 18px;
    line-height: 1.25;
    text-transform: none;
    letter-spacing: 0.005em;
    color: var(--ink);
    margin-bottom: 18px;
}

/* 7-column grid: pole cards span cols 1-3 and 5-7 on the first row;
   the seven dots auto-flow into row 2 (col 4 in row 1 is intentionally empty). */
.q-v4-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    column-gap: 4px;
    row-gap: 14px;
    align-items: start;
    margin-top: 4px;
}
.q-v4-card {
    padding: 12px 12px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.35;
    color: var(--ink);
    min-height: 88px;
    display: flex;
    align-items: center;
}
.q-v4-card.left {
    grid-column: 1 / span 3;
    background: var(--yellow-tint);
    border: 1px solid var(--yellow-pale);
    border-left: 3px solid var(--yellow-main);
}
.q-v4-card.right {
    grid-column: 5 / span 3;
    background: var(--blue-tint);
    border: 1px solid var(--blue-pale);
    border-right: 3px solid var(--blue-main);
}

.q-v4-dot {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===== Dots ===== */
.q-dot {
    border-radius: 50%;
    border: 2px solid;
    background: #fff;
    cursor: pointer;
    position: relative;
    z-index: 2;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.q-dot:not(.disabled):hover { transform: scale(1.08); }
.q-dot:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 161, 47, 0.3);
}

.q-dot.d1 { width: 28px; height: 28px; border-color: var(--yellow-main); }
.q-dot.d2 { width: 24px; height: 24px; border-color: var(--yellow-light); }
.q-dot.d3 { width: 20px; height: 20px; border-color: var(--yellow-pale); }
.q-dot.d4 { width: 16px; height: 16px; border-color: var(--line); }
.q-dot.d5 { width: 20px; height: 20px; border-color: var(--blue-pale); }
.q-dot.d6 { width: 24px; height: 24px; border-color: var(--blue-light); }
.q-dot.d7 { width: 28px; height: 28px; border-color: var(--blue-main); }

.q-dot.disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

/* Selected — yellow side and blue side; halo color picks up the side */
.q-dot.selected.d1 { background: var(--yellow-main);  box-shadow: 0 0 0 4px rgba(239, 194, 52, 0.18); }
.q-dot.selected.d2 { background: var(--yellow-light); box-shadow: 0 0 0 4px rgba(239, 194, 52, 0.18); }
.q-dot.selected.d3 { background: var(--yellow-pale);  box-shadow: 0 0 0 4px rgba(239, 194, 52, 0.18); }
.q-dot.selected.d5 { background: var(--blue-pale);    box-shadow: 0 0 0 4px rgba(61, 140, 199, 0.18); }
.q-dot.selected.d6 { background: var(--blue-light);   box-shadow: 0 0 0 4px rgba(61, 140, 199, 0.18); }
.q-dot.selected.d7 { background: var(--blue-main);    box-shadow: 0 0 0 4px rgba(61, 140, 199, 0.18); }

.q-message {
    margin-top: 18px;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 6px;
    background: var(--yellow-faint);
    border-left: 3px solid var(--yellow-main);
    color: var(--ink-mid);
}

/* ============================================================
   Mid-journey pauses (after Q5, Q10, Q15)
   ============================================================ */
   ============================================================ */

.pause-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 28px 10px 20px;
    background: var(--bg-alt);
    margin-left: calc(-1 * var(--shell-pad-x));
    margin-right: calc(-1 * var(--shell-pad-x));
    padding-left: calc(var(--shell-pad-x) + 10px);
    padding-right: calc(var(--shell-pad-x) + 10px);
}

.pause-label {
    margin-bottom: 12px;
}

.pause-text {
    font-family: var(--title);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.3;
    text-transform: none;
    letter-spacing: 0.01em;
    color: var(--ink);
    margin-bottom: 16px;
}

.pause-note {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-mid);
    margin-bottom: 16px;
}
.pause-note p + p { margin-top: 10px; }
.pause-note em {
    font-style: normal;
    color: var(--ink);
    font-weight: 500;
}

/* ============================================================
   Save-results (Frame 5) — identity capture + OTP code entry
   ============================================================ */
   ============================================================ */

.id-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 28px 10px 24px;
}

.id-body .step[hidden] { display: none; }

.id-label {
    margin-bottom: 8px;
}

.id-head {
    font-family: var(--title);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.25;
    text-transform: none;
    letter-spacing: 0.01em;
    color: var(--ink);
    margin-bottom: 8px;
}

.id-sub {
    font-size: 13px;
    color: var(--ink-soft);
    margin-bottom: 22px;
    line-height: 1.5;
}

.id-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.id-field { margin-bottom: 14px; }

.id-field label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
    margin-bottom: 5px;
    font-weight: 500;
}

.id-field input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: var(--body);
    font-size: 14px;
    color: var(--ink);
    outline: none;
    background: var(--bg);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.id-field input:focus {
    border-color: var(--green-main);
    box-shadow: 0 0 0 3px var(--green-faint);
}

.id-field input.code-input {
    font-size: 26px;
    letter-spacing: 0.4em;
    text-align: center;
    font-variant-numeric: tabular-nums;
    padding: 14px 14px 14px 30px;
}

.id-foot {
    margin-top: 12px;
    font-size: 11px;
    color: var(--ink-light);
    line-height: 1.5;
}

.id-message {
    margin-top: 12px;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 6px;
    border-left: 3px solid var(--ink-light);
    color: var(--ink-mid);
    background: var(--bg-alt);
}
.id-message.error {
    background: var(--yellow-faint);
    border-left-color: var(--yellow-main);
}
.id-message.success {
    background: var(--green-faint);
    border-left-color: var(--green-main);
}
.id-message a {
    color: var(--green-main);
    font-weight: 500;
    text-decoration: none;
}
.id-message a:hover { text-decoration: underline; }

.resend {
    margin-top: 16px;
    text-align: center;
}

/* Trust-this-browser checkbox row (mirrors login.css). */
.id-body .trust-row {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    align-items: start;
    margin-top: 14px;
    padding: 10px 12px;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
}
.id-body .trust-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--green-main);
}
.id-body .trust-row .trust-label-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
}
.id-body .trust-row .trust-help {
    grid-column: 2;
    display: block;
    font-size: 11.5px;
    color: var(--ink-soft);
    line-height: 1.45;
    margin-top: 3px;
}
