/* Attachment v3.2 integration. Existing fonts, palette roles and assessment recipes. */
.attachment-preview {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 24px 56px;
    color: var(--site-color-text);
    line-height: 1.65;
    --intro-primary: var(--site-color-heading);
    --intro-text: var(--site-color-text);
    --intro-muted: var(--site-color-muted);
    --intro-border: var(--site-color-border);
    --intro-border-strong: var(--site-color-border-strong);
    --intro-accent: var(--site-color-accent-text);
    --intro-surface: var(--site-color-surface);
}
.attachment-preview [hidden] { display: none !important; }
.attachment-preview h1, .attachment-preview h2, .attachment-preview h3 {
    color: var(--site-color-heading);
    font-family: var(--pv-font-serif);
    font-weight: 500;
    line-height: 1.25;
}
.attachment-preview h1 { font-size: clamp(1.9rem, 4.5vw, 2.5rem); margin: 12px 0 20px; }
/* Programmatic screen headings announce context; interactive controls retain rings. */
.attachment-preview #intro-title:focus { outline: none; }
.attachment-preview .personality-intro-notice { display: block !important; }
.attachment-preview h2 { font-size: 1.4rem; margin: 0 0 16px; }
.attachment-preview h3 { font-size: 1.15rem; margin: 0 0 12px; }
.attachment-preview p { margin: 0 0 18px; }
.attachment-preview .lead { font-size: 1.05rem; color: var(--site-color-muted); }
.attachment-preview .small { font-size: .85rem; }
.attachment-preview .muted { color: var(--site-color-muted); }
.attachment-preview a { color: var(--site-color-accent-text); text-underline-offset: 3px; }
.attachment-preview .eyebrow { color: var(--site-color-accent-text); text-transform: uppercase; letter-spacing: .09em; font-size: .76rem; font-weight: 700; }
.attachment-preview .panel, .attachment-review-card {
    background: var(--site-color-surface);
    border: 1px solid var(--site-color-border);
    border-radius: 12px;
    box-shadow: var(--pv-shadow-sm);
    padding: 26px 24px 30px;
    margin: 24px 0;
    min-width: 0;
}
.attachment-preview .panel p:last-child { margin-bottom: 0; }
.attachment-preview .notice, .attachment-preview .result-evidence {
    padding: 18px 20px;
    border-left: 3px solid var(--site-color-accent-text);
    background: var(--site-color-surface-elevated);
    border-radius: 8px;
    margin: 24px 0;
    color: var(--site-color-text);
}
.attachment-preview button, .attachment-preview .pv-button {
    font-family: var(--pv-font-sans);
    font-weight: 600;
    font-size: .9rem;
    line-height: 1.4;
    min-height: 44px;
    padding: 11px 22px;
    border: 1px solid var(--site-color-border-strong);
    border-radius: 9px;
    cursor: pointer;
    white-space: normal;
}
.attachment-preview .primary, .attachment-preview a.pv-button {
    background: var(--site-color-accent-primary);
    border-color: var(--site-color-accent-primary);
    color: var(--site-color-on-accent);
    text-decoration: none;
}
.attachment-preview .primary:hover, .attachment-preview a.pv-button:hover { background: var(--site-color-accent-hover); }
.attachment-preview .secondary, .attachment-preview a.pv-button--secondary {
    background: var(--site-color-surface);
    color: var(--site-color-heading);
    border-color: var(--site-color-border-strong);
}
.attachment-preview .secondary:hover { background: var(--site-color-surface-elevated); }
.attachment-preview .text-button, .attachment-preview .skip-button {
    background: none;
    color: var(--site-color-accent-text);
    border-color: transparent;
    padding: 6px 0;
    text-decoration: underline;
}
.attachment-preview :is(button,a,input,summary):focus-visible { outline: 3px solid var(--site-color-focus); outline-offset: 3px; }
.attachment-preview button:disabled { opacity: .55; cursor: default; }
.attachment-preview .error { color: var(--pv-color-danger); }
.attachment-preview .intro-facts { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 24px 0; color: var(--site-color-muted); font-size: .85rem; }
.attachment-preview .eligibility { display: grid; gap: 14px; border-top: 1px solid var(--site-color-border); padding-top: 24px; margin: 24px 0; }
.attachment-preview .eligibility label { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.attachment-preview .eligibility input { width: 20px; height: 20px; margin: 3px 0 0; flex: none; accent-color: var(--site-color-accent-primary); }
.attachment-preview .privacy { margin-top: 18px; }
.attachment-preview .assessment-grid, .attachment-preview .score-grid, .attachment-preview .highlight-grid, .attachment-preview .style-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }
.attachment-preview .assessment-card { display: flex; flex-direction: column; margin: 0; }
.attachment-preview .assessment-card .pv-button { margin-top: auto; text-align: center; }
.attachment-preview .card-caption { margin-top: 16px; }
.attachment-preview .score-card, .attachment-preview .highlight-card { margin: 0; scroll-margin-top: 100px; }
.attachment-preview .score-number { font-size: 2.5rem; line-height: 1.2; font-family: var(--pv-font-serif); margin: 24px 0 12px; color: var(--site-color-heading); }
.attachment-preview .band, .attachment-preview .answer-value { color: var(--site-color-accent-text); font-weight: 600; }
.attachment-preview .scale-bar { display: block; width: 100%; height: 8px; margin-top: 16px; }
.attachment-preview meter::-webkit-meter-bar { background: var(--site-color-border-strong); border: none; }
.attachment-preview meter::-webkit-meter-optimum-value { background: var(--site-color-accent-primary); }
.attachment-preview meter::-moz-meter-bar { background: var(--site-color-accent-primary); }
.attachment-preview .scale-labels { display: flex; justify-content: space-between; gap: 16px; color: var(--site-color-muted); font-size: .8rem; margin: 8px 0 18px; }
.attachment-preview .result-actions, .attachment-preview .navigation { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0; }
.attachment-preview .navigation { justify-content: space-between; }
.attachment-preview .result-meta { color: var(--site-color-muted); }
.attachment-preview summary { cursor: pointer; font-weight: 600; color: var(--site-color-heading); }
.attachment-preview details[open] > summary { margin-bottom: 20px; }
.attachment-preview .factor-detail, .attachment-preview .factor-answers { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--site-color-border); }
.attachment-preview .answer-row { border-top: 1px solid var(--site-color-border); padding: 18px 0; overflow-wrap: anywhere; }
.attachment-preview .answer-row > span { display: block; color: var(--site-color-accent-text); font-weight: 600; }
.attachment-preview .answer-row p { margin-bottom: 10px; }
.attachment-preview .factor-nav > div { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.attachment-preview .factor-nav a { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; align-items: center; border: 1px solid var(--site-color-border); border-radius: 9px; padding: 12px; background: var(--site-color-surface-elevated); text-decoration: none; font-size: .85rem; }
.attachment-preview .factor-nav a:hover { border-color: var(--site-color-border-strong); }
.attachment-preview .pattern-completion { grid-column: 1 / -1; }
.attachment-preview .attachment-hero-actions .pv-button { display: inline-flex; align-items: center; justify-content: center; }
.attachment-preview .attachment-hero-actions { justify-content: center; }
.attachment-preview .attachment-outcomes .panel { margin: 0; }
.attachment-preview .attachment-result-example { max-width: 680px; margin-inline: auto; }
.attachment-preview .attachment-example-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 16px 0; border-bottom: 1px solid var(--site-color-border); }
.attachment-preview .attachment-result-example .small { margin-top: 18px; }
.attachment-preview .attachment-start-panel { scroll-margin-top: 100px; }
.attachment-preview .attachment-reading ul { list-style: none; padding: 0; margin: 0; }
.attachment-preview .attachment-reading li + li { margin-top: 14px; }
.attachment-preview #research-reference { overflow-wrap: anywhere; }
.attachment-preview .highlight-section { margin: 40px 0; }
.attachment-preview blockquote { margin: 0 0 18px; padding-left: 16px; border-left: 2px solid var(--site-color-border-strong); }
.attachment-preview .reflection-list { padding-left: 22px; }
.attachment-preview .reflection-list li + li { margin-top: 16px; }
.attachment-preview dt { font-weight: 600; margin-bottom: 8px; }
.attachment-preview dd { margin: 0; color: var(--site-color-muted); }
.attachment-preview .attachment-credits { padding-top: 24px; margin-top: 32px; border-top: 1px solid var(--site-color-border); color: var(--site-color-muted); font-size: .82rem; overflow-wrap: anywhere; }
.attachment-preview .print-reflection { display: none; }
.attachment-preview .session-dialog { max-width: min(520px, calc(100% - 32px)); padding: 28px; border: 1px solid var(--site-color-border-strong); border-radius: 14px; background: var(--site-color-surface); color: var(--site-color-text); box-shadow: var(--pv-shadow-lg); }
.attachment-preview .session-dialog::backdrop { background: var(--site-color-canvas); opacity: .8; }
.attachment-preview .statement { font-size: 1.05rem; line-height: 1.6; color: var(--site-color-heading); }
.attachment-preview .choices { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 8px; }
.attachment-preview .adq-choices { grid-template-columns: repeat(6,minmax(0,1fr)); }
.attachment-preview .choice { position: relative; cursor: pointer; }
.attachment-preview .choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.attachment-preview .choice-box { display: grid; place-items: center; min-height: 44px; background: var(--site-color-surface); border: 1px solid var(--site-color-border-strong); border-radius: 9px; color: var(--site-color-heading); }
.attachment-preview .choice input:checked + .choice-box { background: var(--site-color-accent-primary); color: var(--site-color-on-accent); border-color: var(--site-color-accent-primary); }
.attachment-preview .assessment-question-layout .choice input:checked + .choice-box { color: var(--site-color-on-accent) !important; }
.attachment-preview .choice input:focus-visible + .choice-box { outline: 3px solid var(--site-color-focus); outline-offset: 3px; }
.attachment-preview .answer-anchors { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; font-size: .8rem; color: var(--site-color-muted); margin-top: 14px; }
.attachment-preview .answer-anchors span:nth-child(2) { text-align: center; }
.attachment-preview .answer-anchors span:last-child { text-align: right; }
.attachment-preview .adq-anchors { grid-template-columns: 1fr 1fr; }
.attachment-preview .question-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.attachment-preview legend { padding: 0 8px; font-size: .8rem; color: var(--site-color-muted); }
.attachment-preview .assessment-question-progress-track { overflow: visible; }
.attachment-preview progress { display: block; width: 100%; height: 6px; border: none; background: var(--site-color-border-strong); }
.attachment-preview progress::-webkit-progress-bar { background: var(--site-color-border-strong); }
.attachment-preview progress::-webkit-progress-value { background: var(--site-color-accent-primary); }
.attachment-preview progress::-moz-progress-bar { background: var(--site-color-accent-primary); }
body.personality-test-focus-mode:has(.attachment-preview) :is(body > .site-header,.site-footer,.site-main > .site-breadcrumbs--mobile,.back-to-top) { display: none !important; }
body.personality-test-focus-mode .attachment-preview { width: 100%; max-width: none; padding: 0; }
.attachment-preview .assessment-question-layout .choices { gap: 0; }
@media (max-width: 380px) {
    .attachment-preview .assessment-question-layout .choice-box { width: 32px; min-width: 32px; height: 32px; min-height: 32px; flex-basis: 32px; }
}
.attachment-preview #attachment-map svg { display: block; width: min(100%,600px); height: auto; margin: auto; }
.attachment-preview .map-style { fill: var(--site-color-muted); font: 600 16px var(--pv-font-sans); }
.attachment-preview .map-tick { fill: var(--site-color-muted); font: 13px var(--pv-font-sans); }
.attachment-preview .map-axis { fill: var(--site-color-heading); font: 14px var(--pv-font-sans); }
.attachment-preview .map-dot { fill: var(--site-color-accent-primary); stroke: var(--site-color-surface); stroke-width: 4; }
.attachment-preview .map-values { text-align: center; font-weight: 600; }
@media (max-width: 760px) {
    .attachment-preview { padding: 32px 16px 40px; }
    .attachment-preview .score-grid, .attachment-preview .highlight-grid, .attachment-preview .assessment-grid, .attachment-preview .style-list { grid-template-columns: 1fr; }
    .attachment-preview .factor-nav > div { grid-template-columns: 1fr; }
    .attachment-preview .panel { padding: 20px 16px 24px; }
    .attachment-preview .choices { gap: 4px; }
    .attachment-preview .answer-anchors { font-size: .74rem; }
    .attachment-preview .map-style { font-size: 24px; }
    .attachment-preview .map-tick, .attachment-preview .map-axis { font-size: 22px; }
}
