/**
 * Hashira Careers — Design Tokens
 *
 * v2.3.8 BL-020 — Phase 1 scaffolding.
 *
 * Single source of truth for visual design values across the plugin.
 * All future templates, components, and page styles should reference
 * these CSS custom properties rather than hard-coding colors, fonts,
 * sizes, or spacing.
 *
 * Migration status (as of v2.3.8):
 *   ✓ HR candidate profile page (BL-021)
 *   ✓ Resume preview chrome (BL-022 polish)
 *   ☐ Candidate-facing Edit Profile (queued)
 *   ☐ Application detail (HR side) (queued)
 *   ☐ Partner portal pages (queued)
 *   ☐ wp-admin screens (queued)
 *
 * Migration policy: one surface per future release; never bulk-migrate
 * since per-surface visual regressions need a manual smoke check.
 */

:root {
    /* ================================================================
     * Brand colors
     * ================================================================ */
    --hashira-color-brand-green: #3B6D11;
    --hashira-color-brand-green-dark: #1B5E20;
    --hashira-color-brand-green-pale: #EAF3DE;
    --hashira-color-brand-navy: #0B2035;
    /* v2.59.0 BL-622 — Brand-green palette siblings. Audit found 5+ different
     * "primary brand" greens hardcoded across PHP inline styles (#3B6D11
     * candidate, #1B5E20 partner, #2DC93C status-good, #2E7D32 admin-quick-link,
     * #3a8a48 email). These tokens surface the same intentional variants for
     * gradual migration — adding them now (without rewiring all callsites)
     * unblocks per-surface tokenization in future passes. */
    --hashira-color-brand-green-status: #2DC93C;   /* status-good (UI signal vs brand) */
    --hashira-color-brand-green-admin: #2E7D32;    /* admin quick-link accent */
    --hashira-color-brand-green-email: #3a8a48;    /* transactional email accent */

    /* v2.59.0 BL-622 — Admin quick-link card accent palette. Audit BL-430
     * flagged 4 cards using 4 disconnected hex codes; tokens surface them
     * for consistent theming. Each card has a distinct purpose; preserving
     * the visual differentiation while making them themeable. */
    --hashira-color-card-operations: #1E88E5;
    --hashira-color-card-configuration: #2E7D32;
    --hashira-color-card-audit: #b58900;
    --hashira-color-card-personas: #8E24AA;

    /* ================================================================
     * Semantic colors
     * ================================================================ */
    --hashira-color-text-primary: #0B2035;
    /* v2.77.0 BL-622 — compat alias: a few legacy sites referenced the bare
     * `--hashira-color-text` (with a #1f2937 fallback). Alias it onto the
     * canonical primary ink so the name resolves and collapses onto one value. */
    --hashira-color-text: var(--hashira-color-text-primary);
    --hashira-color-text-secondary: #475569;
    --hashira-color-text-muted: #94a3b8;
    --hashira-color-text-on-brand: #fff;
    --hashira-color-text-id: #475569;       /* v2.5.0 — slate-600 for monospace IDs */
    /* v2.36.0 BL-T6-21 / audit BL-228 — WordPress admin's canonical secondary
     * text grey. Many existing admin surfaces inline-style `color:#646970` as
     * a subdued label/caption — this token surfaces that value so the same
     * color can be consistently themed in dark mode or custom palettes.
     * Value matches WP 6+ admin chrome convention (`--wp-admin-theme-color-darker-20`
     * inverse), so the visual outcome is identical to v2.35.0. */
    --hashira-color-wp-admin-grey: #646970;

    /* v2.37.0 T5-22 / audit BL-254 — Status colors as semantic tokens.
     * These map application/workflow statuses to colors. Surfaced as tokens
     * (not Settings) because the mappings are tied to brand/UX consistency —
     * green = positive, blue = in-progress, orange = pending-action, grey =
     * terminal. Palette refinements flow through every status surface
     * (candidate-applications, HR list, audit panel) without per-site edits. */
    --hashira-color-status-info: #1976D2;
    --hashira-color-status-warning: #F57C00;
    --hashira-color-status-neutral: #999;

    --hashira-color-bg-page: #f6f7f5;
    --hashira-color-bg-card: #fff;
    --hashira-color-bg-section-tint: #FAFAFA;

    --hashira-color-border: #e2e8f0;        /* v2.5.0 — refined cool gray (was #e8eae8) */
    --hashira-color-border-strong: #cbd5e1;
    --hashira-color-border-rule: #3B6D11;

    --hashira-color-status-info: #1E88E5;
    --hashira-color-status-warn: #C49A1F;
    --hashira-color-status-warn-bg: #FFF7E0;
    --hashira-color-status-warn-text: #7A5A00;
    --hashira-color-status-success: #61CE70;
    --hashira-color-status-error: #C62828;
    --hashira-color-status-error-bg: #fbeaeb;

    /* v2.6.0 BL-073 — Token surface extended for compat layer.
       These complete the semantic palette so compat layer can express
       info/danger/warning/success states consistently. */
    --hashira-color-status-info: #1E88E5;
    --hashira-color-status-info-pale: #DBEAFE;
    --hashira-color-status-info-dark: #1E40AF;
    --hashira-color-status-danger: #A32D2D;
    --hashira-color-status-danger-pale: #FCEBEB;
    --hashira-color-status-danger-dark: #7A1F1F;
    --hashira-color-status-success-pale: #EAF3DE;
    --hashira-color-status-success-dark: #2E5A07;
    --hashira-color-status-warning-pale: #FFF7E0;
    --hashira-color-status-warning-dark: #7A5A00;

    /* Status pill backgrounds (per application-status pipeline) */
    --hashira-color-status-draft: #6c757d;
    --hashira-color-status-submitted: #1E88E5;
    --hashira-color-status-screening: #FB8C00;
    --hashira-color-status-interviewing: #8E24AA;
    --hashira-color-status-offer: #00897B;
    --hashira-color-status-accepted: #2E7D32;
    --hashira-color-status-rejected: #C62828;
    /* v2.5.6 Phase K — dead-end states differentiated. Previously all looked similar gray. */
    --hashira-color-status-withdrawn: #546e7a;  /* blue-gray (candidate pulled out) */
    --hashira-color-status-expired:   #b58900;  /* amber (auto-expired by time) */
    --hashira-color-status-discarded: #6a4c93;  /* purple-gray (HR discarded) */
    /* v2.77.0 BL-622 — pale interview tint. Surfaces the #f3edf9 wash used
     * behind interview-stage panels on the HR Applications surface so the
     * solid (#8E24AA) and its background share one governed pair. */
    --hashira-color-status-interviewing-pale: #F3EDF9;
    /* v2.5.6.1 G3.1 — active-pause state. Distinct amber from expired. */
    --hashira-color-status-on_hold:   #d97706;  /* orange-amber (paused, recoverable) */

    /* ================================================================
     * Typography
     *
     * v2.5.0 — Inter (body) + JetBrains Mono (IDs/code) loaded via
     * Google Fonts in the plugin enqueue + HSP-mounted render shells.
     * System fallbacks ensure graceful degradation if the CDN fails.
     * ================================================================ */
    --hashira-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --hashira-font-display: var(--hashira-font-body);
    --hashira-font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    --hashira-font-serif: 'EB Garamond', Garamond, 'Times New Roman', Times, serif;

    /* ================================================================
     * CANONICAL TYPE SCALE (BL-113 convergence, 2026-06-01)
     * Single governed scale — use these everywhere. The legacy t-shirt
     * tokens are kept as ALIASES resolving to these canonical values
     * (D-52) so existing usages converge to one pixel value without a
     * mass rewrite. Platform rule (D-38): no raw font-size in markup;
     * no token whose value disagrees with its visual peers.
     * ================================================================ */
    --hashira-title:   28px;  /* = h1 — one page title per page             */
    --hashira-section: 22px;  /* = h2 — major section heading               */
    --hashira-subsec:  18px;  /* = h3 — subsection heading                  */
    --hashira-block:   15px;  /* = h4 — card/block heading, emphasised body */
    --hashira-body:    14px;  /* default body                               */
    --hashira-meta:    13px;  /* THE secondary token: table cells, field    */
                              /* labels, filter labels, secondary columns   */
    --hashira-caption: 12px;  /* help text, captions, side notes            */
    --hashira-micro:   11px;  /* eyebrow / uppercase tag / micro-label      */

    /* Legacy t-shirt aliases → canonical (converge drift; prefer canonical names) */
    --hashira-text-xs:  var(--hashira-micro);    /* was 11px */
    --hashira-text-sm:  var(--hashira-meta);     /* was 12px → 13px: unify the meta tier */
    --hashira-text-13:  var(--hashira-meta);     /* was 13px */
    --hashira-text-base: var(--hashira-body);    /* 14px */
    --hashira-text-md:  var(--hashira-block);    /* was 15px */
    --hashira-text-16:  16px;
    --hashira-text-lg:  17px;
    --hashira-text-xl:  20px;
    --hashira-text-2xl: var(--hashira-section);  /* was 24px → 22px */
    --hashira-text-3xl: 30px;
    --hashira-text-display: 32px;
    --hashira-text-hero:    40px;

    /* ================================================================
     * CANONICAL PAGE-WIDTH SCALE (BL-113 / layout convergence, 2026-06-01)
     *
     * Width is chosen per surface PURPOSE, not copied per page:
     *   - content : public / candidate reading + forms. Capped + centered.
     *               Optimal line length; mobile-friendly. (consumer-style)
     *   - work    : internal HR/admin data pages on laptop/desktop. Dense,
     *               table-heavy. Fluid up to a high cap, then center, so it
     *               uses desktop space without over-stretching on ultrawide.
     * Replaces the scattered literals (880 / 1200 / 1280 / 1400) that drifted
     * across careers-public, careers-compat (BL-T7-17) and careers-hsp-mounted.
     * ================================================================ */
    --hashira-width-content: 880px;   /* apply flow, job detail, public reading + forms */
    --hashira-width-landing: 1200px;   /* public listing/landing grids (wider than a form, still capped) */
    --hashira-width-work:    1600px;   /* HR/admin data pages: fluid up to here, then center */
    --hashira-gutter-work:   32px;     /* side padding so work pages don't hit screen edges */

    /* ================================================================
     * v2.31.0 BL-FW-TOKENS — Font weight tokens
     *
     * Introduced to close T4 D-38 typography remainder. Per D-38, every
     * visible text element should use a design token rather than a
     * hardcoded numeric. Prior to this release ~152 sites used inline
     * numerics (400/500/600/700) which produced silent drift over time.
     *
     * Mapping:
     *   --hashira-weight-normal   = 400  (body copy, default)
     *   --hashira-weight-medium   = 500  (labels, captions, light emphasis)
     *   --hashira-weight-semibold = 600  (buttons, badges, table headers)
     *   --hashira-weight-bold     = 700  (h1/h2/h3, primary CTAs)
     *
     * Light (300) is intentionally not included — the Inter family does
     * not ship Light reliably across all browsers via Google Fonts subset,
     * and the design system has not been using weight: 300 anywhere.
     * ================================================================ */
    --hashira-weight-normal:   400;
    --hashira-weight-medium:   500;
    --hashira-weight-semibold: 600;
    --hashira-weight-bold:     700;

    /* ================================================================
     * v2.4.0 — Typographic hierarchy (Word-style semantic levels)
     *
     * Use these instead of arbitrary text-* sizes when expressing
     * document structure. Maps to .hashira-h1 / .hashira-h2 / etc.
     * components defined in components.css.
     * ================================================================ */
    --hashira-h1-size: 28px;    /* Page title — one per page (e.g. "Edit Profile") */
    --hashira-h2-size: 22px;    /* Major section title (e.g. "Personal Details") */
    --hashira-h3-size: 18px;    /* Subsection title (e.g. "Identity" within Personal Details) */
    --hashira-h4-size: 15px;    /* Block heading (e.g. employer card title) */
    --hashira-h5-size: var(--hashira-meta);    /* Field label, small heading → meta */
    --hashira-h6-size: var(--hashira-micro);   /* Eyebrow / micro-label / uppercase tag */

    --hashira-body-size: 14px;    /* Default body text */
    --hashira-body-lg-size: 15px; /* Slightly emphasised body */
    --hashira-body-sm-size: var(--hashira-meta);    /* De-emphasised body / fine print → meta */
    --hashira-caption-size: var(--hashira-caption); /* Help text below inputs, photo captions */
    --hashira-remark-size: var(--hashira-caption);  /* Side notes, comments, parentheticals */

    --hashira-leading-tight: 1.3;
    --hashira-leading-normal: 1.5;
    --hashira-leading-relaxed: 1.65;

    --hashira-weight-normal: 400;
    --hashira-weight-medium: 500;
    --hashira-weight-semibold: 600;
    --hashira-weight-bold: 700;

    /* ================================================================
     * Spacing scale (4px base)
     * ================================================================ */
    --hashira-space-1: 4px;
    --hashira-space-2: 8px;
    --hashira-space-3: 12px;
    --hashira-space-4: 16px;
    --hashira-space-5: 20px;
    --hashira-space-6: 24px;
    --hashira-space-8: 32px;
    --hashira-space-10: 40px;
    --hashira-space-12: 48px;

    /* ================================================================
     * Borders + radii
     * ================================================================ */
    --hashira-border-thin: 1px solid var(--hashira-color-border);
    --hashira-border-rule: 1px solid var(--hashira-color-border-rule);
    --hashira-radius-sm: 4px;
    --hashira-radius-md: 8px;
    --hashira-radius-lg: 12px;
    --hashira-radius-pill: 999px;

    /* ================================================================
     * Shadows
     * ================================================================ */
    --hashira-shadow-sm: 0 1px 2px rgba(11, 32, 53, 0.04);
    --hashira-shadow-md: 0 2px 6px rgba(11, 32, 53, 0.06);

    /* ================================================================
     * v2.40.0 BL-T7-1 — Additive scale extensions
     * Per D-52: additive only, do not overwrite existing tokens.
     *
     * Adds:
     *   text-display (32px) — page heading (H1/H2 on interior pages)
     *   text-hero    (40px) — hero heading (landing pages only, sparingly)
     *   leading-*           — line-height tokens
     *   space-16     (64px) — section break gap
     *
     * Existing tokens preserved as-is: text-base remains 14px (Hashira
     * platform standard since v2.3.8); compat layer maps everything
     * downstream. Hero/Panel/Empty-state components use new tokens.
     * ================================================================ */
    --hashira-text-display: 32px;
    --hashira-text-hero:    40px;

    --hashira-leading-tight:   1.25;
    --hashira-leading-snug:    1.375;
    --hashira-leading-normal:  1.5;
    --hashira-leading-relaxed: 1.75;

    --hashira-letter-tight:   -0.01em;
    --hashira-letter-normal:  0;

    --hashira-space-16: 64px;
}
