/* Muehlhan 2026 brand kit for John's apps (SafeTrack first, then SampleTrack,
   LessonForge, Blood Lead, PowerScan, FieldDocs, QC and the rest).
   John, 2026-11-03: "all the other apps as well so they all look exactly the same".

   Every app copies the whole static/brand/ folder unchanged and loads this one
   file. Change the brand HERE, then copy the folder to the other apps; never
   restyle the brand inside one app.

   Source: Muehlhan Industrial Service Brand Guidelines 2026 (logo chapter in
   D:\APPBuildFiles\Muehlhan 2026-approved braning) and the full guide summary
   (project doc claude/Muehlhan-Brand-Guidelines-2026-Summary.md).
   Font: Reddit Sans, SIL Open Font License 1.1 (fonts/OFL.txt), self-hosted so
   no page calls Google. */

@font-face { font-family: 'Reddit Sans'; font-style: normal; font-weight: 300; font-display: swap; src: url('fonts/reddit-sans-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Reddit Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/reddit-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Reddit Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/reddit-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Reddit Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/reddit-sans-latin-700-normal.woff2') format('woff2'); }

:root {
    /* Guide primary colors */
    --mh-black: #000000;
    --mh-deep-blue: #002B49;      /* Pantone 7463 C */
    --mh-deep-blue-75: #406077;
    --mh-deep-blue-50: #8095A4;
    --mh-deep-blue-25: #BFCAD1;
    --mh-deep-blue-10: #E5EAED;
    --mh-fresh-sky: #0AADFF;      /* Pantone 299 C, the logo blue */
    --mh-fresh-sky-75: #47C1FF;
    /* Guide secondary (charts and data) */
    --mh-green: #4DB051;
    --mh-green-10: #DCECD7;
    --mh-royal-blue: #007AC3;
    --mh-royal-blue-10: #C8DBF3;
    /* Guide support color: highlights only, never a main color */
    --mh-warm-red: #E94734;

    /* App roles built from the palette */
    --mh-page: #F4F6F8;           /* light page, as the guide's UI pages */
    --mh-surface: #FFFFFF;
    --mh-surface-2: #E5EAED;      /* Deep Blue 10%: table heads, quiet panels */
    --mh-line: #CFD8DE;
    --mh-ink: #002B49;            /* headings and strong text */
    --mh-text: #1F2933;
    --mh-dim: #406077;            /* secondary text, 6.6:1 on white */
    --mh-link: #007AC3;           /* Royal Blue: Fresh Sky is too light for text (2.5:1) */
    --mh-primary: #002B49;        /* main buttons: Deep Blue pill */
    --mh-primary-hover: #003D66;
    --mh-accent: #0AADFF;         /* rings, focus, small round accents */

    /* Status colors carry safety meaning. The guide's green and Warm Red are
       too light for words on white (2.8:1 and 3.9:1) and it has no amber, so
       words use these darker shades of the same hues. Guide values stay for
       fills and charts. Flagged for John (doc Muehlhan-Brand-2026-For-SafeTrack). */
    --mh-ok: #2E7D32;
    --mh-warn: #9A5C00;
    --mh-warn-fill: #E8A33D;
    --mh-bad: #C8361F;

    /* Role colors both looks share by name */
    --mh-tile: #FFFFFF;
    --mh-tile-line: #BFCAD1;
    --mh-tile-hover: #F0F9FF;
    --mh-input: #FFFFFF;
    --mh-input-line: #CFD8DE;
    --mh-header: #002B49;
    --mh-header-line: transparent;
    --mh-ok-tint: #DCECD7;
    --mh-bad-tint: #FDECEA;
    --mh-sky-tint: #E3F4FD;
    --mh-purple: #6B3FA0;
    --mh-primary-text: #FFFFFF;

    --mh-font: 'Reddit Sans', Arial, Helvetica, sans-serif;
    --mh-radius: 10px;
    --mh-pill: 999px;
    --mh-header-h: 64px;
}

/* ---------- Deep Blue look (John, 2026-11-04: "I loved our dark background
   because it looked modern and tiles stood out"). Put class="mh-deep" on <html>.
   The guide allows white logo and text on Deep Blue (p.29 "Do's"); its
   blue-on-black is a "don't", which is why this is Deep Blue, not black.
   On Deep Blue the guide's own green (5.3:1), Fresh Sky (5.9:1) and the
   Team Zero amber (6.8:1) read as words; Warm Red is 3.8:1, so words use
   its light tint and the full Warm Red stays for fills and borders. ---------- */
:root.mh-deep {
    --mh-page: #001E33;           /* Deep Blue, deepened for the page */
    --mh-surface: #002B49;        /* Deep Blue: cards and panels */
    --mh-surface-2: #0B3A5C;      /* table heads, quiet panels */
    --mh-line: #1E4A6B;
    --mh-ink: #FFFFFF;
    --mh-text: #E5EAED;           /* Deep Blue 10% tint */
    --mh-dim: #BFCAD1;            /* Deep Blue 25% tint, 8.7:1 */
    --mh-link: #47C1FF;           /* Fresh Sky 75% tint */
    --mh-primary: #007AC3;        /* Royal Blue pill, white words 4.6:1 */
    --mh-primary-hover: #2997D4;
    --mh-accent: #0AADFF;
    --mh-ok: #4DB051;             /* guide green as is */
    --mh-warn: #E8A33D;
    --mh-warn-fill: #E8A33D;
    --mh-bad: #FF7B6B;            /* Warm Red tint for words */
    --mh-tile: #0B3A5C;
    --mh-tile-line: #0AADFF;      /* Fresh Sky ring: the tiles stand out */
    --mh-tile-hover: #104A72;
    --mh-input: #001E33;
    --mh-input-line: #2B5678;
    --mh-header: #002B49;
    --mh-header-line: #1E4A6B;
    --mh-ok-tint: rgba(77,176,81,0.16);
    --mh-bad-tint: rgba(233,71,52,0.18);
    --mh-sky-tint: rgba(10,173,255,0.14);
    --mh-purple: #C9A8F0;
    color-scheme: dark;
}

/* A logo that changes with the look: Fresh Sky on light, white on Deep Blue. */
.mh-on-dark { display: none; }
:root.mh-deep .mh-on-light { display: none; }
:root.mh-deep .mh-on-dark { display: block; }

/* ---------- Header: Deep Blue bar, white logo (guide p.29 "Do's") ---------- */
.mh-header { background: var(--mh-header); border-bottom: 1px solid var(--mh-header-line); color: #fff; width: 100%; }
.mh-header-inner {
    max-width: 2200px; margin: 0 auto; min-height: var(--mh-header-h);
    padding: 0.7rem 1.5rem; display: flex; align-items: center; gap: 1.25rem;
}
.mh-brand { display: flex; align-items: center; gap: 0.9rem; text-decoration: none; color: #fff; min-width: 0; }
.mh-brand img.mh-logo { height: 34px; width: auto; display: block; flex: none; }
.mh-brand .mh-divider { width: 1px; align-self: stretch; background: rgba(255,255,255,0.35); margin: 0.15rem 0; flex: none; }
.mh-brand .mh-company { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.mh-brand .mh-company b { font-weight: 700; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-brand .mh-company span { font-weight: 400; font-size: 0.8rem; color: var(--mh-fresh-sky-75); letter-spacing: 0.3px; }

/* ---------- Buttons: pills (guide UI page) ---------- */
.mh-btn, .mh-btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    min-height: 44px; padding: 0.55rem 1.4rem; border-radius: var(--mh-pill);
    font-family: var(--mh-font); font-size: 1rem; font-weight: 500; text-decoration: none; cursor: pointer;
}
.mh-btn { background: var(--mh-primary); color: #fff; border: 1px solid var(--mh-primary); }
.mh-btn:hover { background: var(--mh-primary-hover); }
.mh-btn-secondary { background: #fff; color: var(--mh-primary); border: 1px solid var(--mh-primary); }
.mh-btn-secondary:hover { background: var(--mh-deep-blue-10); }

/* ---------- Quiet background mu (guide "fifth element": grey, cropped, right) ---------- */
.mh-mu-bg { position: relative; overflow: hidden; }
.mh-mu-bg::after {
    content: ""; position: absolute; right: -6%; bottom: -18%; width: 42%; aspect-ratio: 1;
    background: url('logos/mu-grey.svg') no-repeat right bottom / contain; opacity: 0.6; pointer-events: none;
}
.mh-mu-bg > * { position: relative; z-index: 1; }
