/* AFC header -- the ONE definition, shared by the course page and every
   marketing page that renders the same nav (ai-fluency, cert-sample, the
   sample reports). Extracted from course.css on 2026-09-16 so the two
   surfaces cannot drift apart again. Generic nav chrome (.nav-links,
   .nav-cta, .logo, .nav-container, .mobile-menu-btn) stays in styles.css,
   which every one of these pages already loads. */

.user-trigger {
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 10px;
    transition: background 0.15s;
}
.user-trigger:hover { background: #f1f5f9; }
.user-trigger-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    color: white;
    font-size: 0.78rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.user-trigger-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}
.user-trigger-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1a202c;
}
.user-trigger-tier {
    font-size: 0.7rem;
    font-weight: 600;
    color: #596780;
}
.user-trigger-caret {
    width: 11px; height: 8px;
    color: #94a3b8;
    margin-left: 2px;
}
/* Anon AFC: the inner <nav class="course-header-marketing-nav"> uses the
   shared .nav-container/.nav-links styles from styles.css. The outer
   .course-header still provides sticky + bottom-border. The trust banner
   is a sub-row below the nav. */
.course-header-marketing-nav {
    display: block;
}
.course-header-trust-banner {
    background: #fef3c7;
    color: #92400e;
    text-align: center;
    padding: 10px 20px;
    font-size: 0.92rem;
    font-weight: 600;
    border-bottom: 1px solid #fde68a;
}
.course-header-trust-banner strong {
    color: #1a202c;
}
.course-header-trust-banner a {
    color: #92400e;
    text-decoration: underline;
    font-weight: 700;
}
.course-header-trust-banner a:hover {
    color: #78350f;
}

/* Signed-in AFC: user dropdown positioned at the right edge of the nav,
   sitting alongside .nav-links inside .nav-container. */
.course-header-marketing-nav .nav-container {
    position: relative;
}
.course-header-user-pos {
    position: relative;
    margin-left: 12px;
}
/* Active state for the in-app nav links (Course / Reports / Certificate). */
/* These four were scoped under .course-header-marketing-nav, a wrapper only the
   course page renders, so the active tab and the un-earned Certificate were
   unstyled everywhere else. Keyed on the element instead: this file is loaded
   only by the six AFC pages, so the looser selector cannot reach the
   accounting course or the portal, both of which also use .nav-links a.active. */
.nav-links a.active {
    color: #4d59c5;
}
.nav-links a.active::after {
    content: '';
    display: block;
    height: 2px;
    background: #4d59c5;
    margin-top: 2px;
    border-radius: 2px;
}
/* Disabled-looking nav link (e.g. Certificate before issuance).
   Color was #cbd5e0 (1.49:1 on white — illegible per WCAG); bumped to
   #4a5568 (7.54:1) so the label is readable while still visually muted
   relative to active links via cursor + opacity. */
.nav-links .nav-link-disabled {
    color: #4a5568;
    opacity: 0.55;
    cursor: not-allowed;
    user-select: none;
    /* Match the spacing/typography of real nav links */
    text-decoration: none;
}
.nav-links .nav-link-disabled:hover {
    color: #4a5568;
    opacity: 0.55;
}

/* Reports count chip inside the Reports nav link. */
.nav-count {
    display: inline-block;
    margin-left: 4px;
    background: #4d59c5;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
    vertical-align: 1px;
}
.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    min-width: 280px;
    overflow: hidden;
    z-index: 110;
    animation: user-menu-pop 0.16s ease-out;
}
.user-menu[hidden] { display: none; }
.user-menu-section {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
}
.user-menu-section:last-child { border-bottom: none; }
.user-menu-name {
    font-weight: 800;
    color: #1a202c;
    font-size: 0.95rem;
}
.user-menu-email {
    font-size: 0.82rem;
    color: #596780;
    margin-top: 2px;
}
.user-menu-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 6px;
}
.user-menu-stat {
    font-size: 0.82rem;
    color: #4a5568;
    margin-bottom: 6px;
    font-weight: 600;
}
.user-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 8px 8px;
    margin: 1px -8px;
    font-size: 0.9rem;
    color: #1a202c;
    font-weight: 600;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.12s;
    font-family: inherit;
}
.user-menu-item:hover { background: #f1f5f9; }
.user-menu-item-cta {
    color: #4d59c5;
}
.user-menu-item-danger { color: #b91c1c; }
.user-menu-footer {
    background: #f8fafc;
    font-size: 0.78rem;
    text-align: center;
}
.user-menu-footer a {
    color: #4a5568;
    text-decoration: none;
    margin: 0 4px;
}
.user-menu-footer a:hover { color: #1a202c; text-decoration: underline; }
.user-menu-footer-sep { color: #cbd5e0; }
@media (max-width: 768px) {
    .user-trigger-text { display: none; }
    .user-menu { right: -8px; min-width: 260px; }
}

/* The chip is a <button> on the course page (opens the account menu) and an
   <a> on the marketing pages (no menu handlers there). Same appearance. */
a.user-trigger, a.user-trigger:hover { text-decoration: none; color: inherit; }
