/* Training Unit v1.2.4 — UX typography, specialty finance and modal navigation */
:root{
  --fs-caption:12px;
  --fs-body:14px;
  --fs-table:13px;
  --fs-subtitle:18px;
  --fs-title:24px;
  --lh-caption:16px;
  --lh-body:20px;
  --lh-subtitle:26px;
  --lh-title:32px;
}

html{font-size:100%;text-size-adjust:100%;-webkit-text-size-adjust:100%}
body,button,input,select,textarea{
  font-family:"Segoe UI",Tahoma,Arial,sans-serif;
  font-size:var(--fs-body);
  line-height:var(--lh-body);
}
body{font-size:var(--fs-body)}
h1,h2,h3,.brand b,.section-title>b,.specialty-name-chip,.specialty-tag,.v121-kpi b,.v121-progress-box h2{
  font-family:"Segoe UI",Tahoma,Arial,sans-serif;
  font-weight:700;
}
h1{font-size:var(--fs-title);line-height:var(--lh-title);padding:7px 15px}
h2{font-size:var(--fs-subtitle);line-height:var(--lh-subtitle)}
h3{font-size:15px;line-height:22px}
.brand b{font-size:20px;line-height:28px}
.nav{font-size:14px;line-height:20px}
.btn,input,select,textarea,label{font-size:14px;line-height:20px}
.btn.sm{font-size:12px;line-height:16px}
.small,.muted,.card .s,.v121-kpi>div,.notice{font-size:var(--fs-caption);line-height:var(--lh-caption)}
.badge,.specialty-tag,.specialty-name-chip,.rule-origin,.v121-rule-type,.v121-rule-status{font-size:11px;line-height:16px}
table th,table td{font-size:var(--fs-table);line-height:18px;padding:7px 8px}
table th{font-weight:700}
.stat .n,.v121-kpi strong{font-size:24px;line-height:30px}
.stat .l{font-size:13px;line-height:18px}
.top{gap:7px;flex-wrap:wrap}
.top .search{min-width:220px}
.card{padding:13px}
.modal{font-size:var(--fs-body);line-height:var(--lh-body)}
.modal .card.stat{min-height:82px}
.v121-density-compact table th,.v121-density-compact table td{font-size:12px;line-height:16px;padding:4px 6px}
.v121-density-compact body,.v121-density-compact button,.v121-density-compact input,.v121-density-compact select,.v121-density-compact textarea{font-size:13px}

.v124-modal-back{
  position:absolute;left:52px;top:10px;z-index:7;min-width:72px;height:34px;padding:0 10px;
  border:1px solid var(--line);border-radius:18px;background:#fff;color:#332a67;font-weight:700;cursor:pointer;
}
.v124-modal-back:hover{background:#fff3c4}
.v124-history-bar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:12px 0;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#fff}
.v124-history-bar .v124-history-status{margin-inline-start:auto;color:var(--muted);font-size:12px}
.v124-history-bar button:disabled,.top button:disabled{opacity:.45;cursor:not-allowed}
.v124-finance-kpis{display:grid;grid-template-columns:repeat(4,minmax(135px,1fr));gap:8px;margin:10px 0}
.v124-finance-kpis .mini{border:1px solid var(--line);border-radius:11px;background:#fbfaff;padding:9px}
.v124-finance-kpis b{display:block;font-size:12px;color:var(--muted)}
.v124-finance-kpis strong{display:block;font-size:19px;line-height:26px;color:var(--brand)}
.v124-specialty-section{margin-top:14px;border-top:1px solid var(--line);padding-top:12px}
.v124-specialty-section h3{margin:0 0 8px}
.v124-actions{display:flex;gap:5px;flex-wrap:wrap;min-width:210px}
.v124-zero-note{display:inline-block;margin-top:4px;color:var(--muted);font-size:12px}

@media(max-width:900px){
  .v124-finance-kpis{grid-template-columns:repeat(2,minmax(120px,1fr))}
  h1{font-size:21px;line-height:28px}.top .search{min-width:170px}
}
@media(max-width:600px){
  body,button,input,select,textarea{font-size:14px}
  h1{font-size:20px;line-height:27px}h2{font-size:17px;line-height:24px}
  .v124-finance-kpis{grid-template-columns:1fr 1fr}
  .v124-history-bar .v124-history-status{width:100%;margin:0}
}
