/* Category POV Canvas · builds on site.css */

.canvas {
    max-width: var(--page);
    margin: 0 auto;
    padding: 0 var(--gutter) 6rem;
    display: grid;
    grid-template-columns: var(--margin-col) minmax(0, 1fr);
    column-gap: var(--col-gap);
    align-items: start;
}
.canvas-main { grid-column: 2; max-width: var(--measure); min-width: 0; }

/* The margin: a table of contents that doubles as progress */
.steps {
    grid-column: 1;
    position: sticky;
    top: 2rem;
    list-style: none;
    font-family: var(--mono);
    font-size: 0.8125rem;
    line-height: 1.5;
    border-top: 1.5px solid var(--ink);
    padding-top: 0.75rem;
}
.steps li { margin: 0; }
.steps button {
    display: grid;
    grid-template-columns: 2.25rem 1fr;
    width: 100%;
    padding: 0.4rem 0;
    background: none;
    border: 0;
    font: inherit;
    color: var(--graphite);
    text-align: left;
    cursor: pointer;
}
.steps button:disabled { cursor: default; color: var(--struck); }
.steps button:not(:disabled):hover .t { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule); }
.steps .n { color: var(--struck); }
.steps .done .n { color: var(--ink); }
.steps [aria-current="step"] { color: var(--ink); }
.steps [aria-current="step"] .n { color: var(--red); }
.steps [aria-current="step"] .t { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.steps-note { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--rule); color: var(--graphite); font-size: 0.75rem; }
.steps-note[hidden] { display: none; }
.progress-compact { display: none; }

/* A step */
.step[hidden] { display: none; }
.step > h2 { outline: none; margin-bottom: 0.75rem; }
.step .step-sec { font-family: var(--mono); font-size: 0.8125rem; color: var(--red); margin-bottom: 0.75rem; }
.step-intro { font-family: var(--serif); font-size: 1.25rem; line-height: 1.6; color: var(--text); margin-bottom: 2.5rem; }
.step-intro.lead { font-size: clamp(1.375rem, 2.2vw, 1.5rem); line-height: 1.5; color: var(--ink); }

/* A question */
.q { padding: 1.75rem 0 2rem; border-top: 1px solid var(--rule); }
.q:first-of-type { border-top-color: var(--ink); }
.q-label {
    display: grid;
    grid-template-columns: 2.25rem 1fr;
    font-family: var(--serif);
    font-size: 1.3125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--ink);
    margin-bottom: 0.5rem;
}
.q-label .n { font-family: var(--mono); font-size: 0.8125rem; font-weight: 400; letter-spacing: 0; color: var(--red); padding-top: 0.35rem; }
.q-label .req { color: var(--red); font-weight: 400; margin-left: 0.15rem; }
.q-help, .q-body { margin-left: 2.25rem; }
.q-help { font-size: 0.9688rem; line-height: 1.55; color: var(--graphite); margin-bottom: 0.9rem; max-width: 38rem; }
.q-help .ex { font-family: var(--serif); font-style: italic; font-size: 1.0625rem; color: var(--text-soft); }

.q input[type="text"], .q input[type="email"], .q textarea {
    display: block;
    width: 100%;
    font-family: var(--serif);
    font-size: 1.1875rem;
    line-height: 1.55;
    color: var(--ink);
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-bottom: 1.5px solid var(--ink);
    border-radius: 0;
    padding: 0.75rem 0.9rem;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.15s;
}
.q textarea { resize: vertical; min-height: 6.5rem; overflow: hidden; }
.q input:focus, .q textarea:focus { outline: none; border-color: var(--insert); box-shadow: inset 0 -1px 0 var(--insert); }
.q input::placeholder, .q textarea::placeholder { color: var(--struck); font-style: italic; }
.q .prefix { font-family: var(--serif); font-size: 1.1875rem; font-style: italic; color: var(--graphite); margin-bottom: 0.4rem; }
.q.invalid input, .q.invalid textarea { border-color: var(--red); border-bottom-color: var(--red); }
.q-error { margin: 0.5rem 0 0 2.25rem; font-size: 0.9375rem; font-weight: 600; color: var(--red); }
.q-error:empty { display: none; }

/* Choices */
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.55rem 1rem;
    font-size: 0.9688rem;
    font-weight: 500;
    color: var(--text);
    background: var(--sheet);
    border: 1px solid var(--rule);
    transition: border-color 0.15s, background-color 0.15s;
}
.choice:hover span { border-color: var(--ink); }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.choice input:focus-visible + span { outline: 3px solid var(--insert); outline-offset: 2px; }

.scale .choices { gap: 0.35rem; flex-wrap: nowrap; }
.scale .choice { flex: 1 1 0; min-width: 0; }
.scale .choice span { justify-content: center; width: 100%; padding: 0.55rem 0; font-family: var(--mono); font-size: 0.9375rem; }
.scale-ends { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.5rem; font-family: var(--mono); font-size: 0.75rem; color: var(--graphite); }

/* Navigation between steps */
.step-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
    margin-top: 1rem;
    padding-top: 1.75rem;
    border-top: 1.5px solid var(--ink);
}
.step-nav .btn[disabled] { opacity: 0.6; cursor: progress; }
.step-nav .back { background: none; border: 0; font-family: var(--sans); font-size: 1rem; cursor: pointer; }
.step-nav .spacer { flex: 1; }
.step-nav .saved { font-family: var(--mono); font-size: 0.75rem; color: var(--graphite); }
.form-error {
    margin-top: 1.25rem;
    padding: 1rem 1.1rem;
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--red);
    font-size: 1rem;
    color: var(--ink);
}
.form-error[hidden] { display: none; }

.privacy { margin: 0.5rem 0 1.5rem; font-size: 0.9375rem; line-height: 1.55; color: var(--graphite); max-width: 38rem; }
.turnstile-box { margin: 0.5rem 0 0; min-height: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Intro */
.intro-facts { list-style: none; border-top: 1px solid var(--ink); margin: 0 0 2.25rem; }
.intro-facts li { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--rule); font-size: 1rem; color: var(--text-soft); }
.intro-facts .k { font-family: var(--mono); font-size: 0.8125rem; color: var(--graphite); padding-top: 0.15rem; }
.resume { margin-bottom: 1.5rem; padding: 1rem 1.1rem; background: var(--sheet); border: 1px solid var(--rule); border-left: 3px solid var(--insert); font-size: 1rem; }
.resume[hidden] { display: none; }

/* Finished canvas */
.story {
    margin: 2rem 0 0.5rem;
    padding: 1.75rem 1.75rem 1.6rem;
    background: var(--ink);
    color: var(--paper);
}
.story .label { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; color: var(--night-soft); margin-bottom: 0.75rem; }
.story .label .sec { color: var(--red-night); }
.story p.text { font-family: var(--serif); font-size: 1.375rem; line-height: 1.5; color: var(--paper); margin: 0; }
.sheet-sec { margin: 2.75rem 0 0.25rem; padding-top: 0.75rem; border-top: 1.5px solid var(--ink); font-family: var(--mono); font-size: 0.8125rem; color: var(--red); }
.sheet h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.sheet dl { margin: 0; }
.sheet dt .n { font-family: var(--mono); font-size: 0.8125rem; font-weight: 400; color: var(--red); margin-right: 0.75rem; }
.sheet dt { font-size: 0.9375rem; font-weight: 600; line-height: 1.4; color: var(--graphite); padding-top: 1rem; }
.sheet dd { margin: 0.3rem 0 0; padding-bottom: 1rem; border-bottom: 1px solid var(--rule); font-family: var(--serif); font-size: 1.1875rem; line-height: 1.55; color: var(--ink); white-space: pre-wrap; }
.sheet dd.empty { color: var(--struck); font-style: italic; }
.done-actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; margin: 2rem 0 0; }
.test-note { margin-top: 1rem; font-family: var(--mono); font-size: 0.8125rem; color: var(--insert); }
.test-note[hidden] { display: none; }

@media (max-width: 860px) {
    .canvas { grid-template-columns: minmax(0, 1fr); padding-bottom: 4rem; }
    .canvas-main { grid-column: 1; }
    .steps { display: none; }
    .progress-compact {
        display: block;
        grid-column: 1;
        position: sticky;
        top: 0;
        z-index: 5;
        margin: 0 calc(-1 * var(--gutter)) 1.5rem;
        padding: 0.7rem var(--gutter) 0.6rem;
        background: var(--paper);
        border-bottom: 1px solid var(--rule);
        font-family: var(--mono);
        font-size: 0.75rem;
        color: var(--graphite);
    }
    .progress-compact[hidden] { display: none; }
    .progress-compact .bar { height: 3px; background: var(--rule); margin-top: 0.45rem; }
    .progress-compact .bar i { display: block; height: 100%; background: var(--red); transition: width 0.25s; }
    .q-label { grid-template-columns: 1fr; font-size: 1.1875rem; }
    .q-label .n { padding: 0 0 0.25rem; }
    .q-help, .q-body, .q-error { margin-left: 0; }
    .intro-facts li { grid-template-columns: 1fr; gap: 0.15rem; }
    .scale .choices { flex-wrap: wrap; }
    .scale .choice { flex: 0 0 calc((100% - 5 * 0.35rem) / 6); }
    .step-nav .spacer { display: none; }
    .step-nav .saved { width: 100%; order: 3; }
    .story p.text { font-size: 1.25rem; }
}

@media print {
    .canvas { display: block; padding: 0; }
    .steps, .progress-compact, .step-nav, .done-actions, .done-head, .test-note, .page-hero { display: none !important; }
    .step { display: none !important; }
    .step.step-done { display: block !important; }
    .story { background: none; color: var(--ink); border: 1.5px solid var(--ink); }
    .story p.text { color: var(--ink); }
    .sheet dd, .sheet dt { break-inside: avoid; }
    .sheet-sec { break-after: avoid; }
}
