/* Strict golden-ratio typography normalization
 * Goal: unify type scale across legacy and premium layers without altering behavior.
 * Scope: typography only (font-size/line-height/weight).
 */

body.page-header-fixed {
    --sf-fs-0: 13px;
    --sf-fs-1: 21px;
    --sf-fs-2: 34px;
    --sf-fs-help: 12px; /* Raised from 10px for readability. */
}

/* Heading hierarchy in content region (legacy h1-h6 normalization) */
body.page-header-fixed .page-content h1 {
    font-size: var(--sf-fs-2) !important;
    line-height: 1.24 !important;
}

body.page-header-fixed .page-content h2 {
    font-size: var(--sf-fs-1) !important;
    line-height: 1.28 !important;
}

body.page-header-fixed .page-content h3 {
    font-size: 17px !important;
    line-height: 1.35 !important;
}

body.page-header-fixed .page-content h4,
body.page-header-fixed .page-content h5 {
    font-size: var(--sf-fs-0) !important;
    line-height: 1.42 !important;
}

body.page-header-fixed .page-content h6 {
    font-size: var(--sf-fs-help) !important;
    line-height: 1.45 !important;
}

/* Section/card titles */
body.page-header-fixed .page-content .caption-subject,
body.page-header-fixed .page-content .portlet > .portlet-title > .caption > .caption-subject {
    font-size: 14px !important;
    line-height: 1.42 !important;
    font-weight: 700 !important;
}

/* Helper texts and form hints */
body.page-header-fixed .page-content .caption-helper,
body.page-header-fixed .page-content .para-comm,
body.page-header-fixed .page-content .help-block,
body.page-header-fixed .page-content .form-text {
    font-size: var(--sf-fs-help) !important;
    line-height: 1.58 !important;
}

/* Baseline controls */
body.page-header-fixed .page-content label,
body.page-header-fixed .page-content .form-label,
body.page-header-fixed .page-content .control-label,
body.page-header-fixed .page-content .form-control,
body.page-header-fixed .page-content input,
body.page-header-fixed .page-content select,
body.page-header-fixed .page-content textarea,
body.page-header-fixed .page-content .btn {
    font-size: var(--sf-fs-0) !important;
}

body.page-header-fixed .page-content .btn {
    line-height: 1.42 !important;
}

/* Data-grid typography */
body.page-header-fixed .page-content table,
body.page-header-fixed .page-content table th,
body.page-header-fixed .page-content table td,
body.page-header-fixed .page-content .jtable-main-container table.jtable thead th,
body.page-header-fixed .page-content .jtable-main-container table.jtable tbody td {
    font-size: var(--sf-fs-0) !important;
}

body.page-header-fixed .page-content .jtable-main-container > div.jtable-bottom-panel,
body.page-header-fixed .page-content .jtable-main-container > div.jtable-bottom-panel * {
    font-size: var(--sf-fs-help) !important;
}

/* Page title helper text: consistent premium chip across modules */
body.page-header-fixed .page-content .page-title small {
    display: inline-flex;
    align-items: center;
    margin-left: 8px !important;
    padding: 3px 10px;
    border: 1px solid #d6e0eb;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #f3f7fc 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    color: #667584 !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
}

/* Tabs and badges */
body.page-header-fixed .page-content .ui-tabs .ui-tabs-nav li a,
body.page-header-fixed .page-content .portlet > .portlet-title > .nav-tabs > li > a {
    font-size: var(--sf-fs-0) !important;
    font-weight: 700 !important;
}

body.page-header-fixed .page-content .label,
body.page-header-fixed .page-content .badge {
    font-size: var(--sf-fs-help) !important;
    line-height: 1.35 !important;
}

/* Keep DDoS explanation readability strictly visible */
body.page-header-fixed.module-ddos .page-content .para-comm,
body.page-header-fixed.module-ddos .page-content .caption-helper {
    font-size: 12px !important;
    line-height: 1.62 !important;
}

/* Login page strict alignment (HeadComm loads before login.css; use !important) */
body.login .content .form-title {
    font-size: 21px !important;
    line-height: 1.24 !important;
}

body.login .content .form-horizontal .mb-3 > .form-label.col-md-4,
body.login .content .cLoginInput.form-control,
body.login .content .form-actions .btn {
    font-size: 13px !important;
}
