:root{
  --font-base: 15px;
  --font-small: 13px;
  --font-table: 14px;
  --font-control: 15px;
  --font-button: 14px;
  --font-title: clamp(1.35rem, 1.2rem + .55vw, 1.85rem);
  --font-subtitle: clamp(1.05rem, 1rem + .25vw, 1.35rem);
}

html{
  font-size: var(--font-base);
  -webkit-text-size-adjust: 100%;
}

body{
  font-size: 1rem !important;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}

h1{font-size:var(--font-title) !important;line-height:1.2;margin-bottom:.65rem;}
h2{font-size:var(--font-subtitle) !important;line-height:1.25;}
h3{font-size:1.25rem !important;line-height:1.3;}
h4{font-size:1.12rem !important;}
h5{font-size:1.03rem !important;}
h6{font-size:.96rem !important;}

p, label, .form-label, li, a, span{
  font-size: inherit;
}

.form-control,
.form-select,
input,
select,
textarea{
  font-size: var(--font-control) !important;
  line-height: 1.4 !important;
}

.form-control,
.form-select{
  min-height: 40px;
  padding:.48rem .72rem;
}

.btn,
button,
input[type="submit"],
input[type="button"]{
  font-size: var(--font-button) !important;
  line-height:1.35 !important;
  padding:.5rem .82rem;
}

.btn-sm{
  font-size:13px !important;
  padding:.38rem .58rem !important;
}

.table{
  font-size:var(--font-table) !important;
}

.table th{
  font-size:14px !important;
  line-height:1.3;
  vertical-align:middle;
}

.table td{
  font-size:14px !important;
  line-height:1.4;
  vertical-align:middle;
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4{
  margin-bottom:0;
}

.badge{
  font-size:12px !important;
  line-height:1.2;
}

small,
.small,
.text-muted{
  font-size:var(--font-small) !important;
}

input[type="number"]{
  font-variant-numeric: tabular-nums;
}

@media (max-width: 768px){
  :root{
    --font-base:14px;
    --font-table:13px;
    --font-control:14px;
    --font-button:13px;
  }
  .table th,.table td{font-size:13px !important;}
}
