/* Reset all link colors */
a, a:link, a:visited, a:hover, a:active {
    color: inherit !important;
    text-decoration: none !important;
}

/* !!! ===============================================================================================================*/
/* !!! FONT_IMPORT*/
/* ===================================================================================================================*/

@font-face {
    font-family: 'GT-Pressura-Standard-Black';
    src: url('/assets/GT-Pressura-Standard-Black.woff2') format('woff2'),
         url('/assets/GT-Pressura-Standard-Black.woff') format('woff'),
         url('/assets/GT-Pressura-Standard-Black.otf') format('opentype');
    font-display: swap;
}
@font-face {
    font-family: 'GT-Pressura-Standard-Bold';
    src: url('/assets/GT-Pressura-Standard-Bold.woff2') format('woff2'),
         url('/assets/GT-Pressura-Standard-Bold.woff') format('woff'),
         url('/assets/GT-Pressura-Standard-Bold.otf') format('opentype');
    font-display: swap;
}
@font-face {
    font-family: 'GT-Pressura-Standard-Medium';
    src: url('/assets/GT-Pressura-Standard-Medium.woff2') format('woff2'),
         url('/assets/GT-Pressura-Standard-Medium.woff') format('woff'),
         url('/assets/GT-Pressura-Standard-Medium.otf') format('opentype');
    font-display: swap;
}
@font-face {
    font-family: 'GT-Pressura-Standard-Regular';
    src: url('/assets/GT-Pressura-Standard-Regular.woff2') format('woff2'),
         url('/assets/GT-Pressura-Standard-Regular.woff') format('woff'),
         url('/assets/GT-Pressura-Standard-Regular.otf') format('opentype');
    font-display: swap;
}
@font-face {
    font-family: 'GT-Pressura-Standard-Light';
    src: url('/assets/GT-Pressura-Standard-Light.woff2') format('woff2'),
         url('/assets/GT-Pressura-Standard-Light.woff') format('woff'),
         url('/assets/GT-Pressura-Standard-Light.otf') format('opentype');
    font-display: swap;
}
@font-face {
    font-family: 'GT-Pressura-Mono-Light';
    src: url('/assets/GT-Pressura-Mono-Light.woff2') format('woff2'),
         url('/assets/GT-Pressura-Mono-Light.woff') format('woff'),
         url('/assets/GT-Pressura-Mono-Light.otf') format('opentype');
    font-display: swap;
}
@font-face {
    font-family: 'GT-Pressura-Mono-Regular';
    src: url('/assets/GT-Pressura-Mono-Regular.woff2') format('woff2'),
         url('/assets/GT-Pressura-Mono-Regular.woff') format('woff'),
         url('/assets/GT-Pressura-Mono-Regular.otf') format('opentype');
    font-display: swap;
}
@font-face {
    font-family: 'GT-Pressura-Mono-Bold';
    src: url('/assets/GT-Pressura-Mono-Bold.woff2') format('woff2'),
         url('/assets/GT-Pressura-Mono-Bold.woff') format('woff'),
         url('/assets/GT-Pressura-Mono-Bold.otf') format('opentype');
    font-display: swap;
}
@font-face {
    font-family: 'GT-Pressura-Extended-Bold';
    src: url('/assets/GT-Pressura-Extended-Bold.woff2') format('woff2'),
         url('/assets/GT-Pressura-Extended-Bold.woff') format('woff'),
         url('/assets/GT-Pressura-Extended-Bold.otf') format('opentype');
    font-display: swap;
}
@font-face {
    font-family: 'GT-Pressura-Standard-Light-Italic';
    src: url('/assets/GT-Pressura-Standard-Light-Italic.woff2') format('woff2'),
         url('/assets/GT-Pressura-Standard-Light-Italic.woff') format('woff'),
         url('/assets/GT-Pressura-Standard-Light-Italic.otf') format('opentype');
    font-display: swap;
}

/* !!! ===============================================================================================================*/
/* !!! VARIABLES */
/* ===================================================================================================================*/

/* All GT-Pressura faces carry their own intrinsic weight (Bold, Medium, Light,
   etc.), so emphasis is expressed via font-family, not font-weight. Keep the
   document at a neutral baseline and let <b>, <strong>, headings inherit. */
body {
    font-weight: normal;
}

b, strong, h1, h2, h3, h4, h5, h6 {
    font-weight: inherit;
}

:root {
/* !!! ________Fonts
   Each token bakes in the `sans-serif` fallback so consumers can use
   `font-family: var(--textfont)` without repeating `, sans-serif`. */

    --headingfont: 'GT-Pressura-Standard-Bold', sans-serif;
    --textfont: 'GT-Pressura-Standard-Light', sans-serif;
    --textfont_italic: 'GT-Pressura-Standard-Light-Italic', sans-serif;
    --tablefont: 'GT-Pressura-Standard-Regular', sans-serif;
    --tablefont_bold: 'GT-Pressura-Standard-Bold', sans-serif;
    --tablefont_mono: 'GT-Pressura-Mono-Regular', monospace;
    --tablefont_mono_bold: 'GT-Pressura-Mono-Bold', monospace;
    --tablefont_mono_light: 'GT-Pressura-Mono-Light', monospace;
    --buttonfont: 'GT-Pressura-Standard-Bold', sans-serif;
    --mediumfont: 'GT-Pressura-Standard-Medium', sans-serif;

/* !!! ________Type_Scale
   SINGLE em-based scale. All font-size declarations in this stylesheet use
   one of these tokens — no more hardcoded px/rem/em literals, no parallel
   rem scale. Because every token is em (parent-relative) and the root
   html { font-size: clamp(...) } is fluid, every text in the app scales
   smoothly with viewport width AND inherits its container's context.

   Naming: smaller number = larger size. Suffix letters (A, B, C) are
   intermediate stops — use them when the base step is too big a jump.

        Token            em      ~px*  Intended role
        ─────────────────────────────────────────────────────────────
        --font_em_1      2.5em   40    Display / hero
        --font_em_2      2em     32    H1, marquee heading
        --font_em_2A     1.75em  28    H2
        --font_em_2B     1.5em   24    H3, large section heading
        --font_em_2C     1.25em  20    H4, small section heading
        --font_em_3      1em     16    Body (default)
        --font_em_3A     0.875em 14    Body, reduced
        --font_em_4      0.8em   12.8  UI small (buttons, form labels)
        --font_em_4A     0.75em  12    Compact label, dense UI
        --font_em_5      0.65em  10.4  Caption, legend, meta
        --font_em_5A     0.6em   9.6   Small caption, table footnote
        --font_em_6      0.5em   8     Tiny / micro

        * Approximate resolved pixel size assuming parent is at body-size
          (~16px). Real values breathe with the html clamp(). */

    --font_em_1:  2.5em;
    --font_em_2:  2em;
    --font_em_2A: 1.75em;
    --font_em_2B: 1.5em;
    --font_em_2C: 1.25em;
    --font_em_3:  1em;
    --font_em_3A: 0.875em;
    --font_em_4:  0.8em;
    --font_em_4A: 0.75em;
    --font_em_5:  0.65em;
    --font_em_5A: 0.6em;
    --font_em_6:  0.5em;

    --sManual_leftMargin_1: 0;
    --sManual_leftMargin_2: 1.5rem;
    --sManual_leftMargin_3: calc(var(--sManual_leftMargin_2)*1.7);
    --sManual_leftMargin_4: calc(var(--sManual_leftMargin_3)*1.4);
    --sManual_leftMargin_5: calc(var(--sManual_leftMargin_4)*1.3);
    --sManual_leftMargin_6: calc(var(--sManual_leftMargin_5)*1.2);

    --light_transparent_blue: hsla(200, 50%, 20%, .1);
    --light_transparent_blue_lighter: hsla(200, 50%, 20%, .05);

    --light_transparent_gray: hsla(0, 0%, 50%, 0.1);

    --sManual_yellow_highlight: #fcffcb;
    /* --warning_color_dark and --warning_color_light have been removed.
       All warning / "latest-assignment" accents now share --monconred so
       the app has a single red token with matching tint/ink/line
       derivatives in the monconred family. */

    --sManual_border_thick: 2px;
    /* Alt palette: dotted green accent (was dotted purple) */
    --sManual_link_bottom_border: 2px dotted var(--pt-accent-light);
    --sManual_link_bottom_border_2: var(--sManual_border_thick) dotted var(--pt-accent-light);
    --sManual_link_bottom_border_3: var(--sManual_border_thick) dotted var(--pt-accent-dark);
    --sManual_link_bottom_border_4: var(--sManual_border_thick) dotted var(--orange);

    --sManual_link_bottom_border_highlight: var(--sManual_border_thick) solid var(--gray-900);

    --sManual_link_transition: var(--button-link-transition);

    /* Alt palette: flat UI, no drop shadows */
    --sManual_box_shadow: none;

    --sManual_new_text_highlight_color: #D35400;

    /* Alt palette: accent uses medium text tone */
    --sManual_accent_color: var(--pt-text-medium);

/* !!! ________Ops_Chart */

    --opsChart_PX_color: rgba(251, 251, 239, 1);
    --opsChart_PM_color: rgba(240, 248, 230, 1);
    --opsChart_SU_color: rgba(233, 229, 243, 1);
    --opsChart_ME_color: rgba(251, 244, 237, 1);
    --opsChart_PC_color: rgba(230, 242, 251, 1);

/* !!! ________Design_tokens (pt-*) — alt palette core */
    /* Light shell */
    --pt-body: #f3f3f3;
    --pt-body-medium: #e8e8e8;
    --pt-body-light: #ffffff;
    --pt-text: #1e2124;
    --pt-text-medium: #636363;
    --pt-accent-light: rgb(48, 48, 80);
    --pt-accent-light-05: rgba(43, 89, 69, 0.05);

    /* Dark block tokens — navbar strip + selective surfaces */
    --pt-body-dark: #1e2124;
    --pt-accent-dark: #4e8af7;

    --pt-border: var(--gray-800);
    --pt-border-soft: #e8e8e8;
    /* Shared multi-property transition used by every hover-able surface
       (cards, chips, pills, nav tiles). Always references the single
       --button-link-transition-duration token so the whole app animates
       at the same slow, smooth speed. Includes border-radius and
       transform so card hovers morph instead of snap. */
    --pt-transition:
        color var(--button-link-transition-duration) ease-in-out,
        background-color var(--button-link-transition-duration) ease-in-out,
        border-color var(--button-link-transition-duration) ease-in-out,
        border-radius var(--button-link-transition-duration) ease-in-out,
        box-shadow var(--button-link-transition-duration) ease-in-out,
        transform var(--button-link-transition-duration) ease-in-out,
        opacity var(--button-link-transition-duration) ease-in-out;

    /* ---------------------------------------------------------------------- */
    /* Navbar color controls — change these in ONE place (applies to regular  */
    /* AND landing variants; both rules consume these tokens below).          */
    /* ---------------------------------------------------------------------- */
    --pt-nav-bg: rgba(20, 20, 22, 0.08);
    /* --pt-nav-bg-hover: rgba(95, 95, 95, 0.55); */
    --pt-nav-bg-landing: rgba(24, 26, 27, 0.78);
    --pt-nav-bg-landing-hover: rgba(24, 26, 27, 0.83);

    /* Menu pills inside the navbar (text + button surfaces) */
    --pt-nav-pill-bg: #ffffff;
    --pt-nav-pill-bg-hover: #ececec;

/* !!! ________Colors */

    --monconred: #ed2037;
    /* Derived red tokens — keep usage scarce and intentional. Consume these
       (not raw --monconred) when you need a softened red for tints, hairlines,
       or focus rings. Using color-mix() ties every derivative to the single
       source of truth above — change --monconred and everything follows. */
    --monconred-ink:   color-mix(in srgb, var(--monconred) 85%, #1e2124);
    --monconred-tint:  color-mix(in srgb, var(--monconred) 8%,  #ffffff);
    --monconred-line:  color-mix(in srgb, var(--monconred) 60%, #ffffff);
    --monconred-focus: color-mix(in srgb, var(--monconred) 40%, transparent);
    --orange: #FF7153;
    --lightyellow: #fcffcb;
    --lightblue: #e6faff;
    --lightpurple: #f2eafe;

    /* Outbuild Styles */
    --mist: #d6ddd9;
    --bedrock: #c5cdc9;

    /* Gray ramp: dark grays for shadow/badge usage; surfaces read light */
    --gray-900: #1e2124;
    --gray-800: #3a3c3f;
    --gray-750: #4a4d51;
    --gray-700: #5c5f63;
    --gray-600: #6b6f73;
    --gray-500: #8a8d91;
    --gray-400: #b0b3b6;
    --gray-300: #d0d2d4;
    --gray-200: #e0e2e4;
    --gray-150: #eceeef;
    --gray-100: #f3f4f5;
    --gray-060: #f7f8f8;
    --gray-050: #fbfbfb;
    --gray-025: #ffffff;

    /* Text colors (semantic) */
    --text_color_dark: var(--gray-025);
    --button_color_dark: var(--gray-750);
    --text_dark: var(--gray-800);

/* !!! ________Disabled / Inactive state tokens
   Unified colors for any card/element shown as disabled, inactive, superseded,
   or otherwise deemphasized. Edit ONCE here to change every disabled surface
   in the app (cards, pills, staff/project chart cards, image overlays, etc.). */
    --pt-disabled-bg:      var(--gray-200);   /* surface fill          */
    --pt-disabled-border:  var(--gray-400);   /* 1px solid/dashed line */
    --pt-disabled-text:    var(--gray-500);   /* all text + headings   */
    --pt-disabled-overlay: rgba(200, 200, 200, 0.65); /* image overlay */

/* !!! ________Borders_and_Lines */

    --lw-1: solid 1px var(--pt-border);

/* !!! ________Layout_and_breakpoints */
    --content_max_width: 1700px;

    --nav-width: 200px;
    --gap: 24px;
    --top-offset: 4em;

    /* Center column: clamp means side margins absorb all shrinkage first (until they hit 0),
       then the center itself compresses. Both .main-container and .PT_navbar_main read the
       same resolved value, so navbar and page content always align at every viewport width. */
    --main-col-min: 1000px;
    --main-col: clamp(var(--main-col-min), 80vw, var(--content_max_width));

/* !!! ________Transitions */

    /* Shared easing curves */
    --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-pill: cubic-bezier(0.25, 0.1, 0.25, 1);

    /* Unified button/link transition — every button and link in the app should
       reference this token (or one of the derived tokens below) so their hover
       animations share a single slow speed that's controlled in one place. */
    --button-link-transition-duration: 0.8s;
    --button-link-transition: all var(--button-link-transition-duration) var(--ease-standard);

    /* Slow "sharp -> rounded" pill morph used across .button1, .PT_navbar pills, etc.
       Duration is driven by the shared button/link token so it matches every
       other button/link animation. */
    --pill-morph-transition:
        border-radius var(--button-link-transition-duration) var(--ease-pill),
        background-color var(--button-link-transition-duration) var(--ease-pill),
        border-color var(--button-link-transition-duration) var(--ease-pill),
        color var(--button-link-transition-duration) ease;

    /* Generic soft hover shadow used on buttons, links, tiles, pills */
    --shadow-hover-soft: 0 2px 10px rgba(0, 0, 0, 0.1);

    /* sManual micro-interactions share the same duration so link/card hovers
       match every other button/link in the app. */
    --sManual_transition_duration: var(--button-link-transition-duration);

/* !!! ________Patterns */

    --safety_hatch: repeating-linear-gradient(
        -45deg,
        var(--pt-body-light) 0 14px,
        rgba(43, 89, 69, 0.06) 14px 28px
    );

}

/* !!! ===============================================================================================================*/
/* !!! SCROLLBAR  */
/* ===================================================================================================================*/

::-webkit-scrollbar {
    background-color: var(--pt-body-medium);
    border-radius: 5px;
    width: .5em;
    height: 7px;
}

::-webkit-scrollbar-track {
    border-radius: 5px;
    background-color: var(--pt-body-light);
}

::-webkit-scrollbar-thumb {
    background-color: var(--gray-400);
    border-radius: 5px;
}

.div-login {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* !!! ===============================================================================================================*/
/* !!! LOGIN_STUFF  */
/* ===================================================================================================================*/

.login-header {
    font-family: var(--headingfont);
    font-size: var(--font_em_2);
    color: var(--gray-025) !important;
    margin-bottom: 0.5rem;
    text-align: center;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.input2.login-input {
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    color: var(--gray-025) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    height: 32px;
    padding: 4px 10px;
    border-radius: 8px;
}

.input2.login-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

.input2.login-input:focus {
    border-color: rgba(255, 255, 255, 0.6) !important;
    background-color: rgba(255, 255, 255, 0.14) !important;
    outline: none;
}

.button1.login-button {
    border-color: rgba(255, 255, 255, 0.45);
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--gray-025) !important;
    transition: var(--button-link-transition) !important;
    width: 50%;

}

.button1.login-button.credential {
    border-color: rgba(255, 255, 255, 0.3);
    background-color: transparent;
    color: rgba(255, 255, 255, 0.75) !important;

}

.button1.login-button:hover {
    color: var(--gray-025) !important;
    border-color: rgba(255, 255, 255, 0.75);
    background-color: rgba(255, 255, 255, 0.16);
}

/*   */
.forbidden_landing{
    text-decoration: underline !important;
}

#users-table tbody tr td,
#roles-table tbody tr td {
    padding: 6px 5px !important;
}

#users-table thead tr th,
#roles-table thead tr th {
    padding: 6px 6px !important;
}

#users-table thead tr th span,
#roles-table thead tr th span {
    float: left !important;
}

#users-table tbody tr td:nth-child(6) {
    display: flex;
    justify-content: left;
}

/* !!! ===============================================================================================================*/
/* !!! BUTTONS_AND_LINKS  */
/* ===================================================================================================================*/

/* !!! ________Pill-morph utility
   Opt-in class that packages the app-wide "sharp at rest → round on hover,
   with a soft hover shadow and slow eased transition" pattern. Components
   that need this look can adopt the class and override `--pill-radius-rest`
   / `--pill-radius-hover` inline or in a more specific rule. Existing
   button / link rules intentionally keep their own hover radii, so this is
   not applied retroactively. */
.pill-morph {
    border-radius: var(--pill-radius-rest, 2px);
    transition: var(--pill-morph-transition);
}

.pill-morph:hover {
    border-radius: var(--pill-radius-hover, 16px);
    box-shadow: var(--shadow-hover-soft);
    cursor: pointer;
}

/* !!! ________Button1 */
.button1, .export, .show-hide {
    background-color: transparent;
    color: var(--text_dark);
    padding: 5px 10px;
    border-radius: 2px;
    border: 1px solid var(--pt-text);
    text-align: center;
    text-decoration: none;
    display: block;
    font-size: var(--font_em_5A);
    font-family: var(--buttonfont);
    transition: var(--pill-morph-transition);
    margin-top: 6px;
    margin-bottom: 6px;
    margin-right: 4px;
}

.button1:hover, .export:hover, .show-hide:hover {
    cursor: pointer;
    border-radius: 16px;
    background-color: var(--pt-accent-light-05);
    border-color: var(--pt-accent-light);
    color: var(--text_dark);
}

/* !!! ________Button4 */
.button4 {
    position: absolute;
    top: 0;
    right: 0;
    padding: 5px 10px;
    background: var(--button_color_dark) !important;
    text-align: center;
    height: 36px;
    color: var(--text_color_dark) !important;
    border-radius: 2px;
    margin: 12px;
    font-family: var(--buttonfont);
    transition: var(--pt-transition);
    border: none !important;
}

.button4:hover {
    border-radius: 18px;
    cursor: pointer;
    filter: brightness(1.05);
}

.card nav.button4 {
    font-size: var(--font_em_3);
    position: unset !important;
}

/* !!! ________Button_download */
.button-download {
    background-color: var(--button_color_dark) !important;
    color: var(--text_color_dark) !important;
    padding: 6px 12px;
    border-radius: 2px;
    text-align: center;
    text-decoration: none;
    display: block;
    font-size: var(--font_em_4A);
    font-family: var(--buttonfont);
    transition: var(--button-link-transition);
    margin-top: 6px;
    margin-bottom: 6px;
    margin-right: 0;
    white-space: nowrap;
    border: 0 solid var(--pt-border);
    width: auto;
    min-width: 120px;
}

.button-download:hover {
    cursor: pointer;
    border-radius: 18px;
    border: 0 solid var(--pt-border);
}

/* !!! ________Button_menu */
.button-menu.pt-btn {
    font-size: var(--font_em_5);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 6rem;
    width: auto;
    padding: 4px 8px;
    border: 1px solid var(--pt-border);
    border-radius: 2px;
    background-color: transparent;
    color: var(--text_dark);
    text-decoration: none;
    font-family: var(--mediumfont);
    transition: var(--button-link-transition);
    cursor: pointer;
    margin: 6px 12px 6px 0;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    will-change: border-radius, background-color;
}

.PT_navbar.PT_navbar_landing .PT_navbar_nav_items {
    display: none;
}

.section_nav_container .button-menu.pt-btn {
    width: 100%;
    /*border: none;*/
    margin-bottom: 0.5em;
}

#sManual_nav_buttons_container .button-menu {
    margin: 0;
    margin-bottom: 0.25em;
    padding: 0.2em;
}

#sManual_nav_buttons_container .button-menu.disabled {
    color: var(--gray-300);
    border-color: var(--gray-300);
    animation: none;
    transition: none;
    pointer-events: none;
    cursor: not-allowed;
}

.button-menu.pt-btn:hover {
    border-radius: 18px;
}

/* Ensure all child elements use the EXACT same transition timing */
.pt-btn__label,
.pt-btn__circle {
    transition: var(--button-link-transition);
    will-change: transform, opacity;
}

.pt-btn__label {
    position: relative;
    z-index: 0;
    /* No transition here - it's defined above */
}

.button-menu.pt-btn:hover .pt-btn__label {
    transform: translateX(-14px);
    /* No transition here - it inherits from the class above */
}

.pt-btn__circle {
    position: absolute;
    top: 50%;
    right: 6px;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(-50%) scale(0.5) translateX(12px);
    /* No transition here - it's defined above */
    font-size: var(--font_em_4A);
    color: var(--text_dark);
    background-color: transparent;
}

.button-menu.pt-btn:hover .pt-btn__circle {
    opacity: 1;
    background-color: transparent; /* Or any color you want */
    transform: translateY(-50%) scale(1) translateX(0);
    /* No transition here - it inherits from the class above */
}

.holder {
    background: var(--pt-body-medium) !important;
    width: 100%;
}

.pt-btn__icon {
    width: 16px;
    height: 16px;
    filter: invert(0%); /* Adjust this for different colors */
}

/* Dark variant of the animated button */
.button-menu.pt-btn.dark {
    background-color: var(--button_color_dark);
    color: var(--pt-body-medium) !important;
    margin-right: 0 !important;
}

/* !!! ________Tablebutton */

.tablebutton {
    background: var(--pt-text-medium) !important;
    height: 18px !important;
    line-height: 18px !important;
    color: var(--text_dark) !important;
    padding: 0 8px !important;
    border-radius: 2px !important;
    border: 1px solid var(--pt-border) !important;
    text-align: center !important;
    text-decoration: none !important;
    display: block !important;
    font-size: var(--font_em_5A) !important;
    font-Family: var(--buttonfont) !important;
    transition-duration: var(--button-link-transition-duration) !important;
    margin-top: 2px !important;
    margin-bottom: 2px !important;
}

.tablebutton:hover {
    /*background-color: transparent !important;*/
    /*background: none !important;*/
    /*color: var(--text_color) !important;*/
    border-radius: 12px !important;
    cursor: pointer !important;
}

/* !!! ===============================================================================================================*/
/* !!! LANDING_PAGE_STUFF  */
/* ===================================================================================================================*/

.landing_page_container {
    font-size: var(--font_em_3);
    width: 100%;
    position: relative;
    color: var(--text_dark);
    /*padding-right: 2em;*/
    padding-left: 6px;

}
.landing_column_title {
    font-family: var(--headingfont);
    font-size: var(--font_em_4A);
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--text_dark) !important;
    margin-top: 0;
    margin-bottom: 0.75em;
}

.login_container,
.login_card {
    border: none !important;
    border-radius: 0;
    box-shadow: none !important;
    display: flex;
    align-items: center;
}

.login_container {
    background-color: transparent !important;
    justify-content: center;
    height: fit-content;
    margin-top: 10em;
}

.login_card {
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    border-radius: 14px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    margin-bottom: 0.5em;
    transition: all var(--button-link-transition-duration) var(--ease-standard);
    padding: 1.5em 1.75em;
    max-width: 400px;
    min-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Non-landing home grids: flat gray tiles */
.landing_card {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    padding: 0.6em 0.7em 0.7em;
    min-height: 3.5em;
    height: auto;
    border: none !important;
    color: var(--text_dark);
    font-family: var(--textfont);
    background-color: var(--pt-body-medium) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0;
    box-shadow: none !important;
    margin-bottom: 0.45em;
    transition: var(--button-link-transition);
    overflow-wrap: break-word;
    text-decoration: none;
    cursor: pointer;
}

.landing_card:hover {
    background-color: var(--gray-200) !important;
    border: none !important;
    border-radius: 14px;
    color: var(--text_dark);
}

/* Disabled landing tile (user lacks permission for the page).
   Tile is still rendered so the user sees the option, but it is inert and
   visually dimmed. The :hover rule is duplicated to defeat the active-state
   restyle above. */
.landing_card.disabled,
.landing_card.disabled:hover {
    cursor: not-allowed;
    opacity: 0.45;
    pointer-events: none;
    background-color: var(--pt-body-medium) !important;
    border-radius: 0;
    color: var(--text_dark);
}

.landing_card.disabled .landing_card_title,
.landing_card.disabled .landing_card_text {
    color: var(--text_dark) !important;
    text-decoration: line-through;
}

.landing_card_title {
    font-size: var(--font_em_4A);
    line-height: 1.2;
    font-family: var(--headingfont);
    color: var(--text_dark) !important;
    letter-spacing: -0.02em;
    margin: 0;
    /* Single-line truncation — never wraps */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.landing_card_text {
    font-size: var(--font_em_4A);
    line-height: 1.45;
    font-family: var(--tablefont);
    color: var(--text_dark) !important;
    margin: 0;
    overflow-wrap: break-word;
}

.landing_tile_badge {
    color: var(--text_dark);
    padding: 0.3em 0.8em;
    border: 1px solid var(--gray-900);
    border-radius: 12px;  /* Increased from 9px for more roundness */
    font-family: var(--mediumfont);

    font-size: var(--font_em_6);
    text-align: center;  /* Centers text */
    display: inline-block;  /* Makes it behave like a badge */
    box-sizing: border-box;  /* Ensures padding is included in size */
    cursor: pointer;
    vertical-align: middle;
    background-color: var(--sManual_yellow_highlight);
}

/* !!! ===============================================================================================================*/
/* !!! LANDING_TABS  */
/* ===================================================================================================================*/
/* Tabbed landing: one category active at a time, dense responsive grid below.
   Tabs sit over the dark hero photo, so the inactive/active color contrast is
   tuned for that surface (light text on dark image). The single red hairline
   under the active tab uses --monconred so it threads with the rest of the
   app's filet-rouge accent (h2::before, etc.). */

.landing_tabs_strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15em;
    align-items: flex-end;
    margin-bottom: 1.25em;
    padding-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.landing_tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.5em 0.9em 0.55em;
    margin: 0;
    color: rgba(230, 230, 230, 0.55);
    font-family: var(--headingfont);
    font-size: var(--font_em_4A);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: baseline;
    gap: 0.45em;
    line-height: 1.1;
    transition:
        color var(--button-link-transition-duration) ease-in-out,
        border-color var(--button-link-transition-duration) ease-in-out,
        background-color var(--button-link-transition-duration) ease-in-out;
    margin-bottom: -1px; /* overlap parent border so active hairline sits on it */
}

.landing_tab:hover {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.06);
}

.landing_tab.active {
    color: var(--text_color_dark);
    border-bottom-color: var(--monconred);
}

.landing_tab_count {
    font-family: var(--tablefont_mono);
    font-size: var(--font_em_5A);
    color: rgba(230, 230, 230, 0.55);
    letter-spacing: 0;
}

.landing_tab.active .landing_tab_count {
    color: var(--monconred);
}

.landing_tab:hover .landing_tab_count {
    color: rgba(255, 255, 255, 0.85);
}

.landing_grids_container {
    width: 100%;
}

/* Dense responsive grid: cells morph from 5 cols on wide screens down to 2 on
   narrow ones. minmax(180px, 1fr) keeps tiles legible without tiny stragglers. */
.landing_grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 8px;
    width: 100%;
}

/* !!! ===============================================================================================================*/
/* !!! TEXT_ELEMENTS  */
/* ===================================================================================================================*/

/* !!! ________H1_THRU_H6 */

h1, h2, h3, h4, h5, h6 {
    text-align: left;
    margin-top: 0.75em;
    margin-bottom: 0;
    font-Family: var(--headingfont);
    color: var(--text_dark);
}

h1 {
    font-size: var(--font_em_1);
    background-clip: text;
    color: var(--text_dark);
    margin-top: 0.5em;
}

#v3_manual_div h1 {
    margin-top: 0;
}

#manual_div_legacy h1 {
    margin-top: 0;
}

.card.title h1 {
    margin-top: 0.25em !important;
    margin-bottom: 0.25em !important;
    letter-spacing: -0.02em;
    color: var(--text_dark) !important;
}

h2 {
    font-size: var(--font_em_2);
}

/* Red hairline above page-level H2s — the "filet rouge" that threads brand
   through every section without adding chrome. Scoped to page content so
   navbar/drawer/card H2s stay clean (cards already have their own heading
   treatments, and stacking rails inside warning/disabled cards would muddle
   those semantic states). */
#page-content h2::before,
.main-container h2::before {
    content: "";
    display: block;
    width: 32px;
    height: 2px;
    background-color: var(--monconred);
    border-radius: 1px;
    margin-bottom: 0.4em;
}

.card h2::before,
.card-dashed h2::before,
.card.warning h2::before,
.card.disabled h2::before,
.card.title h2::before,
.card.nav h2::before,
.PT_navbar h2::before,
.modal h2::before,
.mantine-Drawer h2::before,
.section-nav-fab-root h2::before,
.fixed-section-nav h2::before {
    content: none;
}

h4 {
    font-size: var(--font_em_3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.85em;
    color: var(--text_dark);
}

.card.warning h4 {
    color: var(--monconred);
}

h5 {
    font-size: var(--font_em_4);
    margin-bottom: 0.4em;
    color: var(--text_dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sManual_doc_links_container h5 {
    margin-bottom: 0;
    margin-top: 0.25em;
}

h6 {
    font-size: var(--font_em_5);
    margin-bottom: 0;
}

/* !!! ________P */

P {
    font-size: var(--font_em_5);
    font-family: var(--textfont);
    word-break: normal;
    margin: 0;
    margin-bottom: 0.2em;
    padding: 0;
}

P.mono {
    font-family: var(--tablefont_mono);
    font-size: var(--font_em_5);
}

/* !!! ________span_1_thru_span_2 */

.span_1 {
    font-size: var(--font_em_4A);
    font-family: var(--textfont);
    color: var(--text_dark);
    margin: 1px 0 0 0;
    padding: 2px 0 1px;
    display: inline-block;
}

.card.warning .span_1 {
    color: var(--monconred);
}

.span_2 {
    font-size: var(--font_em_4A);
    font-family: var(--headingfont);
    color: var(--text_dark);
    margin: 1px 0 0 0;
    padding: 2px 0 1px;
    display: inline-block;
}

.card.warning .span_2 {
    color: var(--monconred);
}

.span_3 {
    display: block;
}

/* !!! ________Info_grid */

.info_grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.info_row {
    display: grid;
    grid-template-columns: 50% auto;
    align-items: center;
    margin-bottom: 0.15em;
}

.grid_label {
    font-family: var(--headingfont);
    font-size: var(--font_em_5);
    color: var(--text_dark) !important;
    letter-spacing: 0.04em;
    text-align: left;
    padding-right: 1em;
    display: inline-block;  /* Need this for width to work on span */
    max-width: 150px;       /* Adjust to your preference */
    overflow: hidden;
    white-space: nowrap;    /* Prevents text wrapping */
    text-overflow: ellipsis; /* Optional: adds ... when text is cut */
}

.grid_value {
    font-family: var(--textfont);
    font-size: var(--font_em_5);
    color: var(--text_dark) !important;
    text-align: left;
}

/* !!! ________list_grid */

.list_grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    font-size: var(--font_em_5);
    overflow: hidden;
    white-space: nowrap;    /* Prevents text wrapping */
    text-overflow: ellipsis; /* Optional: adds ... when text is cut */
    color: var(--text_dark);
    padding-right: 0.5em;

}

/* !!! ________Misc */

.nav_menu_title {
    /* color: var(--text_dark); */
    color: var(--monconred);
    font-family: var(--headingfont);
    font-size: var(--font_em_3);
    margin-bottom: 0.1em;
}

.modal-title {
    font-family: var(--headingfont);
    font-size: var(--font_em_3);
    color: var(--text_dark);
}

B {
    font-family: var(--headingfont);
}

.list-group-item {
    font-family: var(--textfont);
    color: var(--text_dark) !important;
    background-color: transparent !important;
    border-color: var(--pt-border-soft) !important;
    font-size: var(--font_em_5A);
    word-break: normal;
}

/* !!! ________Revision_Date */

.revision_date {
    color: var(--gray-300);
    padding: 0;
    font-family: var(--textfont);
    font-size: var(--font_em_6);
    cursor: pointer;
    margin-bottom: 1em;
}
.revision_date:hover {
    cursor: default;
}

.sManual_doc_links_container .revision_date {
    margin-bottom: 0;
}

/* !!! ===============================================================================================================*/
/* !!! TOOLTIP  */
/* ===================================================================================================================*/

.tooltip1 {
    background-color: var(--gray-750);
    color: var(--text_color_dark);
    font-family: var(--tablefont);

    font-size: var(--font_em_4);
    padding: 1em;
    border-radius: 5px;
    z-index: 9999;
}

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

.card {
    font-size: var(--font_em_3);
    position: relative;
    text-align: left;
    min-width: 100px;
    overflow-wrap: break-word;
    overflow: hidden;
    word-wrap: break-word;
    word-break: break-all;
    white-space: pre-wrap;
    margin-bottom: 1em;
    padding: 0 0.8em 1.2em;
    background-color: var(--pt-body);
    border-radius: 0.7em;
    /* Alt palette: flat UI, no drop shadows */
    box-shadow: none;
    color: var(--text_dark);
    display: flow-root;
}

.card.level2 {
    background-color: var(--gray-060);
    box-shadow: none;

}

/* Nav cards: flat light-gray fill */
.card.nav,
.card.level2.nav {
    font-size: var(--font_em_3A);
    margin-bottom: 1em;
    background-color: var(--pt-body-light) !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

/* Regular cards (non-nav, non-warning): match nav card fill, no border */
.card:not(.nav):not(.warning),
.card.level2:not(.nav):not(.warning) {
    background-color: var(--pt-body-light) !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.card.warning {
    font-size: var(--font_em_3A);
    margin-bottom: 1em;
}

/* Dashed cards: keep dashed cue, but colors come from the unified
   disabled-state tokens so these always match .card.disabled and
   the .NOTACTIVE ops-chart surfaces. */
.card-dashed {
    background-color: var(--pt-disabled-bg) !important;
    border: 1px dashed var(--pt-disabled-border) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--pt-disabled-text) !important;
}

.card-dashed h4,
.card-dashed .grid_label,
.card-dashed .grid_value {
    color: var(--pt-disabled-text) !important;
}

/* !!! ===============================================================================================================*/
/* !!! DOC_LINKS  */
/* ===================================================================================================================*/

.doc_link {
    font-size: var(--font_em_4A);
    font-family: var(--mediumfont);
    display: inline-flex;
    text-align: left;
    justify-content: left;
    height: 10em;
    width: 8em;
    padding: 0.5em;
    margin: 0.5em;
    background-color: var(--gray-050);
    border: 1px solid var(--pt-border);
    border-radius: 0.5em;
    text-decoration: none;
    transition-duration: var(--sManual_transition_duration) !important;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
    cursor: default;
}

.doc_link:visited {
    text-decoration: none !important;
    border-radius: 18px;
    cursor: pointer;
}

.doc_link:hover {
    border-radius: 16px !important;
    cursor: pointer !important;
    background-color: var(--gray-050);
    box-shadow: var(--shadow-hover-soft);
    transition-duration: var(--sManual_transition_duration) !important;
}

a.doc_link {
    text-decoration: none !important;
}

.doc_link_container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

/* SOP page only (scoped to .card.sop so the Site Response doc tiles are
   untouched): center the attachment tile on the line and let its
   filename wrap + shrink a touch instead of clipping with an ellipsis. */
.card.sop .doc_links_container {
    display: flex;
    justify-content: center;
    margin-left: 0;
}

.card.sop .doc_link {
    font-size: var(--font_em_5);
    text-align: center;
    justify-content: center;
    align-items: center;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-overflow: clip;
}

/* !!! ===============================================================================================================*/
/* !!! SAFETY_MANUAL  */
/* ===================================================================================================================*/

/* Styling for TOC */
.toc-children {
    padding-left: 20px;
    transition: all var(--button-link-transition-duration) ease;
}

/* Chevron styling */
.toc-chevron {
    display: inline-block;
    width: 16px;
    text-align: center;
    transition: transform var(--button-link-transition-duration) ease;
}

.fa-caret-down {
    transform: rotate(90deg);
}

/*-----------------Cards-----------------*/
.card.sManual {
    padding-top: 1em;
    padding-bottom: 1.5em;
    color: var(--text_dark) !important;
}

.card.sManual h4 {
    font-size: var(--font_em_3);
    margin-top: 0;
    margin-bottom: 0;
}

.card.sManual.toc {
    transition: all var(--button-link-transition-duration) ease !important;
}

/*Common styles for all TOC links */
.tocLink {
    text-decoration: none !important;
    cursor: pointer;
    color: var(--text_dark) !important;
    transition: var(--button-link-transition);
    font-size: var(--font_em_5A);
}

/* Prevents color changes for visited links */
.tocLink:visited {
    text-decoration: none !important;
    color: var(--text_dark) !important;
}

/*-------------ToolTip---------------*/

.sManual_tooltip {
    font-family: var(--textfont);

    margin: 1rem;
    font-size: var(--font_em_4A);
    padding: 0.5rem;
}

/* Target the inner content where your text actually lives */
.sManual_tooltip .tooltip-inner {
    background-color: var(--gray-025) !important;
    color: var(--text_dark) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--pt-border);

    /* Add these to fix the sizing issue */
    max-width: 300px !important;
    width: max-content !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    text-align: left !important;

    /* Ensure proper padding */
    padding: 8px 12px !important;
    border-radius: 6px !important;
    box-shadow: var(--sManual_box_shadow);
    margin-left: 50%;

}

/* !!! ________Badges */

.sManual_badges_container {
    display: inline-block;
}

.sManual_badge {
    font-size: var(--font_em_5A) !important;
    padding: 1px 5px !important;
    border-radius: 10px !important;
    color: var(--text_dark) !important;
    display: inline-block !important;
    background-color: var(--gray-050);
    text-align: center !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    margin-left: 3px !important;
    margin-bottom: 0 !important;
    border: 0.5px solid var(--gray-500) !important;
    font-family: var(--tablefont) !important;
}

.sManual_badge.source {
    background-color: var(--sManual_yellow_highlight);
}
.sManual_badge.source.Old_Manual {
    background-color: var(--mist);
}

.sManual.highlight {
    background-color: var(--pt-accent-light);
}

.highlight {
    background-color: var(--pt-accent-light);
    font-family: var(--headingfont);
}

.sManual_modal_text {
    font-size: var(--font_em_3);
    font-family: var(--textfont);

}

.sManual_flex_row {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

/* !!! ________Numbers */

.sManual_number {
    font-family: var(--textfont);
    color: var(--gray-400);
    letter-spacing: -0.10em;
}
.sManual_number.type1 {
    color: var(--text_dark);
}
.sManual_number.type2 {
    color: var(--text_dark);
}
.sManual_number.type3 {
    color: var(--text_dark);
}
.formatted-numerical-code {
    white-space: nowrap;
    font-family: var(--textfont);
}

/* Number parts of the code */
.code-number-part.type1, .code-number-part.type2, .code-number-part.type3 {
    font-family: var(--tablefont_mono_bold) !important;
    color: var(--text_dark);
}
.code-number-part.type4, .code-number-part.type5, .code-number-part.type6 {
    font-family: var(--tablefont_mono_light) !important;
    color: var(--gray-300);
}

.sManual_toc_num.type1 {
    font-family: var(--tablefont_mono_bold);
}

.sManual_toc_num.type2 {
    font-family: var(--tablefont_mono) !important;
}

/* Periods in the code */
.code-period {
    margin: 0 -0.05em;
    font-family: var(--textfont);
    color: var(--gray-400);
}

/* !!! ________Special_text */

.definition_highlight {
    color: var(--text_dark);
    font-family: var(--mediumfont);
    border-bottom: var(--sManual_link_bottom_border_2);
}

.legend_definition {
    border-bottom: var(--sManual_link_bottom_border_2);
}

.topic_highlight {
    font-family: var(--mediumfont);
}

.direct_quote_highlight {
    font-family: var(--textfont_italic);
}

/*--------------Legend----------------------*/
.legend_content {
    font-family: var(--textfont);
    font-size: var(--font_em_4A);
    margin-bottom: 1rem;
}

/* !!! ________Internal_Links*/

.sManual_uuid_link {
    background-color: transparent;
    display: inline-block;
    transition: var(--button-link-transition) !important;
    margin-left: 5px;
    font-family: var(--textfont);
    text-decoration: none;
    border-bottom: var(--sManual_link_bottom_border_3);
    height: auto !important;
    padding-bottom: 0;
    line-height: 1.0 !important;
}

.legend_uuid_link {
    border-bottom: var(--sManual_link_bottom_border_3);
}

.sManual_uuid_link:hover {
    cursor: pointer;
    background-color: var(--gray-100);
    transition: var(--sManual_link_transition);
    border-bottom: var(--sManual_link_bottom_border_highlight);
}

/* !!! ________Rows */

.sManual_content_row {
    font-family: var(--textfont);
    font-size: var(--font_em_4A);
    padding-right: 3px;
}

.sManual_content_row.not_in_scopes {
    background-color: var(--sManual_yellow_highlight) !important;
}

.sManual_content_row.bulletpoint {
    margin-top: 0 !important;
}
.sManual_content_row.type1 {
    font-family: var(--headingfont);
    font-size: var(--font_em_2);
}

.sManual_content_row.type2 {
    margin-left: var(--sManual_leftMargin_2);
    font-family: var(--headingfont);
    font-size: var(--font_em_3);
    margin-top: 1.2rem;
    border-bottom: 1px solid var(--pt-border);
}

.sManual_content_row.type3 {
    margin-left: var(--sManual_leftMargin_3);
    font-family: var(--headingfont);
    font-size: var(--font_em_4);
    margin-top: 0.7rem;
}

.sManual_content_row.type4 {
    margin-left: var(--sManual_leftMargin_4);
    font-size: var(--font_em_4);
    margin-top: 0.45rem;
}

.sManual_content_row.type5 {
    margin-left: var(--sManual_leftMargin_5);
    font-size: var(--font_em_4);
    margin-top: 0.45rem;
}

.sManual_content_row.type6 {
    margin-left: var(--sManual_leftMargin_6);
    font-size: var(--font_em_4);
    margin-top: 0.45rem;
}
.sManual_content_row.type2.summary_card_modifier {
    margin-left: var(--sManual_leftMargin_1);
}
.sManual_content_row.type3.summary_card_modifier {
    margin-left: var(--sManual_leftMargin_1);
}
.sManual_content_row.type4.summary_card_modifier {
    margin-left: var(--sManual_leftMargin_2);
}
.sManual_content_row.type5.summary_card_modifier {
    margin-left: var(--sManual_leftMargin_3);
}
.sManual_content_row.type6.summary_card_modifier {
    margin-left: var(--sManual_leftMargin_4);
}

.sManual_text_line, .siteRespo_text_line {
    display: grid;
    grid-template-columns: auto 1fr; /* First column auto-sized, second takes remaining space */
    gap: 2px;
}

.sManual_row_content_wrapper {
    hyphens: auto;
    word-break: normal;
}

.sManual_content {
    line-height: 1.0rem !important;
}

.sManual_error {
    color: var(--monconred) !important;
}

.sManual_internal_note {
    color: var(--monconred);
    margin-left: 6.0rem;
    font-family: var(--tablefont);
    border-left: 6px solid var(--monconred);
    padding-left: 0.5rem;
    margin-top: 0.25rem;
}

.type1.InternalNote, .type2.InternalNote, .type3.InternalNote, .type4.InternalNote, .type5.InternalNote {
    margin-top: 3px !important;
}

.GRID {
    display: grid;
    column-gap: 4px;
    row-gap: 2px;
    align-items: start;
}

.GRID.sManual_inspection {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.GRID.sManual_permit {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.GRID.doclinks_1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    row-gap: 4px;
}
.GRID.doclinks_2 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 4px;
}

/* !!! ________Search */

.sManual_search_highlight {
    background-color: var(--lightyellow);
}

.sManual_search_content {
    font-family: var(--textfont);
    font-size: var(--font_em_4A);
}

.sManual_search_header {
    font-family: var(--headingfont);
    font-size: var(--font_em_2B);
}

.sManual_search_link {
    font-family: var(--headingfont);
    font-size: var(--font_em_4A);
}

/* !!! ________Flags */

.sManual_flag_container {
    position: absolute;
    left: 1rem;
}

.sManual_flag {
    width: 30px;
    height: 30px;
    transform: translateY(-0.5rem);
}

.sManual_flag_mci {
    font-family: var(--headingfont);
}

/* !!! ________TOC */

.sManual_toc_row {
  margin-right: 18px;
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  border-bottom: 1px dashed var(--gray-400);
  height: 20px;
  min-height: 18px;
  max-height: 24px;
    font-size: var(--font_em_5A);
  overflow: hidden;
}

.sManual_toc_row.type1:hover {
    background-color: var(--gray-100);
}

.sManual_toc_row.type2:hover {
    background-color: var(--gray-050);
}

.sManual_toc_link {
    flex: 1;
    min-width: 25rem !important;
    white-space: nowrap !important;
    display: inline-block;
}

.sManual_toc_link.type1 {
    font-family: var(--headingfont);
    margin-left: var(--sManual_leftMargin_2);
    font-size: var(--font_em_4A);
}

.sManual_toc_link.type2 {
    font-family: var(--tablefont);
    margin-left: var(--sManual_leftMargin_3);
    font-size: var(--font_em_4A);
}

/* SOP-only: section titles in the Table of Contents are slightly larger than
   the shared safety-manual TOC sizing. */
.sop.toc .sManual_toc_link.type1 {
    font-size: var(--font_em_4);
}

.sManual_toc_link.type2.special {
    color: var(--bedrock) !important;
}

.sManual_toc_link.type3 {
    font-family: var(--textfont);
    margin-left: var(--sManual_leftMargin_4);
    font-size: var(--font_em_4A);
}

.sManual_toc_date {
    width: 200px;
    text-align: left;
    color: var(--text_dark);
    font-family: var(--tablefont_mono);
}

.sManual_toc_container {
    margin-left: 36px;
    margin-right: 24px;
}

.sManual_status_container {
    width: 20rem !important;
    min-width: 20rem !important;
    display: inline-block;
    text-align: left;
}

.sManual_horizontal_spacer {
    width: 5rem !important;
    min-width: 5rem !important;
    display: inline-block !important;
}

.sManual_status {
    font-family: var(--textfont);

    border: 1px solid var(--pt-border);
    border-radius: 8px;
    padding: 1px 6px;
    display: inline-block;
    font-size: var(--font_em_5A);
}

.sManual_status.Review {
    background-color: var(--gray-900);
    color: var(--text_color_dark);
}

.sManual_status.In.Progress {
    background-color: var(--gray-100);
}

.sManual_status.Gabi {
    background-color: var(--lightblue);
}
.sManual_status.Gulay {
    background-color: var(--lightpurple);
}
.sManual_status.Alphonse {
    background-color: var(--mist);
}

.btn.btn-primary.sManual_backtotoc_button,
.btn.btn-primary.ml-auto {
    font-size: var(--font_em_4A);
    font-family: var(--headingfont);
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid var(--pt-border);
    color: var(--text_color_dark) !important;
    background-color: var(--button_color_dark);
    transition: var(--button-link-transition);
    margin-top: 1rem;
}

.btn.btn-primary.sManual_backtotoc_button:hover,
.btn.btn-primary.ml-auto:hover {
    color: var(--text_dark) !important;
    cursor: pointer;
    border-radius: 16px;
    box-shadow: var(--shadow-hover-soft);
    background-color: transparent !important;
    border: 1px solid var(--pt-border);
}

/* !!! ________Photos */

.sManual_photo {
    height: 200px;
    max-width: 50%;
    object-fit: contain;
    margin-right: 6px;
    margin-left: 6px;
}

.sManual_photo.large {
    height: 300px;
    max-width: 50%;
}

.sManual_photo.medium {
    height: 200px;
    max-width: 50%;
}

.sManual_photo.small {
    height: 150px !important;
    max-width: 50%;
}

.sManual_photo_row {
    margin-bottom: 12px;
    margin-top: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
}

/* !!! ________Definition_Links*/

/* Enhanced CSS for Definition Links */
.sManual_definition_link {
    border-bottom: var(--sManual_link_bottom_border);
    transition: var(--sManual_link_transition);
    margin-left: 0 !important;
    height: auto;
}

.legend_definition_link {
    border-bottom: var(--sManual_link_bottom_border);
}

.sManual_definition_link_to_original {
    border-bottom: var(--sManual_link_bottom_border_4);
    transition: var(--sManual_link_transition);
    margin-left: 6px !important;
    height: auto;
}

.link_to_original {
    border-bottom: var(--sManual_link_bottom_border_4);

}

.sManual_definition_link:hover {
    border-bottom: var(--sManual_link_bottom_border_highlight);
    background-color: var(--gray-100);
    transition: var(--sManual_link_transition);
}

.sManual_definition_reference_link {
    border-bottom: var(--sManual_link_bottom_border);
    transition: var(--sManual_link_transition);
}

.sManual_definition_reference_link:hover {
    border-bottom: var(--sManual_link_bottom_border_highlight);
    background-color: var(--gray-100);
    transition: var(--sManual_link_transition);
}
.sManual_content_row:has(.sManual_inserted_definition) {
    border-right: var(--sManual_border_thick) dotted var(--gray-900) !important;
}

.sManual_definition_link_to_original:hover {
    border-bottom: var(--sManual_link_bottom_border_highlight);
    background-color: var(--gray-100);
    transition: var(--sManual_link_transition);
}

/* Animated highlight effect when jumping to a definition */
:target + .sManual_content_row {
    animation: definition-target-fade 4s ease;
}

@keyframes definition-target-fade {
    0%, 10%, 30% {
        background-color: var(--sManual_yellow_highlight);
    }
    70%, 100% {
        background-color: transparent;
        box-shadow: none;
    }
}

/* Make the definition highlight stronger when it's the target */
:target + .sManual_content_row .definition_highlight {
    background-color:  var(--sManual_yellow_highlight);
    border-bottom: 1px solid var(--gray-900);
    animation: definition-text-pulse 4s ease;
}

@keyframes definition-text-pulse {
    0%, 10%, 30% {
        background-color:  var(--sManual_yellow_highlight);
    }
    70%, 100% {
        background-color: var(--sManual_yellow_highlight);
        box-shadow: none;
    }
}

/* Add a little animation to make it clear when a user has followed a link */
.sManual_content_row:target {
    animation: highlight-fade 2s ease;
}

@keyframes highlight-fade {
    0% {
        background-color:  var(--sManual_yellow_highlight);
    }
    100% {
        background-color: transparent;
    }
}

/* !!! ________Warnings */

.sManual_warning_header {
    color: var(--monconred);
    margin: 0 0 12px 0;
    font-size: var(--font_em_3);
    padding-top: 0.5em
}

.sManual_warning_item {
    font-family: var(--textfont);
    font-size: var(--font_em_4);
    margin-bottom: 0.35rem;
}

.sManual_warning_section_link {
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid var(--monconred);
    transition: var(--button-link-transition);
    margin: 0 4px;
}

.sManual_warning_section_link:hover {
    border-radius: 16px;
    box-shadow: var(--shadow-hover-soft);
}

.link-separator {
    color: var(--monconred);
}

.sManual_duplicate_warning {
    background-color: var(--monconred-tint);
    color: var(--monconred);
    font-size: var(--font_em_3A);
    padding: 4px 8px;
    margin-top: 10px;
    border-radius: 4px;
    border-left: 3px solid var(--monconred);
    display: flex;
    align-items: center;
}

/* Style the warning card at the top — red border + red text, all tied to --monconred */
.card.warning {
    border: 1px solid var(--monconred) !important;
    background: var(--pt-body-light) !important;
    color: var(--monconred) !important;
    border-radius: 8px !important;
    word-break: normal;
    font-size: var(--font_em_4A);
}

.card.warning,
.card.warning h1,
.card.warning h2,
.card.warning h3,
.card.warning h4,
.card.warning h5,
.card.warning h6,
.card.warning p,
.card.warning span,
.card.warning label,
.card.warning li,
.card.warning a,
.card.warning div {
    color: var(--monconred) !important;
}

/* Improve linking to duplicates */
.sManual_content_row.has-duplicate-warning:target + .sManual_content_row {
    animation: duplicate-definition-flash 4s ease;
}

@keyframes duplicate-definition-flash {
    0%, 15%, 30% {
        background-color: rgba(212, 53, 28, 0.15);
    }
    70%, 100% {
        background-color: transparent;
    }
}

/* !!! ________Doc_Links */

.sManual_doc_link_new {
    display: flex;
    text-align: left;
    margin: 0;
    height: 2.5em;
    text-decoration: none !important;
    color: var(--text_dark);
    background-color: var(--gray-100);
    font-family: var(--headingfont);
    font-size: var(--font_em_5A);
    cursor: default;
    transition-duration: var(--sManual_transition_duration) !important;
    border: 1px solid var(--sManual_accent_color);
    border-radius: 6px;
    padding: 0.45em;
    word-break: normal;
}
.sManual_doc_link_new.spanish_modifier::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;  /* Adjust size as needed */
    height: 12px; /* Adjust size as needed */
    background-color: var(--sManual_accent_color); /* Choose your color */
    clip-path: polygon(100% 0%, 0% 0%, 100% 100%);
    border-top-right-radius: 6px; /* Match the parent's border-radius */
    transition-duration: var(--sManual_transition_duration) !important;
}

.sManual_doc_link:visited {
    text-decoration: none !important;
    border-radius: 18px;
    cursor: pointer;
}

.sManual_doc_link_new:hover {
    border-radius: 16px !important;
    cursor: pointer !important;
    background-color: var(--gray-050);
    box-shadow: var(--shadow-hover-soft);
    transition-duration: var(--sManual_transition_duration) !important;
}

.sManual_doc_link_new.spanish_modifier:hover::after {
    border-top-right-radius: 16px; /* Match the hover border-radius */
    transition-duration: var(--sManual_transition_duration) !important;
}

a.sManual_doc_link {
    text-decoration: none !important;
}

.sManual_doc_icon_container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
    margin: auto;
    overflow: hidden;
}

.sManual_doc_link_group_container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-top: 0.50rem;
}

.sManual_doc_link_group_container.type3 {
    margin-left: var(--sManual_leftMargin_3);
}
.sManual_doc_link_group_container.type4 {
    margin-left: var(--sManual_leftMargin_4);
}
.sManual_doc_link_group_container.type5 {
    margin-left: var(--sManual_leftMargin_5);
}
.sManual_doc_link_group_container.type6 {
    margin-left: var(--sManual_leftMargin_6);
}
.sManual_doc_link_container {
    display: inline-block;
    margin-left: 1rem;
    margin-bottom: 0.75rem;
}

.sManual_doc_link_container_new {
    display: inline-block;
    margin-left: 0;
    margin-bottom: 0;
}

.doc_icon {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sManual_doc_text {
    height: 2.25rem;
    font-family: var(--mediumfont);

}

.sManual_doc_text_new {
    display: inline-block;
}

.sManual_doc_links_container {
    margin-right: 0;
    background-color: var(--gray-060);
    padding-left: 0.5em;
    padding-right: 0.5em;
    padding-bottom: 0.5em;
    border-radius: 12px;
    position: relative;
}

/* !!! ________Personnel_Links */

.sManual_personnel_link {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 16em; /* Changed from height to min-height */
    margin-left: 0;
    margin-bottom: .2em;
    text-align: center;
    text-decoration: none !important;
    color: var(--text_dark);
    font-family: var(--headingfont);
    font-size: var(--font_em_5A);
    cursor: default;
    transition-duration: var(--sManual_transition_duration) !important;
    word-break: keep-all;
    position: relative;
    z-index: 0;
    isolation: isolate;
}

.sManual_personnel_image_container {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 12px;
    transition-duration: var(--sManual_transition_duration) !important;
    overflow: hidden; /* Prevent image overflow */
    position: relative;
    z-index: 0;
    isolation: isolate;
    border: 1px solid var(--sManual_accent_color);
}

.sManual_personnel_image_container:hover {
    cursor: pointer !important;
    background-color: var(--gray-050);
    box-shadow: var(--shadow-hover-soft);
    transition-duration: var(--sManual_transition_duration) !important;
}

.sManual_personnel_image_container.ghosted {
    overflow: visible;
}

/* Ghosts */
.sManual_personnel_image_container.ghosted::before,
.sManual_personnel_image_container.ghosted::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border-right: 1px solid var(--pt-border);
  border-bottom: 1px solid var(--pt-border);
  z-index: -3;
  pointer-events: none;
  opacity: .35;
}

.sManual_personnel_image_container.ghosted::before { transform: translate(5px,5px); opacity:.5; }
.sManual_personnel_image_container.ghosted::after  { transform: translate(9px,9px); }

/* Default for horizontal images */
.sManual_personnel_image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0;
    position: relative;
    z-index: 2;
    background-color: var(--gray-100);
    border-radius: 12px;
    transition-duration: var(--sManual_transition_duration) !important;
}
.sManual_personnel_image:hover {
    background-color: var(--gray-025);
    transition-duration: var(--sManual_transition_duration) !important;
}
.sManual_personnel_image_cover1 {
  position: relative;
  background-color: var(--gray-025);  /* solid bg */
  border-radius: inherit;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  z-index: 1; /* above ghosts, below the img */
}

.sManual_personnel_text_new {
    margin-top: 0.8em;
    font-size: var(--font_em_2C);
    min-height: 2em;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sManual_image_content:hover {
    pointer-events: none !important;
}

.sManual_image_content.within_modal {
    width: 200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.sManual_external_link_new {
    border: 1px solid var(--sManual_accent_color);
    border-radius: 8px;
    padding: 2px 6px;
    background-color: var(--gray-100);
    transition-duration: var(--sManual_transition_duration) !important;
    font-family: var(--mediumfont);
    font-size: var(--font_em_5);
    margin-bottom: 0.5em;
}

.sManual_external_link_new:hover {
    border-radius: 12px;
    box-shadow: var(--shadow-hover-soft);
    border: 1px solid var(--pt-border);
    background-color: var(--gray-050);
}

/* !!! ________Grid_Tables */

.sManual_gridtable_item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    background-color: var(--gray-060);
    color: var(--text_dark);
    margin-left: 0;
    margin-bottom: 0.25em;
    font-family: var(--textfont);
    font-size: var(--font_em_5A);
    border-radius: 6px;
    padding: 0.45em;
    word-break: normal;
    height: 3.5em;
}

.sManual_gridtable_item.main {
    background-color: var(--gray-100);
    font-family: var(--headingfont);
    border: 1px solid var(--sManual_accent_color);
    transition-duration: var(--sManual_transition_duration) !important;
}

.sManual_gridtable_item.main.link:hover {
    border-radius: 12px;
    box-shadow: var(--shadow-hover-soft);
    border: 1px solid var(--sManual_accent_color);
    cursor: pointer !important;
    background-color: var(--gray-050);
    transition-duration: var(--sManual_transition_duration) !important;
}

.sManual_gridtable_item.header {
    background-color: transparent;
    font-family: var(--headingfont);
    font-size: var(--font_em_5A);
    margin-bottom: 0.4em;
    padding-top: 0;
    color: var(--text_dark);
    border-bottom: 1px solid var(--pt-border);
    border-radius: 0;
    height: unset;
}

.sManual_inspection_type_text {
    font-family: var(--textfont);
}

.sManual_inspection_type_text.bold {
    font-family: var(--headingfont) !important;
}

/* Safety Manual Top 10 */
/*------------------------------------------------------------------------------*/

.sManual_top10_content_wrapper {
    display: flex !important;
    align-items: flex-start;
    width: 100%;
    font-family: var(--textfont);

}

.sManual_top10_content_wrapper.nolinks {
    font-size: var(--font_em_4A);
}

.sManual_top10_line {
    display: flex !important;
    font-family: var(--textfont);
    font-size: var(--font_em_4A);
    margin-bottom: 1em;
    width: 100%;
    word-break: normal;
}

.sManual_top10_number {
    margin-right: 0.5em;
    font-family: var(--tablefont_mono_bold);
    flex-shrink: 0;
}

/* The div containing the line spans needs to allow inline flow */
.sManual_top10_line > div:last-child {
    display: inline;
}

/* Keep spans inline */
.sManual_top10_content,
.topic_highlight_ss,
.definition_highlight,
.direct_quote_highlight {
    display: inline !important; /* Change from inline-block to inline */
}

.topic_highlight_ss {
    font-family: var(--mediumfont);
}

.sManual_link_container {
    display: flex;
    flex-direction: column !important;
}

.PILL {
    font-family: var(--textfont);
    display: inline-block;
    margin-bottom: 2px;
    margin-right: 4px;
    border: 1px solid var(--gray-400);
    border-radius: 12px;
    hyphens: auto;
    word-break: normal;
    transition-duration: var(--sManual_transition_duration) !important;
    text-overflow: ellipsis;
    height: 0.6rem;
    overflow: hidden;
    white-space: nowrap;
    max-width: 100%;
    font-size: var(--font_em_6) !important;
    padding: 2px 8px 2px 8px !important;
    line-height: 0.6rem !important;
}

.PILL.doclink {
    color: var(--text_dark);
    border: 1px solid var(--sManual_accent_color);
}

.PILL.doclink:hover {
    border-radius: 16px !important;
    cursor: pointer !important;
    background-color: var(--gray-050);
    box-shadow: var(--shadow-hover-soft);
    border: 1px solid var(--sManual_accent_color);
}

.PILL.log {
    background-color: var(--opsChart_PM_color);
}
.PILL.tag {
    background-color: var(--opsChart_SU_color);
}

.doccard {
    position: relative;
}

.doccard.emphasis {
    border: 3px solid var(--pt-border);
}

.sManual_summarycard_title {
    font-family: var(--headingfont);
    font-size: var(--font_em_3);
    color: var(--text_dark);
    margin-top: 0;
    margin-bottom: 0;
    hyphens: auto;
    word-break: break-word; /* Optional: breaks long words if needed */
    overflow-wrap: break-word; /* Optional: modern alternative to word-wrap */
}
.sManual_summarycard_subtitle_line {
    display: inline-flex;
    margin-top: 0.5em;
    margin-bottom: 1em;
    align-content: center;
}

.sManual_summarycard_subtitle_1 {
    font-family: var(--headingfont);
    font-size: var(--font_em_3);
    color: var(--text_dark);
    hyphens: auto;
    word-break: break-word; /* Optional: breaks long words if needed */
    overflow-wrap: break-word; /* Optional: modern alternative to word-wrap */
    display: inline-flex;
}
.sManual_summarycard_subtitle_2 {
    font-family: var(--headingfont);
    font-size: var(--font_em_3);
    color: var(--text_dark);
    hyphens: auto;
    word-break: break-word; /* Optional: breaks long words if needed */
    overflow-wrap: break-word; /* Optional: modern alternative to word-wrap */
    display: inline-flex;
}

/* Safety Manual Card Rev Date */
/*------------------------------------------------------------------------------*/

.sManual_doctype_section_icon {
    height: calc(100% - 1rem); /* Full height minus margin */
    max-height: 5em;
    max-width: calc(100% - 1rem); /* Prevent horizontal overflow */
    position: absolute;
    right: 0.5rem;
    top: 50%; /* Center vertically */
    transform: translateY(-50%); /* Offset by half the element's height */
    object-fit: contain; /* Maintain aspect ratio while fitting */
    box-sizing: border-box;
}

.smaller_grid_container {
    max-width: 75%;
    padding-right: 24px;
}

.accent_text1 {
    font-family: var(--headingfont);
    font-size: var(--font_em_5);
    color: var(--text_dark);
    display: block;
    text-align: right;
}

.tabletext1 {
    font-family: var(--tablefont);
    font-size: var(--font_em_6);
    text-align: left;
    display: inline;
    color: var(--text_dark);
}

/* !!! ===============================================================================================================*/
/* !!! INPUTS  */
/* ===================================================================================================================*/

/* !!! ________Input2 */

.input2 {
    height: 20px;
    text-align: left;
    color: var(--text_dark);
    font-size: var(--font_em_4);
    font-family: var(--tablefont);
    padding: 2px 0 0 5px;
    border-radius: 8px;
    border: 1px solid var(--pt-border);
    margin-left: 0;
    margin-right: 0;
    margin-Top: 4px;
    transition: all var(--button-link-transition-duration) ease-in-out;
    background-color: transparent;
}

.dropdown1.has-options .Select-control {
    background-color: transparent !important;
}

.dash-input.input2:focus {
    background-color: transparent !important;
}
.dash-input.input2:not([value=""]) {
    background-color: transparent !important;
}
/* For inputs with values */
.dash-input.input2[value]:not([value=""]) {
    background-color: transparent !important;
}

/* !!! ________Input_tpb_jobname */

.input_tpb_jobname {
    height: 20px;
    color: var(--text_dark);
    font-size: var(--font_em_5A);
    font-family: var(--textfont);
    padding: 2px 0 0 5px;
    border-radius: 8px;
    border: 1px solid var(--pt-border);
    margin-left: 0;
    margin-right: 0;
    margin-Top: 4px;
    transition: all var(--button-link-transition-duration) ease-in-out;
    background-color: transparent;
    float: right;
    width: 140px;
}

/* !!! ________Input4 */

.input4 {
    height: 16px;
    text-align: right;
    color: var(--text_dark);
    font-size: var(--font_em_5A);
    font-family: var(--textfont);
    padding: 1px 2px;
    border-radius: 5px;
    border: 2px solid var(--pt-border);
    margin: 2px 0;
    display: inline-flex;
    background-color: transparent;
}

.dash-dropdown {
    border-radius: 8px;
}

/* !!! ===============================================================================================================*/
/* !!! SLIDER  */
/* ===================================================================================================================*/

.mantine-Slider-root {
    margin-bottom: 20px;
}

.mantine-Slider-track {
    background-color: rgba(30, 33, 36, 0.12) !important;
}

.mantine-Slider-bar {
    background-color: var(--button_color_dark) !important;
}

.mantine-Slider-thumb {
    border-color: var(--button_color_dark) !important;
    border-width: var(--lw-1);
    background-color: var(--pt-text) !important;
}

.mantine-Slider-mark {
    border-color: var(--pt-border);
}

/* !!! ===============================================================================================================*/
/* !!! DATEPICKER  */
/* ===================================================================================================================*/

.DateInput, .DateInput_1 {
    border-radius: 4px 0 0 4px !important;
}

.DateInput_input, .DateInput_input_1 {
    Height: 34px !important;
    Width: 100% !important;
}

.SingleDatePickerInput {
    border-radius: 4px 0 0 4px;
    width: 100% !important;
}

.SingleDatePicker_1 {
    width: 100% !important;
}

/* !!! ===============================================================================================================*/
/* !!! DATE_RANGE_PICKER  */
/* ===================================================================================================================*/

.SingleDatePickerInput {
    border: 0 solid;
    background-color: transparent;
}

.DateRangePicker {
    color: var(--text_dark);
    background-color: transparent;
}

.DateRangePickerInput {
    color: var(--text_dark);
    border: solid 0;
}

.DateRangePicker.DateInput_1 {
    background-color: transparent;
}

.DateInput_input {
    border: solid 1px var(--pt-border);
    border-radius: 6px;
    margin-bottom: 4px;
    height: 36px;
    color: var(--text_dark);
    font-size: var(--font_em_5);
    font-family: var(--textfont);
    background-color: transparent;
}

.DateInput.DateInput_1 {
    border-radius: 14px;
    color: var(--text_dark);
    background-color: transparent;
}

.DateInput_input.DateInput_input_1 {
    background-color: transparent;
}

/* !!! ===============================================================================================================*/
/* !!! SEGMENTED_CONTROL  */
/* ===================================================================================================================*/

.mantine-SegmentedControl-root {
    border: solid 1px var(--pt-border);
    border-radius: 0.5rem;
    color: var(--text_color_dark);
    background-color: transparent !important;
    margin-bottom: 4px;
    margin-top: 0;
    align-items: center;
    max-width: 100%;
}

.mantine-SegmentedControl-active {
    background-color: transparent;
}

.mantine-SegmentedControl-label {
    color: var(--text_dark);
    font-family: var(--tablefont);

    font-size: var(--font_em_6);
    background-color: transparent;
}

/* Active segment: shared dark button token */
.mantine-SegmentedControl-labelActive {
    background-color: var(--button_color_dark) !important;
    color: var(--text_color_dark) !important;
    font-family: var(--buttonfont);

    transition: var(--pt-transition);
}

.card .mantine-SegmentedControl-labelActive {
    color: var(--text_color_dark) !important;
}

.mantine-SegmentedControl-labelActive:not(:hover) {
    background-color: var(--button_color_dark) !important;
    color: var(--text_color_dark) !important;
    font-family: var(--buttonfont);

}

.card .mantine-SegmentedControl-labelActive:not(:hover) {
    color: var(--text_color_dark) !important;
}

/* !!! ===============================================================================================================*/
/* !!! DATATABLE_CHECKBOX  */
/* ===================================================================================================================*/

.dash-select-cell input[type="checkbox"] {
    appearance: none;
    width: 15px !important;
    height: 15px !important;
    margin: 1px !important;
    border-radius: 3px !important;
    outline: none !important;
    cursor: pointer !important;
    position: relative !important;
    background-color: transparent !important;
}

.dash-select-cell input[type="checkbox"]:checked {
    color: var(--text_dark) !important;
    background-color: var(--text_dark) !important;
    border: solid 2px var(--pt-border) !important;
    transform: translateX(0em) translateY(0em) !important;
    box-shadow: 0 0 0 var(--gray-900) !important;
}

.dash-select-cell input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid var(--gray-025);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.dash-select-cell input[type="checkbox"]:hover {
    transform: translateX(-0.15em) translateY(-0.15em) !important;
    transition: all var(--button-link-transition-duration) ease-in-out !important;
    box-shadow: 3px 3px 0 var(--gray-900) !important;
    border: solid 2px var(--pt-border) !important;
}

.dash-select-cell input[type="checkbox"]:focus {
    box-shadow: none !important;
}

/* !!! ===============================================================================================================*/
/* !!! MANTINE_CHECKBOX  */
/* ===================================================================================================================*/

.mantine-Checkbox-root {
    display: inline-flex;
    margin-left: 2px;
}

.mantine-Checkbox-input {
    border: solid 2px var(--pt-border);
    background-color: transparent;
}

.mantine-Checkbox-input:hover {
    transform: translateX(-0.15em) translateY(-0.15em);
    transition: all var(--button-link-transition-duration) ease-in-out;
    box-shadow: 3px 3px 0 var(--gray-900);
    border: solid 2px var(--pt-border);
}

.mantine-Checkbox-input:checked,
.mantine-Checkbox-input:checked:hover {
    color: var(--text_dark);
    background-color: var(--text_dark);
    border: solid 2px var(--pt-border);
    transform: translateX(0em) translateY(0em);
    box-shadow: 0 0 0 var(--gray-900);
}

.mantine-Checkbox-input:checked:hover {
    transition: all var(--button-link-transition-duration) ease-in-out;
}

/* Project Summary: the per-card PDF-include checkbox on muted
   (not-yet-started) cards should read lighter gray so it matches the
   rest of that card's greyed-out treatment instead of the full-strength
   dark checkbox used on live cards. */
.card-dashed .mantine-Checkbox-input {
    border-color: var(--pt-disabled-text);
}

.card-dashed .mantine-Checkbox-input:checked,
.card-dashed .mantine-Checkbox-input:checked:hover {
    background-color: var(--pt-disabled-text);
    border-color: var(--pt-disabled-text);
}

/* Project Summary include checkboxes: kill the global checkbox hover
   nudge/shadow animation so the per-card toggle stays put on hover. */
#project_photo_grid .mantine-Checkbox-input,
#project_photo_grid .mantine-Checkbox-input:hover,
#project_photo_grid .mantine-Checkbox-input:checked:hover {
    transform: none;
    box-shadow: none;
    transition: none;
    cursor: pointer;
}

/* The clickable hit-area for the include toggle includes the Mantine
   label wrapper, so give the whole control a pointer cursor on hover. */
#project_photo_grid .mantine-Checkbox-root,
#project_photo_grid .mantine-Checkbox-labelWrapper,
#project_photo_grid .mantine-Checkbox-label {
    cursor: pointer;
}

/* !!! ===============================================================================================================*/
/* !!! CHECKLIST  */
/* ===================================================================================================================*/

.cklst {
    color: var(--text_dark);
    font-size: var(--font_em_5A);
    font-family: var(--textfont);
    margin: 2px 0;
    accent-color: var(--text_dark);
}

/* Modifier: lay the checklist's labels out as a 2-column CSS multi-column
   flow inside its container so long trade lists wrap horizontally instead
   of stacking into one tall single column. break-inside: avoid keeps each
   labelled checkbox row whole rather than getting split across columns. */
.cklst.cklst-2col {
    column-count: 2;
    column-gap: 12px;
}
.cklst.cklst-2col > label {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
}

/* !!! ===============================================================================================================*/
/* !!! DROPDOWN  */
/* ===================================================================================================================*/

.Select-control {
    border-radius: 0.5rem;
    border: 1px solid var(--pt-border) !important;
    background-color: transparent !important;
    color: var(--text_dark) !important;
    height: 20px;
    width: 175px;
    max-width: 100%;
    z-index: 1000;
}

.is-focused .Select-control {
    border-color: var(--pt-border) !important;
    box-shadow: 0 0 0 1px var(--pt-border) !important;
}

.is-pseudo-focused .Select-control {
    border-color: var(--pt-border) !important;
    box-shadow: 0 0 0 1px var(--pt-border) !important;
}

.Select-control:hover {
    cursor: pointer;
}

.Select-placeholder, .Select-menu, .Select-value, .Select-input {
    font-family: var(--textfont);
    font-size: var(--font_em_5A);
}

.Select-menu-outer {
    border-radius: 0.5rem;
    border: 1px solid var(--pt-border) !important;
    background-color: var(--pt-body) !important;
    position: absolute !important;
    z-index: 9999 !important;
}

.card .Select-menu-outer {
    background-color: var(--pt-body);
}

.Select-menu-outer.is-open {
    max-height: 600px !important;
}

.dash-dropdown .Select {
    position: relative !important;
}

/* !!! ===============================================================================================================*/
/* !!! MULTISELECT  */
/* ===================================================================================================================*/

.mantine-MultiSelect-root {
    font-family: var(--textfont);

    font-size: var(--font_em_4A) !important;
    max-width: 200px !important;
}

.card,
.card.nav,
.nav-sidebar,
.sidebar,
.mantine-MultiSelect-wrapper {
    overflow: visible !important;
}
.mantine-MultiSelect-dropdown {
    background-color: var(--pt-body-medium);
    border-color: var(--pt-border);
    z-index: 9999 !important;
}

.mantine-MultiSelect-input {
    border: 1px solid var(--pt-border) !important;
    border-radius: 0.5rem;
    background-color: transparent !important;
    color: var(--text_dark) !important;
    padding-left: 0.25em !important;
    padding-top: 0.10em !important;
    padding-bottom: 0.10em !important;
}

/* Selected tags: shared dark button token */
.mantine-MultiSelect-value {
    background-color: var(--button_color_dark) !important;
    color: var(--text_color_dark) !important;
    font-family: var(--buttonfont);

    font-size: var(--font_em_5) !important;
    padding-left: 1em !important;
    padding-right: 0.5em !important;
}

.card .mantine-MultiSelect-value {
    color: var(--text_color_dark) !important;
}

.mantine-MultiSelect-defaultValueRemove {
    color: var(--text_color_dark) !important;
}

/* !!! ===============================================================================================================*/
/* !!! CALENDAR_WIDGET (react-dates / airbnb) */
/* ===================================================================================================================*/

.CalendarMonth_caption.CalendarMonth_caption_1 {
    color: var(--text_dark);
    font-family: var(--textfont);

    z-index: 9999;
}

.CalendarDay.CalendarDay_1 {
    background-color: var(--text_dark);
    color: var(--text_color_dark);
    border: 1px solid var(--pt-border);
    z-index: 9999;
}

/* !!! ===============================================================================================================*/
/* !!! LISTS  */
/* ===================================================================================================================*/

ul {
    margin-top: 0;
    margin-bottom: 0;
    color: var(--text_dark);
    font-family: var(--textfont);
    padding-left: 2em;
    font-size: var(--font_em_4);

}

li {
    margin-top: 0;
    margin-bottom: 0;
    color: var(--text_dark);
    font-family: var(--textfont);
    word-break: normal;
    hyphens: auto;
}

/* !!! ===============================================================================================================*/
/* !!! TABLE  */
/* ===================================================================================================================*/

#SCL_table th:first-child,
#SCL_table td:first-child,
#SCL_table th:nth-child(2),
#SCL_table td:nth-child(2) {
    font-family: var(--tablefont_mono_bold);
    padding-right: 6px !important;
}

.special-font {
    font-family: var(--tablefont_mono);
}

.table-scroll-container {
    overflow-x: auto;
    width: 100%;
    display: block;
}

table {
    font-size: var(--font_em_5A);
    font-family: var(--tablefont);
    border-collapse: collapse;
    text-align: left;
    vertical-align: middle;
    line-height: 14px;
    width: 100%;
    color: var(--text_dark);
}

td.last-row-bold {
    font-family: var(--tablefont_mono_bold) !important; /* Corrected variable usage */
}

th {
    border-bottom: 1px solid var(--pt-border);
    font-family: var(--headingfont);
    padding: 0 !important;
}

td, th {
    white-space: nowrap;
    text-overflow: ellipsis;
    vertical-align: middle;
    overflow: hidden;
    padding-right: 0 !important;
}

td {
    padding: 0 !important;
}

.table tr {
    vertical-align: middle;
    padding: 0;
    margin: 0;
}

.table tr:nth-child(odd) td {
    background-color: var(--gray-150);
}

table.hover tbody tr:nth-child(odd) td {
  background-color: var(--gray-150);
}

/* Remove alternating background in inner nested tables */
#SCL_table table tr td {
    background-color: transparent;
}

#SCL_table tr:nth-child(4n+1),
#SCL_table tr:nth-child(4n-2) {
    background-color: var(--gray-100);
}

#SCL_table th {
    background-color: var(--gray-025);
}

#SCL_table td {
    padding-right: 0 !important;
}

.botrackertable table {
    table-layout: auto; /* remove fixed layout to allow text wrapping */
    vertical-align: top;
}

.botrackertable td {
    white-space: normal; /* allow text wrapping */
    vertical-align: top;
}

/* Buyout Tracker — cross-highlight matching sub names on hover.
   The pill bg/color/border come from inline styles in the builder, so
   the override has to be !important to win over inline. Driven by
   utils/assets/buyout_sub_hover.js, which toggles .sub-name-highlight
   on every [data-sub-name] element with the same value. */
.sub-name-highlight {
    background-color: var(--monconred) !important;
    color: #ffffff !important;
    border-color: var(--monconred-ink) !important;
    transition: background-color 80ms ease-in, color 80ms ease-in;
}

/* Buyout Tracker — overdue-buyout flag. Empty (unbought) cells whose trade
   should already be bought by now (per the Schedule Milestones buyout-timing
   analysis) get a red pill-shaped marker. It mirrors the sub-name pills'
   shape (same 15px radius / full-width-within-gutter) and sits inside the
   cell's 6px gutter with a small vertical margin, so adjacent overdue
   highlights stay visually separated instead of butting edge-to-edge. */
.bo-overdue-pill {
    display: block;
    box-sizing: border-box;
    width: 100%;
    /* Match the sub-name pill height (see PILL_MIN_HEIGHT / PILL_LINE_HEIGHT
       in buyout_tracker.py) so an overdue flag never makes a row taller than
       a normal single-pill row. */
    line-height: 16px;
    min-height: 18px;
    margin: 1px 0;
    border-radius: 15px;
    background-color: color-mix(in srgb, var(--monconred) 24%, #ffffff);
    border: 1px solid color-mix(in srgb, var(--monconred) 45%, #ffffff);
}

/* Buyout Tracker — trade Name cell is a clickable pill button that opens the
   per-trade buyout-history modal. Styled to match the sub-name pills (see
   pill_base_style / .bo-sub-pill-btn in buyout_tracker.py): gray fill, rounded
   border, ellipsis truncation, same box metrics so rows stay uniform. */
.bo-trade-name-btn {
    display: block;
    box-sizing: border-box;
    width: 100%;
    font: inherit;
    color: var(--text_dark);
    background-color: transparent;
    border: 1px solid var(--gray-800);
    border-radius: 15px;
    padding: 0 6px;
    margin: 1px 0;
    line-height: 16px;
    min-height: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.bo-trade-name-btn:hover {
    filter: brightness(0.97);
}

/* Buyout Tracker — per-sub modal "Name variations consolidated" chips. Each
   shows one raw spelling that the str_replacements mapping folds into the
   canonical sub name. Static, non-clickable gray pills. */
.bo-alias-pill {
    display: inline-block;
    box-sizing: border-box;
    padding: 1px 8px;
    border-radius: 15px;
    border: 1px solid var(--gray-800);
    background-color: var(--gray-100);
    color: var(--text_dark);
    font-family: var(--tablefont);
    font-size: 0.85em;
    white-space: nowrap;
}

/* Buyout Tracker — target buyout date pill. Shown inside a cell (under any
   sub pills) when "Show Target Dates" is on, the buyout log has a Target date
   for that project/trade, and no contractor is assigned yet. Light-blue +
   mono so it reads clearly apart from the yellow date cell values. Matches
   the sub-name pill box metrics (PILL_MIN_HEIGHT / PILL_LINE_HEIGHT) for
   uniform row heights. */
.bo-target-date-pill {
    display: block;
    box-sizing: border-box;
    width: 100%;
    line-height: 16px;
    min-height: 18px;
    margin: 1px 0;
    padding: 0 6px;
    border-radius: 15px;
    border: 1px solid color-mix(in srgb, #3843D0 35%, #ffffff);
    background-color: #e6faff;
    color: var(--text_dark);
    font-family: var(--tablefont_mono);
    font-size: 0.9em;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Buyout Tracker — "Buyout Plan Missing" header flag. Sits under a project's
   column header when that project has fewer than the expected number of
   commitment-log rows (i.e. it hasn't really been bought out yet). A compact
   red-bordered pill; the label wraps within the narrow column. */
.bo-missing-plan-pill {
    display: block;
    box-sizing: border-box;
    margin: 4px auto 0;
    padding: 1px 6px;
    border-radius: 15px;
    border: 1px solid var(--monconred);
    background-color: var(--monconred);
    color: #ffffff;
    font-family: var(--tablefont);
    font-weight: bold;
    font-size: 0.65em;
    line-height: 1.15;
    text-align: center;
    /* Wrap only at spaces — never hyphenate or split a word mid-character. */
    white-space: normal;
    overflow-wrap: normal;
    word-break: keep-all;
    hyphens: none;
}

/* Labor-type pill in the Sub Commitment Log job headers. Shares the geometry
   of .bo-missing-plan-pill so it lines up vertically with the other header
   chips; a neutral blue distinguishes it from the (red) "Buyout Plan Missing"
   flag. The --empty variant keeps the slot's height so every column's pills
   stay vertically aligned even when a project has no labor type recorded. */
.bo-labor-pill {
    display: block;
    box-sizing: border-box;
    margin: 4px auto 0;
    padding: 1px 6px;
    border-radius: 15px;
    border: 1px solid var(--pt-accent-dark);
    background-color: color-mix(in srgb, var(--pt-accent-dark) 12%, #ffffff);
    color: var(--pt-accent-dark);
    font-family: var(--tablefont);
    font-weight: bold;
    font-size: 0.65em;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
    overflow-wrap: normal;
    word-break: keep-all;
    hyphens: none;
}

/* Labor-status variants — match the site-wide pill language: union family
   (U/PW, U, PW) on the dark-gray chip, non-union (NU) on the light-gray chip,
   anything else on a neutral mid-gray. Hex tokens mirror pillgray_dark
   (#77777A) / pillgray_light (#DDDDE0) used elsewhere in the app. */
.bo-labor-pill--upw {
    border-color: #77777A;
    background-color: #77777A;
    color: #ffffff;
}

.bo-labor-pill--nu {
    border-color: #c9c9cc;
    background-color: #DDDDE0;
    color: var(--text_dark);
}

.bo-labor-pill--mixed {
    border-color: #a3a3a6;
    background-color: #B0B3B6;
    color: var(--text_dark);
}

.bo-labor-pill--empty {
    border-color: transparent;
    background: transparent;
    color: transparent;
}

/* Buyout Tracker — subcontractor pills are <button>s so they can open the
   per-sub project modal. Reset the native button chrome so they keep reading
   as pills; the per-pill inline style still supplies fill/border/radius. */
.bo-sub-pill-btn {
    width: 100%;
    font: inherit;
    line-height: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.bo-sub-pill-btn:hover {
    filter: brightness(0.97);
}

/* Buyout Tracker — Awarded Subcontractor Timeline pills are also <button>s
   that open the per-sub modal. Reset native button chrome but DON'T force
   full width (unlike .bo-sub-pill-btn): the timeline pill must stay sized to
   its label so the spine layout reads correctly. The pill's fill/border/
   radius still come from .bo-timeline-sub. */
.bo-timeline-sub-btn {
    font: inherit;
    line-height: inherit;
    /* !important so the pointer always wins over the UA button cursor and any
       lower-priority rule that might otherwise leave it as the default arrow. */
    cursor: pointer !important;
    -webkit-appearance: none;
    appearance: none;
}

.bo-timeline-sub-btn:hover {
    filter: brightness(0.97);
}

/* Buyout Tracker — a subcontractor's FIRST chronological appearance in the
   table just recolors the pill's existing 1px border to red (same
   thickness). !important to beat the inline border set by the builder. */
.bo-first-instance {
    border-color: var(--monconred) !important;
}

/* Buyout Tracker — cell whose source value is "N/A"/"NA" (no sub). A muted,
   hatched ghost chip so it reads clearly as not-applicable rather than as a
   subcontractor literally named "N/A". Non-clickable. */
.bo-na-pill {
    display: block;
    text-align: center;
    border-radius: 15px;
    padding: 0 6px;
    margin: 1px 2px;
    /* Match the sub-name pill height (PILL_MIN_HEIGHT / PILL_LINE_HEIGHT in
       buyout_tracker.py) so an N/A chip is the same height as a real sub
       pill and single-pill rows stay uniform. */
    box-sizing: border-box;
    line-height: 16px;
    min-height: 18px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--gray-500);
    font-style: italic;
    border: 1px dashed var(--gray-400);
    background: repeating-linear-gradient(
        45deg,
        var(--gray-150),
        var(--gray-150) 3px,
        transparent 3px,
        transparent 7px
    );
}

/* Buyout Tracker — "Not Req'd" cell marker. The source value '-----' means
   the trade isn't required for that project; rendered as a centered em-dash
   (mirroring the PDF export) so the cell reads as "not required" rather
   than as a blank/unbought gap. Dark + bold so the mark stays clearly
   visible against the surrounding pills instead of fading into the empty
   cells. Matches the sub-name pill height (PILL_MIN_HEIGHT /
   PILL_LINE_HEIGHT in buyout_tracker.py) so rows stay uniform. */
.bo-notreq-mark {
    display: block;
    box-sizing: border-box;
    text-align: center;
    line-height: 16px;
    min-height: 18px;
    padding: 0 6px;
    color: var(--gray-700);
    font-weight: 700;
}

/* Buyout Tracker — Awarded Subcontractor vertical timeline. A single spine
   (the items' shared left border) keeps every dot in-line; each dot is
   colored by subcontractor via an inline style from the builder. */
.bo-timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 6px;
}

.bo-timeline-item {
    position: relative;
    padding: 6px 0 6px 22px;
    border-left: 2px solid var(--gray-300);
    margin-left: 5px;
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: var(--font_em_4);
    color: var(--text_dark);
}

.bo-timeline-item:last-child {
    /* keep the spine flush through the final dot */
    border-left-color: var(--gray-300);
}

.bo-timeline-dot {
    position: absolute;
    left: -7px;
    top: 9px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid var(--gray-800);
}

.bo-timeline-date {
    font-family: var(--tablefont_mono);
    color: var(--gray-500);
    min-width: 62px;
    flex: 0 0 auto;
}

.bo-timeline-sub {
    font-family: var(--headingfont);
    flex: 0 0 auto;
    /* Colored pill matching the timeline dot; background is set inline
       per-item from the subcontractor color map. */
    display: inline-block;
    padding: 0 8px;
    border-radius: 15px;
    border: 1px solid var(--gray-800);
    color: var(--text_dark);
}

.bo-timeline-proj {
    color: var(--gray-500);
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Project Executive (PX) badge, shown in brackets on the right of each row. */
.bo-timeline-px {
    font-family: var(--tablefont_mono);
    color: var(--gray-500);
    flex: 0 0 auto;
    margin-left: auto;
    padding-left: 8px;
    white-space: nowrap;
}

/* !!! ===============================================================================================================*/
/* !!! DASH_DATATABLE  */
/* ===================================================================================================================*/

.dash-header,
.dash-spreadsheet th {
    color: var(--text_dark) !important;
    background-color: var(--pt-body-medium) !important;
    font-family: var(--headingfont);
    font-size: var(--font_em_5A);
    text-align: left !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: 1px solid var(--pt-border-soft) !important;
}

.dash-cell,
.dash-spreadsheet td {
    color: var(--text_dark) !important;
    background-color: var(--pt-body) !important;
    font-family: var(--tablefont_mono);
    font-size: var(--font_em_5A);
    text-align: left !important;
    border: none !important;
    border-color: var(--pt-border-soft) !important;
    padding: 0 !important;
}

.dash-select-cell {
    border: none !important;
    background-color: transparent !important;
    text-align: left !important;
}

.dash-select-header {
    border: none !important;
    background-color: transparent !important;
}

#est_model2_input_table .tr {
    line-height: 12px !important;
}

#budsim_coeff_table .dash-cell.column-3 .dash-cell-value,
#budsim_coeff_table .dash-cell.column-4 .dash-cell-value,
#budsim_coeff_table .dash-cell.column-6 .dash-cell-value,
#budsim_coeff_table .dash-cell.column-3 .input-active,
#budsim_coeff_table .dash-cell.column-4 .input-active,
#budsim_coeff_table .dash-cell.column-6 .input-active,
input.input-active.unfocused.selectable.dash-cell-value {
    border: 1px solid var(--pt-border) !important;
    border-radius: 6px !important;
    padding: 0.3em 0.6em !important;
    margin: 0 !important;
}

#budsim_coeff_table .dash-cell.column-3 .input-active,
#budsim_coeff_table .dash-cell.column-4 .input-active,
#budsim_coeff_table .dash-cell.column-6 .input-active {
    width: unset !important;
}

input.input-active.unfocused.selectable.dash-cell-value {
    width: 100%;
    color: green !important;
}

.dash-cell-value-container {
    box-sizing: border-box !important;
    height: 100% !important;
    padding: 0.3em 0.6em !important;
    margin: 0 !important;
    text-align: right !important;
}

#budsim_coeff_table .column-3,
#budsim_coeff_table .column-4,
#budsim_coeff_table .column-5,
#budsim_coeff_table .column-6,
#budsim_coeff_table .column-7,
#budsim_coeff_table .column-8,
#budsim_coeff_table .column-9,
#budsim_coeff_table .column-10 {
    text-align: right !important;
}

.dash-cell.column-6:hover {
    cursor: pointer;
}

.dash-spreadsheet tbody tr {
    background-color: transparent !important;
}

.dash-spreadsheet tr {
    height: 6px !important;
}
.dash-spreadsheet tbody tr:nth-child(even) {
    background-color: var(--pt-body-medium) !important;
}

/* !!! ===============================================================================================================*/
/* !!! MATHJAX  */
/* ===================================================================================================================*/

.mjx-chtml {
    font-size: var(--font_em_2) !important;
}

/* !!! ===============================================================================================================*/
/* !!! MODAL  */
/* ===================================================================================================================*/
/* ONE set of rules governs every dbc.Modal in the app. All modals:
   - fill the viewport and center their dialog (no top-anchored variants),
   - share the same dialog width (90% of viewport, capped at 1200px — the
     widest treatment the project-info / staff / buyout modals used to own),
   - carry symmetric 2rem gutters on all four sides of the content box,
   - float the close X in the top-right corner *gutter* (absolutely
     positioned) so it never shoves the title band or body content over.
   Do NOT re-introduce per-modal width/positioning classes; if a modal needs
   to look different, that difference belongs here, stated globally. */

.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: none !important;
    margin: 0 !important;
    overflow: visible !important;
    outline: 0;
}

.modal-dialog {
    position: relative;
    width: 90%;
    max-width: 1200px;
    margin: 0;
    pointer-events: none;
}

.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

@media (prefers-reduced-motion: reduce) {
    .modal.fade .modal-dialog {
        transition: none;
    }
}

.modal.show .modal-dialog {
    transform: none;
}

.modal.modal-static .modal-dialog {
    transform: scale(1.02);
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
}

/* The content box scrolls as a whole (header included) once it exceeds
   80vh — the behavior the project-info modal established. `scrollable=True`
   on individual dbc.Modal components is therefore a no-op by design. */
.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    pointer-events: auto;
    background: var(--gray-025);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-radius: 7px;
    /* Symmetric gutters: sides + bottom here, top via .modal-header. */
    padding: 0 2rem 2rem;
    text-align: left;
}

/* Header supplies the top gutter (2rem, matching the side/bottom padding
   of .modal-content) so the title band's top red hairline sits the same
   distance from the modal's top edge as the body does from its sides.
   No font-size is set here — the pt-red-title-band inside resets to 1rem
   so its typography matches the page-level bands exactly. */
.modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 0 0.5rem;
    font-family: var(--headingfont);
    color: var(--text_dark);
}

/* First child of the header (the title band) owns the full width; the
   close X is lifted out of the flex flow below so it can't compress it. */
.modal-header > :first-child {
    flex: 1 1 auto;
    min-width: 0;
}

/* Close X: absolutely positioned in the top-right corner gutter of
   .modal-content (the nearest positioned ancestor), clear of the title
   band which starts 2rem down. Bootstrap's CSS (not loaded here) normally
   paints the X as a background-image, so we draw our own glyph. */
.modal-header .btn-close {
    position: absolute;
    top: 0.45rem;
    right: 0.55rem;
    width: 1.4rem;
    height: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10;
}

.modal-header .btn-close::before {
    content: '\00d7';
    font-family: var(--textfont);
    font-size: 1.35rem;
    line-height: 1;
    color: var(--gray-500);
}

.modal-header .btn-close:hover::before {
    color: var(--monconred);
}

.modal-title {
    margin-bottom: 0;
}

.modal-footer {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

/* !!! ===============================================================================================================*/
/* !!! SAFETY_SCOPE_PAGE */
/* ===================================================================================================================*/

.safetyscope {
    font-size: var(--font_em_3);
    color: var(--text_dark);
    margin-bottom: 0;
    margin-left: 0;
    margin-top: 0.25em;
    font-family: var(--textfont);
}

.safetyscope.type1 {
    font-family: var(--headingfont);
    font-size: var(--font_em_2);
    margin-top: 0.5em;
    border-bottom: 1px solid var(--pt-border);
}
.safetyscope.type2 {
    font-family: var(--headingfont);
    font-size: var(--font_em_3);
    margin-top: 1em;
    margin-left: 2em;
}
.safetyscope.type3 {
    font-size: var(--font_em_4);
    font-family: var(--headingfont);
    margin-left: 4em;
}
.safetyscope.type4 {
    font-size: var(--font_em_4);
    margin-left: 6em;
}
.safetyscope.type5 {
    font-size: var(--font_em_4);
    margin-left: 8em;
}
.safetyscope.type6 {
    font-size: var(--font_em_4);
    margin-left: 8em;
}

/* !!! ________Numbers */

.code-number-part.scope {
    color: var(--text_dark);
}

.code-number-part.scope.type3 {
    font-family: var(--tablefont_mono);
}

.code-number-part.scope.type1 {
    font-family: var(--headingfont) !important;
}

.code-number-part.scope.type3, .code-number-part.scope.type4, .code-number-part.scope.type5, .code-number-part.scope.type6 {
    color: var(--gray-300);
}

/* !!! ________Other */

[class^="level"] .highlight {
    font-size: inherit;
    color: inherit;
}

.before-Pipe {
    font-Family: 'GT-Pressura-Mono-Regular', sans-serif;
}

.topic_highlight_ss {
    font-family: var(--mediumfont);
}

/* !!! ===============================================================================================================*/
/* !!! DISABLED_ELEMENTS  */
/* ===================================================================================================================*/

/* !!! ________Card */

.card.disabled,
.card.disabled > * {
    background-color: var(--pt-disabled-bg) !important;
}

.card.disabled,
.card.disabled *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
    color: var(--pt-disabled-text);
}

.card.disabled h1,
.card.disabled h2,
.card.disabled h3,
.card.disabled h4,
.card.disabled h5,
.card.disabled h6,
.card.disabled p,
.card.disabled span,
.card.disabled label {
    color: var(--pt-disabled-text) !important;
}

/* !!! ________Slider */

.card.disabled .mantine-Slider-bar {
    background-color: var(--pt-disabled-border);
}

.card.disabled .mantine-Slider-thumb {
    background-color: var(--pt-disabled-text);
    border-color: var(--pt-border-soft);
}

.card.disabled .mantine-Slider-track {
    background-color: var(--gray-200);
}

/* !!! ________Segmented_Control */

.card.disabled .mantine-SegmentedControl-labelActive {
    background-color: var(--pt-disabled-text) !important;
    color: var(--text_color_dark) !important;
}

.card.disabled .mantine-SegmentedControl-root {
    border-color: var(--pt-disabled-text) !important;
}

/* !!! ===============================================================================================================*/
/* !!! PT_DROPDOWN_LINK */
/* ===================================================================================================================*/

/* Drawer dropdown items: sized to match .PT_navbar pills — small text, tight
   padding, so the drawer feels consistent with the top nav.
   The only hover affordance is the border-radius morph — no arrow slide. */
.PT_dropdownLink.pt-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none !important;
    color: var(--text_dark) !important;
    background-color: transparent;
    text-align: left;
    margin: 0;
    padding: 3px 10px;
    font-family: var(--textfont);
    font-size: var(--font_em_5);
    line-height: 1.35;
    transition:
        border-radius var(--button-link-transition-duration) var(--ease-standard),
        background-color var(--button-link-transition-duration) var(--ease-standard),
        color var(--button-link-transition-duration) ease;
    white-space: nowrap;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid var(--pt-border) !important;
    border-radius: 2px;
    will-change: border-radius, background-color;
    cursor: pointer;
}

/* Inner <a> fills the pill so the whole area is clickable. */
.PT_dropdownLink-inner,
.PT_dropdownLink-inner:visited,
.PT_dropdownLink-inner:hover,
.PT_dropdownLink-inner:active {
    color: var(--text_dark) !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0;
}

.PT_dropdownLink.pt-btn:hover {
    border-radius: 18px;
}

.PT_dropdownLink .pt-btn__label {
    position: relative;
    z-index: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Any stray arrow markup inside a drawer item is hidden and the label does not
   translate on hover — border-radius morph is the only hover affordance. */
.PT_dropdownLink .pt-btn__circle,
.PT_dropdownLink .pt-btn__arrow {
    display: none !important;
}

.PT_dropdownLink.pt-btn:hover .pt-btn__label {
    transform: none !important;
}

.card.nav .pt-btn {
    width: 100%;
}

/* !!! ===============================================================================================================*/
/* !!! DROPDOWN_DRAWER */
/* ===================================================================================================================*/

/* Header: withCloseButton=False means Mantine v5 renders no header at all,
   so this rule only matters if a header ever comes back — keep it flat. */
.mantine-Drawer-header {
    height: 3em !important;
    border-bottom: none !important;
}

/* Drawer surface: frosted glass matching the .PT_navbar recipe (same
   --pt-nav-bg tint token), with a stronger blur than the navbar because the
   drawer sits over arbitrary page content and its links need to stay
   legible. Bottom edge divider marks where the glass panel ends. */
.mantine-Drawer-drawer {
    border: none !important;
    border-bottom: 1px solid var(--pt-border-soft) !important;
    background-color: var(--pt-nav-bg) !important;
    border-radius: 0 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    -webkit-backdrop-filter: blur(16px) saturate(1.2) brightness(1.02) !important;
    backdrop-filter: blur(16px) saturate(1.2) brightness(1.02) !important;
}

/* No backdrop darkening for the nav drawer: the overlay element must stay
   mounted (it is what makes click-outside close the drawer) but paints
   nothing. Both class names cover the Mantine v5 (Overlay-root) and v7
   (Drawer-overlay) DOM shapes. */
.mantine-Drawer-root .mantine-Overlay-root,
.mantine-Drawer-overlay {
    background-color: transparent !important;
    opacity: 1 !important;
}

/* Body: simple centered container. No text-level overrides here — those belong
   on the items themselves, not on the body. Top padding carries the offset the
   (now unrendered) 3em header used to provide, clearing the navbar strip so
   the section title is never hidden behind the main menu elements. */
.mantine-Drawer-body {
    padding: 4.5rem 2rem 2rem !important;
    color: var(--text_dark);
    display: flex;
    justify-content: center;
}

.mantine-Paper-root {
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Mantine modal surfaces — flat */
.mantine-Modal-content,
.mantine-Modal-inner {
    box-shadow: none !important;
}

/* Inner wrapper: caps at main column but never exceeds available drawer width,
   so the grid always fits on screen regardless of viewport size. */
.drawer_inner_wrapper {
    width: 100%;
    max-width: min(100%, var(--main-col));
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-left: 1em;
}

/* Nav-link grid: fixed 3 columns, tight-but-readable spacing, breathing room below */
.drawer_dropdown_grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.3rem 1rem;
    max-height: 60vh;
    overflow: auto;
    padding-bottom: 1.5rem;
}

/* Drawer items take the navbar-pill visual language: filled bg, no border,
   radius morphs on hover. Scoped to the drawer so the base .PT_dropdownLink
   styling used elsewhere (e.g. safety_scope section nav) is untouched. */
.drawer_dropdown_grid .PT_dropdownLink.pt-btn {
    width: 100%;
    margin: 0;
    padding: 5px 12px;
    font-family: var(--textfont);
    font-size: var(--font_em_5);
    line-height: 1.4;
    color: var(--text_dark) !important;
    background-color: var(--pt-nav-pill-bg) !important;
    border: none !important;
    border-radius: 0 !important;
    transition: var(--pill-morph-transition) !important;
}

.drawer_dropdown_grid .PT_dropdownLink.pt-btn:hover {
    background-color: var(--pt-nav-pill-bg-hover) !important;
    border-radius: 18px !important;
}

/* Disabled drawer items: shown so users know the page exists, but inert.
   No hover affordance, no pointer cursor, dimmed label. Scoped to the
   drawer grid so the base .PT_dropdownLink.disabled rule below covers other
   surfaces (e.g. fixed-section-nav). */
.drawer_dropdown_grid .PT_dropdownLink.pt-btn.disabled,
.drawer_dropdown_grid .PT_dropdownLink.pt-btn.disabled:hover {
    background-color: var(--pt-nav-pill-bg) !important;
    border-radius: 0 !important;
    cursor: not-allowed;
    opacity: 0.45;
    pointer-events: none;
}

.drawer_dropdown_grid .PT_dropdownLink.pt-btn.disabled .pt-btn__label,
.drawer_dropdown_grid .PT_dropdownLink.pt-btn.disabled .PT_dropdownLink-inner {
    color: var(--text_dark) !important;
    text-decoration: line-through;
}

/* Generic disabled drawer pill — applies wherever a disabled PT_dropdownLink
   is rendered (covers any future surface that reuses the class). */
.PT_dropdownLink.pt-btn.disabled,
.PT_dropdownLink.pt-btn.disabled:hover {
    cursor: not-allowed;
    opacity: 0.45;
    pointer-events: none;
}

/* !!! ===============================================================================================================*/
/* !!! DASH_AG_GRID */
/* ===================================================================================================================*/

/* Essential structural elements */
.custom-grid-theme .ag-root-wrapper {
    border: none;
    font-family: var(--tablefont);

    color: var(--text_dark) !important;
    background-color: var(--pt-body) !important;
    font-size: var(--font_em_5);
}

.custom-grid-theme .ag-header {
    font-family: var(--headingfont);
    background-color: var(--pt-body-medium) !important;
    border-bottom: 1px solid var(--pt-border) !important;
}

.custom-grid-theme .ag-header-cell {
    padding-left: 3px;
    padding-right: 3px;
}

.custom-grid-theme .ag-row {
    line-height: 16px;
}

.custom-grid-theme .ag-row-odd {
    background-color: var(--pt-body-light) !important;
}

.custom-grid-theme .ag-row-even {
    background-color: var(--pt-body) !important;
}

.custom-grid-theme .ag-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 3px;
    padding-right: 3px;
}

.ag-cell.mono-font {
    font-family: var(--tablefont_mono) !important;
}

/* Right-aligned numeric cells */
.custom-grid-theme .ag-numeric-cell {
    text-align: right;
}

/* Your custom modifications */
.custom-grid-theme .monospace-cell {
    font-family: var(--tablefont_mono);
}

.right-aligned-header .ag-header-cell-label {
    justify-content: flex-end !important;
}

/* !!! ===============================================================================================================*/
/* !!! MAIN_LAYOUT_ELEMENTS */
/* ===================================================================================================================*/

/* !!! ________Html / Body */

/* scroll-padding-top reserves space for the sticky navbar when :target jumps
   to an anchor, so the destination isn't hidden behind the bar.

   font-size here is the SINGLE fluid anchor for the whole app's type scale.
   Every --font_em_* token is em-based and ultimately cascades from body's
   1rem, so every text in the app breathes with viewport width because of
   this one clamp(). The preferred value is in rem so users who bump their
   browser's default size still get a proportional boost.

   Resolved values (assuming browser default 16px):
     800px  viewport → ~15.2px   (just above 15px floor)
     1366px viewport → ~16.0px   (current look, unchanged)
     1700px viewport → ~16.6px
     2560px viewport →   17px    (clamped ceiling) */
html {
    font-size: clamp(0.9375rem, 0.875rem + 0.15vw, 1.0625rem);
    scroll-padding-top: 200px;
}

body {
    background-color: var(--pt-body) !important;
    color: var(--text_dark);
    background-size: cover;
    background-position: center;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 0;
    margin: 0;
}

/* DO NOT set overflow on html — it breaks position: sticky on the navbar. */

/* !!! ________Wrapper */

.wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    align-items: stretch;
}

/* Remove dense grid background on non-landing pages; open light fields */
.wrapper:not(.landing-page-active) {
    background-color: var(--pt-body);
    background-image: none;
}

/* Full-width app row (avoids narrow “shrink-to-content” column under align-items: center). */
.wrapper > .PT_navbar_wrapper,
.wrapper > .page,
.PT_navbar_wrapper > .PT_navbar {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Let .page grow to fill remaining wrapper height so the footer chain can reach the bottom. */
.wrapper > .page {
    flex-grow: 1;
}

/* create_layout footer wrapper: stretch like the rest of the page column. */
.layout-with-footer {
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    flex-grow: 1;
}

/* Push main content to grow, keeping footer pinned to the bottom of the viewport. */
.layout-with-footer > :first-child {
    flex-grow: 1;
}

/* background-attachment: fixed is avoided here for two reasons:
   1. It conflicts with backdrop-filter on the navbar (which creates a new stacking context),
      causing the image to only appear behind the header on many browsers.
   2. It is completely broken on iOS Safari.
   Instead, the image is painted as a position:fixed pseudo-element so it always covers
   the full viewport regardless of scroll depth, without any stacking-context conflicts.
   The background-color is a dark fallback shown instantly while the image loads.
   The hero photo lives in S3 (moncon-app-assets) so it does not bloat the repo;
   if you need to swap it, run `bin/add_static_asset IMG_0081.jpg --source <new>` and
   bump the ?v= cache buster below to the new version reported by the script. */
.wrapper.landing-page-active {
    background-color: var(--pt-body-dark);
    isolation: isolate;
}

.wrapper.landing-page-active::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url('https://moncon-app-assets.s3.us-east-2.amazonaws.com/static/IMG_0081.jpg?v=1563580f');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
    /* Alt palette: softer overlay, still readable */
    filter: brightness(0.55) saturate(0.9);
}

/* !!! ________Page */

/* Side tracks (1fr) absorb all free space; center column tracks --main-col whose clamp()
   holds the minimum, so sides compress to zero before the center shrinks. */
.page {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, min(100%, var(--main-col)))
    minmax(0, 1fr);
  column-gap: var(--gap);
  align-items: start;
}

/* !!! ________Navigation_Column */

.navigation_column {
    font-size: var(--font_em_3A);
    grid-column: 1;
    justify-self: end;
    width: var(--nav-width);
    position: sticky;
    top: var(--top-offset);
    z-index: 1000;
    padding-top: 1rem;
    padding-left: 0.5rem;
}

/* Collapse left column when it has no content — rightcol is always None in current layout. */
.navigation_column:empty {
    display: none;
    width: 0;
    padding: 0;
}

/* Also hide via hard-pixel media query (CSS variables are not valid in @media conditions). */
@media (max-width: 1120px) {
    .navigation_column {
        display: none;
        width: 0;
        padding: 0;
    }
}

/* Hide the Sections FAB on narrow screens where it overlaps content. */
@media (max-width: 800px) {
    .section-nav-fab-root {
        display: none;
    }
}

/* !!! ________Main_container */

.main-container {
  grid-column: 2;
  width: 100%;
  max-width: var(--main-col);
  margin: 0;
  margin-inline: auto;
  box-sizing: border-box;
  font-size: var(--font_em_3);
  padding-left: 2px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  color: var(--text_dark);
}

#page-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* !!! ________Section */

/* Alt palette: match page background (no alternating band) */
.section.even_section {
    --full-width: calc(50vw - 50%);
    margin-left: calc(-1 * var(--full-width));
    margin-right: calc(-1 * var(--full-width));
    padding-left: var(--full-width);
    padding-right: var(--full-width);
    padding-top: 1em;
    background-color: var(--pt-body) !important;
}

/* !!! ________Content Container */

.content_container {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 1.25em;
    margin-top: 1em;
}

/* !!! ________Content */

.content {
    flex: 1; /* Takes up all available space */
    min-width: 0; /* Prevents overflow issues */
}

/* !!! ________Content_Settings */

.content_settings {
    flex: 0 1 auto;
    min-width: 0;
    flex-basis: 15%;
    max-width: 25%;
}

/* !!! ________PT_navbar */

/* Sit below top edge and slightly in from sides — content behind stays visible */
#PT_navbar_wrapper.PT_navbar_wrapper,
.PT_navbar_wrapper {
    font-size: var(--font_em_3A);
    position: sticky !important;
    top: 0.25rem !important;
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: stretch;
    z-index: 99999;
    padding: 0.325rem 1.125rem 0 !important;
    box-sizing: border-box !important;

}

/* Full-width bar — no grid here. Content centering is delegated to .PT_navbar_main
   using the same max-width + margin-inline: auto as .main-container, so the two
   always stay in sync regardless of scrollbars or sticky-positioning quirks. */
/* Frosted-glass strip: token-driven background, rounded lip */
.PT_navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    display: block;
    width: 100%;
    background: var(--pt-nav-bg) !important;
    backdrop-filter: blur(6px) saturate(1.12) brightness(1.02) !important;
    -webkit-backdrop-filter: blur(8px) saturate(1.12) brightness(1.02) !important;
    border: none !important;
    border-bottom: none !important;
    /* Only the top bar is rounded; cards / controls elsewhere stay square */
    border-radius: 12px !important;
    overflow: hidden;
    color: var(--text_dark);
    transition:
        background-color var(--button-link-transition-duration) ease-in-out,
        backdrop-filter var(--button-link-transition-duration) ease-in-out,
        box-shadow var(--button-link-transition-duration) ease-in-out;
}

/* Landing pages (/, /home, /login, /landing) — two-class selectors are more specific */
.PT_navbar_landing.PT_navbar,
.PT_navbar.PT_navbar_landing {
    background: var(--pt-nav-bg-landing) !important;
    backdrop-filter: blur(4px) saturate(1.12) brightness(1.05) !important;
    -webkit-backdrop-filter: blur(4px) saturate(1.12) brightness(1.05) !important;
    border-bottom: none !important;
}

.PT_navbar:hover {
    box-shadow: 0 0 0 1px var(--pt-border) !important;
}

.PT_navbar_landing.PT_navbar:hover {
    background: var(--pt-nav-bg-landing-hover) !important;
}

/* While a top drawer is open (Mantine mounts .mantine-Drawer-root only when
   opened), the navbar goes fully transparent so the drawer surface reads as
   one continuous panel with the nav strip. */
body:has(.mantine-Drawer-root) .PT_navbar,
body:has(.mantine-Drawer-root) .PT_navbar.PT_navbar_landing,
body:has(.mantine-Drawer-root) .PT_navbar:hover,
body:has(.mantine-Drawer-root) .PT_navbar.PT_navbar_landing:hover {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
}

.PT_navbar_section_nav::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
    hsla(100, 15%, 85%, .05),
    hsla(100, 10%, 80%, .05));
    border-radius: 10px;
    pointer-events: none;
}

.PT_navbar > * {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Mirrors .main-container's centering exactly: same max-width + margin-inline: auto.
   This guarantees the logo left edge and logout right edge are always flush with
   the page content below, at every viewport width. */
.PT_navbar > .PT_navbar_main {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    max-width: var(--main-col);
    margin: 0;
    margin-inline: auto;
    min-width: 0;
    box-sizing: border-box;
    column-gap: 0.35rem;
    padding-left: 2px;
}

.PT_navbar.scrolled .title {
    opacity: 0;
}

.PT_navbar_leftcontent {
    flex: 0 0 auto;
    margin-right: auto;
    align-items: center;
    min-width: 0;
}

.PT_navbar_rightcontent {
    flex: 1 1 0;
    margin-left: 0;
    min-width: 0;
    max-width: 100%;
    text-align: right;
    justify-content: flex-end;
}

.PT_navbar_menu_wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    text-align: right;
    padding: 0;
    margin: 0;
    min-width: 0;
    flex: 1 1 auto;
    max-width: 100%;
    column-gap: 6px;
}

/* Scroll category buttons inside the bar; logout stays pinned to the right edge of the main column. */
.PT_navbar_nav_items {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    padding-bottom: 2px;
}

.PT_navbar_nav_items::-webkit-scrollbar {
    height: 4px;
}

.PT_navbar_nav_items::-webkit-scrollbar-thumb {
    background: rgba(30, 33, 36, 0.35);
    border-radius: 4px;
}

/* Navbar pills: slightly tighter than app-wide .button-menu defaults so more fit before scroll.
   font-size uses the --font_em_5 token (0.65em). Because it's em and the root html font-size
   is fluid (clamp()), pill text scales smoothly with viewport width — no per-breakpoint
   font-size overrides needed. */
/* Lighter GT Pressura cut for nav labels (--textfont = Standard Light) */
.PT_navbar .button-menu.pt-btn {
    min-width: 0;
    max-width: 12rem;
    margin: 4px 6px 4px 0;
    padding: 3px 10px 3px 10px;
    height: auto;
    font-size: var(--font_em_5);
    font-family: var(--textfont) !important;
}

.PT_navbar .button-menu.pt-btn .pt-btn__label {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tighten spacing and pill width when the main column gets crowded. Font size already handled
   by the clamp() above — no font-size override needed here. */
@media (max-width: 1500px) {
    .PT_navbar .button-menu.pt-btn {
        max-width: 9rem;
        padding: 2px 5px 2px 7px;
        margin-right: 1px;
    }
    .PT_navbar_nav_items {
        gap: 2px;
    }
}

@media (max-width: 1280px) {
    .PT_navbar .button-menu.pt-btn {
        max-width: 7rem;
    }
}

/* Top menu: no sliding-arrow animation (avoids overlap on narrow pills); simple hover only. */
.PT_navbar .button-menu.pt-btn .pt-btn__circle {
    display: none !important;
}

.PT_navbar .button-menu.pt-btn:hover .pt-btn__label {
    transform: none !important;
}

.PT_navbar .button-menu.pt-btn:not(.dark) {
    border: none !important;
    color: var(--text_dark) !important;
    background-color: var(--pt-nav-pill-bg) !important;
    border-radius: 0 !important;
    transition: var(--pill-morph-transition) !important;
}

.PT_navbar .button-menu.pt-btn:not(.dark):hover {
    background-color: var(--pt-nav-pill-bg-hover) !important;
    border: none !important;
    color: var(--text_dark) !important;
    border-radius: 18px !important;
}

/* Logout / secondary: same pill language + hover radius */
.PT_navbar .button-menu.pt-btn.dark {
    background-color: var(--pt-nav-pill-bg) !important;
    color: var(--text_dark) !important;
    border: none !important;
    border-radius: 0 !important;
    transition: var(--pill-morph-transition) !important;
}

.PT_navbar .button-menu.pt-btn.dark:hover {
    background-color: var(--pt-nav-pill-bg-hover) !important;
    filter: none;
    color: var(--text_dark) !important;
    border-radius: 18px !important;
}

/* When the navbar itself is hovered, every pill flips to the dark button
   surface with light label text. The existing color/background transitions
   on each pill carry the animation. */
.PT_navbar:hover .button-menu.pt-btn,
.PT_navbar:hover .button-menu.pt-btn.dark,
.PT_navbar:hover .button-menu.pt-btn:not(.dark),
.PT_navbar:hover .button-menu.pt-btn:hover,
.PT_navbar:hover .button-menu.pt-btn.dark:hover,
.PT_navbar:hover .button-menu.pt-btn:not(.dark):hover {
    background-color: var(--button_color_dark) !important;
    color: var(--text_color_dark) !important;
}

.PT_navbar:hover .button-menu.pt-btn .pt-btn__label {
    color: var(--text_color_dark) !important;
}

/* Keep the arrow/logout icons legible against the dark fill during navbar hover */
.PT_navbar:hover .button-menu.pt-btn .pt-btn__icon,
.PT_navbar:hover .button-menu.pt-btn.dark .pt-btn__icon {
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

/* Navbar logo: paint the shape via mask + background-color so the color is
   transitionable. The <img src="/assets/logo.svg"> normally blocks CSS from
   reaching the SVG's inner <path fill>, so we neutralize the img's own pixels
   with a transparent SVG of the same viewBox (preserves intrinsic aspect /
   40px layout height set in main_layout.py) and let background-color fill the
   masked shape. Default is the logo's original gray (#4a4d51); on navbar hover
   this lerps to MonCon red. Applies to both regular and landing variants. */
.PT_navbar #navbar-logo {
    content: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150.92 47'/>");
    background-color: #4a4d51;
    -webkit-mask: url('/assets/logo.svg') no-repeat center / contain;
            mask: url('/assets/logo.svg') no-repeat center / contain;
    filter: none;
    opacity: 1;
    transition: background-color var(--button-link-transition-duration) ease-in-out;
    cursor: pointer;
}

/* The logo is wrapped in <a href="/login"> (see main_layout.py). The
   content:url() replacement above plus overflow:hidden on .logo-container can
   suppress the default anchor pointer in some browsers, so set it explicitly
   on the container and its anchor child. */
.logo-container,
.logo-container > a,
.logo-container > a > img {
    cursor: pointer;
}

.PT_navbar:hover #navbar-logo,
body:has(.section-nav-fab-details > summary.section-nav-fab-toggle:hover) .PT_navbar #navbar-logo {
    background-color: var(--monconred);
}

/* Arrows in pills: dark on light gray */
.PT_navbar .pt-btn__icon {
    filter: none;
    opacity: 0.75;
}

/* Logout uses white SVG — invert to dark on light-gray pill */
.PT_navbar .button-menu.pt-btn.dark .pt-btn__icon {
    filter: brightness(0);
    opacity: 0.65;
}

/* Logout block stays pinned to the right; category buttons live in the scrollable region.
   display:flex + align-items:center prevents the invisible Dash Location/redirect divs
   inside the logout wrapper from adding phantom height that misaligns the button. */
.PT_navbar_menu_wrapper > div:not(.PT_navbar_nav_items) {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.PT_navbar_nav_items > div {
    flex: 0 0 auto;
}

/* !!! ________Footer */

.footer_section {
    background-color: var(--gray-700);
    margin-top: 3em;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    box-sizing: border-box;
}

.footer_container {
    width: min(100%, var(--main-col));
    max-width: 100%;
    margin-inline: auto;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding-bottom: 3em;
    box-sizing: border-box;
}

.footer_container h4,
#page-content .footer_container h4,
.main-container .footer_container h4 {
    margin-top: 2em;
    /* Force light text — ID-qualified variant beats the #page-content / .main-container h4
       rule later in this file, which also carries !important. */
    color: var(--text_color_dark) !important;
}
.footer_section .span_1,
.footer_section .span_2 {
    color: var(--text_color_dark);
}

.footer-meta-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.footer-meta-item .footer-meta-date {
    margin-top: auto;
}

/* Footer columns: metadata on the left grows to fill available width; the
   user-types column on the right stays compact since it's just a vertical
   list. ``.footer_container`` is already ``display: flex; flex-direction:
   row;`` (see above), so the two ``.content`` children are flex siblings.

   We can't add classes to the inner ``.content`` divs without changing
   create_layout's signature, so we target the wrappers around the known
   inner blocks (``.dataframe_status_div`` for metadata,
   ``.footer-access-col`` for user types) and lift the flex sizing onto
   their parent ``.content`` via :has(). */
.footer_container > .content:has(> .dataframe_status_div:not(.footer-access-col)) {
    flex: 1 1 auto;
    min-width: 0;
}

.footer_container > .content:has(> .footer-access-col) {
    flex: 0 0 auto;
}

.footer-access-col {
    min-width: 12em;
}

.footer-access-list {
    list-style: disc;
    padding-left: 1.25em;
    margin: 0;
}

.footer-access-list li {
    margin: 2px 0;
}

.footer-access-empty {
    margin-top: 6px;
}

.col, [class^="col-"], [class*=" col-"] {
    transition: none;
}

/* !!! ________Side_Navbar */

.fixed-section-nav {
    padding: 0 0.75em 0.75em;
    max-height: calc(100vh - 40px);
    scrollbar-width: none;
    -ms-overflow-style: none;
    backdrop-filter: blur(10px);
    background-color: var(--light_transparent_gray);
    border-radius: 10px;
    position: relative;
    overflow-x: hidden;
    transition: all var(--button-link-transition-duration) ease-in-out;
}

.fixed-section-nav:hover {
    background-color: var(--gray-025);
}

.section_nav_container {
    display: flex;
    flex-direction: column;
    gap: 3px;
    position: relative;
}

.fixed-section-nav .PT_dropdownLink.active {
    font-family: var(--headingfont);
}

/* Active-item rail: a 3px red bar hugging the left edge of the active link.
   Host is already position:relative (see .PT_dropdownLink.pt-btn) so the
   pseudo anchors cleanly without disturbing padding or the 1px border. */
.fixed-section-nav .PT_dropdownLink.active::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background-color: var(--monconred);
    border-radius: 2px;
    pointer-events: none;
}

/* --- Section navigation: floating <details> TOC (see _build_section_nav_drawer) --- */

/* Fixed pill at bottom-left; expands a panel upward when clicked. */
.section-nav-fab-root {
    position: fixed;
    bottom: 4rem;
    left: 1.75rem;
    z-index: 2000;
}

.section-nav-fab-details {
    /* override .fixed-section-nav defaults so they don't interfere */
    position: static;
    max-height: none;
    overflow: visible;
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    padding: 0;
}

/* The summary row is the visible "Sections" pill. Idle surface mirrors the
   .PT_navbar frosted-glass look (same --pt-nav-bg + backdrop-filter + radius,
   no border). Hover adds the same 1px ring as .PT_navbar:hover instead of a
   background shift. */
.section-nav-fab-details > summary.section-nav-fab-toggle {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    font-size: var(--font_em_4A);
    font-family: var(--headingfont);
    color: var(--text_dark);
    background: var(--pt-nav-bg);
    backdrop-filter: blur(6px) saturate(1.12) brightness(1.02);
    -webkit-backdrop-filter: blur(8px) saturate(1.12) brightness(1.02);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition:
        background-color var(--button-link-transition-duration) ease-in-out,
        backdrop-filter var(--button-link-transition-duration) ease-in-out,
        box-shadow var(--button-link-transition-duration) ease-in-out;
}

.section-nav-fab-details > summary.section-nav-fab-toggle::-webkit-details-marker { display: none; }
.section-nav-fab-details > summary.section-nav-fab-toggle::marker { display: none; }

/* Paired hover: hovering either the PT_navbar OR the Sections pill puts the
   1px outline ring on BOTH (cross-linked via :has()). Self-hover is also
   covered here so the ring shows regardless of :has() support. */
.section-nav-fab-details > summary.section-nav-fab-toggle:hover,
body:has(.PT_navbar:hover) .section-nav-fab-details > summary.section-nav-fab-toggle {
    box-shadow: 0 0 0 1px var(--pt-border);
}

body:has(.section-nav-fab-details > summary.section-nav-fab-toggle:hover) .PT_navbar {
    box-shadow: 0 0 0 1px var(--pt-border) !important;
}

/* Panel appears above the pill when open. */
.section-nav-fab-panel {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 0;
    min-width: 13rem;
    max-width: min(20rem, 90vw);
    max-height: 60vh;
    overflow-y: auto;
    background: var(--pt-body);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 0.6rem 0.75rem 0.5rem;
    box-shadow: 2px 6px 24px rgba(0,0,0,0.13);
    display: none;
}

.section-nav-fab-details[open] .section-nav-fab-panel {
    display: block;
}

.section-nav-fab-panel-title {
    display: block;
    font-family: var(--headingfont);
    font-size: var(--font_em_4);
    color: var(--text_dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.section-nav-fab-back {
    display: block;
    margin-top: 0.5rem;
    cursor: pointer;
}

/* Section link list — styled to match the top dropdown drawer items
   (.PT_dropdownLink.pt-btn): small text, thin border, radius-morph hover. */
.section-nav-drawer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.section-nav-drawer-list li {
    margin: 0;
}

.section-nav-drawer-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    text-align: left;
    margin: 0;
    padding: 3px 10px;
    font-family: var(--textfont);
    font-size: var(--font_em_5);
    line-height: 1.35;
    color: var(--text_dark) !important;
    background-color: transparent;
    text-decoration: none !important;
    border: 1px solid var(--pt-border);
    border-radius: 2px;
    white-space: nowrap;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    will-change: border-radius, background-color;
    transition:
        border-radius var(--button-link-transition-duration) var(--ease-standard),
        background-color var(--button-link-transition-duration) var(--ease-standard),
        color var(--button-link-transition-duration) ease;
}

.section-nav-drawer-link:hover {
    border-radius: 18px;
    background-color: transparent;
}

.section-nav-drawer-link.active {
    font-family: var(--headingfont);
    border-color: var(--pt-border);
}

.section-nav-drawer-link.active::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background-color: var(--monconred);
    border-radius: 2px;
    pointer-events: none;
}

.section-nav-override-inner .section_nav_container {
    flex-direction: column;
}

/* !!! ===============================================================================================================*/
/* !!! MISC  */
/* ===================================================================================================================*/

.collapse_symbol {
    margin-left: 8px;
    margin-bottom: 4px;
    font-size: var(--font_em_4);
    transition: transform var(--button-link-transition-duration) ease-in-out;
}

.checkbox-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    padding: 5px;
}

.dash-delete-cell {
    height: 12px;
}

.fa,
.fas {
    margin: 0;
    padding: 0;
}

#howto-md img {
    max-width: 100%;
}

/* !!! ________Logo_entry_animation */

.logo-container {
    overflow: hidden;
    align-items: center;
    padding: 0;
    margin: 4px;
}

.rising-logo {
    animation: rise 1.5s ease-out forwards;
    position: relative;
    align-items: center;
}

.img {
    align-items: center;
}

@keyframes rise {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* !!! ===============================================================================================================*/
/* !!! JOB_CALENDAR (milestones grid) */
/* ===================================================================================================================*/

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: var(--pt-body-light);
}

.calendar-header {
    background: var(--pt-body-light);
    color: var(--text_dark);
    padding: 10px;
    text-align: center;
    font-family: var(--headingfont);
}

.calendar-day {
    background: var(--pt-body-light);
    min-height: 175px;
    padding: 5px;
    border: 1px solid var(--gray-100);
    position: relative;
    font-size: var(--font_em_4A);
    background-color: var(--gray-025);
    margin: 3px;
    border-radius: 8px;
}

.calendar-day.today {
    border: 2px solid var(--gray-800);
}

.calendar-day.empty {
    background-color: var(--gray-050);
}

.calendar-date {
    font-family: var(--headingfont);
    color: var(--text_dark);
}

.calendar-event {
    background: var(--gray-100);
    border: 1px solid var(--pt-border);
    margin: 2px 0;
    padding: 2px 4px;
    border-radius: 6px;
    font-size: var(--font_em_4A);
}

.calendar-event.TCO {
    background: var(--lightyellow);
}

.calendar_jobname {
    font-family: var(--headingfont);
    font-size: var(--font_em_5);
    color: var(--text_dark);
}

.calendar_milestone_type {
    font-family: var(--tablefont);
    font-size: var(--font_em_5A);
    color: var(--text_dark);
    margin: 2px 0;
}

.calendar_title {
    font-family: var(--headingfont);
    color: var(--text_dark);
    font-size: var(--font_em_2);
    margin-bottom: 4px;
}

/* ===================================================================================================================*/
/* !!! PROJECT_SUMMARY */
/* ===================================================================================================================*/

.projSum_image_container {
    position: relative;
}

.projSum_image_container:hover {
    cursor: pointer;
}

/* Condense the per-card info rows so each project card reads as a
   tight block. The generic .info_row / .grid_label / .grid_value
   styles are shared with other pages (ops chart, CSI cost model,
   project info modal, etc.), so we scope these overrides to the
   Project Summary grid container and avoid touching the base
   styles. */
#project_photo_grid .info_row {
    margin-bottom: 0;
}

#project_photo_grid .grid_label,
#project_photo_grid .grid_value {
    line-height: 1.15;
}

/* Project Summary cards must stay a fixed-height, single-line-per-row
   block so the 4-up grid lines up cleanly. Force every value onto one
   line and truncate with an ellipsis rather than letting long owners /
   architects / neighborhoods wrap and blow out the card height. The
   min-width:0 on both grid tracks lets the truncation actually engage
   inside the info_row grid. */
#project_photo_grid .info_row {
    grid-template-columns: 50% minmax(0, 1fr);
}

#project_photo_grid .grid_label,
#project_photo_grid .grid_value {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ===================================================================================================================*/
/* !!! PRECON_STAFFING — compact, outlined project sub-cards
/* ---------------------------------------------------------------------
/* Scoped to the Precon Staffing Chart page. Shrinks the shared Project
/* Summary sub-card (.card.level2) into a tight, outlined tile and renders
/* the project photo in black & white. Reuses the existing card / info_grid
/* markup; only sizing, outline, and a grayscale filter are added here. */
/* ===================================================================================================================*/

/* Even padding on all sides of the personnel cards. The base `.card` uses
   `padding: 0 0.8em 1.2em` (no top), which makes the top/bottom look uneven
   against the round photo; set an explicit symmetric box here. */
.precon_staffing .card:not(.level2) {
    padding: 1em !important;
}

/* Personnel-card header: circular staff photo to the LEFT of the name +
   summary info grid. Plain flexbox so it reuses the existing H4 / info_grid
   type. */
.precon_staffing .precon_staff_header {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1em;
    margin-bottom: 0.75em;
}

.precon_staffing .precon_staff_photo {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--pt-border-soft);
}

.precon_staffing .precon_staff_photo_empty {
    background-color: var(--gray-300);
}

.precon_staffing .precon_staff_meta {
    min-width: 0;
    flex: 1 1 auto;
}

.precon_staffing .precon_staff_meta h4 {
    margin-bottom: 0.25em;
}

/* Outline + full-bleed photo. We mirror the `:not(.nav):not(.warning)`
   qualifiers from the shared `.card.level2` reset so this selector has equal-
   or-higher specificity and our border/radius actually win over the
   `border: none !important` reset. Padding is zeroed so the photo bleeds to
   the card edges; text padding lives on `.precon_card_body`. The base `.card`
   already sets `overflow: hidden`, so the photo clips to the rounded corners. */
.precon_staffing .card.level2:not(.nav):not(.warning) {
    border: 1px solid var(--gray-300) !important;
    border-radius: 6px !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    font-size: 0.72em;
}

.precon_staffing .precon_card_body {
    padding: 0.4em 0.5em 0.5em;
}

.precon_staffing .card.level2 h5 {
    font-size: 1.05em;
    margin: 0 0 0.2em;
}

/* Round the photo's top corners to match the card's 6px radius (bottom stays
   square against the card body). Same `overflow:hidden` + `line-height:0`
   approach used by the PT Dashboard mini-card image container. */
.precon_staffing .projSum_image_container {
    border-radius: 6px 6px 0 0;
    overflow: hidden;
    line-height: 0;
}

/* The shared `.projSum_image_container` is clickable on the Project Summary
   page; these cards aren't interactive yet, so drop the pointer cursor. */
.precon_staffing .projSum_image_container:hover {
    cursor: default;
}

/* Black & white + darkened project photos. dmc.Image renders an <img>; the
   height is set via the Python `height` prop, so we only restyle. Darkening
   lets the light-gray job-number overlay read clearly. */
.precon_staffing .projSum_image_container img {
    filter: grayscale(100%) brightness(0.55);
}

/* Fallback for projects with no photo: a dark gray filled box matching the
   photo height instead of a broken/empty image. */
.precon_staffing .precon_no_photo {
    height: 80px;
    background-color: var(--gray-500);
}

/* Job number overlaid on the (darkened) photo in light-gray text. */
.precon_staffing .precon_job_overlay {
    position: absolute;
    bottom: 8px;
    left: 6px;
    z-index: 1;
    font-family: var(--tablefont_mono_bold);
    font-weight: bold;
    font-size: 0.85em;
    color: var(--gray-200);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

/* Inactive (non-active) assignments: a simple bullet list at the bottom of
   the staff card instead of full project photo cards. */
.precon_staffing .precon_inactive_list {
    margin-top: 0.75em;
}

.precon_staffing .precon_inactive_list h5 {
    margin-bottom: 0.25em;
}

/* Trim the browser-default ~40px <ul> indent so the bullet list lines up with
   the rest of the card content instead of looking left-offset. */
.precon_staffing .precon_inactive_list ul {
    margin: 0;
    padding-left: 1.2em;
}

/* ===================================================================================================================*/
/* !!! PT_DASHBOARD — mini project cards
/* ---------------------------------------------------------------------
/* Compact variant of the Project Summary card: photo + name + a small
/* %-complete badge overlaid on the photo. Each card is clickable and
/* fires the standard project-info modal. Sized to fit ~6–8 per row on
/* desktop so the strip reads as a quick portfolio scanner rather than
/* a full card grid. */
/* ===================================================================================================================*/

.pt_dash_mini_card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border-radius: 6px;
    padding: 4px;
    background-color: var(--pt-body-light, #ffffff);
    transition: var(--pt-transition);
}

.pt_dash_mini_card:hover {
    background-color: var(--pt-accent-light-05, rgba(43, 89, 69, 0.05));
    transform: translateY(-1px);
}

.pt_dash_mini_image_container {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    line-height: 0;
}

/* Render every mini-card project photo in black & white *and* ghost it
   back to roughly half opacity, so the progress overlay below + the
   project name above can carry the visual weight of the card. The
   selector targets the actual <img> dmc.Image renders inside this
   container — sibling absolutely-positioned children (the overlay +
   the %-badge) are unaffected and keep their full chroma/contrast. */
.pt_dash_mini_image_container img {
    filter: grayscale(100%);
    opacity: 0.55;
}

.pt_dash_mini_comp_pct {
    position: absolute;
    bottom: 4px;
    left: 4px;
    color: var(--gray-025, #ffffff);
    font-family: var(--headingfont);
    font-size: var(--font_em_4);
    line-height: 1;
    padding: 2px 6px;
    background-color: rgba(0, 0, 0, 0.45);
    border-radius: 4px;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.85);
    pointer-events: none;
    z-index: 2;
}

/* Vertical progress fill drawn over the mini-card photo. Anchored to
   the bottom and sized inline (Python sets height in px from the
   project's latest Comp%) so the strip reads like a vertical progress
   chart layered on the photos themselves. z-index sits below the
   %-complete badge (z-index: 2) so the number stays crisp regardless
   of how full the fill is.

   Color routing (layered, top-down):
   * Waterline (border-top): rgba of --monconred (#ed2037 →
     237,32,55) at 90% alpha, 1.5px so the only solid chroma on the
     card sits in this thin accent line marking the exact Comp%
     level.
   * Red glow (background-image): a vertical linear-gradient that
     starts at the waterline with ~30% monconred and fades to fully
     transparent ~30px below, so the red feels like it "bleeds" out
     of the waterline into the gray fill below. Uses a pixel stop
     (not a percentage) so the glow band is the same size regardless
     of how tall the overlay is — short progress fills (low %)
     render mostly as glow, tall fills (high %) carry the glow at
     the top with the gray fill dominating below.
   * Gray fill (background-color): rgba of --gray-800 (#3a3c3f →
     58,60,63) at 45% alpha. A calm neutral that visibly darkens the
     bottom of the (already ghosted) photo without using brand color.

   CSS variables can't carry per-property alpha directly, so the rgba
   triplets are hardcoded; if either token changes hue, update the
   rgba() literals here to match. */
.pt_dash_mini_progress_overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(58, 60, 63, 0.45);
    background-image: linear-gradient(
        to bottom,
        rgba(237, 32, 55, 0.30),
        rgba(237, 32, 55, 0.00) 30px
    );
    border-top: 1.5px solid rgba(237, 32, 55, 0.90);
    pointer-events: none;
    z-index: 1;
    transition: height var(--button-link-transition-duration) ease-in-out;
}

/* Suppress the red waterline + glow on near-complete (>= 97.5%)
   cards. Python opts each card in by adding this modifier class
   whenever ``_comp_pct_show_accent(...)`` returns False. The gray
   fill remains via the base rule above — only the chroma accent is
   removed, so the card reads as effectively "done" rather than as
   "still has work above the red line". */
.pt_dash_mini_progress_overlay--no-accent {
    background-image: none;
    border-top: 0;
}

.pt_dash_mini_name {
    font-family: var(--headingfont);
    font-size: var(--font_em_5);
    color: var(--text_dark);
    margin-top: 4px;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

/* Next-milestone pill at the bottom of each mini card. Stacks the
   milestone label over the date so longer phase names ("Superstructure
   Topout" etc.) wrap cleanly without spilling outside the card width. */
.pt_dash_mini_next_pill {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 4px;
    padding: 2px 6px;
    border-radius: 10px;
    background-color: var(--pt-body, #f3f3f3);
    border: 1px solid var(--pt-body-medium, #e8e8e8);
    line-height: 1.1;
    max-width: 100%;
}

.pt_dash_mini_pill_label {
    font-family: var(--headingfont);
    font-size: var(--font_em_6);
    color: var(--text_dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.pt_dash_mini_pill_date {
    font-family: var(--tablefont);
    font-size: var(--font_em_6);
    color: var(--pt-text-medium, #636363);
}

/* ===================================================================================================================*/
/* !!! OPS_CHART */
/* ===================================================================================================================*/

.opsChart_proj_card {
    border-radius: 4px;
    padding: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    /* Card height tuned so a 2-card column (natural stack, ~210px) and
       a 3-card smart-overlap column (~188px container) both sit inside
       the card after the header takes its natural ~65–70px. */
    height: 256px;
    overflow: visible !important;
    position: relative;
}

.opsChart_proj_card.NOTACTIVE {
    border: 1px solid var(--pt-disabled-border) !important;
    background-color: var(--pt-disabled-bg);
}

/* When the project is completed/inactive, card header text (project name,
   start date, TCO date, contract value) uses the unified disabled text
   color. Image overlays (jobno, comp%) keep their white-on-shadow look
   since they sit atop the gray image overlay. */
.opsChart_proj_card.NOTACTIVE .opsChart_proj_name,
.opsChart_proj_card.NOTACTIVE .opsChart_proj_info,
.opsChart_proj_card.NOTACTIVE .opsChart_role_type_stats {
    color: var(--pt-disabled-text) !important;
}

/* Project header containing the project name */
.opsChart_proj_header {
    width: 100%;
    margin: 0 0 2px;
    padding-bottom: 1px;
    display: inline-block;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    z-index: 100;
}

.opsChart_proj_name {
    font-family: var(--headingfont);
    font-size: var(--font_em_4);
    color: var(--text_dark);
    margin: 0 3px;
    display: inline-block;
}

.opsChart_proj_info {
    font-family: var(--textfont);
    font-size: var(--font_em_5);
    color: var(--text_dark);
    margin: 0;
    margin-left: 0.15em;
    display: inline-block;
}

/* Main content row that contains everything except the project name.
   Uses flex:1 + min-height:0 (instead of height:100%) so it takes
   exactly the space left over by the project header inside the
   flex-column project card. height:100% in that context triggers a
   flex-shrink tug-of-war with the header and lets the stacked staff
   cards bleed a few pixels past the card's bottom border. */
.opsChart_content_row {
    display: flex;
    width: 100%;
    align-items: flex-start;
    margin: 0;
    flex: 1;
    min-height: 0;
    padding-bottom: 6px;
    box-sizing: border-box;
}

/* Staff columns - each takes equal space of remaining width */
.opsChart_staff_column {
    flex: 1;
    min-width: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    margin: 1px;
    height: 100%;
    gap: 0.15em;
}

/* !!! ________Staff_Card */

/* Role-tinted staff-card backgrounds, image overlays, title tints, and
   years-badge tints have all been eliminated. Cards read on a neutral
   light-gray surface; the "latest assignment" signal is carried by the
   red border + red staff-name, and superseded assignments recede to a
   plain gray outline. The --opsChart_*_color tokens remain defined at
   :root because other views (e.g. .PILL.log / .PILL.tag in the safety
   manual) still reference them. */
.opsChart_staff_card {
    font-family: var(--tablefont);
    display: block;
    position: relative;
    align-items: center;
    border: 1px solid var(--monconred);
    border-radius: 5px;
    margin: 0.1em;
    padding: 0.1em 0.2em;
    box-shadow: var(--shadow-hover-soft);
    color: var(--text_dark);
    /* Solid light-gray fill (not transparent) so the 3+ staff card
       overlap in create_smart_staff_column reads cleanly — the upper
       card fully covers the card beneath it at the overlap area. */
    background-color: var(--gray-100);
    transition: var(--pt-transition);
    cursor: pointer;
}

.opsChart_staff_card.Future {
    border: 1px dashed var(--gray-300) !important;
    color: rgba(0,0,0,0) !important;
    box-shadow: None !important;
}

/* Superseded assignment: light-gray outline plus grayed-out text so
   the card visually recedes next to the red-bordered latest-assignment
   cards. The staff image is desaturated via the matching .NOTACTIVE
   rule on the image container below. All three (border, text, photo)
   use the same lighter gray so the card reads as uniformly dimmed. */
.opsChart_staff_card.NOTACTIVE {
    border: 1px solid var(--gray-300);
    color: var(--gray-300);
}

.opsChart_staff_card.NOTACTIVE .opsChart_staff_name {
    color: var(--gray-300) !important;
}

.opsChart_staff_card.Assign {
    color: var(--monconred) !important;
    border: 1px var(--monconred) solid;
}

.opsChart_staff_card.PRELIM {
    background-color: var(--lightyellow);
    border: 1px var(--monconred) solid;
}

.opsChart_staff_name.PRELIM {
    color: var(--monconred) !important;
}

.opsChart_staff_card:hover {
    border-radius: 12px;
    cursor: default;
    font-family: var(--headingfont) !important;
    z-index: 1000 !important;
}

.opsChart_staff_name {
    font-size: var(--font_em_5);
    font-family: var(--tablefont);
    margin: 0;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap;
    width: 100%;
    transition: var(--pt-transition);
}

.opsChart_staff_name:hover {
    cursor: pointer;
}

.opsChart_staff_card:hover .opsChart_staff_name {
    font-family: var(--headingfont) !important;
}

/* Latest-assignment cards get red staff-name text to reinforce the red
   border, plus a slightly heavier GT-Pressura Medium face (one step above
   the Regular --tablefont base, well short of Bold) so the active name
   reads a touch stronger than superseded ones. Superseded (.NOTACTIVE)
   cards keep the dark-text + regular-weight treatment so they visually
   recede. The title over the photo stays white. */
.opsChart_staff_card:not(.NOTACTIVE) .opsChart_staff_name {
    color: var(--monconred);
    font-family: var(--mediumfont);
}

/* !!! ________Staff_Images */

.opsChart_staff_image_container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    border-radius: 4px;
    margin-bottom: 2px;
    border: none;
}

.opsChart_staff_image {
    border: None !important;
    width: 100%;
    height: 5rem;
    object-fit: cover;
    display: block;
    cursor: pointer;
    object-position: center;
}

/* No-photo fallback on Ops Chart staff cards: plain gray box filling the
   same footprint as the photo (.opsChart_staff_image sets width/height)
   instead of a broken-image icon. Mirrors .precon_staff_photo_empty and
   .projinfo_hours_staff_photo_empty. */
.opsChart_staff_photo_empty {
    background-color: var(--gray-400);
}

/* Superseded staff image: partially desaturate and fade so the photo
   visually recedes in sync with the grayed card text/border. Latest-
   assignment cards (no .NOTACTIVE) keep their full-color photo. */
.opsChart_staff_image_container.NOTACTIVE .opsChart_staff_image {
    filter: grayscale(100%) brightness(1.15) contrast(0.75);
    opacity: 0.4;
}

.opsChart_staff_title {
    font-family: var(--headingfont) !important;
    font-size: var(--font_em_5);
    position: absolute;
    left: .5em;
    bottom: 0.25em;
    color: var(--gray-025);
    text-shadow: 0 0 12px rgba(0, 0, 0, 1) !important;
    overflow: hidden;
}

.opsChart_staff_title.NOTACTIVE {
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3) !important;
}
.opsChart_staff_title.NOTACTIVE.Future,
.opsChart_staff_title.Assign {
    text-shadow: None !important;
}

.opsChart_staff_years {
    font-family: var(--headingfont);
    font-size: var(--font_em_6);
    color: var(--text_dark);
    position: absolute;
    right: 4px;
    top: 6px;
    padding: 0.2em 0.4em;
    min-width: 2em;
    background-color: var(--gray-025);
    border: 1px solid var(--gray-500);
    border-radius: 12px;
    text-align: center;
    display: inline-block;
    box-sizing: border-box;
    cursor: pointer;
    vertical-align: middle;
}

/* Latest-assignment cards: years badge text + border pick up --monconred
   to match the card's red border and red staff-name treatment. */
.opsChart_staff_card:not(.NOTACTIVE) .opsChart_staff_years {
    color: var(--monconred);
    border-color: var(--monconred);
}

/* Superseded-assignment cards: years badge keeps its own --text_dark from
   the base rule above; align the numeral with the muted .NOTACTIVE name.
   Also lighten the badge border so it reads as uniformly dimmed alongside
   the card's own --gray-300 border. */
.opsChart_staff_card.NOTACTIVE .opsChart_staff_years {
    color: var(--gray-300);
    border-color: var(--gray-300);
}

/* !!! ________ProjInfo_Modal_Subheads */
/* Red hairline beneath every section subheading in the project info
   modal body (Basic Info, A/E Team, Design, Project Schedule, Trade
   Payment Breakdown, Subcontractor Commitments, Staff with 300+ Hours
   Logged, etc.). Mirrors the PDF export's section bands so every heading
   reads the same way — heading text, then a red rule — across web + PDF.
   Scoped to ``.modal-body`` so the modal-header title band (which already
   has its own ``pt-red-title-band`` treatment) is left untouched. */
.opsChart_proj_modal .modal-body h4 {
    border-bottom: 2px solid var(--monconred);
    padding-bottom: 0.28em;
    margin-bottom: 0.6em;
}

/* !!! ________ProjInfo_Hours_Staff */
/* Staff-card grid used in the project info modal to show everyone who
   logged 300+ hours on a job. Reuses the .opsChart_staff_card look but
   lays the cards out in a wrapping flex row (they are display-only, so
   the hover/pointer affordance from the interactive cards is removed)
   and gives each card a fixed width since it isn't inside the flex-sized
   opsChart_staff_column. The corner badge (.opsChart_staff_years) carries
   the hours figure instead of a role title. */
.projinfo_hours_staff_grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    margin-top: 0.4em;
}

.projinfo_hours_staff_card {
    width: 4.5rem;
    flex: 0 0 auto;
    cursor: default;
}

/* Shrink the photo so each card reads as a compact, roughly-square tile
   (like the dense Ops Chart staff cards) instead of the tall/elongated
   portrait the base .opsChart_staff_image 5rem height produced here. */
.projinfo_hours_staff_card .opsChart_staff_image {
    height: 3.5rem;
}

/* These cards are display-only, so suppress the interactive hover
   affordances the base .opsChart_staff_card carries (corner-radius grow,
   heading-font swap, z-index lift) and keep the resting appearance on
   hover. Cursor stays the default arrow everywhere on the card. */
.projinfo_hours_staff_card:hover {
    border-radius: 5px;
    font-family: var(--tablefont) !important;
    z-index: auto !important;
}

.projinfo_hours_staff_card:hover .opsChart_staff_name {
    font-family: var(--mediumfont) !important;
}

.projinfo_hours_staff_card,
.projinfo_hours_staff_card:hover,
.projinfo_hours_staff_card .opsChart_staff_name,
.projinfo_hours_staff_card .opsChart_staff_name:hover,
.projinfo_hours_staff_card .opsChart_staff_image {
    cursor: default;
}

/* No-photo fallback: a plain gray box filling the same footprint as the
   staff photo (the .opsChart_staff_image rule sets the width/height) so
   photoless staff read as a neutral placeholder rather than a broken
   image. Mirrors the .precon_staff_photo_empty treatment. */
.projinfo_hours_staff_photo_empty {
    background-color: var(--gray-300);
}

/* !!! ________Hours_Data_Currency_Warning */
/* Small muted caveat shown beneath every staff logged-hours display
   (project info modal, staff modal, Hours Stats tables, Management Time
   analysis) noting the date through which payroll hours are complete. */
.hours-data-warning {
    font-family: var(--tablefont);
    font-size: var(--font_em_5);
    font-style: italic;
    color: var(--gray-500);
    margin: 0.15em 0 0.5em;
    line-height: 1.3;
}

.transparentPhoto {
    opacity: 0 !important;
}

.opsChart_px_card_title {
    font-family: var(--headingfont);
    font-size: var(--font_em_2C);
    margin-bottom: 2px;
}

.opsChart_staff_temp_NOTACTIVE {
    position: absolute;
    top: 45%;
    left: 25%;
    transform: rotate(-45deg);
    font-family: var(--headingfont);
    color: var(--pt-disabled-text);
    text-shadow: 0 0 10px rgba(255, 255, 255, 1) !important;
}

.opsChart_staff_temp_ {
    position: absolute;
    top: 45%;
    left: 25%;
    transform: rotate(-45deg);
    font-family: var(--headingfont);
    color: var(--text_color_dark);
    text-shadow: 0 0 10px rgba(0, 0, 0, 1) !important;
}

/* Wrapper for card with image */
.opsChart_card_with_image {
    display: flex;
    flex-direction: row;
    width: 100%;
    margin: 0;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
    border-radius: 4px;
    align-items: stretch;
    background-color: var(--gray-025) !important;
}

/* !!! ________Project_Images */

.opsChart_proj_img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 6;
    border-radius: 4px 0 0 4px !important;
    filter: grayscale(100%) contrast(0.75) brightness(1.05);
    /* Ghost the photo back to ~half opacity over the white card
       background so the gray progress overlay (drawn on top, below
       the badge layer) reads as the dominant visual signal on the
       card. Applied uniformly to every photo regardless of project
       state — the active vs inactive distinction is now carried by
       the .NOTACTIVE modifier on the container, not by the photo
       itself. Mirrors the PT Dashboard mini-card photo treatment
       (.pt_dash_mini_image_container img). */
    opacity: 0.55;
}

.staff_modal_project_photo {
    width: 100%;
    height: 120px;
    object-fit: cover;
    object-position: center;
}

/* Modal title bands reuse the app-wide pt-red-title-band idiom
 * (emitted by ``make_modal_title_band`` / ``make_modal_header``) and are
 * deliberately styled to be *identical* to the page-level bands built by
 * ``create_layout``: same heading size, same caption, same red-outline
 * Download PDF pill. The only work done here is:
 *   1. reset font-size to 1rem so the band's em-based typography computes
 *      exactly as it does on a page (immune to any .modal-header sizing),
 *   2. zero the page-level band's outer margins (the modal-header supplies
 *      the gutters), and
 *   3. let the modal's H4 title render at the page band's H1 size, wrapping
 *      instead of ellipsizing (the global h4 rule nowraps + ellipsizes). */
.modal-header .pt-red-title-band {
    margin: 0;
    width: 100%;
    font-size: 1rem;
}

.modal-header .pt-red-title-band__main {
    min-width: 0;
}

.modal-header .pt-red-title-band h4 {
    font-size: var(--font_em_1);
    line-height: 1.05;
    margin: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

/* Style for the image container */
.opsChart_image_container {
    width: 100px;
    min-width: 5.5rem;
    margin: 0;
    padding: 0;
    border-radius: 4px 0 0 4px !important;
    border: 1px solid var(--gray-500);
    border-right: none;
    display: block;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

.opsChart_image_container.NOTACTIVE {
    border-left: 1px solid var(--pt-disabled-border) !important;
    border-top: 1px solid var(--pt-disabled-border) !important;
    border-bottom: 1px solid var(--pt-disabled-border) !important;
    border-radius: 4px 0 0 4px !important;
    z-index: 6;
}

.opsChart_image_container.NOTACTIVE::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--pt-disabled-overlay);
    pointer-events: none;
    z-index: 7;
    border-radius: 4px 0 0 4px !important;
}

/* Overlay for projects that haven't started */
.opsChart_no_image_fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-100);
    color: var(--text_dark);
    font-family: var(--headingfont);
    font-size: var(--font_em_4A);
    border-radius: 4px 0 0 4px;
}

.opsChart_card_with_image .opsChart_proj_card {
    border-radius: 0 4px 4px 0;
    width: calc(100% - 5rem);
    box-sizing: border-box;
    border: 1px solid var(--gray-500);
    border-left: none;
    margin: 0;
}

.custom-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 10px;
    width: 100%;
}

.opsChart_comp_percent {
    position: absolute;
    bottom: 0;
    left: 3px;
    color: var(--text_color_dark);
    font-family: var(--headingfont);
    font-size: var(--font_em_2B);
    z-index: 7;
    text-shadow: 0 0 12px rgba(0, 0, 0, 1) !important;
    padding: 2px 6px;
    cursor: pointer;
    transition: var(--pt-transition);
}

.opsChart_jobno {
    position: absolute;
    top: 3px;
    left: 3px;
    color: var(--text_color_dark);
    font-family: var(--headingfont);
    font-size: var(--font_em_4);
    z-index: 7;
    pointer-events: none;
    text-shadow: 0 0 12px rgba(0, 0, 0, 1) !important;
}

/* Vertical progress fill drawn over the project photo on the
   Operational Chart. Mirrors the PT Dashboard mini-card overlay
   (.pt_dash_mini_progress_overlay) — see that rule for the full
   design rationale of the layered color stack. Same recipe here:
   * Waterline (border-top): --monconred at 90% alpha, 1.5px so the
     only solid chroma marks the exact Comp% level.
   * Red glow (background-image): linear-gradient bleeding from the
     waterline down ~30px, monconred → transparent, so the red feels
     like it fades out of the waterline rather than ending abruptly.
   * Gray fill (background-color): --gray-800 at 45% alpha to
     visibly darken the bottom of the photo without using brand
     color across the whole fill.
   z-index 6 sits above the photo (also z-index 6, drawn earlier in
   DOM order) and below the comp% badge / job-number (z-index 7) so
   those text overlays stay legible. ``top`` is set inline by Python
   from row['Comp%'], so the overlay always anchors flush to the
   bottom regardless of the flex-stretched container height. */
.opsChart_progress_overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(58, 60, 63, 0.45);
    background-image: linear-gradient(
        to bottom,
        rgba(237, 32, 55, 0.30),
        rgba(237, 32, 55, 0.00) 30px
    );
    border-top: 1.5px solid rgba(237, 32, 55, 0.90);
    pointer-events: none;
    z-index: 6;
    transition: top var(--button-link-transition-duration) ease-in-out;
    /* Rounded bottom-left to match the parent .opsChart_image_container's
       4px 0 0 4px radius. The top corners stay square because the
       overlay's top edge is mid-photo (or, at very high Comp%, gets
       masked by the NOTACTIVE wash that has its own border-radius). */
    border-radius: 0 0 0 4px;
}

/* Suppress the red waterline + glow on near-complete (>= 97.5%)
   cards. Python opts each card in by adding this modifier class
   whenever row['Comp%'] >= _OPSCHART_PROGRESS_ACCENT_THRESHOLD.
   The gray fill remains via the base rule above. */
.opsChart_progress_overlay--no-accent {
    background-image: none;
    border-top: 0;
}

.opsChart_modal_button {
    cursor: pointer;
    transition: background-color var(--button-link-transition-duration) ease;
}

.opsChart_modal_button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.opsChart_role_type_stats {
    line-height: 0.75;
}

.card h4 + .opsChart_role_type_stats {
    margin-bottom: 3px !important;
}

.staff-project-card > div {
    white-space: nowrap;
    overflow: hidden;
}

/* Modal z-index fixes. Positioning/sizing for every modal lives in the
   single !!! MODAL block above — no per-modal overrides here. */
.modal-backdrop {
  z-index: 9000 !important;

}
.modal-backdrop.show {
    opacity: 1 !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
}
.modal {
  z-index: 9001 !important;
}

.modal-dialog {
    z-index: 9002 !important;
}

.ml-auto {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 5px 10px;
    background: var(--button_color_dark) !important;
    text-align: center;
    color: var(--text_dark);
    border-radius: 6px;
    margin: 12px;
    font-family: var(--buttonfont);
    transition: var(--pt-transition);
}

.ml-auto:hover {
    border-radius: 12px;
}

.opsChart_role_type_stats .span_1,
.opsChart_role_type_stats .span_2 {
    font-size: var(--font_em_5);
    color: var(--text_dark);
    margin-bottom: 0;
    margin-top: 0;
    padding: 0;
}

/* !!! ________Staff_History_Modal_Stuff */
.staff-history-proj-card {
    background-color: var(--pt-body-medium);
    padding: 0.4rem;
    border-radius: 0.25rem;
}

.staff-project-card {
    background-color: var(--pt-body-medium);
    padding: 0.4rem;
    border-radius: 0.25rem;
}

/* ===================================================================================================================*/
/* !!! DESIGN DATA */
/* ===================================================================================================================*/

/* Category Explorer — flat, editorial section model.
   Replaces the older cascading dd_cat_heading / dd_subcat1_heading /
   dd_subcat2_heading / dd_tiles_block stack (which produced an indented
   "staircase" of headings).  Now: one Category title at the top, then a
   stack of SubCat1 section blocks anchored by an <h2> (so they inherit
   the page-level red filet-rouge from .main-container h2::before), and
   SubCat2 boundaries collapse into hairline-flanked dividers inside the
   tile grid itself — no second indent, no extra heading level. */

.dd_cat_heading {
    font-size: var(--font_em_2);
    font-family: var(--headingfont);
    color: var(--text_dark);
    letter-spacing: -0.01em;
    margin: 0 0 1.5em 0;
}

.dd_sections {
    display: flex;
    flex-direction: column;
    gap: 2.5em;
}

.dd_section_block {
    /* Anchor target for the side-nav links; the offset keeps the H2 visible
       below the sticky top bar when jumped to. */
    scroll-margin-top: var(--top-offset);
}

.dd_section_title_row {
    display: flex;
    align-items: baseline;
    gap: 0.75em;
    margin-bottom: 0.75em;
}

.dd_section_title_row h2.dd_section_title {
    margin-top: 0.25em;
    margin-bottom: 0;
    flex: 0 1 auto;
}

/* Small mono count chip, riding the H2 baseline.  Uses the neutral
   pt-body fill so it sits quietly beside the brand red rule above. */
.dd_section_count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75em;
    height: 1.5em;
    padding: 0 0.55em;
    border-radius: 999px;
    background-color: var(--pt-body);
    color: var(--gray-700);
    font-family: var(--tablefont_mono);
    font-size: var(--font_em_5);
    line-height: 1;
    flex: 0 0 auto;
}

/* SubCat2 in-grid divider — spans every column of the dmc.SimpleGrid via
   grid-column: 1 / -1.  Hairline-flanked uppercase mono label, same
   editorial vocabulary used by .landing_tabs_strip / .landing_tab_count. */
.dd_sc2_divider {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.75em;
    margin-top: 0.5em;
    margin-bottom: 0;
}

.dd_sc2_divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--gray-200);
}

.dd_sc2_divider_label {
    font-family: var(--tablefont_mono);
    font-size: var(--font_em_5);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gray-700);
    white-space: nowrap;
}

/* Side-nav: tiny mono section number rendered before the SubCat1 label
   inside each nav button, so the editorial 01/02/03 numbering threads
   through both the page and the nav. */
.dd_nav_num {
    font-family: var(--tablefont_mono);
    font-size: var(--font_em_5A);
    color: var(--gray-500);
    margin-right: 0.6em;
    letter-spacing: 0;
}

.button-menu.pt-btn:hover .dd_nav_num {
    color: var(--pt-accent-light);
}

/* Multi-regression card — pin button to bottom */
.card.mr-card {
    display: flex;
    flex-direction: column;
}
.mr-card-button-row {
    position: absolute;
    bottom: 1.2em;
    left: 0.8em;
    width: 50%;
}
/* Multi-regression equation — allow natural wrapping */
.mr-equation {
    font-size: var(--font_em_3A);
    line-height: 1.6;
    word-wrap: break-word;
}
.mr-equation .mr-eq-fn {
    font-style: italic;
}
.mr-equation .mr-eq-var {
    font-style: italic;
}
.mr-equation .mr-eq-coef {
    font-family: 'Courier New', monospace;
}
.mr-equation .mr-eq-op {
    padding: 0 3px;
}
.dd_title {
    margin-bottom: 0 !important;
}

.dd_subtitle {
    margin-top: 0 !important;
    color: var(--gray-400);
    margin-bottom: 0 !important;
}

.dd_units {
    font-family: var(--textfont);
}

/* Interactive chart copy inside each card's "More" modal — capped width and
   centered so the taller figure doesn't stretch edge-to-edge in the modal. */
.dd_modal_chart {
    max-width: 560px;
    margin: 0 auto 1.25em auto;
}

/* Project-highlight dropdown — sits under the interactive chart copy inside
   each card's "More" modal; kept visually quiet so the chart stays primary. */
.dd_highlight_dropdown {
    margin-top: 0.4em;
    font-size: var(--font_em_5);
}

/* ===================================================================================================================*/
/* !!! DESIGN_RECS */
/* ===================================================================================================================*/

.card.designrecs {
    padding-left: 1em;
    padding-right: 3em;
    padding-bottom: 1em;
}

.designrecs_content {
    line-height: 0.7em;
    word-break: normal;
}

.designrecs_content_row {
    font-family: var(--textfont);
    margin-bottom: 0;
    margin-top: 0.5em;
}

.designrecs_content_row.type1 {
    font-family: var(--headingfont);
    font-size: var(--font_em_2);
}
.designrecs_content_row.type2 {
    font-family: var(--headingfont);
    font-size: var(--font_em_3);
    margin-left: 2em;
    margin-top: 1em;
    border-bottom: 1px solid var(--pt-border);
}
.designrecs_content_row.type3 {
    font-size: var(--font_em_4);
    margin-left: 4em;
}
.designrecs_content_row.type4 {
    font-size: var(--font_em_4);
    margin-left: 6em;
}
.designrecs_content_row.type5 {
    font-size: var(--font_em_4);
    margin-left: 8em;
}
.designrecs_content_row.type6 {
    font-size: var(--font_em_4);
    margin-left: 10em;
}

.designrecs_content_row.bulletpoint {
    margin-top: 0;
    /* Nudge bullet rows slightly to the right of the parent paragraph's
       body-text x-position. ``padding-left`` (rather than ``margin-left``)
       keeps the row's outer ``typeN`` margin intact — which is what
       anchors the bullet to its parent level — and just shifts the
       row's content (invisible-number placeholder + bullet glyph +
       text) inward by the indent step. */
    padding-left: 1.5em;
}

/* Numerical-code spans (the ``01.01.02 | `` prefix on every body
   row) are partially monospace on the Design Recs / SOP pages so
   the digit column stays uniformly wide and bullets line up at
   exactly the parent paragraph's body-text x-position. Only the
   digit groups (``.code-number-part``) and their wrapper
   (``.formatted-numerical-code``) get monospace. The dots
   (``.code-period``) and the trailing ``" | "`` separator
   (``.sManual_number``) intentionally fall through to the global
   ``--textfont`` proportional rules so they take their naturally
   narrower advance — a monospace ``.`` or ``|`` carries the full
   digit advance, which makes the prefix column read as obviously
   over-spaced.

   Alignment is preserved because every row at the same hierarchy
   depth uses the same dot / pipe / space count: the proportional
   advance of those glyphs applies uniformly across the column, so
   row-to-row x-positions still line up exactly. Bullet rows use
   their parent's ``No.`` (same dot count) for the hidden
   placeholder, so their hang-point matches the parent's body-text
   x-position as well. */
.card.designrecs .formatted-numerical-code,
.card.designrecs .code-number-part {
    font-family: var(--tablefont_mono) !important;
}

.card.designrecs .code-number-part.type1,
.card.designrecs .code-number-part.type2 {
    font-family: var(--tablefont_mono_bold) !important;
}

.designrecs_container_wrapper {
    /* Plain block flow — the table aligns with its parent
       paragraph's left edge (via ``parent-typeN`` margin on the
       container below) and runs flush to the right margin. */
}

/* !!! ________Tables */

.designrecs_table_container {
    font-size: inherit;
    margin-top: 1rem;
    margin-bottom: 1rem;
    /* Width is implicitly ``parent-width minus margin-left``;
       the inner ``.designrecs_table`` keeps ``width: 100%`` so it
       fills whatever space the container leaves. */
}

/* Left-align tables with the parent paragraph's *body text*
   (not its number prefix). Each value is the parent row's
   ``margin-left`` (matching ``.designrecs_content_row.typeN``)
   plus an estimate of the level's number-prefix width — i.e.
   the rendered width of ``01.01.05 | `` and so on. The wider
   the number, the bigger the offset. Eyeball-tuned in ``em``
   so the table's left edge sits under the body text rather
   than under the number column. */
.designrecs_table_container.parent-type1 { margin-left: 3em;  }
.designrecs_table_container.parent-type2 { margin-left: 5.5em; }
.designrecs_table_container.parent-type3 { margin-left: 8em;  }
.designrecs_table_container.parent-type4 { margin-left: 11em; }
.designrecs_table_container.parent-type5 { margin-left: 14em; }
.designrecs_table_container.parent-type6 { margin-left: 17em; }

.designrecs_table {
    width: 100%;
    max-width: 100%;
    /* ``auto`` lets columns size to content, but combined with the
       cells' ``white-space: normal`` below, long cells wrap rather
       than push the table past its container's right edge. The
       container's effective width is ``card_width - left_padding -
       right_padding - parent-typeN.margin-left``, so the table's
       right edge always lands at the card's right padding. */
    table-layout: auto;
    font-family: var(--textfont);
}

.designrecs_table_data {
    vertical-align: top !important;
    padding: 6px 2px !important;
    box-sizing: border-box;
    /* Allow cell content to wrap onto multiple lines so a long
       sentence in one cell doesn't push the table off the right
       edge of the card. ``word-wrap: break-word`` is the
       belt-and-suspenders fallback for pathological cases (e.g. a
       single unbroken URL or hyphenated chemical name) where the
       browser otherwise refuses to break. */
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: auto;
}

.designrecs_header {
    font-family: var(--mediumfont) !important;
    padding: 2px !important;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: auto;
}

.sManual_row_content_wrapper.docket {
    color: var(--monconred) !important;
}

.docket {
    color: var(--monconred) !important;
    font-size: var(--font_em_4);
}

.mpm {
    border-bottom: var(--sManual_link_bottom_border_2) !important;
}

.designrecs_toc_modifier {
    font-family: var(--tablefont);
}

/* TOC link sizing — the shared ``sManual_toc_link.typeN`` rules
   (around line 1763) set every TOC link to ``--font_em_4A``
   (0.75em), which reads as undersized on the Design Recs page
   where the surrounding section body is rendered at the much
   larger ``--font_em_2`` heading and ``--font_em_4`` body sizes.
   The Design Recs TOC container is emitted as ``card sManual toc``
   (see design_recs.py), NOT ``card designrecs toc``, so we scope
   via ``:has(.designRecs_toc_modifier)`` — a marker that only the
   Design Recs TOC rows carry — to bump the font while leaving the
   Safety Manual TOC (same container class) untouched. The TOC date
   column is intentionally NOT bumped — it sits at the right edge in
   a monospaced face and reads correctly at the smaller size. */
.card.sManual.toc:has(.designRecs_toc_modifier) .sManual_toc_link.type1,
.card.sManual.toc:has(.designRecs_toc_modifier) .sManual_toc_link.type2,
.card.sManual.toc:has(.designRecs_toc_modifier) .sManual_toc_link.type3 {
    font-size: var(--font_em_3);
}

/* ``##term##`` inline markup renders as ``<span class="topic_highlight">``
   in ``process_special_text_design_recs``. The shared
   ``.topic_highlight`` rule (around line 1490) uses ``--mediumfont``,
   which reads as a semibold weight on Pressura. On the Design Recs
   and SOP pages the user wants those spans to match the full
   heading weight (``--headingfont`` = ``GT-Pressura-Standard-Bold``)
   so the emphasis lands more decisively. Scope to ``.card.designrecs``
   so Site Response / Safety Manual keep the medium-weight default. */
.card.designrecs .topic_highlight {
    font-family: var(--headingfont);
}

/* ===================================================================================================================*/
/* !!! SOP */
/* The SOP page (utils/subapps/sop.py) is intentionally a visual twin of
   Design Recommendations. Its content rows reuse ``designrecs_content_row``
   wholesale via an additional ``sop_content_row`` marker class so any
   page-specific tweaks (e.g. the editorial-note line) can be scoped
   without affecting Design Recs. */
/* ===================================================================================================================*/

/* The outer card uses ``card designrecs sop`` so it inherits every
   ``card.designrecs`` rule above; this block exists only for SOP-only
   additions. */
.card.sop {
    /* placeholder: intentionally empty so SOP can diverge later without
       touching Design Recs styles. */
}

/* Editorial note: free-form ``Flag`` annotation, rendered as a small
   muted italic line hung under the parent row. Only appears when the
   on-screen ``Show Editorial Notes = Yes`` toggle is on. */
.sop_editorial_note {
    font-family: var(--textfont);
    font-style: italic;
    font-size: var(--font_em_5);
    color: var(--gray-600, #6b6f73);
    margin-top: 0.15em;
    margin-bottom: 0.35em;
    margin-left: 1.5em;
    line-height: 1.25;
}

/* Recent-edit highlight: rows whose ``ModDate`` equals the max
   ``ModDate`` in the dataset light up yellow when the user flips
   the ``Highlight Recent Edits`` toggle on. Reuses the same
   ``--sManual_yellow_highlight`` token the Safety Manual and TPB
   reports use for the on-screen yellow band so the visual language
   stays consistent. The rule covers both plain paragraph rows
   (``sop_content_row``) and individual table rows (``Tr``s tagged
   with the same modifier) — see ``utils/subapps/sop_functions.py``. */
.sop_recent_edit {
    background-color: var(--sManual_yellow_highlight) !important;
}

/* ``Internal Note`` column: free-form editorial annotation from the
   source author about a specific line (e.g. "this might belong
   elsewhere"). Rendered inline as red italic text immediately after
   the row's main content so the comment sits with the line it
   annotates. */
.sop_internal_note {
    color: var(--monconred);
    font-style: italic;
}

/* "Has internal note" marker: a small monconred dot anchored just
   inside the card's right padding so the reader can scan a long
   document and immediately spot which lines carry an editorial
   annotation from the source author. The dot is rendered regardless
   of whether the ``Show Internal Notes`` toggle is on — when off the
   dot is the only surface area of the annotation, telling the reader
   "there's a note here, flip the toggle to see it"; when on, it
   keeps the visual rhythm aligned across rows. Anchored ``right:
   -1.5em`` so the dot sits in the card's 3em right-padding zone
   instead of overlapping body text or wrapping anchors. */
.designrecs_content_row.sop_has_internal_note {
    position: relative;
}
.designrecs_content_row.sop_has_internal_note::after {
    content: "";
    position: absolute;
    top: 0.55em;
    right: -1.5em;
    width: 0.55em;
    height: 0.55em;
    border-radius: 50%;
    background-color: var(--monconred);
    pointer-events: none;
}

/* "Important change" flag: rows whose source ``Flag`` cell contains
   ``!!!`` hang a small bold-red ``!!!`` glyph in the card's left
   margin, vertically aligned with the start of the row's content.
   Reads like an icon so a reader scanning the document immediately
   spots an important new change. The marker is a real ``<span>``
   (see ``utils/subapps/sop_functions.py``) absolutely positioned
   against the row (which gets ``position: relative`` via the
   ``sop_flag_important`` class), so it floats left of the body text
   without taking part in the line's flow. */
.designrecs_content_row.sop_flag_important {
    position: relative;
}
.sop_flag_marker {
    position: absolute;
    left: -1.6em;
    top: 0;
    color: var(--monconred);
    font-family: var(--headingfont);
    font-weight: bold;
    font-size: var(--font_em_3);
    letter-spacing: -0.06em;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

/* Per-row ModDate pill — uses the shared ``make_inline_pill`` helper
   (``utils/functions.py``) so the styling matches every other pill on
   the site. Toggled on/off by the ``Show Mod Dates`` segmented
   control in ``utils/subapps/sop.py``. No dedicated CSS class —
   ``make_inline_pill`` carries its styling inline so we don't
   accumulate page-specific pill rules. */

/* "Latest Revision: MM/DD/YY" sub-heading rendered directly under
   the section's H1 (``type1`` row). The same date also appears in
   the TOC's date column for the matching section, so a reader
   scanning either index can immediately see when each section was
   last touched. Sized between the H1 and body type so it reads
   as a caption rather than a sibling heading. */
.sop_section_revdate {
    font-family: var(--textfont);
    font-size: var(--font_em_3A);
    color: var(--gray-600, #6b6f73);
    margin-left: 0;
    margin-top: -0.2em;
    margin-bottom: 0.6em;
    letter-spacing: 0.01em;
}

/* ===================================================================================================================*/
/* !!! BUDGET_SIMULATOR */
/* ===================================================================================================================*/

.bidSim_trade_filter_card {
    background-color: var(--gray-025);
    border-radius: 0.7em;
    padding: 1em !important;
    margin-bottom: 1em;
    box-shadow: 2px 4px 12px #00000014;
}

/* Unselected trade-filter cards share the unified disabled tokens. */
.bidSim_trade_filter_card_disabled {
    background-color: var(--pt-disabled-bg);
    border: 1px solid var(--pt-disabled-border);
    border-radius: 0.7em;
    padding: 1em !important;
    margin-bottom: 1em;
    box-shadow: none;
    color: var(--pt-disabled-text);
}

.bidSim_trade_filter_card_disabled .budSim_trade_filter_header,
.bidSim_trade_filter_card_disabled .budSim_filter_title {
    color: var(--pt-disabled-text) !important;
}

.budSim_filter_div {
    background-color: var(--gray-060);
    border-radius: 1em;
    padding: 0.5rem;
    min-height: 6em;
}

.budSim_trade_filter_header {
    font-family: var(--headingfont);
    font-size: var(--font_em_3A);
    color: var(--text_dark);
    margin-bottom: 0.25em;
    margin-top: 0;
    margin-left: 0.5em;
}

.budSim_filter_title {
    font-family: var(--headingfont);
    font-size: var(--font_em_5);
    color: var(--text_dark);
    margin-bottom: 0.25rem;
    margin-top: 0;
}

/* ===================================================================================================================*/
/* !!! SITE_RESPONSE */
/* ===================================================================================================================*/

.card.siteResponse {
    font-family: var(--textfont);
    padding-top: 1em;
    padding-bottom: 3em;
    color: var(--text_dark);
}

.card.siteResponse h4 {
    font-family: var(--headingfont);
    font-size: var(--font_em_2) !important;
    margin-bottom: .2rem;
    margin-top: 0 !important;
}

.card.siteResponse h4::before {
  content: "";
  display: block;
  height: 0.75em;
  background: var(--safety_hatch);
  border-radius: 3px;
}

.card.siteResponse .code-number-part {
    font-family: var(--mediumfont) !important;
}

.card.siteResponse .code-number-part.type1 {
    font-family: var(--headingfont) !important;
}

.siteRespo_content {
    overflow-wrap: normal;
    word-break: normal;
    line-height: .7em;
}

.siteRespo_content_row {
    margin-bottom: 0;
    margin-top: 0.25em;
    font-family: var(--textfont);
}

.siteRespo_content_row.type1 {
    font-family: var(--headingfont);
    font-size: var(--font_em_3);
    margin-bottom: 0.1em;
    margin-top: 1em;
    margin-left: 0;
}

.siteRespo_content_row.type2 {
    font-size: var(--font_em_4);
    margin-left: 2em;
}
.doc_links_container.type2 {
    margin-left: 4em;
}

.siteRespo_content_row.type3 {
    font-size: var(--font_em_4);
    margin-left: 4em;
}
.doc_links_container.type3 {
    margin-left: 6em;
}

.siteRespo_content_row.type4 {
    font-size: var(--font_em_4);
    margin-left: 6em;
}
.doc_links_container.type4 {
    margin-left: 8em;
}

.siteRespo_content_row.type5 {
    font-size: var(--font_em_4);
    margin-left: 8em;
}
.doc_links_container.type5 {
    margin-left: 10em;
}

.siteRespo_content_row.bulletpoint {
    margin-top: 0;
}

.card.siteResponse .topic_highlight {
    font-family: var(--mediumfont) !important;
    background-color: var(--lightyellow);
    word-break: normal;
}

.cc_grid_container {
    display: grid;
    grid-template-columns: 0.75fr 2fr 2fr 0.5fr;
    gap: 0;
    font-family: var(--textfont);
    font-size: var(--font_em_4);
}

.cc_grid_row {
    display: contents;
    position: relative;
}

.cc_grid_row:hover {
    font-family: var(--headingfont);
}

.cc_grid_item{
    padding: 0;
    border: none;
    white-space: nowrap;
    overflow: hidden;
}
.cc_grid_item.monobold {
    font-family: var(--tablefont_mono_bold);
}

.cc_grid_header {
    font-family: var(--headingfont);
    border-bottom: 1px solid var(--gray-750);
}

.deprecated {
    background-color: var(--pt-body-medium);
    color: var(--gray-400);
    text-decoration: line-through;

}

.update {
    background-color: var(--lightyellow);
}

.ccip_cost {
    background-color: var(--lightblue);
    color: var(--gray-400);
    text-decoration: line-through;
}

/* !!! ===============================================================================================================*/
/* !!! LEGEND  */
/* ===================================================================================================================*/

.legend_goal_value {
    background-color: var(--gray-100);
}

.legend_certified_value {
    background-color: var(--lightyellow);
}

/* !!! ===============================================================================================================*/
/* !!! ESTIMATE MODELS  */
/* ===================================================================================================================*/

.best_model_badge {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    clip-path: polygon(
        50% 0%,
        61% 35%,
        98% 35%,
        68% 57%,
        79% 91%,
        50% 70%,
        21% 91%,
        32% 57%,
        2% 35%,
        39% 35%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.4);
    border: 1px solid var(--gray-750);
}

/* !!! ===============================================================================================================*/
/* !!! COST MODEL  */
/* ===================================================================================================================*/

:root { --cm_table_fontsize: 10px; }

/* --- Audit Table --- */
.cm-audit-table        { width: 100%; border-collapse: collapse; }

.cm-th                 { padding: 3px 0; font-family: var(--headingfont);   border-bottom: 2px solid var(--pt-border);white-space: nowrap;
                         font-size: var(--font_em_2C);
                        }

.cm-td                 { vertical-align: top; border-bottom: 1px solid var(--gray-500);
                         font-family: var(--tablefont) !important;
                        }
table.cm-audit-table td { padding: 3px 0 !important; }

.cm-td-mono            { padding: 5px 0; border-bottom: 1px solid var(--pt-border);
                         text-align: right; vertical-align: middle;
                         font-family: var(--tablefont_mono) !important;}

/* Zebra on the per-section input / adjustments tables. Mix the gray-050
   token with 10% white so the banding is a touch lighter than the raw
   token — subtle stripes that read on dense rows without feeling heavy. */
table.cm-audit-table tbody tr:nth-child(even) td {
    background-color: color-mix(in srgb, var(--gray-050) 90%, #fff 10%);
}

/* Total Cost Model's large data table (make_table output inside
   #oc_table) gets the same 10%-lighter treatment, scoped to that table
   only so the CSI Cost Model summary table and other table.hover
   instances across the app keep their existing zebra. */
#oc_table table.hover tbody tr:nth-child(odd) td {
    background-color: color-mix(in srgb, var(--gray-150) 90%, #fff 10%);
}

.cm-td-middle          { vertical-align: middle; }
.cm-td-center          { text-align: center; }
.cm-td-right           { text-align: right; }

.cm-col-36             { width: 36px; }
.cm-col-44             { width: 44px; }
.cm-col-60             { width: 60px; }
.cm-col-72             { width: 72px; }
.cm-col-90             { width: 90px; }
.cm-col-115            { width: 115px; }
.cm-col-120            { width: 120px; }

.cm-dir                { margin-right: 3px; flex-shrink: 0; }
.cm-dir-minus          { color: #e05555; }
.cm-dir-plus           { color: #4a9e6b; }
.cm-dir-pm             { color: var(--gray-500); }

.cm-adj-lbl            { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 110px;
                         font-family: var(--tablefont) !important;
}

.cm-delta              { font-family: var(--tablefont_mono) !important;}
.cm-unit               { margin-left: 2px; white-space: nowrap;
                         flex-shrink: 0;
                        }

.cm-row-h              {
                        height: 17px;
                        display: flex; align-items: center;
                        vertical-align: middle; line-height: 1;
                        margin-bottom: 2px;
                        }
.cm-row-h-center       {
                        height: 17px;
                        display: flex; align-items: center; justify-content: center; vertical-align: middle; }
.cm-row-h-right        {
                        height: 17px;
                        display: flex; align-items: center; justify-content: flex-end;
                        vertical-align: middle; line-height: 1;
                        }
.cm-implied-val        { white-space: nowrap; }

.cm-pred-auto          { font-style: italic; }
.cm-fac-input          { width: 68px; height: 15px; padding: 0 3px; flex-shrink: 0;vertical-align: middle; }
.cm-switch-no-mb       { margin-bottom: 0; }

/* --- N Count Rows (stacked per sub-adjustment) --- */
.cm-n-row              {
                        height: 17px;
                        display: flex; align-items: center; justify-content: flex-end;vertical-align: middle;
                        }

/* Subtle N=0 indicator: light red pill on the value only. */
.cm-n-zero-pill {
    color: var(--monconred);
    font-weight: 600;
}

/* ── Back-to-top button — flat alt palette ──────────────────────────────── */
.back-to-top-btn {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    width: 40px;
    height: 40px;
    border-radius: 0;
    background-color: var(--pt-body-medium) !important;
    color: var(--text_dark) !important;
    border: none !important;
    box-shadow: none !important;
    font-size: var(--font_em_2C);
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition:
        opacity var(--button-link-transition-duration) ease,
        transform var(--button-link-transition-duration) ease,
        background var(--button-link-transition-duration) ease;
    pointer-events: none;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}
.back-to-top-btn.btt-visible {
    opacity: 0.3;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.back-to-top-btn.btt-visible:hover {
    opacity: 1;
    background: var(--gray-900);
}

/* !!! ===============================================================================================================*/
/* !!! MERGED ALT THEME RULES (no base-file equivalent)                                                                */
/* ===================================================================================================================*/
/* These rules originated in style-alt-overrides.css and have no direct counterpart in the base stylesheet. They still
   carry !important conservatively to beat library defaults (Bootstrap, Mantine, Plotly, react-select, AG Grid). */

/* -------------------------------------------------------------------------- */
/* Section H4 tone — match section H1 tone (--gray-750)                       */
/* -------------------------------------------------------------------------- */
#page-content h4,
.main-container h4 {
    color: var(--text_dark) !important;
}

/* Warning cards: header text must stay in warning red. This beats the
   #page-content / .main-container h4 ID-specificity rule above. */
#page-content .card.warning h4,
#page-content .card.warning h1,
#page-content .card.warning h2,
#page-content .card.warning h3,
#page-content .card.warning h5,
#page-content .card.warning h6,
.main-container .card.warning h4,
.main-container .card.warning h1,
.main-container .card.warning h2,
.main-container .card.warning h3,
.main-container .card.warning h5,
.main-container .card.warning h6 {
    color: var(--monconred) !important;
}

/* Disabled / inactive cards (.card.disabled used by Curves, .card-dashed used
   by Project Summary for not-yet-started projects): all header levels must
   render in the unified disabled text color. This beats the #page-content /
   .main-container h4 ID-specificity rule above. */
#page-content .card.disabled h1,
#page-content .card.disabled h2,
#page-content .card.disabled h3,
#page-content .card.disabled h4,
#page-content .card.disabled h5,
#page-content .card.disabled h6,
#page-content .card-dashed h1,
#page-content .card-dashed h2,
#page-content .card-dashed h3,
#page-content .card-dashed h4,
#page-content .card-dashed h5,
#page-content .card-dashed h6,
.main-container .card.disabled h1,
.main-container .card.disabled h2,
.main-container .card.disabled h3,
.main-container .card.disabled h4,
.main-container .card.disabled h5,
.main-container .card.disabled h6,
.main-container .card-dashed h1,
.main-container .card-dashed h2,
.main-container .card-dashed h3,
.main-container .card-dashed h4,
.main-container .card-dashed h5,
.main-container .card-dashed h6 {
    color: var(--pt-disabled-text) !important;
}

/* -------------------------------------------------------------------------- */
/* Landing hero: column labels + cards sit over dark photo                   */
/* -------------------------------------------------------------------------- */
.wrapper.landing-page-active .landing_column_title {
    color: rgba(230, 230, 230, 0.88) !important;
}

/* Landing grid only: frosted tiles over hero */
.wrapper.landing-page-active .landing_card {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(14px) saturate(1.25) !important;
    -webkit-backdrop-filter: blur(14px) saturate(1.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 0;
    color: rgba(255, 255, 255, 0.95);
    box-shadow: none !important;

    /* Uniform card height + stacked title/description for hover swap.
       Geometry is fully locked (box-sizing, height, min/max-height, fixed
       padding) so hovering NEVER changes tile size and siblings cannot be
       pushed down when the title↔description crossfade runs. */
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    align-items: start;
    box-sizing: border-box;
    /* Card geometry — sized so the longest 3-line description fits without
       clipping when hover swaps title -> text. Locked top/bottom so the
       crossfade NEVER changes tile height (would shove neighbors). */
    height: 5.75rem;
    min-height: 5.75rem;
    max-height: 5.75rem;
    padding: 0.55em 0.8em;
    gap: 0;
    overflow: hidden;
    transition:
        background 260ms ease,
        border-color 260ms ease,
        border-radius 260ms ease;
}

/* When the card sits inside the new tabbed .landing_grid, the parent gap
   handles spacing between tiles — clear the legacy margin so columns and
   rows align cleanly. */
.wrapper.landing-page-active .landing_grid .landing_card {
    margin-bottom: 0;
}

.wrapper.landing-page-active .landing_card:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.24) !important;
    border-radius: 14px;
    /* Padding intentionally unchanged on hover — changing it would shift
       tile geometry and push neighboring tiles in the column. */
}

/* Disabled hero-landing tile: keep the frosted geometry so the grid layout
   stays uniform, but dim it and disable hover/interaction. The unauthorized
   user still sees the tile (so they know the page exists) but cannot navigate
   to it. The title↔description crossfade is suppressed via opacity overrides
   on hover so the dimmed state stays stable. */
.wrapper.landing-page-active .landing_card.disabled,
.wrapper.landing-page-active .landing_card.disabled:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 0;
    cursor: not-allowed;
    opacity: 0.45;
    pointer-events: none;
}

.wrapper.landing-page-active .landing_card.disabled .landing_card_title {
    text-decoration: line-through;
}

.wrapper.landing-page-active .landing_card.disabled:hover .landing_card_title {
    opacity: 1;
    transform: translateY(0);
}

.wrapper.landing-page-active .landing_card.disabled:hover .landing_card_text {
    opacity: 0;
    transform: translateY(4px);
}

/* Stack title and description in the same grid cell so they can crossfade.
   min-height/min-width: 0 prevents the grid track from expanding to the
   intrinsic content size (default `auto`), which would otherwise push the
   tile taller and shove sibling tiles in the column. */
.wrapper.landing-page-active .landing_card_title,
.wrapper.landing-page-active .landing_card_text {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    margin: 0;
    min-height: 0;
    min-width: 0;
    transition:
        opacity 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
    pointer-events: none;
}

.wrapper.landing-page-active .landing_card_title {
    color: var(--text_color_dark) !important;
    letter-spacing: -0.02em;
    /* Allow 2-line wrapping instead of single-line ellipsis */
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.15;
    opacity: 1;
    transform: translateY(0);
}

.wrapper.landing-page-active .landing_card_text {
    color: rgba(255, 255, 255, 0.78) !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    opacity: 0;
    transform: translateY(4px);
}

.wrapper.landing-page-active .landing_card:hover .landing_card_title {
    opacity: 0;
    transform: translateY(-4px);
}

.wrapper.landing-page-active .landing_card:hover .landing_card_text {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .wrapper.landing-page-active .landing_card_title,
    .wrapper.landing-page-active .landing_card_text {
        transition: opacity 120ms linear;
        transform: none !important;
    }
}

/* -------------------------------------------------------------------------- */
/* Dash DataTable — even-row td tint (overrides the td bg in .dash-cell)     */
/* -------------------------------------------------------------------------- */
.dash-spreadsheet tbody tr:nth-child(even) td {
    background-color: var(--pt-body-light) !important;
}

.dash-filter input {
    background-color: transparent !important;
    color: var(--text_dark) !important;
    border: 1px solid var(--pt-border) !important;
    border-radius: 2px;
}

/* -------------------------------------------------------------------------- */
/* react-select — extra inner elements not styled by base                    */
/* -------------------------------------------------------------------------- */
.Select-placeholder,
.Select-value-label,
.Select-input > input {
    color: var(--text_dark) !important;
}

.Select-option.is-focused {
    background-color: var(--pt-accent-light-05) !important;
}

/* -------------------------------------------------------------------------- */
/* Mantine inputs — TextInput / NumberInput / Textarea / Input not in base   */
/* -------------------------------------------------------------------------- */
.mantine-Input-input,
.mantine-TextInput-input,
.mantine-NumberInput-input,
.mantine-Textarea-input {
    background-color: transparent !important;
    color: var(--text_dark) !important;
    border: 1px solid var(--pt-border) !important;
    border-radius: 0.5rem;
}

/* -------------------------------------------------------------------------- */
/* Plotly                                                                    */
/* -------------------------------------------------------------------------- */
.js-plotly-plot .plotly .main-svg {
    border-radius: 2px;
}

/* Keep the modebar tray transparent until interaction (Plotly fades in on hover) */
.js-plotly-plot .plotly .modebar {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.js-plotly-plot .plotly .modebar-btn {
    color: var(--text_dark) !important;
}

/* -------------------------------------------------------------------------- */
/* Scroll-driven H1 scramble reveal (per-char spans applied by                */
/* alt-heading-reveal.js). Chars show random glyphs and settle left-to-right */
/* into the real text when the heading enters the viewport. All timing lives */
/* in the JS; this CSS only keeps the churning glyphs from shifting layout   */
/* (each span's width is locked inline by the JS to its real glyph's width). */
/* -------------------------------------------------------------------------- */
#page-content .alt-heading-reveal .ahc,
.main-container .alt-heading-reveal .ahc {
    display: inline-block;
    text-align: center;
    white-space: pre;
    will-change: contents;
}

/* -------------------------------------------------------------------------- */
/* Kinetic red: content-change flash for any element tagged                   */
/* .pt-kinetic-number. pt-kinetic-number.js watches for text mutations and    */
/* re-applies .pt-kinetic-flash--on to retrigger the animation, giving KPI    */
/* values, counters, and live totals the same red→settle motion vocabulary   */
/* as the H1 typewriter reveal.                                               */
/* -------------------------------------------------------------------------- */
@keyframes pt-kinetic-flash {
    0%   { color: var(--monconred); }
    100% { color: var(--text_dark); }
}

.pt-kinetic-number.pt-kinetic-flash--on {
    animation: pt-kinetic-flash 900ms ease forwards;
}

@media (prefers-reduced-motion: reduce) {
    .pt-kinetic-number.pt-kinetic-flash--on {
        animation: none;
        color: var(--text_dark);
    }
}

/* -------------------------------------------------------------------------- */
/* Keyboard focus ring: single red accent reserved for :focus-visible so      */
/* mouse users never see it, but keyboard/accessibility users get a clear     */
/* brand-consistent indicator. :where() keeps specificity at 0 so any         */
/* component-specific focus style still wins.                                 */
/*                                                                            */
/* IMPORTANT: every selector below excludes descendants of Mantine components */
/* (`.mantine-* *`, plus the root elements themselves). Mantine v6 ships its  */
/* own accessible focus ring and — critically — dmc.MultiSelect's dropdown    */
/* closes as soon as focus lands on any of its internal descendants that      */
/* isn't part of its Popover tree. When we painted a bright red outline on    */
/* the tag remove-buttons and the internal search <input> we were (a)         */
/* showing phantom red halos inside the select, and (b) causing the menu to   */
/* flash open and immediately dismiss. Leaving Mantine to manage its own      */
/* focus rings fixes both symptoms.                                           */
/* -------------------------------------------------------------------------- */
:where(
    a,
    button,
    [role="button"],
    [tabindex]:not([tabindex="-1"]),
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea,
    summary,
    .pt-btn,
    .PT_dropdownLink,
    .section-nav-drawer-link
):focus-visible {
    outline: 2px solid var(--monconred-focus);
    outline-offset: 2px;
    border-radius: inherit;
}

/* Opt Mantine-component internals OUT of the app-wide red focus ring.
   Mantine v6 ships its own accessible focus ring; when we painted our
   red outline on the MultiSelect's internal search <input> and its tag
   remove-buttons (class names like .mantine-MultiSelect-searchInput,
   .mantine-MultiSelect-defaultValueRemove, .mantine-CloseButton, etc.)
   two things broke:
     1. Phantom red halos appeared inside the select — the outline is
        offset 2px so on tiny remove-X buttons it reads as loose red
        speckle, not an intentional focus mark.
     2. dmc.MultiSelect's Popover treats focus moving to any of those
        descendants as "focus left the input", which causes the dropdown
        menu to flash open and immediately dismiss. End-user symptom:
        "the menu won't open."
   Reverting outline/outline-offset here restores Mantine's own focus
   ring, which is already brand-neutral and accessible. :where() keeps
   specificity at 0 so any deliberate component override still wins. */
:where([class*="mantine-"]):focus-visible,
:where([class*="mantine-"] *):focus-visible {
    outline: revert;
    outline-offset: revert;
}

/* Nav-drawer links are app components that merely *live inside* a Mantine
   Drawer, so the blanket Mantine opt-out above would hand them the browser's
   default (blue) focus outline. Re-assert the app-wide red :focus-visible
   ring for them so a blue ring can never appear in the drawer. The drawer's
   inner wrapper carries tabIndex=-1 + data-autofocus (see main_layout.py) so
   Mantine's focus trap lands there on open — no link gets auto-focused — and
   the wrapper itself must never paint a ring. */
.mantine-Drawer-drawer .drawer_inner_wrapper:focus,
.mantine-Drawer-drawer .drawer_inner_wrapper:focus-visible {
    outline: none;
}
.mantine-Drawer-drawer .PT_dropdownLink:focus-visible {
    outline: 2px solid var(--monconred-focus);
    outline-offset: 2px;
    border-radius: inherit;
}

/* ========================================================================== */
/* !!! RED_GRAPHIC_SYSTEM                                                     */
/* -------------------------------------------------------------------------- */
/* Opt-in utility classes that give authors a shared graphic vocabulary for   */
/* --monconred. Every class is inert until applied, so adding them anywhere   */
/* in the app does NOT increase global red density — scarcity is enforced by  */
/* the author, not the stylesheet. All consume the derived tokens (or the    */
/* raw --monconred where full saturation is required for the graphic mark).  */
/* ========================================================================== */


/* -------------------------------------------------------------------------- */
/* 1. EDITORIAL / SWISS TYPOGRAPHIC MARKS                                     */
/*    Micro-glyphs that earn red its "signal character" status one mark       */
/*    at a time. Apply to <span>, or to a parent where noted.                 */
/* -------------------------------------------------------------------------- */

/* Leading numeral before a section heading: "01 · Overview"
   Usage: <h2><span class="pt-red-numeral">01</span> Overview</h2> */
.pt-red-numeral {
    color: var(--monconred);
    font-family: var(--headingfont);
    font-variant-numeric: tabular-nums;
    margin-right: 0.45em;
}

/* Red drop-cap on the first paragraph of an intro block.
   Usage: <p class="pt-red-dropcap">Lorem ipsum dolor…</p> */
.pt-red-dropcap::first-letter {
    float: left;
    font-family: var(--headingfont);
    font-size: 3.2em;
    line-height: 0.85;
    color: var(--monconred);
    padding: 0.05em 0.12em 0 0;
}

/* Pilcrow / section / number-sign lead-ins. Used BEFORE the content of the
   tagged inline element: <span class="pt-red-pilcrow">Note text</span> */
.pt-red-pilcrow::before { content: "¶ "; color: var(--monconred); }
.pt-red-section::before { content: "§ "; color: var(--monconred); }
.pt-red-numero::before  { content: "№ "; color: var(--monconred); }

/* Leading symbol in a KPI value: only the $/€/% glyph is red, digits stay
   in --text_dark. Usage: <span class="pt-red-symbol">$</span>1,240,000 */
.pt-red-symbol {
    color: var(--monconred);
    font-family: var(--headingfont);
    margin-right: 0.05em;
}

/* Red decimal point in a headline number.
   Usage: $1,240,000<span class="pt-red-decimal">.</span>00 */
.pt-red-decimal {
    color: var(--monconred);
    font-family: var(--headingfont);
}

/* Footnote marker (†, ‡, *) — superscripted, subtle.
   Usage: 12.4%<sup class="pt-red-foot">†</sup> */
.pt-red-foot {
    color: var(--monconred);
    font-size: 0.7em;
    vertical-align: super;
    line-height: 0;
    padding-left: 0.15em;
}

/* Red em-dash used as metadata separator.
   Usage: Project A <span class="pt-red-sep">—</span> Q3 2026 */
.pt-red-sep {
    color: var(--monconred);
    padding: 0 0.35em;
}

/* Red folio line: "— 14 —" style with red flanking dashes. Set the page
   number via data-folio: <span class="pt-red-folio" data-folio="14"></span> */
.pt-red-folio {
    display: inline-block;
    font-family: var(--headingfont);
    font-size: 0.72em;
    letter-spacing: 0.12em;
    color: var(--text_dark);
}
.pt-red-folio::before,
.pt-red-folio::after {
    content: "—";
    color: var(--monconred);
    padding: 0 0.4em;
}
.pt-red-folio::before { content: "— "; }
.pt-red-folio::after  { content: attr(data-folio) " —"; color: var(--monconred); }


/* -------------------------------------------------------------------------- */
/* 2. STRUCTURAL HAIRLINES — extended filet rouge                             */
/*    Thin red rules used as architectural dividers and leader lines.         */
/* -------------------------------------------------------------------------- */

/* Thin red vertical rule between columns. Place as a flex/grid child,
   or use inside a flex row. */
.pt-red-vrule {
    align-self: stretch;
    flex: 0 0 1px;
    width: 1px;
    background: var(--monconred-line);
    margin: 0 1rem;
}

/* Dimension line: horizontal hairline with 6px tick marks at each end
   (├────┤). Place directly under a number as its "measurement bar". */
.pt-red-dimline {
    position: relative;
    height: 8px;
    margin-top: 0.25em;
}
.pt-red-dimline::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--monconred);
}
.pt-red-dimline::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    border-left: 1px solid var(--monconred);
    border-right: 1px solid var(--monconred);
}

/* Leader line: hairline with a 5px red dot on the LEFT end, pointing away
   from an annotation toward the referenced element. */
.pt-red-leader {
    position: relative;
    height: 1px;
    background: var(--monconred);
    margin: 0.4em 0;
}
.pt-red-leader::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 50%;
    width: 6px;
    height: 6px;
    transform: translateY(-50%);
    background: var(--monconred);
    border-radius: 50%;
}

/* Corner tab: a 3px × 24px red bar pinned to the top-right of a card.
   Mirrors the left-rail pattern used for active nav items, so "primary"
   cards and "active" nav share one visual language. */
.pt-red-tab {
    position: relative;
}
.pt-red-tab::after {
    content: "";
    position: absolute;
    top: 10px;
    right: 0;
    width: 3px;
    height: 24px;
    background: var(--monconred);
    border-radius: 2px 0 0 2px;
    pointer-events: none;
}


/* -------------------------------------------------------------------------- */
/* 3. BRUTALIST-MODERN BLOCK MOVES                                            */
/*    Larger graphic gestures — still opt-in, still rare by design.           */
/* -------------------------------------------------------------------------- */

/* Oversized red-tint numeral living BEHIND a section as a folio mark.
   Usage: <section class="pt-red-bignum" data-bignum="03">…</section>
   The numeral never shifts layout (absolute + z-index:-1). */
.pt-red-bignum {
    position: relative;
    isolation: isolate;
}
.pt-red-bignum::before {
    content: attr(data-bignum);
    position: absolute;
    top: -0.15em;
    left: -0.1em;
    font-family: var(--headingfont);
    font-size: 8em;
    line-height: 1;
    color: var(--monconred-tint);
    letter-spacing: -0.04em;
    pointer-events: none;
    user-select: none;
    z-index: -1;
}

/* Title band: top + bottom red hairlines framing a section heading.
   The inline alternative to crop marks — red brackets sit in the page
   rhythm rather than hugging the corners of the whole content area.
   Wrap the label strip + heading together inside one band.
   Usage:
     <div class="pt-red-title-band">
       <div class="pt-red-labelstrip">Section 01 · Cash Balance</div>
       <h4>01 Cash Flow Reporting</h4>
     </div>

   Spacing rationale:
   - The baseline `margin-top` keeps a clear gap above the top red hairline
     so it reads as a deliberate bracket, not a border glued to whatever
     precedes it (card bottom edge, prior section, etc.).
   - `.section.first-section > .pt-red-title-band` gets extra top margin so
     the first band on a page sits well below the sticky frosted navbar's
     footprint instead of being kissed by its translucent lower edge on
     initial page load. The `first-section` class is stamped on the first
     rendered section by `create_layout()` — more reliable than any CSS
     sibling pseudo-class because anchor/nav-drawer <div>s can appear
     before the first <div class="section">. */
.pt-red-title-band {
    border-top: 1px solid var(--monconred);
    border-bottom: 1px solid var(--monconred);
    padding: 0 0 0.25em;
    margin: 1.25em 0 0.8em;

    /* Two-child flex row: the ``__main`` wrapper (H1 + caption stack) on
       the left, the optional ``__action`` slot (usually a thin red-outline
       button like "Download PDF") flush-right. ``align-items: center``
       sits the button optically on the H1's cap-height instead of the
       caption's baseline, so the red hairlines read as a single bracket.
       ``gap`` leaves breathing room between a long title and its action
       button without requiring per-button margins. */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
}

/* Extra clearance for the very first section's band — pushes the top red
   hairline below the navbar's frosted-glass footprint on initial load. */
.section.first-section > .pt-red-title-band {
    margin-top: 2.25em;
}

/* Left side of the band: the heading + caption stack. Keeping this in its
   own wrapper preserves the pre-flex vertical stacking rules (and makes
   ``first-child`` / ``last-child`` margin zeroing predictable). */
.pt-red-title-band__main {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;   /* so long titles can truncate / wrap without pushing the action off-page */
}
.pt-red-title-band__main > :first-child { margin-top: 0; }
.pt-red-title-band__main > :last-child  { margin-bottom: 0; }
.pt-red-title-band__main h1,
.pt-red-title-band__main h2,
.pt-red-title-band__main h3,
.pt-red-title-band__main h4 {
    margin-top: 0;
    margin-bottom: 0;
    line-height: 1.05;
}

/* Right side of the band: the action slot. ``flex: 0 0 auto`` keeps the
   button its natural width instead of stretching, and the slot is offset
   off the paper's right edge by the band's own right padding (zero) so it
   sits aligned with the red hairlines on either end. */
.pt-red-title-band__action {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

/* Thin red-outline button used inside a section title band (e.g. the
   "Download PDF" button on reports). Transparent fill, red border + red
   text at rest; inverts to solid red on hover. Small padding so it sits
   comfortably between the two red hairlines without ballooning the band. */
.pt-red-title-band__action .button-download,
.pt-red-title-band__action button {
    background-color: transparent !important;
    color: var(--monconred) !important;
    border: 1px solid var(--monconred) !important;
    border-radius: 6px;
    padding: 4px 10px;
    margin: 0;
    font-family: var(--textfont);
    font-size: var(--font_em_4A);
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--button-link-transition);
}
.pt-red-title-band__action .button-download:hover,
.pt-red-title-band__action button:hover {
    background-color: var(--monconred) !important;
    color: #ffffff !important;
}

/* Input + Download-PDF pair living inside the title band (e.g. the
   Curves view's "Project name" field next to its Download button).
   Keeps the two controls flush-right between the red hairlines with a
   small gap. The input mirrors the Download button's exact box model
   (box-sizing, padding, border, border-radius, font-size, line-height,
   letter-spacing) so the two controls render at identical heights and
   share the same thin red-outline shape — only their content width
   differs. Set ``box-sizing: border-box`` on both so border + padding
   are included in the computed height, guaranteeing pixel parity
   regardless of the viewport font-size scale. */
.pt-red-title-band__action .pt-title-band-input-group {
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.pt-red-title-band__action .pt-title-band-input-group .button-download,
.pt-red-title-band__action .pt-title-band-input-group input {
    box-sizing: border-box;
}
.pt-red-title-band__action .pt-title-band-input-group input {
    /* Every box-model token below (padding, border, border-radius, font,
       line-height, letter-spacing) is pulled verbatim from the
       Download button rule above — do not diverge these values or the
       input and button will render at different heights. */
    padding: 4px 10px;
    margin: 0;
    border: 1px solid var(--monconred) !important;
    border-radius: 6px;
    background-color: transparent !important;
    color: var(--monconred) !important;
    font-family: var(--textfont);
    font-size: var(--font_em_4A);
    line-height: 1.3;
    letter-spacing: 0.04em;
    cursor: text;
    white-space: nowrap;
    transition: var(--button-link-transition);
    /* Same visual width as the Download button so the two controls
       read as a matched pair. Narrow enough for short project names;
       the browser lets the user keep typing past the visible width
       (the caret scrolls) so longer names aren't truncated in the
       payload. */
    width: 140px;
}
.pt-red-title-band__action .pt-title-band-input-group input::placeholder {
    color: var(--monconred) !important;
    opacity: 0.55;
    letter-spacing: 0.04em;
}
.pt-red-title-band__action .pt-title-band-input-group input:focus {
    outline: none;
    background-color: rgba(237, 32, 55, 0.06) !important;
    color: var(--text_dark) !important;
}

/* Decorative label strip above a heading: a 28px red rule + small all-caps
   label. Usage: <div class="pt-red-labelstrip">Section 03 / Variance</div> */
.pt-red-labelstrip {
    display: flex;
    align-items: center;
    gap: 0.6em;
    font-family: var(--headingfont);
    font-size: 0.72em;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--monconred);
    margin-bottom: 0.35em;
}
.pt-red-labelstrip::before {
    content: "";
    display: inline-block;
    height: 2px;
    width: 28px;
    background: var(--monconred);
}

/* Byline caption beneath a title-band heading. Uses the light text
   face (--textfont) instead of the bold heading face so it reads as
   editorial metadata rather than chrome. Uppercase + modest letter-
   spacing keeps the strip legible at small sizes.
   Usage: <div class="pt-red-caption">Section 01 · Cash Balance — file.py · Rev. 2026-04-19</div> */
.pt-red-caption {
    font-family: var(--textfont);
    font-size: 0.7em;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--monconred);
    margin: 0.1em 0 0;   /* ~2px more breathing room below the H1 */
    line-height: 1.2;
}

/* Red box fill behind a single word in a heading — the "one word that
   matters". Use sparingly: max one per page.
   Usage: <h1>Budget <span class="pt-red-fill">Variance</span></h1> */
.pt-red-fill {
    display: inline-block;
    padding: 0 0.22em;
    background: var(--monconred);
    color: var(--gray-025);
    font-family: var(--headingfont);
    border-radius: 2px;
    line-height: 1.15;
}

/* Meta strip across the top of a report page: top/bottom red hairlines,
   small uppercase text, red bullet separators between children.
   Usage: <div class="pt-red-metastrip"><span>…</span><span>…</span></div> */
.pt-red-metastrip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-family: var(--textfont);
    font-size: 0.72em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text_dark);
    border-top: 1px solid var(--monconred);
    border-bottom: 1px solid var(--monconred);
    padding: 0.4em 0;
    margin-bottom: 1.25rem;
}
.pt-red-metastrip > :not(:first-child)::before {
    content: "•";
    color: var(--monconred);
    margin: 0 0.6em;
    display: inline-block;
}


/* -------------------------------------------------------------------------- */
/* 4. CROP MARKS / REGISTRATION MARKS                                         */
/*    Print-production signature marks. Authored-object feel, almost free.    */
/* -------------------------------------------------------------------------- */

/* Four red L-shaped crop marks in the corners of the tagged element,
   offset 8px from the edges. Applied via a single ::before pseudo using
   a composite multi-stop background — no extra markup required.           */
.pt-red-cropmarks {
    position: relative;
}
.pt-red-cropmarks::before {
    content: "";
    position: absolute;
    inset: 8px;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size:
        16px 1px, 1px 16px,
        16px 1px, 1px 16px,
        16px 1px, 1px 16px,
        16px 1px, 1px 16px;
    background-position:
        top left, top left,
        top right, top right,
        bottom left, bottom left,
        bottom right, bottom right;
    background-image:
        linear-gradient(var(--monconred), var(--monconred)),
        linear-gradient(var(--monconred), var(--monconred)),
        linear-gradient(var(--monconred), var(--monconred)),
        linear-gradient(var(--monconred), var(--monconred)),
        linear-gradient(var(--monconred), var(--monconred)),
        linear-gradient(var(--monconred), var(--monconred)),
        linear-gradient(var(--monconred), var(--monconred)),
        linear-gradient(var(--monconred), var(--monconred));
}

/* Corner brackets — same mechanic as crop marks, but hugging the edges
   (inset 0) with 12px arms. Use to frame an "active" or "selected" region. */
.pt-red-brackets {
    position: relative;
}
.pt-red-brackets::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size:
        12px 1px, 1px 12px,
        12px 1px, 1px 12px,
        12px 1px, 1px 12px,
        12px 1px, 1px 12px;
    background-position:
        top left, top left,
        top right, top right,
        bottom left, bottom left,
        bottom right, bottom right;
    background-image:
        linear-gradient(var(--monconred), var(--monconred)),
        linear-gradient(var(--monconred), var(--monconred)),
        linear-gradient(var(--monconred), var(--monconred)),
        linear-gradient(var(--monconred), var(--monconred)),
        linear-gradient(var(--monconred), var(--monconred)),
        linear-gradient(var(--monconred), var(--monconred)),
        linear-gradient(var(--monconred), var(--monconred)),
        linear-gradient(var(--monconred), var(--monconred));
}

/* Registration target (concentric circles + crosshair). Inline SVG so it
   scales crisply at any size. Reserve for ONE occurrence per page — it's
   a signature mark, not an icon. */
.pt-red-regmark {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: no-repeat center / contain
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23ed2037' stroke-width='1'><circle cx='10' cy='10' r='8'/><circle cx='10' cy='10' r='3'/><line x1='0' y1='10' x2='20' y2='10'/><line x1='10' y1='0' x2='10' y2='20'/></svg>");
}


/* -------------------------------------------------------------------------- */
/* 7. LIST & CALLOUT ORNAMENT                                                 */
/*    Replaces default browser bullets with disciplined red marks.            */
/* -------------------------------------------------------------------------- */

/* Red square bullet list. <ul class="pt-red-list">…</ul> */
.pt-red-list {
    list-style: none;
    padding-left: 1.2em;
    margin: 0.5em 0;
}
.pt-red-list > li {
    position: relative;
    padding-left: 0;
    margin-bottom: 0.25em;
    font-size: var(--font_em_4);
}
.pt-red-list > li::before {
    content: "";
    position: absolute;
    left: -1em;
    /* Vertically center the bullet on the first line of text. ``0.5lh``
       is "halfway down one line-height"; ``translateY(-50%)`` then
       shifts the 6px square so its own center sits exactly there.
       Robust across whatever font-size / line-height the surrounding
       text inherits, so the bullet never drifts above or below the
       cap-height as it did with the old fixed ``top: 0.55em`` rule. */
    top: 0.5lh;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--monconred);
}

/* Triangle variant — for items that imply expansion or a next step.
   <ul class="pt-red-list pt-red-list--tri">…</ul> */
.pt-red-list.pt-red-list--tri > li::before {
    content: "";
    width: 0;
    height: 0;
    background: transparent;
    border-left: 6px solid var(--monconred);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    /* Same centering recipe as the square bullet — half a line-height
       down, then shifted up by half the triangle's height (8px / 2) so
       the marker sits visually on the first text line. */
    top: 0.5lh;
    transform: translateY(-50%);
}

/* Red numbered list with tabular, leading-zero numerals.
   <ol class="pt-red-olist">…</ol> */
.pt-red-olist {
    list-style: none;
    counter-reset: pt-red-olist;
    padding-left: 2.4em;
    margin: 0.5em 0;
}
.pt-red-olist > li {
    position: relative;
    counter-increment: pt-red-olist;
    margin-bottom: 0.25em;
}
.pt-red-olist > li::before {
    content: counter(pt-red-olist, decimal-leading-zero) ".";
    position: absolute;
    left: -2.2em;
    top: 0;
    width: 2em;
    color: var(--monconred);
    font-family: var(--headingfont);
    font-variant-numeric: tabular-nums;
    text-align: right;
    padding-right: 0.4em;
}

/* Callout / note block: 2px red left border + optional red lead word.
   Usage:
     <div class="pt-red-callout">
       <span class="pt-red-callout-lead">Note —</span>
       Rest of the note text in normal color.
     </div> */
.pt-red-callout {
    border-left: 2px solid var(--monconred);
    padding: 0.35em 0 0.35em 0.85em;
    margin: 0.75em 0;
    background: var(--monconred-tint);
}
.pt-red-callout-lead {
    color: var(--monconred);
    font-family: var(--headingfont);
    margin-right: 0.3em;
}


/* -------------------------------------------------------------------------- */
/* 8. GANTT-BAR TABLE CELLS                                                   */
/*    Year-column cells in tables that approximate a Gantt timeline render    */
/*    as filled bar segments instead of 'X' marks. Adjacent active cells     */
/*    form a single continuous bar — there's no horizontal padding or gap    */
/*    between cells, so a contiguous run reads as one rectangle.             */
/*    Used by the Inflation Calculator's observation-type table.             */
/* -------------------------------------------------------------------------- */

.gantt-cell {
    padding: 0 !important;
    width: 18px;
    min-width: 18px;
    box-sizing: border-box;
    /* line-height: 0 keeps the gantt cells from adding their own
       baseline contribution, so row height is set entirely by the
       text-bearing cells (Type, Date_min, etc.). The bar height
       below is intentionally a hair under that natural row height. */
    line-height: 0;
}

.gantt-cell .gantt-bar {
    height: 1em;
    width: 100%;
    background-color: transparent;
}

.gantt-cell--active .gantt-bar {
    background-color: var(--gray-600);
}

/* Rounded ends only at the actual start/end of a contiguous run, so the
   bar reads as one chip across multiple cells. */
.gantt-cell--start .gantt-bar {
    border-top-left-radius: 2px;
    border-bottom-left-radius: 2px;
}

.gantt-cell--end .gantt-bar {
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
}


/* -------------------------------------------------------------------------- */
/* 9. COLOPHON / BRAND SIGNATURE                                              */
/*    Footer "signed document" block + brand-wordmark underline.              */
/* -------------------------------------------------------------------------- */

/* Colophon strip at the bottom of a report page.
   Usage:
     <footer class="pt-red-colophon">
       <span class="pt-red-colophon-mark">Construction Curves</span>
       <span>Generated 2026-04-19 · v1.4</span>
     </footer> */
.pt-red-colophon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    border-top: 1px solid var(--monconred);
    padding: 0.8em 0 0;
    margin-top: 2rem;
    font-family: var(--textfont);
    font-size: 0.72em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text_dark);
}
.pt-red-colophon-mark {
    color: var(--monconred);
    font-family: var(--headingfont);
    letter-spacing: 0.05em;
}

/* Red 1px underline beneath the brand wordmark / logo, for the active page
   heraldic "you are here" moment. */
.pt-red-brand-underline {
    position: relative;
    display: inline-block;
}
.pt-red-brand-underline::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.18em;
    height: 1px;
    background: var(--monconred);
}

/* Generic red inline glyph — convenience wrapper when none of the more
   specific classes fit (e.g. a standalone &, @, or № in brand display). */
.pt-red-glyph {
    color: var(--monconred);
    font-family: var(--headingfont);
}
/* ========================================================================== */
/* !!! END RED_GRAPHIC_SYSTEM                                                 */
/* ========================================================================== */


/* ========================================================================== */
/* !!! PRINT_STYLES_OPSCHART                                                  */
/*                                                                            */
/* Secondary affordance: if a user invokes the browser's native print dialog  */
/* (Cmd+P / Ctrl+P) on the Operational Chart page these rules produce a       */
/* readable print. The primary "Download PDF" export is server-rendered via   */
/* ReportLab (see utils/functions_opschart_pdf.py) and does NOT rely on any   */
/* of the CSS below. Screen rendering is unaffected — rules are all scoped    */
/* inside @media print.                                                       */
/* ========================================================================== */

@media print {
    /* Force Chrome/Safari to honor background colors, borders, and custom    */
    /* fills that are otherwise stripped out of printed output by default.    */
    *,
    *::before,
    *::after {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    /* Letter landscape fits the 2-column project grid comfortably at native */
    /* scale; the user can still change paper size in the print dialog.      */
    @page {
        size: letter landscape;
        margin: 0.35in 0.3in;
    }

    html,
    body {
        background: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* ---- Hide app chrome -------------------------------------------------- */
@media print {
    .PT_navbar_wrapper,
    #PT_navbar_wrapper,
    .PT_navbar,
    .navigation_column,
    #nav_column,
    .section-nav-fab-root,
    .section-nav-drawer,
    .back-to-top-btn,
    .footer_section,
    .pagecontent,
    #page-content1,
    #page-content2,
    .content_settings,
    .dash-debug-menu,
    .dash-debug-menu__outer,
    #debug-console,
    .opsChart_modal_button:not(.opsChart_image_container) {
        display: none !important;
    }
}

/* ---- Expand the main content column to the full printable area -------- */
@media print {
    .wrapper,
    .page,
    .main-container,
    .content_container,
    .content,
    .layout-with-footer,
    #page-content {
        display: block !important;
        grid-template-columns: none !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        overflow: visible !important;
        gap: 0 !important;
    }

    .section {
        padding: 0 !important;
        margin: 0 0 0.2in 0 !important;
        background: transparent !important;
        page-break-before: auto;
    }

    /* The "even" sections use negative side margins for a full-bleed band    */
    /* on screen — kill that in print so nothing bleeds off the page.         */
    .section.even_section {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        background: transparent !important;
    }

    .section > h1 {
        font-size: 14pt !important;
        line-height: 1.2 !important;
        margin: 0 0 0.1in 0 !important;
        padding: 0 !important;
        page-break-after: avoid;
        break-after: avoid-page;
    }
}

/* ---- Disable motion / glow that degrades raster fidelity in PDFs ------ */
@media print {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
        cursor: default !important;
    }

    /* Soften (don't kill) the shadowed overlay labels so they stay legible  */
    /* against project photos while not blurring the vector snapshot.       */
    .opsChart_comp_percent,
    .opsChart_jobno {
        text-shadow: 0 0 3px rgba(0, 0, 0, 0.9) !important;
    }

    img {
        image-rendering: -webkit-optimize-contrast;
        max-width: 100% !important;
    }
}

/* ---- Ops-Chart grid + cards: keep visual density, avoid split cards --- */
@media print {
    .custom-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 6pt !important;
        width: 100% !important;
    }

    .opsChart_card_with_image,
    .opsChart_proj_card,
    .opsChart_px_div > *,
    .opsChart_staff_card,
    .staff-history-proj-card,
    .staff-project-card {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    .opsChart_px_card_title {
        break-after: avoid !important;
        page-break-after: avoid !important;
    }

    /* Drop the shadow-based card elevation — prints as a muddy gray box     */
    /* and contributes nothing useful to a presentation PDF.                 */
    .opsChart_card_with_image,
    .opsChart_proj_card,
    .card {
        box-shadow: none !important;
    }

    /* Keep modals + toasts out of the printed output regardless of state. */
    .modal,
    .modal-backdrop,
    .dbc-modal,
    .opsChart_staff_modal,
    #modal-container,
    #staff-modal-container {
        display: none !important;
    }
}

/* ========================================================================== */
/* !!! END PRINT_STYLES_OPSCHART                                              */
/* ========================================================================== */


/* ========================================================================== */
/* !!! CSI_COST_MODEL · ACCURACY_KPIS                                         */
/* -------------------------------------------------------------------------- */
/* Out-of-sample MAPE + LOOCV R² surfaced as plain red text inline with the  */
/* Adjustments card header, placed directly before the LOOCV Backtest button */
/* so the readout reads as the button's caption. No border, no background,  */
/* no padding — monconred ink is the entire visual signal, and the text     */
/* stays smaller than the H4 card title so it never upstages it.            */
/* ========================================================================== */

.csi-accuracy-kpi {
    display: inline-flex;
    align-items: baseline;
    color: var(--text_dark);
    /* Match the section total's .span_2 sizing so the red readout sits on
       the same typographic baseline as the dollar total next to it. */
    font-size: var(--font_em_4A);
    line-height: 1.2;
    white-space: nowrap;
}

.csi-accuracy-kpi__label {
    font-family: var(--textfont);
    font-weight: 400;
    letter-spacing: 0.04em;
    margin-right: 0.3em;
}

.csi-accuracy-kpi__value {
    font-family: var(--headingfont);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.csi-accuracy-kpi__sep {
    opacity: 0.55;
    margin: 0 0.15em;
}

