/* net-folder — the 2D-net <-> 3D-solid relationship. */

.nf-mode-chip {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #e0e7ff;
    color: #3730a3;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ---- Stages: net | fold | solid ---- */

.nf-stages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 10px;
}

.nf-stage {
    flex: 0 1 300px;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.nf-stage-title {
    margin: 0 0 4px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.nf-svg {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
}

.nf-fold-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.nf-fold-btn { white-space: nowrap; }
.nf-fold-arrow { color: #94a3b8; font-size: 1.4rem; }

.nf-net-foot { min-height: 1.4rem; margin-top: 4px; }
.nf-net-count { font-weight: 700; color: #475569; font-size: 0.9rem; }

/* Teacher "replay fold" control under the solid. */
.nf-refold {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 5px 12px;
    background: none;
    border: none;
    border-radius: 8px;
    color: #4f46e5;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
}
.nf-refold:hover { background: #eef2ff; text-decoration: underline; }
.nf-refold:active { transform: scale(0.97); }

/* ---- Net squares ---- */

.nf-grid-cell {
    fill: #f8fafc;
    stroke: #e2e8f0;
    stroke-width: 1.5;
    cursor: pointer;
}
.nf-grid-cell:hover { fill: #eef2ff; }

.nf-face {
    stroke-width: 2.5;
    stroke-linejoin: round;
    cursor: default;
    transition: fill 0.25s ease;
}
.nf-face-clash {
    stroke: #b91c1c;
    stroke-width: 3.5;
    fill: #fecaca !important;
}
.nf-face-label {
    fill: #fff;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 13px;
    text-anchor: middle;
    dominant-baseline: central;
    paint-order: stroke;
    stroke: rgba(15, 23, 42, 0.35);
    stroke-width: 2.5px;
    pointer-events: none;
}

/* ---- Solid faces ---- */

.nf-solid-face {
    stroke: #0f172a;
    stroke-width: 2.5;
    stroke-linejoin: round;
}
.nf-solid-missing {
    stroke: #b91c1c;
    stroke-width: 2.5;
    stroke-dasharray: 7 6;
}
.nf-solid-label {
    fill: #fff;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 14px;
    text-anchor: middle;
    dominant-baseline: central;
    paint-order: stroke;
    stroke: rgba(15, 23, 42, 0.35);
    stroke-width: 2.5px;
}
.nf-solid-hint {
    fill: #94a3b8;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 16px;
    text-anchor: middle;
    dominant-baseline: central;
}

/* ---- Result line ---- */

.nf-result {
    text-align: center;
    max-width: 640px;
    margin: 12px auto 0;
    padding: 8px 14px;
    border-radius: 12px;
    font-weight: 700;
}
.nf-result.nf-ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.nf-result.nf-no { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

.nf-caption {
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    margin: 12px auto 4px;
    max-width: 640px;
}

/* ---- Challenge predict panel ---- */

.nf-target-label { font-weight: 800; color: #8a5a00; font-size: 0.95rem; margin-right: 0.5rem; }
.nf-target-prompt { flex: 1 1 auto; color: #6b4500; font-weight: 700; font-size: 1rem; }

.nf-answer-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1 1 100%;
    margin-top: 0.4rem;
}
.nf-predict-chip {
    padding: 0.45rem 0.9rem;
    background: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 999px;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    color: #3730a3;
    cursor: pointer;
    transition: background-color 140ms ease, transform 80ms ease;
}
.nf-predict-chip:hover { background: #eef2ff; }
.nf-predict-chip:active { transform: scale(0.96); }
.nf-predict-chip.is-active { background: #4f46e5; color: #fff; border-color: #4f46e5; }

/* ---- Display mode: tighten, drop the explore-only chrome ---- */

body.display-mode .nf-net-foot { display: none; }
body.display-mode .nf-caption { margin-bottom: 0; }
