/* Blueprint CAD skin. Geometry, responsive layout and PRV animation remain in style.css. */
body[data-theme="theme-blueprint"] {
    --bg-page: #05274c;
    --card-bg: #082c52;
    --card-bg-glass: rgba(5, 36, 71, .54);
    --primary: #dff3ff;
    --primary-light: #b2dfff;
    --primary-accent: #38bdf8;
    --border-color: #68c9f1;
    --text-primary: #edf7ff;
    --text-secondary: #bbdcf3;
    --text-muted: #8bb4d2;
    --shadow-sm: 0 1px 4px #00173133;
    --shadow-card: inset 0 0 0 1px #70c8ec, inset 0 0 24px #0269af10;
    --correct-bg: #073e46;
    --wrong-bg: #442b48;
    background-color: var(--bg-page);
    background-image:
        linear-gradient(#2097d416 1px, transparent 1px),
        linear-gradient(90deg, #2097d416 1px, transparent 1px),
        linear-gradient(#2097d421 1px, transparent 1px),
        linear-gradient(90deg, #2097d421 1px, transparent 1px),
        radial-gradient(ellipse at 50% 20%, #073668, #041e3c);
    background-size: 14px 14px, 14px 14px, 70px 70px, 70px 70px, 100% 100%;
}

body[data-theme="theme-blueprint"] .rpg-header,
body[data-theme="theme-blueprint"] #quiz-card {
    background: var(--card-bg-glass);
    border-color: #7bcff0;
    border-radius: 0;
    box-shadow: var(--shadow-card);
    backdrop-filter: none;
}

/* Registration marks sit on top of the existing bounds, never affect layout. */
body[data-theme="theme-blueprint"] .rpg-header::before,
body[data-theme="theme-blueprint"] .rpg-header::after,
body[data-theme="theme-blueprint"] #quiz-card::before,
body[data-theme="theme-blueprint"] #quiz-card::after {
    content: "";
    position: absolute;
    inset: -5px;
    pointer-events: none;
    background:
        linear-gradient(#8ad8ff, #8ad8ff) left 0 top 4px / 18px 1px no-repeat,
        linear-gradient(#8ad8ff, #8ad8ff) left 4px top 0 / 1px 18px no-repeat,
        linear-gradient(#8ad8ff, #8ad8ff) right 0 top 4px / 18px 1px no-repeat,
        linear-gradient(#8ad8ff, #8ad8ff) right 4px top 0 / 1px 18px no-repeat;
    opacity: .8;
}
body[data-theme="theme-blueprint"] .rpg-header::after,
body[data-theme="theme-blueprint"] #quiz-card::after { transform: rotate(180deg); }
body[data-theme="theme-blueprint"] #quiz-card::before,
body[data-theme="theme-blueprint"] #quiz-card::after { inset: 3px; }

body[data-theme="theme-blueprint"] .rpg-skill-name { color: #d5eaff; }
body[data-theme="theme-blueprint"] .badge-apprentice {
    color: #70f5ec !important;
    background: #007c8340 !important;
    box-shadow: inset 0 0 0 1px #32cdd44d;
}
body[data-theme="theme-blueprint"] .badge-novice { color: #bdd7ed !important; }
body[data-theme="theme-blueprint"] .badge-technician { color: #67e8f9 !important; }
body[data-theme="theme-blueprint"] .badge-journeyman { color: #7dd3fc !important; }
body[data-theme="theme-blueprint"] .badge-foreman { color: #b6beff !important; }
body[data-theme="theme-blueprint"] .badge-master { color: #d5baff !important; }
body[data-theme="theme-blueprint"] .badge-ace { color: #ffe593 !important; }
body[data-theme="theme-blueprint"] #rpg-psi-container {
    background: #004b7940 !important;
    border-color: #3fc6ff !important;
    box-shadow: inset 0 0 10px #008dda12;
}
body[data-theme="theme-blueprint"] #rpg-psi-value { color: #5bd5ff !important; }
body[data-theme="theme-blueprint"] #rpg-psi-container > span:last-child { color: #b2e3ff !important; }
body[data-theme="theme-blueprint"] .header-achievements-quick-btn {
    background: #052d51;
    border-color: #6bd5fa;
    color: #e9f6ff;
}
body[data-theme="theme-blueprint"] .progress-labels { color: #c4e2f8; }
body[data-theme="theme-blueprint"] .progress-track {
    background: #13436a;
    box-shadow: inset 0 0 0 1px #57b6e399;
}
body[data-theme="theme-blueprint"] .questions-fill {
    background: linear-gradient(90deg, #087dff, #20bdff);
    box-shadow: 0 0 6px #14a8ff88;
}
body[data-theme="theme-blueprint"] .xp-fill { box-shadow: 0 0 5px #00e1bc66; }
body[data-theme="theme-blueprint"] .threshold-tick { background-color: #a9dfff70; }
body[data-theme="theme-blueprint"] .option-btn {
    background: linear-gradient(110deg, #0b3c6538, #05264b66);
    border-color: #7bd5ff;
    box-shadow: inset 0 0 14px #007bbb0a, 0 1px 3px #00152c33;
}
body[data-theme="theme-blueprint"] .opt-letter {
    color: #e9f8ff;
    background: #064d83;
    border-color: #4bcdff;
    box-shadow: inset 0 0 8px #008cff1a;
}
body[data-theme="theme-blueprint"] .opt-letter::after { background: #61bbdf88; }
body[data-theme="theme-blueprint"] .opt-text { color: #edf7ff; }
body[data-theme="theme-blueprint"] .option-btn:hover:not(:disabled) {
    background: #0b4d7e;
    border-color: #c2efff;
    box-shadow: inset 0 0 18px #008fff10, 0 0 10px #2db5ff24;
}
body[data-theme="theme-blueprint"] .option-btn:hover:not(:disabled) .opt-text { color: #fff; }
body[data-theme="theme-blueprint"] .option-btn:hover:not(:disabled) .opt-letter { background: #09649b; color: #fff; border-color: #acf0ff; }
body[data-theme="theme-blueprint"] .option-btn:focus-visible,
body[data-theme="theme-blueprint"] button:focus-visible { outline: 2px solid #a7eaff; outline-offset: 4px; }
body[data-theme="theme-blueprint"] .option-btn.correct { background: linear-gradient(110deg, #083e4a, #063346) !important; }
body[data-theme="theme-blueprint"] .option-btn.correct .opt-text { color: #a5ffe0 !important; }
body[data-theme="theme-blueprint"] .option-btn.wrong { background: linear-gradient(110deg, #442738, #302b49) !important; }
body[data-theme="theme-blueprint"] .option-btn.wrong .opt-text { color: #ffc5cc !important; }
body[data-theme="theme-blueprint"] .explanation { background: #063d53; color: #d8f5ff; border-color: #44b9c7; }
body[data-theme="theme-blueprint"] .explanation h3,
body[data-theme="theme-blueprint"] .explanation p { color: #d8f5ff; }
body[data-theme="theme-blueprint"] .primary-btn { background: #0878c4; color: #f1fbff; border-color: #7ad9ff; }
body[data-theme="theme-blueprint"] .primary-btn:hover { background: #1094dc; }
body[data-theme="theme-blueprint"] .footer-legal-link,
body[data-theme="theme-blueprint"] .footer-legal-copy { color: #8fbfdf; }
body[data-theme="theme-blueprint"] .footer-legal-bullet { color: #7fb0d2; }
body[data-theme="theme-blueprint"] .prv-modal-bubble,
body[data-theme="theme-blueprint"] .prv-header-bubble,
body[data-theme="theme-blueprint"] .modal-card,
body[data-theme="theme-blueprint"] .account-flyout-card {
    background-color: #092c4c;
    color: #ecf7ff;
    border-color: #67c5e9;
}
body[data-theme="theme-blueprint"] .prv-header-bubble-text,
body[data-theme="theme-blueprint"] .prv-header-bubble-text strong,
body[data-theme="theme-blueprint"] .prv-header-bubble-title,
body[data-theme="theme-blueprint"] .prv-modal-bubble-body,
body[data-theme="theme-blueprint"] #prv-modal-speech-text { color: #def3ff; }

/* Alternate vector parts share the original animation groups and stage visibility. */
.prv-blueprint-art { display: none; }
body[data-theme="theme-blueprint"] .prv-original-art { display: none; }
body[data-theme="theme-blueprint"] .prv-blueprint-art { display: inline; }
body[data-theme="theme-blueprint"] #prv-svg-container,
body[data-theme="theme-blueprint"] .rpg-prv-slot #prv-companion-layer.prv-header-mode #prv-svg-container {
    filter: drop-shadow(0 0 .4px #4ac6ff99);
}
body[data-theme="theme-blueprint"] #prv-bg-top,
body[data-theme="theme-blueprint"] #prv-bg-lower { fill: #062b51; }
body[data-theme="theme-blueprint"] #prv-water-flow { fill: #55d9ff; }
body[data-theme="theme-blueprint"] #prv-cap-screw .prv-blueprint-art > g { fill: none; }
body[data-theme="theme-blueprint"] #prv-body .prv-blueprint-art > g:first-child > path:first-child { fill-opacity: .25; }
body[data-theme="theme-blueprint"] .prv-header-mode .prv-blueprint-art :is(path, circle, ellipse, rect) {
    vector-effect: non-scaling-stroke;
    stroke-width: .7px;
}
/* Stationary drafting guides surround the moving valve, as on the approved reference. */
body[data-theme="theme-blueprint"] .rpg-prv-slot::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("assets/prv-blueprint-dimensions.svg") center / contain no-repeat;
    opacity: .5;
    pointer-events: none;
}
body[data-theme="theme-blueprint"] #prv-parts-staging svg { filter: drop-shadow(0 0 1px #68cfff33) !important; }
body[data-theme="theme-blueprint"] #prv-parts-staging .part-label { color: #bae7ff; }
body[data-theme="theme-blueprint"] #drag-cap .prv-blueprint-art > g { fill: none; }

/* This companion is explicitly intended to stay animated, including in the desktop preview. */
body[data-theme="theme-blueprint"] #prv-companion-layer:not(.prv-fullscreen-mode) #prv-svg-container {
    animation: blueprint-companion-idle 4s ease-in-out infinite;
    transform-origin: 50% 55%;
}
@keyframes blueprint-companion-idle {
    0%, 100% { transform: translateY(2px) rotate(-2deg); }
    25% { transform: translateY(-4px) rotate(0deg); }
    50% { transform: translateY(2px) rotate(2deg); }
    75% { transform: translateY(-3px) rotate(0deg); }
}
