/* coord-plotter.css - styles for shared/coord-plotter.js (interactive coordinate grid). */
.cp-root { max-width: 100%; margin: 0 auto; }
.cp-svg { display: block; width: 100%; height: auto; margin: 0 auto; background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; cursor: crosshair; font-family: Lexend, sans-serif; -webkit-tap-highlight-color: transparent; }
.cp-svg:focus { outline: 3px solid #143185; outline-offset: 2px; }
.cp-svg.cp-locked { cursor: default; }
.cp-bg { fill: #fff; }
.cp-grid { stroke: #cfd8e6; stroke-width: 1; }
.cp-axis { stroke: #0f172a; stroke-width: 2; }
.cp-arrow { fill: #0f172a; }
.cp-axname { font-size: 18px; font-weight: 700; font-style: italic; fill: #0f172a; }
.cp-num { font-size: 15px; fill: #334155; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.cp-guide { stroke: #2563eb; stroke-width: 1.5; stroke-dasharray: 4 3; opacity: .55; }
.cp-pt line { stroke: #2563eb; stroke-width: 3; stroke-linecap: round; }
.cp-pt-ok line { stroke: #15803d; }
.cp-pt-bad line { stroke: #dc2626; }
.cp-given { fill: #c2410c; stroke: #fff; stroke-width: 1.5; }
.cp-preview { fill: rgba(37, 99, 235, .15); stroke: #2563eb; stroke-width: 1.5; stroke-dasharray: 3 2; }
.cp-reveal { fill: none; stroke: #15803d; stroke-width: 2.5; }
.cp-cursor { fill: none; stroke: #143185; stroke-width: 2; stroke-dasharray: 4 2; }
.cp-tag { font-size: 15px; font-weight: 600; fill: #1e3a8a; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.cp-tag-given { fill: #9a3412; font-size: 15px; font-weight: 700; }
.cp-tag-ok, .cp-tag-reveal { fill: #166534; }
.cp-tag-bad { fill: #b91c1c; }

.cp-readout { min-height: 24px; margin: 10px 0 4px; text-align: center; font-size: 14px; font-weight: 600; color: #143185; }
.cp-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; min-height: 30px; margin-bottom: 6px; }
.cp-chip { background: #e0e7ff; color: #143185; border-radius: 14px; padding: 3px 12px; font-size: 14px; font-weight: 700; }
.cp-chip-ok { background: #dcfce7; color: #166534; }
.cp-chip-bad { background: #fee2e2; color: #991b1b; }
.cp-empty { font-size: 13px; color: #64748b; }
.cp-controls, .cp-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
.cp-btn { min-height: 44px; min-width: 110px; padding: 10px 20px; border-radius: 22px; border: 2px solid #143185; background: #fff; color: #143185; font: 700 14px Lexend, sans-serif; cursor: pointer; touch-action: manipulation; }
.cp-btn:hover:not(:disabled) { background: #eef2ff; }
.cp-btn:disabled { opacity: .45; cursor: not-allowed; }
.cp-btn-primary { background: #143185; color: #fff; }
.cp-btn-primary:hover:not(:disabled) { background: #1f4aaa; }
.cp-btn:focus-visible, .cp-input:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }
.cp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* tool and quiz cards (siblings of the concept blocks, never nested inside one) */
.cp-card { background: #f8fafc; border: 2px solid #143185; border-radius: 12px; padding: 20px; margin: 0 0 22px; box-shadow: 0 1px 6px rgba(0,0,0,.07); }
.cp-card h3 { margin: 0 0 6px; color: #143185; font-size: 17px; }
.cp-card .cp-intro { font-size: 14px; line-height: 1.7; margin: 0 0 12px; }

.cp-quiz { max-width: 100%; }
.cp-q-prog { font-size: 13px; font-weight: 700; color: #475569; margin-bottom: 6px; }
.cp-q-barwrap { height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; margin-bottom: 14px; }
.cp-q-bar { height: 100%; width: 0; background: #143185; transition: width .3s; }
.cp-q-text { font-size: 16px; font-weight: 600; line-height: 1.5; margin: 0 0 12px; color: #0f172a; }
.cp-answer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; font-size: 18px; font-weight: 700; color: #143185; }
.cp-input { width: 72px; min-height: 44px; padding: 6px 8px; border: 2px solid #94a3b8; border-radius: 8px; font: 700 18px Lexend, sans-serif; text-align: center; }
.cp-note { text-align: center; font-size: 12px; color: #64748b; margin-top: 6px; }
.cp-feedback { min-height: 24px; margin: 12px 0 0; padding: 0; font-size: 14px; line-height: 1.6; border-radius: 8px; }
.cp-feedback:empty { display: none; }
.cp-fb-ok, .cp-fb-bad, .cp-fb-info { padding: 10px 14px; }
.cp-fb-ok { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.cp-fb-bad { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.cp-fb-info { background: #e0f2fe; color: #075985; border: 1px solid #7dd3fc; }

@media (max-width: 480px) {
  .cp-card { padding: 14px 12px; }
  .cp-btn { flex: 1 1 130px; }
}
