
/*! BSCRS FINAL MOBILE + DYNAMIC TERMS POLISH - loaded last - v20260830mobilefinal */
:root{
    --bscrs-touch:44px;
    --bscrs-mobile-pad:14px;
    --bscrs-line:#d9e6f3;
    --bscrs-navy:#07143f;
    --bscrs-blue:#0d4fa3;
    --bscrs-teal:#10b9c9;
    --bscrs-soft:#f5f8fc;
    --bscrs-text:#223044;
}

/* Universal overflow protection */
html,body{
    max-width:100%!important;
    overflow-x:hidden!important;
}
*{
    box-sizing:border-box!important;
}
img,svg,video,canvas,iframe{
    max-width:100%!important;
    height:auto!important;
}
pre,code{
    white-space:pre-wrap!important;
    word-break:break-word!important;
}
table{
    width:100%!important;
    border-collapse:collapse!important;
}
.table-wrap,
.responsive-table-wrap,
.fascrs-auto-table-wrap{
    max-width:100%!important;
    overflow-x:auto!important;
    -webkit-overflow-scrolling:touch!important;
    border-radius:12px!important;
}

/* Touch and readable forms */
button,.btn,input,select,textarea,a{
    -webkit-tap-highlight-color:rgba(16,185,201,.18)!important;
}
button,.btn,
html body.fascrs-reference-mode .isj-main-nav > a,
html body.fascrs-reference-mode .isj-main-nav .nav-dropdown > a,
html body.fascrs-reference-mode .admin-sidebar-ojs a,
html body.fascrs-reference-mode .fascrs-panel-action-grid a,
html body.fascrs-reference-mode .fascrs-resource-card,
html body.fascrs-reference-mode .fascrs-functional-card{
    min-height:var(--bscrs-touch)!important;
}
input,select,textarea{
    max-width:100%!important;
    font-size:16px!important;
}
.form .grid,
.ojs-form .grid,
.grid.grid-2,
.grid.grid-3,
.form-grid{
    grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr))!important;
}

/* Header/mobile navigation */
html body.fascrs-reference-mode .isj-ref-header{
    width:100%!important;
}
html body.fascrs-reference-mode .isj-top-identity-inner{
    padding-left:var(--bscrs-mobile-pad)!important;
    padding-right:var(--bscrs-mobile-pad)!important;
}
html body.fascrs-reference-mode .isj-menu-container{
    padding-left:0!important;
    padding-right:0!important;
}
html body.fascrs-reference-mode .isj-main-nav{
    max-width:100%!important;
}
html body.fascrs-reference-mode .dropdown-panel{
    max-width:min(100vw,320px)!important;
}

/* Page widths */
html body.fascrs-reference-mode main.container.main,
html body.fascrs-reference-mode main.main.journaltheme-main-container{
    max-width:1440px!important;
    width:100%!important;
    padding-left:18px!important;
    padding-right:18px!important;
}

/* Responsive cards and panels */
html body.fascrs-reference-mode .fascrs-card-grid,
html body.fascrs-reference-mode .fascrs-resource-band,
html body.fascrs-reference-mode .fascrs-functional-grid,
html body.fascrs-reference-mode .fascrs-directory-grid,
html body.fascrs-reference-mode .fascrs-panel-action-grid,
html body.fascrs-reference-mode .download-file-grid,
html body.fascrs-reference-mode .panel-audit-grid,
html body.fascrs-reference-mode .dashboard-report-grid,
html body.fascrs-reference-mode .admin-mini-grid,
html body.fascrs-reference-mode .portal-readiness-grid,
html body.fascrs-reference-mode .smart-ai-actions,
html body.fascrs-reference-mode .smart-ai-action-list,
html body.fascrs-reference-mode .smart-tool-grid{
    display:grid!important;
    grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr))!important;
    gap:14px!important;
}
html body.fascrs-reference-mode .fascrs-resource-card,
html body.fascrs-reference-mode .fascrs-panel-action-grid a,
html body.fascrs-reference-mode .fascrs-functional-card,
html body.fascrs-reference-mode .panel-audit-card,
html body.fascrs-reference-mode .report-tile,
html body.fascrs-reference-mode .card{
    overflow:hidden!important;
    word-break:break-word!important;
}

/* Admin/user/reviewer layout */
html body.fascrs-reference-mode .admin-layout{
    align-items:start!important;
}
html body.fascrs-reference-mode .admin-sidebar-ojs{
    scrollbar-width:thin!important;
}
html body.fascrs-reference-mode .professional-dashboard,
html body.fascrs-reference-mode .admin-pro-dashboard,
html body.fascrs-reference-mode .routing-check-page,
html body.fascrs-reference-mode .production-audit-page,
html body.fascrs-reference-mode .terms-dashboard-page{
    min-width:0!important;
}
html body.fascrs-reference-mode .portal-hero,
html body.fascrs-reference-mode .admin-dashboard-hero,
html body.fascrs-reference-mode .fascrs-page-hero,
html body.fascrs-reference-mode .fascrs-hero{
    overflow:hidden!important;
    word-break:break-word!important;
}

/* Dynamic terms visual system */
html body.fascrs-reference-mode .logic-term-chip,
html body.fascrs-reference-mode .term-status-chip{
    display:inline-flex!important;
    align-items:center!important;
    gap:6px!important;
    min-height:30px!important;
    padding:5px 10px!important;
    border-radius:999px!important;
    background:#eef7ff!important;
    color:var(--bscrs-blue)!important;
    font-size:12px!important;
    font-weight:900!important;
    border:1px solid #d9e6f3!important;
}
html body.fascrs-reference-mode .logic-term-chip.ok{
    background:#effffb!important;
    color:#067a83!important;
    border-color:#bceee9!important;
}
html body.fascrs-reference-mode .logic-term-chip.warn{
    background:#fff7ed!important;
    color:#b45309!important;
    border-color:#fed7aa!important;
}
html body.fascrs-reference-mode .logic-term-grid{
    display:grid!important;
    grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr))!important;
    gap:14px!important;
}
html body.fascrs-reference-mode .logic-term-card{
    padding:16px!important;
    border:1px solid #d9e6f3!important;
    background:#fff!important;
    box-shadow:0 10px 26px rgba(7,20,63,.06)!important;
}
html body.fascrs-reference-mode .logic-term-card strong{
    display:block!important;
    color:var(--bscrs-navy)!important;
    margin-bottom:5px!important;
}
html body.fascrs-reference-mode .logic-term-card span,
html body.fascrs-reference-mode .logic-term-card small{
    display:block!important;
    color:#52627a!important;
    line-height:1.45!important;
}

/* Better mobile tables as cards when marked */
@media(max-width:760px){
    html body.fascrs-reference-mode main.container.main,
    html body.fascrs-reference-mode main.main.journaltheme-main-container{
        padding-left:10px!important;
        padding-right:10px!important;
    }
    html body.fascrs-reference-mode .isj-top-identity-inner{
        display:grid!important;
        grid-template-columns:1fr auto!important;
        gap:10px!important;
    }
    html body.fascrs-reference-mode .isj-journal-brand{
        min-width:0!important;
    }
    html body.fascrs-reference-mode .isj-journal-brand strong{
        font-size:22px!important;
        line-height:1.12!important;
    }
    html body.fascrs-reference-mode .isj-journal-brand small{
        font-size:12px!important;
        line-height:1.35!important;
    }
    html body.fascrs-reference-mode .isj-journal-brand img{
        width:48px!important;
        height:48px!important;
        flex:0 0 auto!important;
    }
    html body.fascrs-reference-mode .isj-header-meta{
        display:none!important;
    }
    html body.fascrs-reference-mode .isj-main-nav{
        max-height:calc(100vh - 86px)!important;
        overflow-y:auto!important;
        -webkit-overflow-scrolling:touch!important;
    }
    html body.fascrs-reference-mode .isj-main-nav > a,
    html body.fascrs-reference-mode .isj-main-nav .nav-dropdown > a,
    html body.fascrs-reference-mode .isj-main-nav .dropdown-panel a{
        width:100%!important;
        justify-content:flex-start!important;
        padding:12px 16px!important;
        line-height:1.3!important;
    }
    html body.fascrs-reference-mode .fascrs-hero,
    html body.fascrs-reference-mode .fascrs-page-hero,
    html body.fascrs-reference-mode .portal-hero,
    html body.fascrs-reference-mode .admin-dashboard-hero{
        padding:20px 14px!important;
    }
    html body.fascrs-reference-mode .fascrs-hero h1,
    html body.fascrs-reference-mode .fascrs-page-hero h1,
    html body.fascrs-reference-mode .portal-hero h1,
    html body.fascrs-reference-mode .admin-dashboard-hero h1{
        font-size:clamp(26px,8vw,34px)!important;
        line-height:1.08!important;
    }
    html body.fascrs-reference-mode .fascrs-hero p,
    html body.fascrs-reference-mode .fascrs-page-hero p,
    html body.fascrs-reference-mode .portal-hero p,
    html body.fascrs-reference-mode .admin-dashboard-hero p{
        font-size:14px!important;
        line-height:1.55!important;
    }
    html body.fascrs-reference-mode .fascrs-content-grid,
    html body.fascrs-reference-mode .fascrs-journal-panel,
    html body.fascrs-reference-mode .fascrs-hero{
        grid-template-columns:1fr!important;
    }
    html body.fascrs-reference-mode .fascrs-resource-card{
        grid-template-columns:46px 1fr!important;
        gap:10px!important;
        padding:14px!important;
    }
    html body.fascrs-reference-mode .fascrs-resource-card b,
    html body.fascrs-reference-mode .fascrs-panel-action-grid b{
        width:44px!important;
        height:44px!important;
        border-radius:14px!important;
        font-size:15px!important;
    }
    html body.fascrs-reference-mode .fascrs-resource-card strong,
    html body.fascrs-reference-mode .fascrs-panel-action-grid strong{
        font-size:16px!important;
    }
    html body.fascrs-reference-mode .fascrs-resource-card span,
    html body.fascrs-reference-mode .fascrs-panel-action-grid span{
        font-size:13px!important;
        line-height:1.45!important;
    }
    html body.fascrs-reference-mode .admin-layout{
        grid-template-columns:1fr!important;
        gap:12px!important;
    }
    html body.fascrs-reference-mode .admin-sidebar-ojs{
        position:relative!important;
        top:auto!important;
        display:grid!important;
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
        gap:7px!important;
        max-height:none!important;
        padding:10px!important;
        overflow:visible!important;
    }
    html body.fascrs-reference-mode .admin-sidebar-ojs strong,
    html body.fascrs-reference-mode .admin-sidebar-ojs span{
        grid-column:1 / -1!important;
    }
    html body.fascrs-reference-mode .admin-sidebar-ojs a{
        font-size:12px!important;
        padding:10px!important;
        border-radius:10px!important;
        text-align:center!important;
    }
    html body.fascrs-reference-mode .table-wrap table,
    html body.fascrs-reference-mode .responsive-table-wrap table,
    html body.fascrs-reference-mode .fascrs-auto-table-wrap table{
        min-width:720px!important;
    }
    html body.fascrs-reference-mode .fascrs-simple-footer-inner{
        display:grid!important;
        justify-items:center!important;
        text-align:center!important;
        gap:8px!important;
    }
    html body.fascrs-reference-mode .fascrs-simple-footer-inner p{
        font-size:12px!important;
        line-height:1.45!important;
    }
}

@media(max-width:420px){
    html body.fascrs-reference-mode .admin-sidebar-ojs{
        grid-template-columns:1fr!important;
    }
    html body.fascrs-reference-mode .fascrs-panel-action-grid a{
        grid-template-columns:40px 1fr!important;
        padding:12px!important;
    }
    html body.fascrs-reference-mode .fascrs-panel-action-grid b{
        width:38px!important;
        height:38px!important;
        border-radius:12px!important;
    }
}

/* Print-friendly basics */
@media print{
    .isj-ref-header,.admin-sidebar-ojs,.fascrs-simple-footer,.btn,.mobile-quickbar{display:none!important}
    main.container.main{max-width:100%!important;padding:0!important}
    .card,.fascrs-reference-section,.fascrs-page-hero{box-shadow:none!important;border:1px solid #bbb!important}
}
