/* ═══════════════════════════════════════════════════════════════════════
   QCF ENGINE — DESIGN TOKENS
   "Assessment Ledger" system: the record of verified competence.
   Shared root variables + base components used by both the frontend
   learner/assessor experience and the WordPress admin screens.
═══════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
    /* ── Color: named per role, not generic numbers ── */
    --qcf-ink:        #111827;   /* primary text */
    --qcf-muted:      #6B7280;   /* secondary text */
    --qcf-ledger:     #1E3A5F;   /* primary navy — headers, certificate elements */
    --qcf-ledger-dark:#152A45;
    --qcf-signal:     #2563EB;   /* primary action blue */
    --qcf-signal-dark:#1D4ED8;
    --qcf-verified:   #0D9488;   /* approved / competent — the seal color */
    --qcf-verified-bg:#ECFDF9;
    --qcf-amber:      #D97706;   /* pending / attention */
    --qcf-amber-bg:   #FEF6E7;
    --qcf-danger:     #DC2626;   /* rejected / error */
    --qcf-danger-bg:  #FEF2F2;

    --qcf-paper:      #FFFFFF;   /* card surface */
    --qcf-canvas:     #F4F6F9;   /* page background — cool neutral, not cream */
    --qcf-line:       #E2E6ED;   /* hairline borders */
    --qcf-line-dark:  #CBD5E1;

    /* ── Type ── */
    --qcf-font-display: 'Fraunces', Georgia, serif;
    --qcf-font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --qcf-font-mono:    'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

    /* ── Geometry ── */
    --qcf-radius-sm:  6px;
    --qcf-radius:     10px;
    --qcf-radius-lg:  16px;
    --qcf-shadow-sm:  0 1px 2px rgba(17,24,39,.06);
    --qcf-shadow:     0 2px 8px rgba(17,24,39,.07), 0 1px 2px rgba(17,24,39,.05);
    --qcf-shadow-lg:  0 8px 24px rgba(17,24,39,.10);
}

/* ── Eyebrow label: small caps mono tag above a heading ── */
.qcf-eyebrow {
    font-family: var(--qcf-font-mono);
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--qcf-signal);
}

/* ── Reference codes (AC numbers, unit refs, evidence IDs) always in mono ── */
.qcf-ref {
    font-family: var(--qcf-font-mono);
    font-weight: 600;
    font-size: .82em;
    letter-spacing: -.01em;
}

/* ── The Seal: signature element for verified/approved status ──
   A small circular stamp, double ring, set at a slight angle —
   evokes an examiner's official mark rather than a generic checkmark. */
.qcf-seal {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--qcf-font-mono);
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--qcf-verified);
    white-space: nowrap;
}
.qcf-seal::before {
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid var(--qcf-verified);
    box-shadow: 0 0 0 2px var(--qcf-verified-bg), inset 0 0 0 2px var(--qcf-verified-bg);
    background:
        radial-gradient(circle at center, transparent 0, transparent 3px, var(--qcf-verified) 3px, var(--qcf-verified) 4px, transparent 4px);
    transform: rotate(-8deg);
    flex-shrink: 0;
}

/* ── Buttons ── */
.qcf-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--qcf-font-body);
    font-size: .86rem;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: var(--qcf-radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background .12s, border-color .12s, transform .08s;
}
.qcf-btn:active { transform: translateY(1px); }
.qcf-btn-primary { background: var(--qcf-signal); color: #fff; }
.qcf-btn-primary:hover { background: var(--qcf-signal-dark); color: #fff; }
.qcf-btn-secondary { background: var(--qcf-paper); color: var(--qcf-ink); border-color: var(--qcf-line-dark); }
.qcf-btn-secondary:hover { background: var(--qcf-canvas); }
.qcf-btn-ghost { background: transparent; color: var(--qcf-muted); }
.qcf-btn-ghost:hover { color: var(--qcf-ink); }

/* ── Cards / panels ── */
.qcf-card {
    background: var(--qcf-paper);
    border: 1px solid var(--qcf-line);
    border-radius: var(--qcf-radius);
    box-shadow: var(--qcf-shadow-sm);
}

/* ── Status badges (shared vocabulary across frontend + admin) ── */
.qcf-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 100px;
    font-family: var(--qcf-font-body);
    font-size: .74rem;
    font-weight: 600;
    white-space: nowrap;
}
.qcf-status-badge.small { padding: 1px 8px; font-size: .68rem; }

.qcf-badge-approved       { background: transparent; padding: 0; }
.qcf-badge-pending        { background: var(--qcf-amber-bg);   color: #92400E; }
.qcf-badge-in_progress    { background: #EFF6FF;                color: var(--qcf-signal-dark); }
.qcf-badge-not_started    { background: var(--qcf-canvas);      color: var(--qcf-muted); }
.qcf-badge-needs_revision { background: var(--qcf-danger-bg);   color: var(--qcf-danger); }
.qcf-badge-rejected       { background: var(--qcf-danger-bg);   color: var(--qcf-danger); }

/* ── Empty state ── */
.qcf-notice {
    color: var(--qcf-muted);
    font-family: var(--qcf-font-body);
    padding: 18px 20px;
    background: var(--qcf-canvas);
    border-radius: var(--qcf-radius);
    font-size: .9rem;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
