/* Layout settings: font weight and font. Everything is scoped under a class on <html> set by js/historian-layout.js.
   Both classes are on by default; only an explicit Thin or Historian UI choice removes them. */

/* ---------- Font weight: Normal (html.layout-font-normal) — every Light (300) and Semilight (350) becomes Regular ---------- */

/* historian.css and app.css load before this file, so matching their specificity is enough and more specific rules still win */
:where(html.layout-font-normal) body,
:where(html.layout-font-normal) .lead,
:where(html.layout-font-normal) .display-1,
:where(html.layout-font-normal) .display-2,
:where(html.layout-font-normal) .display-3,
:where(html.layout-font-normal) .display-4,
:where(html.layout-font-normal) small,
:where(html.layout-font-normal) .small,
:where(html.layout-font-normal) .form-control,
:where(html.layout-font-normal) .btn,
:where(html.layout-font-normal) .btn-link,
:where(html.layout-font-normal) .dropdown-item,
:where(html.layout-font-normal) .input-group-text,
:where(html.layout-font-normal) .custom-select,
:where(html.layout-font-normal) .custom-file-label,
:where(html.layout-font-normal) .tooltip,
:where(html.layout-font-normal) .popover,
:where(html.layout-font-normal) .e-btn,
:where(html.layout-font-normal) .e-css.e-btn,
:where(html.layout-font-normal) .items-dashboard-view .top5-list-item .heading .item-name,
:where(html.layout-font-normal) .MuiTypography-h1,
:where(html.layout-font-normal) .skeleton-block-3em,
:where(html.layout-font-normal) .skeleton-block-4-5em,
:where(html.layout-font-normal) .historian-ribbon-full-width-1 > div > span,
:where(html.layout-font-normal) .historian-ribbon-full-width-2 > div > span,
:where(html.layout-font-normal) .historian-ribbon-content-width-1 > div > span,
:where(html.layout-font-normal) .historian-ribbon-content-width-2 > div > span,
:where(html.layout-font-normal) .historian-items-card-container.card .card-title .item-name,
:where(html.layout-font-normal) input.e-input,
:where(html.layout-font-normal) textarea.e-input,
:where(html.layout-font-normal) .e-input-group,
:where(html.layout-font-normal) .e-input-group.e-control-wrapper,
:where(html.layout-font-normal) .e-dropdownbase .e-list-item,
:where(html.layout-font-normal) .e-dropdownbase .e-list-item.e-active,
:where(html.layout-font-normal) .e-dropdownbase .e-list-item.e-active.e-hover,
:where(html.layout-font-normal) .e-datepicker.e-popup-wrapper .e-calendar,
:where(html.layout-font-normal) .e-control.e-calendar,
:where(html.layout-font-normal) .e-datepicker.e-popup-wrapper .e-calendar .e-content td span.e-day,
:where(html.layout-font-normal) .e-control.e-calendar .e-content td span.e-day {
    font-weight: 400;
}

/* isolated .razor.css rules carry an extra [b-…] attribute; the chat stylesheets and .razor <style> blocks load after this file */
html.layout-font-normal .copilot-md .cw-widget,
html.layout-font-normal .cw-sort-btn,
html.layout-font-normal .cw-evidence-viewmode,
html.layout-font-normal .analyst-agent-select,
html.layout-font-normal .analyst-prompt-btn,
html.layout-font-normal .analyst-input-field,
html.layout-font-normal .chat-surface-greeting-title,
html.layout-font-normal .recent-chats-search-input,
html.layout-font-normal .recent-chat-preview,
html.layout-font-normal .chat-history-search-input,
html.layout-font-normal .chat-history-empty,
html.layout-font-normal .chat-history-preview,
html.layout-font-normal .chat-history-time,
html.layout-font-normal .tracking-tile-value,
html.layout-font-normal .message-step-content,
html.layout-font-normal .message-step-content-plain,
html.layout-font-normal .error-block,
html.layout-font-normal .run-card-caret,
html.layout-font-normal .flow2-lbl,
html.layout-font-normal .flow2-bench-vs,
html.layout-font-normal .flow2-neck-total-lbl,
html.layout-font-normal .flow2-drop,
html.layout-font-normal .flow2-overall-lbl,
html.layout-font-normal .compact-legend,
html.layout-font-normal .suggestion-btn,
html.layout-font-normal .stat-value,
html.layout-font-normal .variation-segment-pct,
html.layout-font-normal .gb-title,
html.layout-font-normal .nl-info-facts dt,
html.layout-font-normal .nl-dtab:not(.nl-dtab-active),
html.layout-font-normal .e-sidebar,
html.layout-font-normal .developer-bar,
html.layout-font-normal .stats-freshness-toaster__body,
html.layout-font-normal .stats-freshness-toaster__detail {
    font-weight: 400;
}

html.layout-font-normal .font-weight-light,
html.layout-font-normal .font-weight-normal,
html.layout-font-normal .force-font-300,
html.layout-font-normal [style*="font-weight: 300"],
html.layout-font-normal [style*="font-weight:300"],
html.layout-font-normal [style*="font-weight: 350"],
html.layout-font-normal [style*="font-weight:350"] {
    font-weight: 400 !important;
}

/* ---------- Font: Schibsted Grotesk (html.layout-font-schibsted) ---------- */

html.layout-font-schibsted {
    --layout-font-ink: #1D1D1D;
    --layout-font-muted: #6B6B6B;
    --layout-font-family: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
}

html.layout-font-schibsted body {
    -webkit-font-smoothing: antialiased;
}

/* icon fonts and monospace keep their own family */
html.layout-font-schibsted body,
html.layout-font-schibsted body *:not(.las):not(.lar):not(.lab):not(.la):not(.oi):not(.e-icons):not(.fa):not(.fas):not(.far):not([class*="icon"]):not(mjx-container):not(mjx-container *):not(.e-frame):not(.e-chips-close):not(.e-arrow-tip-inner):not(.e-value-switch-btn):not(pre):not(pre *):not(code):not(code *):not(kbd):not(samp):not(.text-monospace):not([style*="monospace"]):not([style*="monospace"] *):not(.copilot-code-header):not(.nl-addr):not(.feature-chip):not(.developer-bar-mono):not(.inspector):not(.inspector *) {
    font-family: var(--layout-font-family) !important;
}

html.layout-font-schibsted h1.ad-head-name {
    font-weight: 800 !important;
    letter-spacing: -.03em;
    color: var(--layout-font-ink);
}

html.layout-font-schibsted .kpi-tile-values .tt-wrapper > span {
    font-weight: 700 !important;
    letter-spacing: -.02em;
}

html.layout-font-schibsted .kpi-tile-values .tt-wrapper > span > span {
    font-weight: 400 !important;
    letter-spacing: 0;
    color: var(--layout-font-muted);
}

html.layout-font-schibsted .card-body > div:has(+ .kpi-tile-values) > .small.mb-0 {
    font-weight: 500 !important;
    color: var(--layout-font-muted);
}

html.layout-font-schibsted .ad-overview-range {
    font-weight: 600 !important;
    color: var(--layout-font-ink);
}

html.layout-font-schibsted .ad-tab {
    font-weight: 500 !important;
    color: var(--layout-font-muted);
}

html.layout-font-schibsted .ad-tab.on {
    font-weight: 700 !important;
    color: var(--layout-font-ink);
}

html.layout-font-schibsted .ad-overview-charthead h6 {
    font-weight: 700 !important;
    letter-spacing: .04em;
    color: var(--layout-font-ink);
}

html.layout-font-schibsted .historian-left-menu-container .dark-frame a.nav-link,
html.layout-font-schibsted .historian-left-menu-container .light-frame a.nav-link {
    font-weight: 500 !important;
}

html.layout-font-schibsted .historian-left-menu-container .dark-frame a.nav-link.active,
html.layout-font-schibsted .historian-left-menu-container .light-frame a.nav-link.active {
    font-weight: 700 !important;
}

html.layout-font-schibsted .top-row.dark-frame,
html.layout-font-schibsted .top-row.light-frame {
    font-weight: 500;
}
