/* Almofiid labour-tools family: overtime, leave, service length, settlement.
   Same brand palette as the salary and end-of-service pages, scoped to `.alt` so a host module reset
   cannot reach in — the site's own per-tool rules are id+element selectors, and this file stays
   inside its own subtree. */
.alt{--ink:#241E1D;--muted:#6F6260;--accent:#B8322B;--deep:#7B211B;--tint:#F5ECEA;--border:#E5DBD7;--surface:#FFFFFF;--bg:#F7F5F3;--good:#1F6B4A;--good-tint:#E7F1EC;--info:#3C6E9F;width:min(1160px,calc(100% - 32px));margin:32px auto 64px;direction:rtl;color:var(--ink);font:16px/1.9 Tahoma,Arial,sans-serif}
.alt *{box-sizing:border-box}
.alt :where(h1,h2,h3,p,ul,li,table,caption,figure){margin:0}
.alt :where(input,select,button){font:inherit;color:inherit}
.alt a{color:var(--deep);text-decoration:none}
.alt a:hover{text-decoration:underline}
.alt :where(button,input,select,a,summary):focus-visible{outline:3px solid var(--accent);outline-offset:2px}

.alt-crumb{display:flex;flex-wrap:wrap;gap:10px;align-items:center;font-size:14px;color:var(--muted);margin-bottom:18px}
.alt-crumb span[aria-hidden]{color:var(--border)}
.alt-crumb [aria-current="page"]{color:var(--ink)}
.alt-hero{padding:22px 0 26px;border-bottom:1px solid var(--border);margin-bottom:24px}
.alt-hero h1{font:700 clamp(25px,4vw,37px)/1.5 Tahoma,Arial,sans-serif;color:var(--deep)}
.alt-intro{max-width:780px;color:var(--muted)}
.alt-icon{display:inline-flex;width:48px;height:48px;color:var(--accent);margin-bottom:8px}
.alt-icon svg{width:100%;height:100%}

.alt-card,.alt-quick,.alt-rule,.alt-src{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:24px;margin-bottom:20px}

.alt-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:20px;border-bottom:1px solid var(--border);padding-bottom:2px}
.alt-tab{background:none;border:0;border-bottom:3px solid transparent;padding:10px 14px;font-weight:700;color:var(--muted);cursor:pointer;min-height:44px}
.alt-tab:hover{color:var(--deep)}
.alt-tab[aria-selected="true"]{color:var(--deep);border-bottom-color:var(--accent)}

.alt-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:end}
.alt-field{display:block;min-width:0}
.alt-field>span{display:block;font-weight:700;font-size:14px;margin-bottom:6px}
.alt-field small{display:block;font-weight:400;font-size:12px;color:var(--muted);margin-top:4px;line-height:1.6}
.alt input,.alt select{width:100%;min-width:0;min-height:48px;padding:10px 12px;background:var(--surface);border:1px solid var(--border);border-radius:8px;color:var(--ink)}
.alt input{font-variant-numeric:tabular-nums}
.alt input::placeholder{color:var(--muted);opacity:1}
.alt input[aria-invalid="true"],.alt select[aria-invalid="true"]{border-color:var(--accent);background:var(--tint)}
.alt input[type=number]{-moz-appearance:textfield}
.alt-field-wide{grid-column:1 / -1}

/* 44px is the smallest tap target the site holds itself to; date inputs shrink their own chrome on
   iOS, so the field wrapper carries the height instead of the control. */
.alt-field input[type=date],.alt-field input[type=month]{min-height:48px}

.alt-out{margin-top:20px;padding:20px;background:var(--good-tint);border:1px solid #CBE0D5;border-radius:12px;line-height:1.4}
.alt-out strong{display:block;font-size:clamp(26px,5.5vw,42px);font-weight:700;color:var(--good);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.alt-out>span{color:var(--muted);font-size:15px}
.alt-out[data-empty="true"]{background:var(--bg);border-color:var(--border)}
.alt-out[data-empty="true"] strong{color:var(--muted)}

.alt-breakdown{width:100%;border-collapse:collapse;margin-top:18px;font-size:15px}
.alt-breakdown caption{text-align:right;font-weight:700;font-size:16px;padding-bottom:10px;color:var(--deep)}
.alt-breakdown th,.alt-breakdown td{padding:10px 8px;border-bottom:1px solid var(--border);text-align:right;vertical-align:top}
.alt-breakdown thead th{font-size:13px;color:var(--muted);font-weight:700;border-bottom:2px solid var(--border)}
.alt-breakdown tbody th{font-weight:700}
.alt-breakdown td{font-variant-numeric:tabular-nums;overflow-wrap:break-word}
.alt-breakdown td:last-child{color:var(--muted);font-size:13px}
.alt-breakdown tr[data-total] th,.alt-breakdown tr[data-total] td{border-bottom:0;padding-top:14px;font-size:17px;color:var(--deep)}

/* What the arithmetic used, inside the result card. `.alt-rule` below is the separate published
   schedule section, so the two are deliberately different classes. */
.alt-used{margin-top:18px;border-top:1px solid var(--border);padding-top:14px}
.alt-used h3{font-size:16px;color:var(--deep);margin-bottom:12px}
.alt-used ul{list-style:none;padding:0}
.alt-used li{display:flex;flex-wrap:wrap;gap:8px;align-items:baseline;padding:10px 0;border-bottom:1px dashed var(--border)}
.alt-used li:last-child{border-bottom:0}
.alt-used li strong{font-weight:700;min-width:150px}
.alt-used li em{font-style:normal;font-variant-numeric:tabular-nums;color:var(--deep);font-weight:700}
.alt-used li span{color:var(--muted);font-size:13px;flex:1 1 240px}
.alt-used .alt-cite{color:var(--info);font-size:12px;flex:1 1 100%}
.alt-milestones{list-style:none;padding:0;margin-top:6px}
.alt-milestones li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;padding:12px 0;border-bottom:1px dashed var(--border)}
.alt-milestones li:last-child{border-bottom:0}
.alt-milestones strong{font-weight:700}
.alt-milestones span{font-variant-numeric:tabular-nums;color:var(--muted)}
.alt-milestones em{font-style:normal;font-size:13px;font-weight:700;color:var(--good)}
.alt-milestones li[data-state="pending"] em{color:var(--muted)}
.alt-milestones li[data-state="due"] em{color:var(--accent)}
.alt-milestones small{grid-column:1 / -1;color:var(--muted);font-size:12px;line-height:1.7}

.alt-warning{margin-top:14px;padding:12px 14px;background:var(--tint);border-right:4px solid var(--accent);border-radius:8px;font-size:14px;color:var(--deep)}
.alt-formula{margin-top:14px;font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums;line-height:1.9;overflow-wrap:anywhere}
.alt-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.alt button{cursor:pointer;min-height:44px;padding:9px 16px;font-weight:700;background:var(--surface);border:1px solid var(--border);border-radius:8px;color:var(--deep)}
.alt button:hover{background:var(--tint);border-color:var(--accent)}
.alt-status:empty{display:none}
.alt-status{margin-top:12px;padding:8px 12px;background:var(--tint);border-radius:8px;font-size:14px;color:var(--deep)}
.alt-when{margin-top:14px;font-size:12px;color:var(--muted)}

.alt-quick h2,.alt-rule h2,.alt-src h2{font-size:20px;color:var(--deep);margin-bottom:10px}
.alt-quick-lead{color:var(--muted);font-size:14px;margin-bottom:14px}
.alt-quick-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:20px}
.alt-quick table,.alt-rule table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:14px}
.alt-quick caption,.alt-rule caption{text-align:right;font-weight:700;padding-bottom:8px;color:var(--deep)}
.alt-quick th,.alt-quick td,.alt-rule th,.alt-rule td{padding:8px;border-bottom:1px solid var(--border);text-align:right;font-variant-numeric:tabular-nums;overflow-wrap:break-word}
.alt-quick thead th,.alt-rule thead th{font-size:12px;color:var(--muted)}
.alt-quick td:first-child,.alt-rule td:first-child{font-weight:700}
.alt-quick tfoot td,.alt-rule tfoot td{border-bottom:0;padding-top:10px;color:var(--muted);font-size:12px}

.alt-cols{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,340px);gap:24px;align-items:start;margin-bottom:24px}
.alt-article{min-width:0}
.alt-article h2{font-size:22px;color:var(--deep);margin:26px 0 10px}
.alt-article h3{font-size:18px;color:var(--deep);margin:20px 0 8px}
.alt-article p{margin-bottom:14px}
.alt-article ul{margin:0 0 16px 18px}
.alt-article li{margin-bottom:6px}
.alt-article table{width:100%;border-collapse:collapse;margin:10px 0 18px;font-size:14px}
.alt-article th,.alt-article td{padding:8px;border:1px solid var(--border);text-align:right;font-variant-numeric:tabular-nums}
.alt-side{display:grid;gap:18px;position:sticky;top:16px}
.alt-notes,.alt-faq{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:20px}
.alt-notes h2,.alt-faq h2{font-size:18px;color:var(--deep);margin-bottom:10px}
.alt-notes ul{list-style:none;padding:0}
.alt-notes li{padding:10px 0;border-bottom:1px dashed var(--border);font-size:14px;color:var(--muted)}
.alt-notes li:last-child{border-bottom:0}
.alt-faq details{border-bottom:1px solid var(--border);padding:6px 0}
.alt-faq details:last-child{border-bottom:0}
.alt-faq summary{cursor:pointer;font-weight:700;min-height:40px;display:flex;align-items:center;gap:8px;color:var(--deep)}
.alt-faq details p{font-size:14px;color:var(--muted);padding:4px 0 10px}
.alt-src ul{list-style:none;padding:0}
.alt-src li{padding:6px 0;font-size:14px}
.alt-src p{font-size:13px;color:var(--muted);margin-top:8px}

.alt-related{display:flex;flex-wrap:wrap;gap:10px;margin:8px 0 18px}
.alt-related a{display:inline-flex;align-items:center;min-height:44px;padding:8px 16px;background:var(--surface);border:1px solid var(--border);border-radius:999px;font-size:14px;font-weight:700;color:var(--deep)}
.alt-related a:hover{background:var(--tint);border-color:var(--accent);text-decoration:none}
.alt-disclaimer{font-size:13px;color:var(--muted);background:var(--bg);border:1px solid var(--border);border-radius:12px;padding:16px 18px;line-height:1.8}
.alt-fallback{font-size:14px;color:var(--deep);background:var(--tint);border-radius:8px;padding:12px}

@media(max-width:900px){.alt-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.alt-cols{grid-template-columns:minmax(0,1fr)}.alt-side{position:static}}
/* Six columns of Arabic figures do not survive 342px: the header words wrap letter-by-letter and every
   number splits in two. The table stays a table in the markup; on a phone each case becomes a block of
   label-and-value lines, read from data-col because the header row is no longer on screen. */
@media(max-width:560px){
  .alt{margin-top:18px}
  .alt-grid{grid-template-columns:minmax(0,1fr)}
  .alt-card,.alt-quick,.alt-rule,.alt-src{padding:16px}
  .alt-out{padding:16px}
  .alt-breakdown{font-size:14px}
  .alt-breakdown td:last-child{display:none}
  .alt-breakdown thead th:last-child{display:none}
  .alt-quick table{table-layout:auto}
  .alt-quick thead{display:none}
  .alt-quick tbody tr{display:block;border-bottom:1px solid var(--border);padding:12px 0}
  .alt-quick tbody th[scope=row]{display:block;padding:0 0 6px}
  .alt-quick tbody td{display:flex;justify-content:space-between;gap:16px;border:0;padding:3px 0;font-weight:700}
  .alt-quick tbody td::before{content:attr(data-col);flex:0 0 auto;font-weight:400;color:var(--muted)}
  .alt-quick tfoot td{display:block;padding-top:10px}
}

/* The print sheet is the deliverable the visitor takes to HR, so it drops the controls and keeps the
   numbers, the rule panel and the citation. */
@media print{
  .alt{width:auto;margin:0;font:12pt/1.6 Tahoma,Arial,sans-serif;color:#000}
  .alt input,.alt select,.alt-tabs,.alt-actions,.alt-status,.alt-related,.alt-side,.alt-crumb{display:none!important}
  .alt-card,.alt-quick,.alt-rule,.alt-src{border:0;padding:0;margin:0 0 12pt;break-inside:avoid}
  .alt-out{border:1px solid #000;background:none;color:#000}
  .alt-out strong{color:#000;font-size:20pt}
  .alt-breakdown th,.alt-breakdown td{border-bottom:1px solid #999}
  .alt-disclaimer{border:1px solid #999}
}
