/* Application typography authority. The historical filename and token aliases
   remain compatible with existing workspaces; DM Sans is shared by every GUI.
   Technical output retains its dedicated monospace stack. */

@font-face {
    font-family: "OpsPilot Anthropic Mono";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src:
        local("Anthropic Mono"),
        local("anthropicMono"),
        local("AnthropicMono Roman");
}

:root {
    --gui-font-scale: 90%;
    --claude-font-sans: var(--gui-font-sans);
    --sidebar-font-sans: var(--claude-font-sans);
    --claude-font-mono: "OpsPilot Anthropic Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
    --ds-font-sans: var(--sidebar-font-sans);
    --font-sans: var(--sidebar-font-sans);
    --font-mono: var(--claude-font-mono);
    --easyclick-font-sans-ui: var(--sidebar-font-sans);
    --frame-heading-font: var(--sidebar-font-sans);
}

body { font-size: var(--gui-text-body); line-height: var(--gui-text-leading); }
button, input, select, textarea, optgroup, option {
    font-size: var(--gui-text-control);
    line-height: var(--gui-text-leading);
}

/* One proportional screen scale for the application. Rem-based headings,
   labels, controls and dialogs remain in the same visual hierarchy, while
   browser font preferences and zoom still work. Do not shrink printed pages
   or override the separate pixel-based terminal/output font controls. */
@media screen {
    html[data-theme] {
        font-size: var(--gui-font-scale);
    }
}

/* Keep feature workspaces from silently falling back to legacy Inter,
   Helvetica, Arial-only, or Segoe-only declarations. */
html,
body,
body *,
button,
input,
select,
textarea,
optgroup,
option,
table,
svg text {
    font-family: var(--sidebar-font-sans) !important;
    font-kerning: normal;
    font-optical-sizing: auto;
    font-feature-settings: "pnum" 1, "lnum" 1, "liga" 1, "kern" 1;
}

/* Titles use the same typeface as the sidebar. Size and weight continue to
   provide hierarchy without introducing a second display family. */
:is(
    h1,
    h2,
    h3,
    .view-title,
    .page-title,
    .workspace-title,
    .section-title,
    .panel-title,
    .content-card__title,
    .frame-heading
) {
    font-family: var(--sidebar-font-sans) !important;
    font-weight: 500;
    letter-spacing: -0.018em;
    text-rendering: optimizeLegibility;
}

/* Compact status-footer typography. */
.workspace-footer .footer-pill__label {
    font-size: 0.58rem !important;
    font-weight: 500 !important;
    line-height: 1.08 !important;
    letter-spacing: 0.09em !important;
}

.workspace-footer :is(.footer-pill strong, .footer-pill time) {
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    line-height: 1.16 !important;
    letter-spacing: -0.008em !important;
}

.workspace-footer .footer-pill__meta {
    font-size: 0.6rem !important;
    font-weight: 400 !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
}

/* Dashboard data tables use a restrained weight hierarchy. Shared
   legacy table rules and semantic <strong> wrappers must not bold values. */
.dashboard-grid--ops-tables :is(
    [data-change-dashboard-recent-shell],
    [data-static-table-shell^="dashboard-engineer-sla-"]
) table {
    font-size: 0.72rem !important;
    font-weight: 400 !important;
    letter-spacing: -0.006em !important;
}

.dashboard-grid--ops-tables :is(
    [data-change-dashboard-recent-shell],
    [data-static-table-shell^="dashboard-engineer-sla-"]
) thead th {
    font-size: 0.66rem !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    letter-spacing: 0.045em !important;
}

.dashboard-grid--ops-tables :is(
    [data-change-dashboard-recent-shell],
    [data-static-table-shell^="dashboard-engineer-sla-"]
) tbody td {
    font-weight: 400 !important;
    line-height: 1.28 !important;
    letter-spacing: -0.006em !important;
}

.dashboard-grid--ops-tables :is(
    [data-change-dashboard-recent-shell],
    [data-static-table-shell^="dashboard-engineer-sla-"]
) tbody td :is(strong, b, .muted-copy) {
    font-weight: 400 !important;
}

.dashboard-grid--ops-tables :is(
    [data-change-dashboard-recent-shell],
    [data-static-table-shell^="dashboard-engineer-sla-"]
) :is(
    .table-widget__toolbar,
    .compact-table__toolbar,
    .table-widget__footer
) {
    font-weight: 400 !important;
    letter-spacing: 0 !important;
}

.dashboard-grid--ops-tables :is(
    [data-change-dashboard-recent-shell],
    [data-static-table-shell^="dashboard-engineer-sla-"]
) :is(
    .table-widget__toolbar,
    .compact-table__toolbar,
    .table-widget__footer
) :is(input, select, label, span, small, strong) {
    font-weight: 400 !important;
}

.dashboard-grid--ops-tables [data-static-table-shell^="dashboard-engineer-sla-"]
    :is(.dashboard-engineer-sla-case-count, .dashboard-case-link, .dashboard-engineer-sla-case-more > summary) {
    font-weight: 500 !important;
    letter-spacing: 0 !important;
}

.dashboard-grid--ops-tables :is(
    [data-change-dashboard-recent-shell],
    [data-static-table-shell^="dashboard-engineer-sla-"]
) :is(.status-pill, .modern-pagination__button) {
    font-weight: 500 !important;
}

/* Operational output, commands, JSON, and keyboard hints use Anthropic Mono
   when licensed locally and Claude's ui-monospace fallback otherwise. */
:is(code, code *, pre, pre *, kbd, samp, .monospace, .monospace *) {
    font-family: var(--claude-font-mono) !important;
    font-optical-sizing: auto;
}
