/**
 * NCLEX Exam Design Tokens
 *
 * Shared CSS custom properties for colors, typography, and shadows.
 * Matches the NCLEX exam design from Figma.
 *
 * Used by: assessments/base.html, authoring/question_preview.html
 */

:root {
    /* Typography */
    --font-primary: "IBM Plex Sans", sans-serif;
    --font-heading: "Public Sans", sans-serif;

    /* Colors - Core */
    --color-black: #000000;
    --color-white: #FFFFFF;

    /* Colors - Greys */
    --color-icon-grey: #6B6B73;
    --color-card-grey: #F5F5F8;
    --color-stroke-grey: #DBDBDC;
    --color-dark-grey: #2B3150;
    --color-dark-grey-hover: #646C8E;
    --color-dark-card-grey: #434669;
    --color-medium-grey: #E9E8EC;
    --color-disabled-grey: #9CA3AF;
    --color-grey-copy: #3B3F5C;
    --color-dark-copy: #2D2C2B;
    --color-light-grey-bg: #F8FAFC;
    --color-learning-grey: #F4F8FF;

    /* Colors - Accent */
    --color-blue: #23ACE8;
    --color-green: #20CBC0;
    --color-red: #F65252;
    --color-orange: #F5A623;
    --color-card-blue: #E9F7FD;
    --color-purple: #4C49F4;

    /* Nala AI study companion — semantic names aliased to shared tokens so a
       rebrand of the base token propagates instead of leaving a stale copy. */
    --color-nala-purple: var(--color-purple);
    --color-nala-name: var(--color-royal-blue);
    --color-nala-insight-bg: var(--color-learning-grey);   /* lavender insight card / Nala bubble */
    --color-nala-chip-bg: var(--color-white);
    --color-nala-user-bubble: var(--color-dark-grey);      /* dark navy student bubble */
    --color-nala-border-from: var(--color-blue);           /* gradient panel border start */
    --color-nala-border-to: var(--color-purple);           /* gradient panel border end */
    --color-nala-scrollbar: #C7CAD9;                       /* thin chat-thread scrollbar thumb (own value) */
    --shadow-nala-panel: var(--shadow-soft);

    /* Colors - Status Backgrounds */
    --color-status-green-bg: #E6F9F8;
    --color-status-yellow-bg: #FEECC2;
    --color-status-red-bg: #FEF0F0;

    /* Colors - Status Text */
    --color-status-yellow-text: #A66000;
    --color-status-yellow-text-strong: #8A4F00;  /* body-size text on --color-status-yellow-bg: 5.6:1 (AA) */
    --color-copy-red: #930101;

    /* Data Visualization Colors */
    --color-data-vis-blue: #1F77B4;
    --color-data-vis-aqua: #17BECF;
    --color-data-vis-yellow: #FFD700;
    --color-data-vis-red: #D62728;
    --color-data-vis-orange: #FF7F0E;
    --color-data-vis-pink: #E377C2;
    --color-data-vis-purple: #9467BD;
    --color-data-vis-green: #2CA02C;
    --color-data-vis-grey: #999999;

    /* Indicator Colors (status pills) */
    --color-indicator-red: #E94B3C;
    --color-indicator-yellow: #F5A623;

    /* High-Yield Daily Dose (from Figma).
       Accent hues are per-subject; the deep/emphasis shades are derived in
       daily-dose.css via color-mix (accent x 0.70 / x 0.85). Neutrals are
       darkened from the Figma greys to meet WCAG AA on white. */
    --color-dd-title: #1E2A3B;
    --color-dd-muted: #5F6B7D;   /* labels + de-emphasized body (~5:1) */
    --color-dd-body: #515C6C;    /* reading body / box content (~6:1) */

    /* Accent + column-tone palette */
    --color-dd-blue: #23ACE8;
    --color-dd-indigo: #4C49F4;
    --color-dd-cyan: #1FBCE3;
    --color-dd-teal: #20CBC0;
    --color-dd-pink: #E377C2;
    --color-dd-red: #EF4444;
    --color-dd-amber: #F59E0B;
    --color-dd-grey: #9BA8B7;

    --color-dd-divider: #F0F2F5;
    --color-dd-box-border: #E0E4EA;

    /* Card Shadow (performance cards) */
    --shadow-card-light: 0px 4px 6px 0px #E9F5FA;

    /* Royal Blue (score values) */
    --color-royal-blue: #122272;

    /* Text */
    --color-text-muted: #6B6B73;
    --color-text-subtle: #898892;
    --color-input-placeholder: #717182;

    /* Focus. Darkened from the design's #23ACE8, which reached only 2.51:1
       against a white surface — a focus indicator has to clear 3:1 (WCAG
       1.4.11). Same hue, so it still reads as the brand blue. */
    --color-focus-ring: #169CD6;

    /* Shadows */
    --shadow-soft: 0px 12px 34px 5px rgba(226, 239, 255, 0.6);

    /* How long a single chart bar takes to grow to its target height. Sole owner of that
       duration for both bar charts (results.html and performance.html); the JS in
       bar-chart-animate.js only staggers when each bar starts, never how long it takes. */
    --bar-rise-duration: 500ms;

    /* How long a single polar ring takes to fill (performance.html). Same split as above: CSS
       owns the duration; the page script only staggers when each ring starts. */
    --ring-fill-duration: 700ms;

    /* How long the progress-over-time chart takes to sweep in from the left (performance.html).
       CSS owns the duration; the page script only clips and unclips the chart to start it. */
    --area-reveal-duration: 900ms;

    /* HESI/TEAS question player.
       The design gives each answer state a tint OR a border, never both, and
       spends red only on the option the student actually chose. Aliased to the
       shared palette where a value already exists so a rebrand propagates. */
    --color-answer-correct: #0F7C72;
    --color-answer-correct-bg: #F0FBFA;
    --color-answer-correct-border: #9FE3DC;
    --color-answer-wrong: #D62728;
    --color-answer-wrong-bg: var(--color-status-red-bg);
    --color-answer-wrong-border: #F2CACA;
    /* Filled outcome badge on a graded option. Deliberately not
       --color-answer-correct/-wrong, which are the text and chip colours.
       Each carries a white glyph, so each has to clear 3:1 BOTH against that
       glyph and against the tinted row it sits on. The design's #20CBC0 and
       brand blue managed neither (2.03:1 and 2.58:1 against white), which
       left the tick that marks your answer all but invisible; these are the
       same hues walked down to the threshold. */
    --color-answer-icon-correct: #19A198;
    --color-answer-icon-incorrect: #E94B3C;
    --color-answer-selected-bg: #EAF3FE;
    --color-answer-selected-border: var(--color-blue);
    --color-answer-selected-mark: #1595CD;
    --color-answer-resting-border: #E7ECF4;
    --color-answer-dot-border: #CFD8E6;

    /* Player surfaces and rules */
    --color-player-hairline: #EDF1F7;
    --color-player-surface: #FBFCFE;
    --color-player-soft: #F7F9FC;
    --color-player-body: #4A5169;      /* explanation body copy */
    --color-player-secondary: #5B6079; /* labels, muted rows */
    /* Darkened from the design's #8B93AD (2.98:1). It carries real prose —
       drag instructions, figure captions, the empty-slot hint and the passage
       close button — at 11-13px, so it needs the full 4.5:1. */
    --color-player-tertiary: #697394;  /* eyebrows, captions */
    --color-player-drop-border: #C9D6EE;
    --color-player-drop-bg: var(--color-learning-grey);
    --color-player-passage-accent: #1B7FB0;
    --color-player-passage-bg: #EAF6FD;
    --color-player-passage-border: #B7DCF3;  /* trigger border while open */
    --color-player-note: #5976A3;      /* the blue "note" aside in explanations; 4.32:1 -> 4.50:1 */
    --color-player-highlight: #FEF3D8; /* select-to-highlight in a passage */
    --color-player-grip: #B7BCCB;           /* drag-handle dots */
    /* Graded matching box. Backgrounds are the design's; the foreground and
       border are the darker teal already used for correct text, because the
       design's #0F9B8E is 3.22:1 on its own background and #20CBC0 is 2.03:1
       against white — under the 4.5:1 and 3:1 WCAG minimums. */
    --color-match-correct-bg: #E9FBF8;
    --color-match-correct-fg: var(--color-answer-correct);
    --color-match-wrong-bg: #FDEEEC;
    --color-match-wrong-fg: #C43A2D;
    --color-player-figure-bg: #FAFBFE;      /* framed stem image */
    --color-player-figure-border: #EDEFF4;
    --shadow-player-figure-btn: 0 2px 8px rgba(20, 24, 45, 0.15);
    --color-player-empty-ring: #E4E9FB;  /* explanation empty-state circle, gradient start */
    --color-player-lightbox-scrim: rgba(43, 49, 80, 0.72); /* image lightbox backdrop */
    --shadow-player-panel: 0 4px 6px 2px #E9F2FA;

    /* HESI/TEAS lesson page (static/css/hesi-lesson.css). Values from the
       lesson-page design; aliased to the player palette where one exists. */
    --color-lesson-accent: #4C49F4;          /* goals label, goal ticks, text links */
    --color-lesson-why: #0F5F5A;             /* "Why it matters" label */
    --color-lesson-why-body: #1F5651;
    --color-lesson-intro-start: #EEF0FE;     /* goals/why card gradient */
    --color-lesson-intro-end: #F7F5FE;
    --color-lesson-rule-mid: #23ACE8;        /* brand gradient rule on the intro card */
    --color-lesson-rule-end: #20CBC0;
    --color-lesson-card-border: #EBEEF4;
    --color-lesson-term-border: #E1E6F0;
    --color-lesson-term-open-bg: #F7F8FC;
    --color-lesson-term-dot: #23ACE8;
    --color-lesson-howto-bg: #FFFBF3;
    --color-lesson-howto-border: #F6E4C2;
    --color-lesson-howto-icon-bg: #FCEACB;
    --color-lesson-howto-icon-fg: #A66000;
    --color-lesson-howto-number: #F5A623;
    --color-lesson-howto-example-border: #F0E3C8;
    --color-lesson-howto-note: #8A6A2E;
    --color-lesson-gallery-bg: #F7FBFE;
    --color-lesson-gallery-border: #E3EDF6;
    --color-lesson-gallery-icon-bg: #E1F0FA;
    --color-lesson-gallery-icon-fg: #14618A;
    --color-lesson-gallery-dot: #D8E0EC;
    --color-lesson-video-start: #2B3150;     /* placeholder frame gradient */
    --color-lesson-video-end: #1E4F6E;
    --color-lesson-video-pill-bg: rgba(43, 49, 80, 0.85);
    --color-lesson-video-pill-fg: #FAFAFA;
    --color-lesson-kc-icon-bg: #E6F9F8;
    --color-lesson-kc-icon-fg: #0F5F5A;
    --color-lesson-tab-active: #2B3150;
    --shadow-lesson-card: 0 4px 6px 2px #E9F5FA;
    --color-lesson-page-bg: #F4F8FF;         /* page behind the lesson card */
    --color-lesson-kc-border: #D8E0EC;       /* knowledge-check card, 1.5px */
    --color-lesson-kc-tab-fg: #8B93AD;       /* Knowledge Check Player: other tags */
    --color-lesson-kc-tab-ring-current: #C9D8EE;
    --color-lesson-passage-fg: #3A3F52;
    --color-lesson-video-mid: #3B4570;       /* in-lesson video frame gradient */
    --shadow-lesson-video: 0 14px 30px -12px rgba(43, 49, 80, 0.35);
    --color-lesson-video-pill-dark: rgba(0, 0, 0, 0.42);
    --color-lesson-video-play-bg: rgba(255, 255, 255, 0.96);
    --color-lesson-exp-video-bg: #0E1A3A;    /* video explanation inside the check */
    --color-lesson-exp-video-play-bg: rgba(255, 255, 255, 0.92);
    /* Remediation lesson Page States. Exact design values, contrast
       included (amber label 2.0:1, sub-line 2.98:1 on white). */
    --color-lesson-rem-accent: #F5A623;      /* open round: banner dot + label */
    --color-lesson-rem-done: #20CBC0;        /* reviewed round */
    --color-lesson-rem-badge-bg: #FFF6DE;
    --color-lesson-rem-badge-fg: #8A5A1A;
    --color-lesson-rem-done-bg: #E6F9F8;
    --color-lesson-rem-done-fg: #0F5F5A;
    --color-lesson-rem-sub: #8B93AD;
    --color-lesson-rem-nav: #B7BCCA;
    --color-lesson-rem-nav-active: #2B3150;
    --color-lesson-rem-arrow: #5B6079;
    --color-lesson-video-row-end: #1B7FB0;   /* "Original video" row gradient */
    --color-lesson-video-row-shadow: rgba(43, 49, 80, 0.4);
    --color-lesson-on-video-soft: rgba(255, 255, 255, 0.14);
    --color-lesson-on-video-pill: rgba(255, 255, 255, 0.16);
    --color-lesson-on-video-muted: rgba(255, 255, 255, 0.7);
    --filter-lesson-rem-primary: grayscale(0.5) brightness(0.85);
    --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Partner portal (static/css/partner.css) — semantic names aliased to shared tokens. */
    --color-partner-page-bg: var(--color-learning-grey);
    --color-partner-nav-bg: var(--color-dark-grey);              /* navy nav rail */
    --color-partner-nav-card: var(--color-dark-card-grey);       /* the organization card in the rail */
    --color-partner-nav-text: var(--color-white);
    --color-partner-nav-hover: rgba(255, 255, 255, 0.08);
    --color-partner-nav-muted: rgba(255, 255, 255, 0.7);
    --color-partner-card: var(--color-white);
    --color-partner-rule: var(--color-medium-grey);
    --color-partner-text: var(--color-dark-grey);
    --color-partner-muted: var(--color-player-secondary);
    --color-partner-link: var(--color-royal-blue);
    --color-partner-available-bg: var(--color-status-green-bg);
    --color-partner-available-label: var(--color-lesson-why);   /* deep teal */
    --color-partner-active-bg: var(--color-card-blue);
    --color-partner-active-label: var(--color-royal-blue);
    --color-partner-bucket-bg: var(--color-card-grey);
    --color-partner-notice-bg: var(--color-status-yellow-bg);
    --color-partner-notice-text: var(--color-status-yellow-text-strong);
    --color-partner-alert-bg: var(--color-status-red-bg);
    --color-partner-alert-text: var(--color-copy-red);
    --color-partner-body: #44423F;                               /* body copy and captions on a card */
    --color-partner-link-hover: var(--color-purple);
    --color-partner-dark-hover: var(--color-dark-grey-hover);    /* the dark pill button's hover */
    --color-partner-border: var(--color-stroke-grey);            /* white pill and chip borders */
    --color-partner-input-border: #D9DCE3;
    --color-partner-input-readonly: #F7F8FA;
    --color-partner-placeholder-bg: #F0F4FB;                     /* logo placeholders, icon circles */
    --color-partner-dropzone-bg: #FAFBFD;
    --color-partner-disabled-bg: #E9E9EA;
    --color-partner-disabled-text: var(--color-text-muted);
    --color-partner-danger-text: var(--color-copy-red);
    --color-partner-danger-border: #F88888;
    --color-partner-green-text: var(--color-lesson-why);
    --color-partner-amber-text: var(--color-status-yellow-text-strong);
    --color-partner-dot-on: var(--color-green);
    --color-partner-dot-off: var(--color-indicator-yellow);
    --color-partner-dot-none: #B1B1B2;
    --color-partner-nav-active-text: var(--color-black);
    --color-partner-nav-foot: rgba(255, 255, 255, 0.06);
    --color-partner-nav-foot-hover: rgba(255, 255, 255, 0.12);
    --color-partner-nav-foot-text: rgba(255, 255, 255, 0.86);
    --color-partner-overlay: rgba(43, 49, 80, 0.55);
    --color-partner-sponsor-bg: rgba(255, 255, 255, 0.08);      /* the student sidebar's "Sponsored by" box */
    --color-partner-sponsor-label: rgba(255, 255, 255, 0.85);
    --color-partner-sponsor-logo-bg: var(--color-white);  /* a partner's logo is always on white */
    --color-partner-band-well: var(--color-green);            /* the dashboard's bars: doing well */
    --color-partner-band-needs: var(--color-indicator-yellow); /* needs improvement */
    --color-partner-band-critical: var(--color-indicator-red); /* critical focus */
    --color-partner-band-chart: var(--color-blue);             /* the weekly column chart */
    --shadow-partner-card: 0 4px 18px rgba(35, 172, 232, 0.10);
    --shadow-partner-pill: 0 4px 12px rgba(43, 49, 80, 0.12);
    --shadow-partner-dialog: 0 8px 28px rgba(0, 0, 0, 0.18);
    --shadow-partner-nav-active: 0 3px 4px 2px rgba(0, 0, 0, 0.10);
    --shadow-partner-sticky: 6px 0 8px -6px rgba(43, 49, 80, 0.15);
    --gradient-partner-mark: linear-gradient(135deg, var(--color-purple), var(--color-blue) 45%, var(--color-green));

    /* Exam Simulations page (the five-exam redesign): semantic names, aliased to shared tokens where one exists */
    --color-exam-sim-secondary: var(--color-player-secondary);  /* body copy, labels, chips */
    /* Sub-lines and notes: 13px text that carries information ("27 of 85 answered · 3h 12m remaining"). The
       board's #8B93AD is 3.05:1 on white; this is the same hue darkened to pass AA: 4.90:1 on white and 4.60:1
       on the highlighted row (--color-exam-sim-soft). */
    --color-exam-sim-muted: #667090;
    --color-exam-sim-chip-bg: #EEF2FB;                           /* chips and the "Starting point" pill */
    --color-exam-sim-divider: var(--color-lesson-card-border);
    --color-exam-sim-ring: #DCE3F0;                              /* outline of an unfilled number marker */
    --color-exam-sim-soft: var(--color-learning-grey);           /* empty bar slot, highlighted row, features strip */
    --color-exam-sim-marker-fg: #FAFAFA;                         /* number on the filled marker */
    --color-exam-sim-above: var(--color-green);                  /* bars and the status dot, by readiness band */
    --color-exam-sim-near: var(--color-orange);
    --color-exam-sim-below: var(--color-indicator-red);
    --color-exam-sim-above-bg: var(--color-status-green-bg);     /* pills and the status card */
    --color-exam-sim-near-bg: #FFF6E5;
    --color-exam-sim-below-bg: #FDECEA;
    --color-exam-sim-above-ink: var(--color-lesson-why);
    --color-exam-sim-near-ink: var(--color-status-yellow-text);
    --color-exam-sim-below-ink: #C2352A;
    --shadow-exam-sim-card: var(--shadow-lesson-card);
    --shadow-exam-sim-list: 0 1px 3px rgba(43, 49, 80, 0.08), 0 2px 8px rgba(43, 49, 80, 0.06);
    --shadow-exam-sim-raised: 0 1px 3px rgba(43, 49, 80, 0.12);  /* a bar's value label, a feature's icon */
}

/* Global focus-visible indicator for all interactive elements */
:focus-visible {
    outline: 2px solid var(--color-focus-ring);
    outline-offset: 2px;
}
