:root {
    color-scheme: light dark;
}

body {
    font-size: var(--fl-text-sm);
    line-height: var(--fl-lh-sm);
}

a {
    color: var(--fl-link);
    font-weight: var(--fl-w-medium);
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

h1,
.fl-h1 {
    font-size: var(--fl-text-2xl);
    line-height: var(--fl-lh-2xl);
    font-weight: var(--fl-w-semibold);
    color: var(--fl-text-strong);
}

h2,
.fl-h2 {
    font-size: var(--fl-text-xl);
    line-height: var(--fl-lh-xl);
    font-weight: var(--fl-w-semibold);
    color: var(--fl-text-strong);
}

h3,
.fl-h3 {
    font-size: var(--fl-text-lg);
    line-height: var(--fl-lh-lg);
    font-weight: var(--fl-w-semibold);
    color: var(--fl-text-default);
}

.form-label,
label {
    font-weight: var(--fl-w-medium);
    font-size: var(--fl-text-sm);
    line-height: var(--fl-lh-sm);
    color: var(--fl-text-muted);
}

.form-control,
.form-select {
    font-size: var(--fl-text-sm);
    line-height: var(--fl-lh-sm);
    color: var(--fl-text-default);
    border-color: var(--fl-border);
    border-radius: var(--fl-radius-md);
}

.form-control::placeholder {
    color: var(--fl-text-placeholder);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--fl-primary);
    box-shadow: 0 0 0 0.25rem var(--fl-focus-ring);
}

.form-control:not(.form-control-sm):not(.form-control-lg),
.form-select:not(.form-select-sm):not(.form-select-lg) {
    min-height: var(--fl-control-h);
}

.form-control-sm,
.form-select-sm {
    min-height: var(--fl-control-h-compact);
    border-radius: var(--fl-radius-sm);
}

.btn {
    font-weight: var(--fl-w-semibold);
    font-size: 15px;
    border-radius: var(--fl-radius-md);
}

.btn:not(.btn-sm):not(.btn-lg) {
    min-height: var(--fl-control-h);
}

.btn.btn-sm {
    min-height: var(--fl-control-h-compact);
    border-radius: var(--fl-radius-sm);
}

.btn-primary,
.btn.btn-primary {
    background-color: var(--fl-primary);
    border-color: var(--fl-primary);
    color: #fff;
}

.btn-primary:hover,
.btn.btn-primary:hover,
.btn-primary:focus,
.btn.btn-primary:focus {
    background-color: var(--fl-primary-hover);
    border-color: var(--fl-primary-hover);
    color: #fff;
}

.btn-outline-primary,
.btn.btn-outline-primary {
    color: var(--fl-primary);
    border-color: var(--fl-border);
    background-color: transparent;
}

.btn-outline-primary:hover,
.btn.btn-outline-primary:hover {
    background-color: var(--fl-surface-subtle);
    border-color: var(--fl-primary);
    color: var(--fl-primary);
}

.table thead th {
    font-weight: var(--fl-w-semibold);
    font-size: var(--fl-text-xs);
    line-height: var(--fl-lh-xs);
    color: var(--fl-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.table tbody td {
    font-weight: var(--fl-w-regular);
    font-size: var(--fl-text-sm);
    line-height: var(--fl-lh-sm);
    color: var(--fl-text-default);
}

.modal-title {
    font-weight: var(--fl-w-semibold);
    font-size: var(--fl-text-xl);
    line-height: var(--fl-lh-xl);
    color: var(--fl-text-strong);
}

.modal-body {
    font-size: var(--fl-text-sm);
    line-height: var(--fl-lh-sm);
}

.nav-link,
.menu-link,
.menu-title {
    font-family: var(--fl-font-sans) !important;
    font-weight: var(--fl-w-medium);
    font-size: var(--fl-text-sm);
    line-height: var(--fl-lh-sm);
}

.nav-link.active,
.menu-item.here > .menu-link,
.menu-item.show > .menu-link {
    font-weight: var(--fl-w-semibold);
}

