/*
 * Dyutam Intel bridge — tools microsite.
 *
 * The tools CSS corpus was written against the retired dyutam-custom theme
 * and consumes its global custom properties (--text-primary, --bg-surface,
 * --space-*, --font-heading, …). This sheet re-declares those legacy tokens
 * on top of the dyutam-intel token set so every tools page follows the site
 * theme — including the light/dark scheme toggle — without touching the
 * 50k lines of per-tool CSS.
 *
 * Load order matters: after main.css/verifier.css (so the pf-* remaps win)
 * and BEFORE the per-page stylesheets (so a calculator that deliberately
 * redefines a token for its own palette keeps winning, exactly as it did
 * against the old theme).
 */

:root {
    /* ------- legacy dyutam-custom globals → intel tokens ------- */
    --bg-primary: var(--bg);
    --bg-surface: var(--surface);
    --bg-elevated: var(--surface-3);
    --bg-card: var(--surface);
    --surface-primary: var(--surface);
    --surface-secondary: var(--surface-2);

    --text-primary: var(--text);
    --text-secondary: var(--text-muted);
    --text-tertiary: var(--text-dim);

    --border-subtle: var(--border);
    --border-color: var(--border-strong);

    --accent-primary: var(--accent);
    --accent-primary-hover: var(--accent-bright);
    --accent-electric: var(--accent-bright);
    --accent-color: var(--accent);
    --accent-secondary: var(--accent-bright);
    --accent-dark: var(--accent);
    --accent-warning: #f59e0b;
    --accent-danger: var(--down-text);

    --font-heading: var(--font-sans);
    --font-body: var(--font-sans);
    --font-accent: var(--font-sans);

    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    --radius-md: var(--r);

    --layout-max-width: var(--maxw);
    --layout-gutter: var(--gut);
    --divider-thickness: 3px;
    --section-gap: var(--space-2xl);
    --border-brutal: 5px;
    --border-thin: 2px;

    /* ------- pf-* structural family (main.css / verifier.css) -------
       The neon-terminal palette main.css declared reads as raw #00ff88 on
       the intel paper; the live/verified role maps to intel's green pair
       and the rest onto the surface/text ramp. Per-tool glass palettes
       (arbitrage, kelly, …) redefine pf-* in their own sheets, which load
       after this one and keep their self-contained look. */
    --pf-primary: var(--up-text);
    --pf-primary-rgb: 21, 160, 106;
    --pf-electric: var(--accent-bright);
    --pf-accent: var(--accent);
    --pf-accent-dark: var(--accent);
    --pf-bg-primary: var(--bg);
    --pf-bg-secondary: var(--surface-2);
    --pf-bg-card: var(--surface);
    --pf-bg-elevated: var(--surface-3);
    --pf-border: var(--border);
    --pf-border-hover: var(--border-strong);
    --pf-text-primary: var(--text);
    --pf-text-secondary: var(--text-muted);
    --pf-text-muted: var(--text-dim);

    /* ------- tokens some tools reference but nothing ever defined ------- */
    --tool-primary: var(--accent);
    --tool-primary-dark: var(--accent);
    --tool-text: var(--text);
    --tool-text-muted: var(--text-muted);
    --tool-card-bg: var(--surface);
}

/* ---------------------------------------------------------------------
   Structural harmonisation with the intel chrome. Scoped to the body
   marker the tools header adds, so nothing leaks into WordPress pages.
   ------------------------------------------------------------------- */

/* Tools containers align with the theme's column, not the old 1600px. */
.pf-tools-page .site-container,
.pf-tools-page .breadcrumb-container {
    max-width: var(--maxw);
}

/* Breadcrumb strip: quiet intel styling instead of the neon-green tint. */
.pf-tools-page .pf-tools-breadcrumbs {
    background: transparent;
    border-bottom: 1px solid var(--border);
}

.pf-tools-page .breadcrumb a {
    color: var(--text-dim);
}

.pf-tools-page .breadcrumb a:hover {
    color: var(--accent-text);
    background: var(--accent-soft);
}

.pf-tools-page .breadcrumb .separator {
    color: var(--text-dim);
}

.pf-tools-page .breadcrumb .current {
    color: var(--accent-text);
    background: var(--accent-soft);
    font-weight: 600;
}

/* Cards and sections that used the old theme's flat dark surfaces now sit
   on intel surfaces; give them the theme's soft shadow so they read as
   cards on the light paper too. */
.pf-tools-page .calculator-section,
.pf-tools-page .info-section {
    border-radius: var(--r);
    border-width: 1px;
    box-shadow: var(--shadow);
}
