/* Vanishing point: mode buttons, construction-lines toggle, sliders, the readout, the box in perspective and the key.
   Builds on the shared .explorer, .btn and .cx styles in styles.css. */
.vanishing-point { min-width: 0; }

.vp-body { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; align-items: flex-start; }
.vp-panel { flex: 1 1 15rem; min-width: 0; display: flex; flex-direction: column; gap: 0.8rem; }
.vp-stage { flex: 1 1 18rem; min-width: 0; max-width: 460px; }

.vp-modes { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.vp-mode { flex: 1 1 auto; min-height: 44px; }
.vp-mode[aria-pressed="true"], .vp-construction[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.vp-construction { min-height: 44px; align-self: flex-start; }

.vp-sliders { display: flex; flex-direction: column; gap: 0.5rem; }
.vp-slider { display: grid; grid-template-columns: minmax(0, 1fr) auto; overflow-wrap: anywhere; align-items: center; gap: 0.1rem 0.6rem; font-weight: 600; font-size: 0.95rem; }
.vp-value { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 700; }
.vp-range { grid-column: 1 / -1; width: 100%; min-height: 44px; margin: 0; accent-color: var(--accent); }
.vp-range:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }

/* The readout is the live region: it is also what the student reads. */
.vp-readout { margin: 0; min-height: 3em; padding: 0.55rem 0.75rem; border-radius: 10px; background: var(--accent-soft); font-weight: 600; overflow-wrap: anywhere; }

/* The picture. Faces differ in tint and are all outlined, so colour is never the only cue. */
.vp-figure-wrap { max-width: 460px; border-radius: 10px; }
.vp-figure { background: var(--surface); border-radius: 10px; border: 1px solid var(--border); }
.vp-horizon { stroke: var(--axis); stroke-width: 2; }
.vp-face { stroke: var(--text); stroke-width: 2; stroke-linejoin: round; }
.vp-face--front { fill: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.vp-face--left, .vp-face--right { fill: color-mix(in srgb, var(--accent) 32%, var(--surface)); }
.vp-face--top, .vp-face--bottom { fill: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
/* The orthogonals: dashed and in the second line colour. */
.vp-orth { stroke: var(--user-line); stroke-width: 1.75; stroke-dasharray: 6 4; }
.vp-marker { fill: var(--user-line); stroke: var(--surface); stroke-width: 2; pointer-events: none; }
/* Invisible, wider targets for dragging with a pointer; the sliders do the same without one. */
.vp-hit { fill: transparent; stroke: transparent; }
.vp-hit--horizon { stroke-width: 26; cursor: ns-resize; touch-action: none; }
.vp-hit--point { cursor: grab; touch-action: none; }
.vp-label { fill: var(--text); font-size: 13px; font-weight: 700; paint-order: stroke; stroke: var(--surface); stroke-width: 3.5px; stroke-linejoin: round; pointer-events: none; }

/* The key says in words what the three labels mean, next to a sample of each mark. */
.vp-key { margin-top: 0.7rem; font-size: 0.9rem; }
.vp-key-title { margin: 0 0 0.3rem; font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.vp-key dl { margin: 0; display: grid; gap: 0.1rem; }
.vp-key dt { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.4rem; font-weight: 700; }
.vp-key dd { margin: 0; color: var(--muted); }
.vp-key-term::before { content: ''; flex: none; box-sizing: border-box; width: 1.4rem; height: 0; border-top: 3px solid var(--axis); }
.vp-key-term--vp::before { width: 0.9rem; height: 0.9rem; margin: 0 0.25rem; border: 2px solid var(--surface); border-radius: 50%; background: var(--user-line); box-shadow: 0 0 0 1px var(--user-line); }
.vp-key-term--orthogonals::before { border-top: 3px dashed var(--user-line); }
