/* ============================================
   WITS 3.0 BRAND TOKENS v1.0.0
   Loaded after Avada to override Fusion defaults
   Scoped to .wits-portal body class
   Spec: WITS_3_0_BRAND_PASS_SPEC.md
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* Color */
    --wits-red: #D1242B;
    --wits-yellow: #FFCB05;
    --wits-green: #50B848;
    --wits-blue: #00568B;
    --wits-blue-dark: #003E66;
    --wits-blue-light: #E6F0F8;
    --wits-ink: #1A1A1A;
    --wits-ink-soft: #4A4A4A;
    --wits-mute: #6B7280;
    --wits-line: #E5E7EB;
    --wits-bg: #FAFAFA;
    --wits-bg-card: #FFFFFF;

    /* Typography */
    --wits-font-display: 'Poppins', system-ui, -apple-system, sans-serif;
    --wits-font-body: 'Poppins', system-ui, -apple-system, sans-serif;

    /* Type scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 2.75rem;

    /* Spacing 8px grid */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
    --space-9: 96px;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
    --shadow-focus: 0 0 0 3px rgba(0,86,139,0.25);

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --duration-fast: 150ms;
    --duration-base: 250ms;
    --duration-slow: 400ms;
}

@media (min-width: 640px) {
    :root {
        --text-lg: 1.25rem;
        --text-xl: 1.5rem;
        --text-2xl: 1.875rem;
        --text-3xl: 2.25rem;
        --text-4xl: 3rem;
        --text-5xl: 3.75rem;
    }
}

/* ============================================
   GLOBAL TYPOGRAPHY (scoped to .wits-portal)
   ============================================ */

body.wits-portal {
    font-family: var(--wits-font-body);
    color: var(--wits-ink);
    background: var(--wits-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.wits-portal h1,
body.wits-portal h2,
body.wits-portal h3,
body.wits-portal h4,
body.wits-portal h5,
body.wits-portal h6 {
    font-family: var(--wits-font-display);
    color: var(--wits-ink);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

body.wits-portal h1 { font-size: var(--text-4xl); }
body.wits-portal h2 { font-size: var(--text-3xl); }
body.wits-portal h3 { font-size: var(--text-2xl); }
body.wits-portal h4 { font-size: var(--text-xl); }
body.wits-portal h5 { font-size: var(--text-lg); }
body.wits-portal h6 { font-size: var(--text-base); text-transform: uppercase; letter-spacing: 0.05em; }

body.wits-portal a {
    color: var(--wits-blue);
    text-decoration: none;
    transition: color var(--duration-base) var(--ease-out);
}
body.wits-portal a:hover {
    color: var(--wits-blue-dark);
    text-decoration: underline;
}

body.wits-portal p {
    line-height: 1.6;
    margin: 0 0 var(--space-4);
}

/* ============================================
   BUTTONS
   ============================================ */

.wits-portal .fusion-button,
.wits-portal .button,
.wits-portal button.wits-btn,
.wits-portal a.wits-btn,
.wits-portal .wits-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 12px 24px;
    font-family: var(--wits-font-display);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--duration-base) var(--ease-out);
    text-decoration: none;
    white-space: nowrap;
    text-align: center;
}

.wits-portal .wits-btn-primary,
.wits-portal .fusion-button.fusion-button-default,
.wits-portal a.wits-btn-primary {
    background: var(--wits-blue);
    color: #FFF !important;
    border-color: var(--wits-blue);
}
.wits-portal .wits-btn-primary:hover {
    background: var(--wits-blue-dark);
    border-color: var(--wits-blue-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: #FFF !important;
}

.wits-portal .wits-btn-secondary {
    background: #FFF;
    color: var(--wits-blue) !important;
    border-color: var(--wits-blue);
}
.wits-portal .wits-btn-secondary:hover {
    background: var(--wits-blue-light);
    text-decoration: none;
}

.wits-portal .wits-btn-ghost {
    background: transparent;
    color: var(--wits-blue) !important;
    border-color: transparent;
}
.wits-portal .wits-btn-ghost:hover {
    background: var(--wits-blue-light);
    text-decoration: none;
}

.wits-portal .wits-btn-danger {
    background: var(--wits-red);
    color: #FFF !important;
    border-color: var(--wits-red);
}
.wits-portal .wits-btn-danger:hover {
    background: #A81A20;
    border-color: #A81A20;
    text-decoration: none;
    color: #FFF !important;
}

.wits-portal .wits-btn:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}

.wits-portal .wits-btn-lg { padding: 16px 32px; font-size: 1.125rem; }
.wits-portal .wits-btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.wits-portal .wits-btn-block { width: 100%; }

/* ============================================
   FORM FIELDS
   ============================================ */

.wits-portal input[type="text"],
.wits-portal input[type="email"],
.wits-portal input[type="password"],
.wits-portal input[type="tel"],
.wits-portal input[type="search"],
.wits-portal input[type="url"],
.wits-portal input[type="number"],
.wits-portal select,
.wits-portal textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--wits-font-body);
    font-size: 1rem;
    color: var(--wits-ink);
    background: #FFF;
    border: 1.5px solid var(--wits-line);
    border-radius: var(--radius-md);
    transition: border-color var(--duration-base) var(--ease-out),
                box-shadow var(--duration-base) var(--ease-out);
    box-sizing: border-box;
}

.wits-portal input:focus,
.wits-portal select:focus,
.wits-portal textarea:focus {
    outline: none;
    border-color: var(--wits-blue);
    box-shadow: var(--shadow-focus);
}

.wits-portal label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: var(--wits-ink);
    font-size: 0.9375rem;
}

.wits-portal .wits-field { margin-bottom: var(--space-5); }
.wits-portal .wits-field-help {
    font-size: 0.875rem;
    color: var(--wits-mute);
    margin-top: var(--space-2);
}
.wits-portal .wits-field-error {
    color: var(--wits-red);
    font-size: 0.875rem;
    margin-top: var(--space-2);
}

/* ============================================
   CARDS
   ============================================ */

.wits-portal .wits-card {
    background: var(--wits-bg-card);
    border: 1px solid var(--wits-line);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--duration-base) var(--ease-out);
}

.wits-portal .wits-card-elevated {
    box-shadow: var(--shadow-md);
}

.wits-portal .wits-card-featured {
    border-color: var(--wits-green);
    border-width: 2px;
    position: relative;
}
.wits-portal .wits-card-featured::before {
    content: 'Most popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--wits-green);
    color: #FFF;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* ============================================
   BADGES
   ============================================ */

.wits-portal .wits-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    line-height: 1;
}
.wits-portal .wits-badge-active   { background: rgba(80,184,72,0.12);  color: #2D7026; }
.wits-portal .wits-badge-trial    { background: rgba(255,203,5,0.18);  color: #856100; }
.wits-portal .wits-badge-expired  { background: rgba(209,36,43,0.10);  color: #8B1820; }
.wits-portal .wits-badge-legacy   { background: rgba(0,86,139,0.10);   color: var(--wits-blue); }
.wits-portal .wits-badge-beta     { background: var(--wits-blue);      color: #FFF; }

/* ============================================
   FOUR-COLOR STRIPE (signature WITS mark)
   ============================================ */

.wits-portal .wits-stripe {
    display: block;
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg,
        var(--wits-red) 0% 25%,
        var(--wits-yellow) 25% 50%,
        var(--wits-green) 50% 75%,
        var(--wits-blue) 75% 100%);
    border-radius: 2px;
}

.wits-portal .wits-stripe-thick {
    height: 8px;
    border-radius: 4px;
}

/* ============================================
   FRAME 1: PRICING (/pricing/)
   ============================================ */

.wits-portal .wits-pricing {
    background: var(--wits-bg);
    padding: var(--space-8) 0;
}

.wits-portal .wits-pricing-hero {
    text-align: center;
    max-width: 720px;
    margin: 0 auto var(--space-8);
    padding: 0 var(--space-4);
}

.wits-portal .wits-pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}
@media (min-width: 768px) {
    .wits-portal .wits-pricing-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.wits-portal .wits-pricing-tier {
    font-size: var(--text-xl);
    color: var(--wits-blue);
    margin: 0 0 var(--space-2);
    font-weight: 600;
}

.wits-portal .wits-pricing-amount {
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--wits-ink);
    line-height: 1;
    margin: var(--space-2) 0;
}

.wits-portal .wits-pricing-period {
    font-size: var(--text-base);
    color: var(--wits-mute);
}

.wits-portal .wits-pricing-features {
    list-style: none;
    padding: 0;
    margin: var(--space-5) 0;
}
.wits-portal .wits-pricing-features li {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--wits-line);
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    font-size: 0.9375rem;
    color: var(--wits-ink-soft);
}
.wits-portal .wits-pricing-features li::before {
    content: '\2713';
    color: var(--wits-green);
    font-weight: 700;
    flex-shrink: 0;
}

.wits-portal .wits-trial-callout {
    background: var(--wits-blue-light);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: center;
    margin: 0 auto var(--space-7);
    max-width: 1100px;
    color: var(--wits-blue-dark);
    font-weight: 500;
}

.wits-portal .wits-district-band {
    background: var(--wits-blue-dark);
    color: #FFF;
    padding: var(--space-7) var(--space-4);
    margin-top: var(--space-8);
    text-align: center;
}
.wits-portal .wits-district-band h2 { color: #FFF; }
.wits-portal .wits-district-band .wits-btn-primary {
    background: var(--wits-yellow);
    color: var(--wits-ink) !important;
    border-color: var(--wits-yellow);
}
.wits-portal .wits-district-band .wits-btn-primary:hover {
    background: #E6B500;
    border-color: #E6B500;
}

/* ============================================
   FRAME 2: REGISTRATION (/register/)
   ============================================ */

.wits-portal .wits-register {
    max-width: 640px;
    margin: var(--space-7) auto;
    padding: 0 var(--space-4);
}

.wits-portal .wits-register-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-7);
    position: relative;
}

.wits-portal .wits-register-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 2;
}

.wits-portal .wits-register-step-num {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--wits-line);
    color: var(--wits-mute);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: all var(--duration-base) var(--ease-out);
    border: 2px solid var(--wits-line);
}
.wits-portal .wits-register-step.is-active .wits-register-step-num {
    background: var(--wits-blue);
    color: #FFF;
    border-color: var(--wits-blue);
}
.wits-portal .wits-register-step.is-done .wits-register-step-num {
    background: var(--wits-green);
    color: #FFF;
    border-color: var(--wits-green);
}

.wits-portal .wits-register-step-label {
    margin-top: var(--space-2);
    font-size: 0.8125rem;
    color: var(--wits-mute);
    text-align: center;
}
.wits-portal .wits-register-step.is-active .wits-register-step-label {
    color: var(--wits-blue);
    font-weight: 600;
}

.wits-portal .wits-school-result {
    padding: var(--space-4);
    border: 1.5px solid var(--wits-line);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-2);
    cursor: pointer;
    transition: all var(--duration-base) var(--ease-out);
    background: #FFF;
}
.wits-portal .wits-school-result:hover {
    border-color: var(--wits-blue);
    background: var(--wits-blue-light);
}
.wits-portal .wits-school-result.is-selected {
    border-color: var(--wits-blue);
    background: var(--wits-blue-light);
}

.wits-portal .wits-school-name { font-weight: 600; color: var(--wits-ink); }
.wits-portal .wits-school-meta { font-size: 0.875rem; color: var(--wits-mute); margin-top: 2px; }

/* ============================================
   FRAME 3: IMPLEMENTATION PROFILE (/my-school/) - PRIORITY
   ============================================ */

.wits-portal .wits-dashboard {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-4);
}

.wits-portal .wits-dashboard-header {
    background: #FFF;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-6);
}

.wits-portal .wits-dashboard-header .wits-stripe {
    border-radius: 0;
}

.wits-portal .wits-dashboard-header-body {
    padding: var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.wits-portal .wits-dashboard-school {
    font-size: var(--text-2xl);
    margin: 0 0 var(--space-2);
    color: var(--wits-ink);
}

.wits-portal .wits-dashboard-meta {
    color: var(--wits-mute);
    font-size: var(--text-sm);
}

.wits-portal .wits-progress {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: var(--space-1);
    margin: var(--space-5) 0;
}

.wits-portal .wits-progress-step {
    height: 10px;
    background: var(--wits-line);
    border-radius: 5px;
    position: relative;
    cursor: help;
    transition: background var(--duration-base) var(--ease-out);
}
.wits-portal .wits-progress-step.is-done {
    background: var(--wits-green);
}
.wits-portal .wits-progress-step.is-current {
    background: var(--wits-blue);
    animation: wits-pulse 2s var(--ease-out) infinite;
}

@keyframes wits-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.wits-portal .wits-step-card {
    background: #FFF;
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    border: 1px solid var(--wits-line);
    margin-bottom: var(--space-6);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
}
@media (min-width: 768px) {
    .wits-portal .wits-step-card {
        grid-template-columns: 2fr 1fr;
    }
}

.wits-portal .wits-step-card h3 {
    color: var(--wits-blue);
    margin-top: 0;
}

.wits-portal .wits-checkin-card {
    background: #FFF;
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    border: 1px solid var(--wits-line);
    margin-bottom: var(--space-6);
}

.wits-portal .wits-checkin-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.wits-portal .wits-checkin-btn {
    background: #FFF;
    border: 2px solid var(--wits-line);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-3);
    text-align: center;
    cursor: pointer;
    transition: all var(--duration-base) var(--ease-out);
    font-family: var(--wits-font-body);
}
.wits-portal .wits-checkin-btn:hover {
    border-color: var(--wits-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.wits-portal .wits-checkin-btn.is-selected {
    border-color: var(--wits-green);
    background: rgba(80,184,72,0.05);
}

.wits-portal .wits-checkin-btn-emoji {
    font-size: 2.5rem;
    display: block;
    margin-bottom: var(--space-2);
    line-height: 1;
}
.wits-portal .wits-checkin-btn-label {
    font-weight: 600;
    color: var(--wits-ink);
    font-size: 0.9375rem;
}

.wits-portal .wits-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    margin: var(--space-6) 0;
}

.wits-portal .wits-stat-tile {
    background: #FFF;
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--wits-line);
}

.wits-portal .wits-stat-value {
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--wits-blue);
    font-family: var(--wits-font-display);
    line-height: 1;
}

.wits-portal .wits-stat-label {
    color: var(--wits-mute);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: var(--space-2);
    font-weight: 500;
}

.wits-portal .wits-activity-feed {
    background: #FFF;
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    border: 1px solid var(--wits-line);
    margin-bottom: var(--space-6);
}

.wits-portal .wits-activity-item {
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--wits-line);
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
}
.wits-portal .wits-activity-item:last-child {
    border-bottom: none;
}

.wits-portal .wits-activity-time {
    font-size: 0.8125rem;
    color: var(--wits-mute);
    margin-left: auto;
    flex-shrink: 0;
}

.wits-portal .wits-quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}
@media (min-width: 640px) {
    .wits-portal .wits-quick-links {
        grid-template-columns: repeat(4, 1fr);
    }
}

.wits-portal .wits-quick-link {
    background: #FFF;
    border: 1px solid var(--wits-line);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: center;
    text-decoration: none;
    color: var(--wits-ink);
    transition: all var(--duration-base) var(--ease-out);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}
.wits-portal .wits-quick-link:hover {
    border-color: var(--wits-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: var(--wits-blue);
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.wits-portal *:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}

/* ============================================
   UTILITIES
   ============================================ */

.wits-portal .wits-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.wits-portal .wits-text-center { text-align: center; }
.wits-portal .wits-text-mute { color: var(--wits-mute); }
.wits-portal .wits-mt-0 { margin-top: 0; }
.wits-portal .wits-mb-0 { margin-bottom: 0; }

/* ============================================
   FRAME 4: CLASSROOM KIT detail (/classroom-kit/)
   Added in brand pass Session B (v2.2.0)
   ============================================ */

.wits-portal .wits-kit {
    max-width: 900px;
    margin: var(--space-6) auto;
    padding: 0 var(--space-4);
}

/* Header card: full-bleed stripe on top, cover + headings below */
.wits-portal .wits-kit-header {
    padding: 0;
    overflow: hidden;
    margin-bottom: var(--space-6);
}
.wits-portal .wits-kit-header .wits-stripe {
    border-radius: 0;
}
.wits-portal .wits-kit-header-body {
    padding: var(--space-6);
    display: flex;
    gap: var(--space-6);
    align-items: flex-start;
}

.wits-portal .wits-kit-cover {
    flex-shrink: 0;
    width: 120px;
    height: 160px;
    border-radius: var(--radius-md);
    background: var(--wits-blue-light);
    border: 1px solid var(--wits-line);
    display: flex;
    align-items: center;
    justify-content: center;
}
.wits-portal .wits-kit-cover-emoji { font-size: 3rem; line-height: 1; }

.wits-portal .wits-kit-headings { flex: 1; min-width: 0; }

/* Strategy label uses the pricing-tier pattern; colour varies by strategy */
.wits-portal .wits-kit-strategy-label {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: var(--text-sm);
}
.wits-portal .wits-kit-strategy-red    { color: #A81A20; }
.wits-portal .wits-kit-strategy-yellow { color: #856100; }
.wits-portal .wits-kit-strategy-green  { color: #2D7026; }
.wits-portal .wits-kit-strategy-blue   { color: var(--wits-blue); }

.wits-portal .wits-kit-title {
    font-size: var(--text-3xl);
    margin: var(--space-1) 0 var(--space-2);
    color: var(--wits-ink);
}
.wits-portal .wits-kit-author {
    font-size: var(--text-sm);
    margin: 0 0 var(--space-4);
}

.wits-portal .wits-kit-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}
.wits-portal .wits-kit-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    line-height: 1.4;
}
.wits-portal .wits-kit-chip-red    { background: rgba(209,36,43,0.12); color: #A81A20; }
.wits-portal .wits-kit-chip-yellow { background: rgba(255,203,5,0.20); color: #856100; }
.wits-portal .wits-kit-chip-green  { background: rgba(80,184,72,0.14); color: #2D7026; }
.wits-portal .wits-kit-chip-blue   { background: var(--wits-blue-light); color: var(--wits-blue); }
.wits-portal .wits-kit-chip-muted  { background: #F3F4F6; color: var(--wits-mute); }

.wits-portal .wits-kit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}
.wits-portal .wits-kit-pdf-pending { cursor: default; }

/* About card: 4-up stats instead of the dashboard 3-up */
.wits-portal .wits-kit-about { margin-bottom: var(--space-6); }
.wits-portal .wits-kit-about h2,
.wits-portal .wits-kit-activities-card h2,
.wits-portal .wits-kit-related h2 {
    font-size: var(--text-xl);
    margin: 0 0 var(--space-4);
}
.wits-portal .wits-stats.wits-kit-stats {
    grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) {
    .wits-portal .wits-stats.wits-kit-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}
.wits-portal .wits-kit-stats .wits-stat-value { font-size: var(--text-xl); }

/* Lesson activities list */
.wits-portal .wits-kit-activities-card { margin-bottom: var(--space-6); }
.wits-portal .wits-kit-activities {
    list-style: none;
    padding: 0;
    margin: 0;
}
.wits-portal .wits-kit-activity {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--wits-line);
}
.wits-portal .wits-kit-activity:last-child { border-bottom: none; }
.wits-portal .wits-kit-activity-num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    justify-content: center;
    padding: 0;
    border-radius: var(--radius-full);
}
.wits-portal .wits-kit-activity-text { flex: 1; color: var(--wits-ink-soft); }
.wits-portal .wits-kit-activity-time {
    flex-shrink: 0;
    font-size: var(--text-sm);
    color: var(--wits-mute);
    font-weight: 600;
}

/* Co-Pilot CTA card (beta only) */
.wits-portal .wits-kit-copilot {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    border: 2px solid var(--wits-green);
    margin-bottom: var(--space-6);
}
.wits-portal .wits-kit-copilot-icon { font-size: 2rem; line-height: 1; flex-shrink: 0; }
.wits-portal .wits-kit-copilot-text { flex: 1; }
.wits-portal .wits-kit-copilot .wits-btn { flex-shrink: 0; }

/* Related kits reuse .wits-quick-link; tighten internal alignment */
.wits-portal .wits-kit-related .wits-quick-link strong { font-size: var(--text-base); }
.wits-portal .wits-kit-related .wits-quick-link .wits-kit-chip { margin-bottom: var(--space-1); }

/* Mobile: stack header */
@media (max-width: 639px) {
    .wits-portal .wits-kit-header-body { flex-direction: column; align-items: center; text-align: center; }
    .wits-portal .wits-kit-chips,
    .wits-portal .wits-kit-actions { justify-content: center; }
    .wits-portal .wits-kit-copilot { flex-direction: column; text-align: center; }
}

/* ============================================
   FRAME 8: AI GOVERNANCE (/ai-governance/)
   Added in brand pass Session B (v2.2.0)
   ============================================ */

html { scroll-behavior: smooth; }

.wits-portal .wits-gov {
    max-width: 1040px;
    margin: var(--space-7) auto;
    padding: 0 var(--space-4);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}
@media (min-width: 1024px) {
    .wits-portal .wits-gov {
        grid-template-columns: 240px 1fr;
        align-items: start;
    }
}

.wits-portal .wits-gov-toc { font-size: var(--text-sm); }
@media (min-width: 1024px) {
    .wits-portal .wits-gov-toc {
        position: sticky;
        top: var(--space-5);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
}
.wits-portal .wits-gov-toc h2 {
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wits-mute);
    margin: 0 0 var(--space-3);
}
.wits-portal .wits-gov-toc ol { list-style: none; padding: 0; margin: 0; }
.wits-portal .wits-gov-toc li { margin-bottom: var(--space-1); }
.wits-portal .wits-gov-toc a {
    display: block;
    padding: 4px 0 4px var(--space-3);
    color: var(--wits-ink-soft);
    border-left: 2px solid transparent;
    line-height: 1.4;
}
.wits-portal .wits-gov-toc a:hover {
    color: var(--wits-blue);
    border-left-color: var(--wits-blue);
    text-decoration: none;
}

.wits-portal .wits-gov-body { max-width: 720px; }
.wits-portal .wits-gov-body .wits-stripe { margin-bottom: var(--space-5); }
.wits-portal .wits-gov-body h1 { margin-bottom: var(--space-2); }
.wits-portal .wits-gov-updated {
    color: var(--wits-mute);
    font-size: var(--text-sm);
    margin-bottom: var(--space-6);
}

.wits-portal .wits-gov-section {
    margin-bottom: var(--space-7);
    scroll-margin-top: var(--space-6);
}
.wits-portal .wits-gov-section h2 {
    font-size: var(--text-2xl);
    margin: 0 0 var(--space-3);
}
.wits-portal .wits-gov-section h3 {
    font-size: var(--text-lg);
    color: var(--wits-blue);
    margin: var(--space-5) 0 var(--space-2);
}
.wits-portal .wits-gov-section table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-4) 0;
    font-size: var(--text-sm);
}
.wits-portal .wits-gov-section th,
.wits-portal .wits-gov-section td {
    text-align: left;
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--wits-line);
    vertical-align: top;
}
.wits-portal .wits-gov-section th {
    color: var(--wits-mute);
    text-transform: uppercase;
    font-size: var(--text-xs);
    letter-spacing: 0.04em;
}
.wits-portal .wits-gov-section ul,
.wits-portal .wits-gov-section ol.wits-gov-list { padding-left: var(--space-5); }
.wits-portal .wits-gov-section li { margin-bottom: var(--space-2); line-height: 1.6; }
.wits-portal .wits-gov-pre {
    background: #F7F8FA;
    border: 1px solid var(--wits-line);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: var(--text-xs);
    white-space: pre;
    overflow-x: auto;
    line-height: 1.5;
    color: var(--wits-ink-soft);
}

@media print {
    .wits-portal .wits-gov-toc { display: none; }
    .wits-portal .wits-gov { display: block; max-width: none; margin: 0; padding: 0; }
    .wits-portal .wits-gov-body { max-width: none; }
    body.wits-portal { background: #FFF; }
    .wits-portal .wits-gov-section { page-break-inside: avoid; }
    .wits-portal .wits-gov-pre { white-space: pre-wrap; }
}

/* ============================================
   FRAME 6: MY ACCOUNT (WooCommerce overrides)
   Added in brand pass Session B (v2.2.0)
   Visual-only: vertical nav tabs, content card, billing table.
   No structural/float changes (logged-in layout untouched).
   ============================================ */

.wits-portal .woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-5);
    background: #FFF;
    border-radius: var(--radius-lg);
    border: 1px solid var(--wits-line);
    overflow: hidden;
}
.wits-portal .woocommerce-MyAccount-navigation li a {
    display: block;
    padding: var(--space-3) var(--space-4);
    color: var(--wits-ink-soft);
    border-left: 3px solid transparent;
    transition: all var(--duration-base) var(--ease-out);
    text-decoration: none;
}
.wits-portal .woocommerce-MyAccount-navigation li.is-active a {
    background: var(--wits-blue-light);
    color: var(--wits-blue);
    border-left-color: var(--wits-blue);
    font-weight: 600;
}
.wits-portal .woocommerce-MyAccount-navigation li a:hover {
    background: var(--wits-blue-light);
    text-decoration: none;
}
.wits-portal .woocommerce-MyAccount-content {
    background: #FFF;
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    border: 1px solid var(--wits-line);
}

/* Billing / orders / subscriptions tables: striped rows, status badges */
.wits-portal .woocommerce-orders-table,
.wits-portal .woocommerce-table,
.wits-portal table.shop_table {
    width: 100%;
    border-collapse: collapse;
}
.wits-portal .woocommerce-orders-table th,
.wits-portal .woocommerce-table th,
.wits-portal table.shop_table th {
    text-align: left;
    color: var(--wits-mute);
    text-transform: uppercase;
    font-size: var(--text-xs);
    letter-spacing: 0.04em;
    padding: var(--space-3);
    border-bottom: 1px solid var(--wits-line);
}
.wits-portal .woocommerce-orders-table td,
.wits-portal .woocommerce-table td,
.wits-portal table.shop_table td {
    padding: var(--space-3);
    border-bottom: 1px solid var(--wits-line);
}
.wits-portal .woocommerce-orders-table tbody tr:nth-child(odd) td {
    background: #FAFBFC;
}
.wits-portal mark.order-status {
    background: rgba(0,86,139,0.10);
    color: var(--wits-blue);
    border-radius: var(--radius-full);
    padding: 2px 10px;
    font-weight: 600;
    font-size: var(--text-xs);
    line-height: 1.6;
}
.wits-portal mark.order-status.status-active,
.wits-portal mark.order-status.status-completed {
    background: rgba(80,184,72,0.12);
    color: #2D7026;
}
.wits-portal mark.order-status.status-processing,
.wits-portal mark.order-status.status-on-hold,
.wits-portal mark.order-status.status-pending {
    background: rgba(255,203,5,0.18);
    color: #856100;
}
.wits-portal mark.order-status.status-cancelled,
.wits-portal mark.order-status.status-failed,
.wits-portal mark.order-status.status-expired {
    background: rgba(209,36,43,0.10);
    color: #8B1820;
}

/* ============================================================
   Legal pages (Privacy Policy / Terms of Service)  v1.0.0
   Reuses the Frame 8 .wits-gov* layout. Adds: sub-title, draft
   banner, table styling, contact block, TOC title.
   Scoped under body.wits-portal. Tokens only, no hardcoded hex.
   ============================================================ */
body.wits-portal .wits-portal-legal .wits-gov-sub {
    font-size: var(--text-lg);
    color: var(--wits-ink-soft);
    margin: var(--space-1) 0 var(--space-2);
    font-weight: 500;
}
body.wits-portal .wits-legal-draft {
    border-left: 4px solid var(--wits-yellow);
    background: color-mix(in srgb, var(--wits-yellow) 14%, var(--wits-bg-card));
    color: var(--wits-ink);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    margin: var(--space-4) 0 var(--space-6);
    font-size: var(--text-sm);
    line-height: 1.5;
}
body.wits-portal .wits-gov-toc-title {
    font-weight: 700;
    font-size: var(--text-sm);
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--wits-mute);
    margin: var(--space-2) 0 var(--space-2);
}
body.wits-portal .wits-gov-toc .wits-stripe { margin-bottom: var(--space-2); }
body.wits-portal .wits-gov-body h3 {
    font-size: var(--text-lg);
    color: var(--wits-blue-dark);
    margin: var(--space-4) 0 var(--space-2);
}
/* Tables inside legal/gov body */
body.wits-portal .wits-gov-tablewrap { overflow-x: auto; margin: var(--space-3) 0 var(--space-4); }
body.wits-portal .wits-gov-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
    background: var(--wits-bg-card);
    border: 1px solid var(--wits-line);
    border-radius: var(--radius-md);
    overflow: hidden;
}
body.wits-portal .wits-gov-body thead th {
    background: var(--wits-blue-light);
    color: var(--wits-blue-dark);
    text-align: left;
    font-weight: 700;
    padding: var(--space-2) var(--space-3);
    border-bottom: 2px solid var(--wits-line);
}
body.wits-portal .wits-gov-body tbody td {
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--wits-line);
    vertical-align: top;
}
body.wits-portal .wits-gov-body tbody tr:nth-child(even) td {
    background: var(--wits-bg);
}
body.wits-portal .wits-gov-body tbody tr:last-child td { border-bottom: 0; }
body.wits-portal .wits-gov-contact {
    background: var(--wits-blue-light);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    margin: var(--space-3) 0;
    border-left: 4px solid var(--wits-blue);
}
body.wits-portal .wits-gov-contact p { margin: 0; line-height: 1.7; }
body.wits-portal .wits-gov-body a { color: var(--wits-blue); text-decoration: underline; }
@media (max-width: 1024px) {
    body.wits-portal .wits-gov-body thead th,
    body.wits-portal .wits-gov-body tbody td { font-size: var(--text-xs); padding: var(--space-2); }
}
