/* Decision 210 (Kareem: «صور الموبايل الأول»، «الدفعة الأولى بالصور»; the aim is an app on Google Play): the phone's look,
   batch 1: the site's frame, the project cards and «حضوري». Loaded after every other sheet, on the office's pages and on
   the public ones. Everything here is inside a phone-width rule, except the two lines under this note that keep the new
   menu button and drawer out of the computer's layout (the button hidden, the drawer's box not drawn: its children are
   laid out by the sidebar as before), so 1440 and 1920 stay as they were, pixel for pixel. */
.navToggle,.navClose{display:none}
.sideDrawer{display:contents}

/* 1) The frame. The sidebar is a slim bar on a phone: «القائمة» on the right, the small logo on the left; the button opens
   the sidebar's own list (every item with its numbers, «الإعدادات» and «بيانات حسابي» too, and «تسجيل الخروج») as a drawer
   from the right over a dimmed page (nav-drawer.js). Decision 288 (Kareem, 1 December, the employee's screens at every
   size): up to 900px, a tablet too. Between 761 and 900 the sidebar stayed a 210px column and the page got what was left
   (at 768: the project's name one letter a line, the chat column 140px, «تسجيل انصراف» 170px off the screen); now the
   page takes the whole width there as on a phone, with the same frame (no sidebar margin, the date off the crowded head). */
@media (max-width:900px){
  .workspace-page .shell{margin:0}
  .workspace-page main{padding:22px 16px}
  .workspace-page .shell>header .date{display:none}
  .workspace-page .sidebar{position:static;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;width:auto;min-height:56px;max-height:none;padding:6px 12px;overflow:visible}
  .workspace-page .sidebar>.brand{display:block;flex:none;margin:0;padding:0;border:0}
  .workspace-page .sidebar>.brand .brandMark{width:64px;margin:0}
  .workspace-page .sidebar>.brand small{display:none}
  .workspace-page .navToggle{order:-1;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:6px 12px;border:1px solid #ffffff33;border-radius:10px;background:transparent;color:#fff;font-size:15px;line-height:1}
  .workspace-page .navToggle:hover,.workspace-page .navToggle[aria-expanded="true"]{background:#ffffff14}
  .workspace-page .navToggle svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
  .workspace-page .sideDrawer{position:fixed;top:0;bottom:0;right:0;z-index:1000;display:flex;flex-direction:column;width:min(86vw,320px);padding:12px 14px 20px;background:var(--navy);color:#fff;overflow-y:auto;overscroll-behavior:contain;box-shadow:-12px 0 40px #0006;transform:translateX(100%);visibility:hidden;transition:transform .2s ease,visibility .2s}
  /* Decision 215: shown at once when it opens (the hiding waits for the slide only on closing), and its buttons do not
     fade in their inherited visibility (every button has transition:.15s), so the focus can go into it. */
  .workspace-page .sidebar.navOpen .sideDrawer{transform:none;visibility:visible;transition:transform .2s ease}
  .workspace-page .sidebar.navOpen .sideDrawer button{transition-property:background-color,border-color,color,box-shadow}
  .workspace-page .sidebar.navOpen::before{content:'';position:fixed;inset:0;z-index:999;background:#0a243b99}
  html.navLocked{overflow:hidden}
  .workspace-page .navClose{display:inline-grid;place-items:center;align-self:flex-end;flex:none;width:44px;height:44px;padding:0;border:1px solid #ffffff33;border-radius:10px;background:transparent;color:#fff;font-size:26px;line-height:1}
  .workspace-page .navClose:hover{background:#ffffff14}
  .workspace-page .sideDrawer>.workspace{display:block;margin:4px 6px 14px}
  .workspace-page .sideDrawer #nav{display:flex;flex-direction:column;gap:4px;margin:0;max-height:none;overflow:visible}
  .workspace-page .sideDrawer #nav button{flex:none;width:100%;min-height:48px;padding:10px 12px;font-size:15px;white-space:normal;text-align:right}
  .workspace-page .sideDrawer>.sidebottom{display:block;margin-top:auto;padding-top:16px}
  .workspace-page .sideDrawer>.sidebottom .sidecard{display:none}
  .workspace-page .sideDrawer>.sidebottom button{width:100%;min-height:44px}
}
@media (max-width:900px) and (prefers-reduced-motion:reduce){.workspace-page .sideDrawer{transition:none}}

/* The public pages' bar: the logo with its line on one line, and «الرئيسية»، «ابدأ طلبك كزائر»، «تسجيل الدخول» whole on the
   line under it (they were cut at the left, and the line under the logo took three lines). */
@media (max-width:700px){
  .publicBar .publicHeader{flex-wrap:wrap;justify-content:center;gap:10px;padding:12px 16px}
  .publicBar .publicHeader .brand{display:flex;align-items:center;justify-content:center;gap:10px;flex:1 1 100%}
  .publicBar .publicHeader .brand .brandMark{width:72px}
  .publicBar .publicHeader .brand small{margin:0;font-size:8px;letter-spacing:1px;white-space:nowrap}
  .publicBar .publicHeader nav{display:flex;flex:1 1 100%;flex-wrap:wrap;justify-content:center;gap:6px}
  .publicBar .publicHeader nav button{flex:1 1 auto;min-height:40px;padding:8px 10px;font-size:14px;white-space:nowrap;text-align:center}
  .publicHome{padding:0 16px}
  .publicHome .homeHead{flex-wrap:wrap;align-items:flex-start;gap:12px}
  .publicHome .homeHead h1{font-size:24px}
}

/* 2) The project cards (the lists of every role: «المشاريع»، «شغلي»، «مستحقات الدفع»، المنتهية والمؤرشفة). Kareem on the phone
   («و صغر الصورة هنا»): the picture is a small square beside the name, not a column the height of the card; everything else
   takes the card's whole width. The money row wraps, so «تسجيل دفعة» and «الاتفاق المالي» are never cut by the list's box,
   and the client's search and sort go on their own lines. */
/* Decision 237 (the colleague column under her list on a phone) is in compact.css now, up to 1100px with decision 288's tabs. */
@media (max-width:700px){
  .workspace-page .r7card>.r7top{display:block;position:relative}
  .workspace-page .r7top>.projectAvatar{position:absolute;top:0;inset-inline-start:0;z-index:1;width:52px;min-width:52px;height:52px;min-height:0;border-radius:12px;font-size:22px}
  .workspace-page .sideWrap .r7top>.projectAvatar{width:52px;min-width:52px;font-size:22px}
  .workspace-page .r7top>.projectAvatar img{border-radius:12px}
  .workspace-page .r7top>.r7body{width:100%}
  .workspace-page .r7top .r7head>.projectIdentity{flex:1 1 100%}
  .workspace-page .r7top .r7head>.projectIdentity>:first-child{flex:1 1 100%;min-height:52px;padding-inline-start:64px}
  .workspace-page .r7body>.r7meta{flex-wrap:wrap;gap:6px 12px}
  .workspace-page .r7body>.r7meta>.r7money{flex:1 1 100%;min-width:0}
  .workspace-page .r7meta .compactmoney{flex-wrap:wrap;gap:6px 14px}
  .workspace-page .r7meta .compactmoney>button{order:2;flex:1 1 0;min-height:40px}
  .workspace-page .r7meta .compactmoney:has(>button)::before{content:'';order:1;flex:0 0 100%;height:0}
  .workspace-page .r7body>.r7meta>.openedAt{flex:1 1 100%;margin:0}
  .workspace-page .r7customerControls>.suiteToolbar{flex:1 1 100%}
  .workspace-page .r7customerControls .suiteToolbar{flex-wrap:wrap}
  .workspace-page .r7customerControls .suiteToolbar>.searchBox{flex:1 1 100%}
  .workspace-page .r7customerControls .suiteToolbar>select{flex:1 1 auto}
  /* The project's own page and its window: the same small picture beside the client and the project's name. */
  .workspace-page .r7head .projectIdentity>.projectAvatar{width:52px;height:52px;min-width:52px;font-size:22px}
}

/* 3) «حضوري» (the employee and the staff manager): the month and «＋ طلب جديد» fit the head, today's line wraps and its
   button («تسجيل حضور» / «تسجيل انصراف») has a whole row; the month's table puts each day on a few lines: the day and its
   hours on the first, the request on the day, the sessions and «اطلب تصحيح» under them, whole. */
@media (max-width:700px){
  .workspace-page .shell>header:has(.eTop){flex-wrap:wrap;align-items:flex-start}
  .workspace-page .shell>header>.titlebar:has(.eTop){flex-wrap:wrap}
  .workspace-page .eTop{flex:1 1 100%;flex-wrap:wrap;justify-content:flex-start;row-gap:8px}
  .workspace-page .eTop .dMonth{flex:1 1 100%;justify-content:space-between;flex-wrap:wrap;gap:4px 12px;margin:0}
  .workspace-page .eTop>.primary{flex:none;white-space:nowrap}
  .workspace-page .eTop .eMore .rPop{inset-inline-end:auto;inset-inline-start:0}
  .workspace-page .ePage{padding:6px 14px 14px}
  .workspace-page .eToday{flex-wrap:wrap;gap:10px 12px}
  .workspace-page .eLine{flex:1 1 calc(100% - 30px);min-width:0;white-space:normal;line-height:1.9}
  .workspace-page .eLine i{margin:0 6px}
  .workspace-page .eLine b{white-space:nowrap}
  .workspace-page progress.eBar{flex:1 1 100%;min-width:0}
  .workspace-page .eToday form.counterAction{flex:1 1 100%}
  .workspace-page .eToday form.counterAction>button{flex:1 1 0;min-height:44px}
  .workspace-page .ePage .dDaysWrap{overflow:visible}
  .workspace-page .ePage .dDays,.workspace-page .ePage .dDays>thead,.workspace-page .ePage .dDays>tbody{display:block}
  .workspace-page .ePage .dDays>thead>tr,.workspace-page .ePage .dDays>tbody>tr{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
  .workspace-page .ePage .dDays>thead th:nth-child(n+5){display:none}
  .workspace-page .ePage .dDays>tbody>tr{border-top:1px solid #e3eaee}
  .workspace-page .ePage .dDays td{border-top:0;padding:6px 8px;white-space:normal}
  .workspace-page .ePage .dDays td:nth-child(n+5),.workspace-page .ePage .dDays td[colspan]{grid-column:1/-1;padding-top:0}
  .workspace-page .ePage .dDays td:nth-child(n+5):empty{display:none}
  .workspace-page .ePage .dDays td.act{width:auto;text-align:start}
}

/* Decision 215 (batch 2, «الدفعة التانية»: the wide tables and grids). Every rule below is inside a phone-width @media too.
   4) The stages sheet (decision 196) in «تعديل الخدمة» and «إعدادات المشروع» (the page and its window): one card per stage,
   «⋮⋮» to drag it, its number and «✕» on the first line, then its name, «بعد ما تخلص» with its chips, «بنود التسليم» and
   «مين يعملها», each the card's whole width. The part's line and «+ مرحلة» stay as they are, full width. The fields
   above it (name, department, the line under the name; the city and the two dates) are one column. */
@media (max-width:700px){
  .workspace-page .sheetGrid3,.workspace-page .sheetGrid2,.workspace-page .detailgrid.cols3{grid-template-columns:minmax(0,1fr);gap:12px}
  .workspace-page .sheetSec{padding:16px 14px}
  .workspace-page table.sheet,.workspace-page .sheet>tbody,.workspace-page .sheet>tbody>tr,.workspace-page .sheet>tbody>tr>td{display:block;width:auto}
  .workspace-page table.sheet{border:0;border-radius:0;background:transparent}
  .workspace-page .sheet>thead{display:none}
  .workspace-page .sheet>tbody{margin:0 0 16px}
  .workspace-page .sheet>tbody>tr>td{border:0;border-radius:0}
  .workspace-page .sheet tr.sheetPart>td{padding:10px 12px;border-radius:12px}
  .workspace-page .sheet .stageName{flex-wrap:wrap;gap:6px 10px}
  .workspace-page .sheet .stageName input{flex:1 1 180px;width:auto;min-width:0}
  .workspace-page .sheet tr.sheetStage,.workspace-page .sheet tr.sheetEnd{display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;align-items:center;gap:8px 6px;margin-top:8px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#fff}
  .workspace-page .sheet tr.sheetEnd{background:#fffaf0}
  .workspace-page .sheet tr.sheetFinal{background:#eef4f7;border-color:#bfd2dc}
  .workspace-page .sheet tr.sheetStage>td,.workspace-page .sheet tr.sheetEnd>td{padding:0;background:transparent;border:0}
  .workspace-page .sheet tr.sheetStage>td.sheetGrip,.workspace-page .sheet tr.sheetEnd>td.sheetGrip{grid-row:1;grid-column:1;width:auto;padding:0}
  .workspace-page .sheet tr.sheetStage>td.gateNum,.workspace-page .sheet tr.sheetEnd>td.sheetNum{grid-row:1;grid-column:2;width:auto;min-width:22px}
  .workspace-page .sheet tr>td.sheetName{grid-row:1;grid-column:3;width:auto;min-width:0}
  .workspace-page .sheet tr.sheetStage>td.sheetName{grid-row:2;grid-column:1/-1}
  .workspace-page .sheet tr>td.sheetDel{grid-row:1;grid-column:4;width:auto}
  .workspace-page .sheet tr>td.sheetGate,.workspace-page .sheet tr>td.sheetItems,.workspace-page .sheet tr>td.sheetWho{grid-column:1/-1;width:auto}
  .workspace-page .sheet tr.sheetStage>td.sheetGate::before{content:'بعد ما تخلص';display:block;margin:0 0 4px;font-size:12px;font-weight:700;color:#5d7380}
  .workspace-page .sheet tr.sheetStage>td.sheetWho::before{content:'مين يعملها';display:block;margin:0 0 4px;font-size:12px;font-weight:700;color:#5d7380}
  .workspace-page .sheet tr.sheetStage>td.sheetWho:empty,.workspace-page .sheet tr.sheetEnd>td.sheetWho,.workspace-page .sheet tr.sheetEnd>td.sheetGrip:empty,.workspace-page .sheet tr>td.sheetDel:empty{display:none}
  .workspace-page .sheet tr>td.sheetItems:not(:has(details:not([hidden]))){display:none}
  .workspace-page .sheet .gateName{width:100%}
  .workspace-page .sheet .gateChips{flex-wrap:wrap}
  .workspace-page .sheet .gateEndLabel{white-space:normal}
  .workspace-page .sheet .rowGrip,.workspace-page .sheet .rowDel{min-width:32px;min-height:36px;padding:4px 6px;font-size:15px}
  .workspace-page .sheet tr.sheetAdd>td{padding:8px 4px 0}
  .workspace-page .sheet .gateAdd{min-height:36px;padding:4px 8px}
  .workspace-page .sheet .who b{max-width:none;white-space:normal}
  .workspace-page .sheet .sheetPop,.workspace-page .sheet .whoPick .sheetPop{width:min(300px,calc(100vw - 72px))}
  .workspace-page .sheet tr.rowDropBefore{box-shadow:0 -3px 0 var(--teal)}
  .workspace-page .sheet tr.rowDropAfter{box-shadow:0 3px 0 var(--teal)}
  .workspace-page .sheet tr.rowDropBefore>td,.workspace-page .sheet tr.rowDropAfter>td{box-shadow:none}
  .workspace-page .sheet tr.rowDragging{opacity:.5}
}

/* 5) «الفريق»: one card per person, stacked: the person and today, the month, «شغال على» with «مشاريعه بالسعر» under it,
   then «التفاصيل» and «⋯». The head row (the columns' names) is not drawn; each part says what it is. */
@media (max-width:700px){
  .workspace-page .panel.rTable .rRow{grid-template-columns:minmax(0,1fr);gap:10px;padding:14px}
  .workspace-page .panel.rTable .rRow.rHeadRow{display:none}
  .workspace-page .panel.rTable .rRow:nth-child(2){border-top:0;border-radius:12px 12px 0 0}
  .workspace-page .rWork.rPriced{grid-template-columns:minmax(0,1fr);row-gap:8px}
  .workspace-page .rWork.rPriced>.rPrice{grid-column:1;grid-row:auto;padding:8px 0 0;border-inline-start:0;border-top:1px solid #e4ebee}
  .workspace-page .rWork.rPriced>.rPriceHead{display:none}
  .workspace-page .rEnd{justify-content:flex-start;flex-wrap:wrap}
  .workspace-page .rEnd .rMenu .rPop{inset-inline-end:auto;inset-inline-start:0}
  /* A person's «التفاصيل» (its page and its window): the name beside the picture and «⋯», the month's arrows under them. */
  .workspace-page .dHead{flex-wrap:wrap;row-gap:8px;padding:14px}
  .workspace-page .dHead>.dWho{flex:1 1 0}
  .workspace-page .dHead>.dWho small{white-space:normal}
  .workspace-page .dHead>.dMonth{order:5;flex:1 1 100%;flex-wrap:wrap;justify-content:space-between;gap:4px 12px}
}

/* 6) The money boxes: «حساب الشهر» on «العملاء» two by two, «الحسابات»'s three figures two by two (the third the whole
   width), «إجمالي حساب العميل» and the client's projects one under the other, each client of «العملاء» a card of its own
   (its four amounts two by two, they were drawn over one another); every amount a size smaller and whole. */
@media (max-width:700px){
  .workspace-page .monthTiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .workspace-page .monthTile{padding:10px 12px}
  .workspace-page .monthTile b.money{font-size:19px!important;white-space:normal}
  .workspace-page .monthNav{flex-wrap:wrap;gap:6px 14px;white-space:normal}
  .workspace-page .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .workspace-page .stats>.stat{min-width:0}
  .workspace-page .stats>.stat:last-child:nth-child(odd){grid-column:1/-1}
  .workspace-page .stats .money{font-size:20px!important;overflow-wrap:anywhere}
  .workspace-page .accountBox{grid-template-columns:repeat(2,minmax(0,1fr));padding:14px 16px;gap:12px}
  .workspace-page .accountBox b{white-space:normal}
  .workspace-page .accountBox b.money{font-size:18px!important}
  .workspace-page .accountBox .paybutton{grid-column:1/-1}
  .workspace-page .clientCards{grid-template-columns:minmax(0,1fr)}
  .workspace-page .clientRow{grid-template-columns:minmax(0,1fr);gap:10px;padding:14px}
  .workspace-page .clientRow .acct{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px}
  .workspace-page .clientRow .acct b.money{white-space:normal}
  .workspace-page .clientRow.clientTotal .totalPad{display:none}
  .workspace-page .clientRow .actions{flex-wrap:wrap}
  .workspace-page .clientCard .mini{grid-template-columns:repeat(3,minmax(0,1fr))}
  .workspace-page .clientCard .mini b.money{white-space:normal}
}

/* 7) The files' rows (the delivery hub, the archive, the stage's files): the name on the first line, whole (a long one
   wraps at its dashes), the type, size, date and time on the line under it; the thumbnail beside them, and «تنزيل» (with
   «ماتسلّمش» and the like) beside them too while the name keeps 150px, else on a line of its own under them. In the
   archive the file takes its line beside its box, its state and «تنزيل» go under it. */
@media (max-width:700px){
  .workspace-page .hubRow{grid-template-columns:minmax(0,1fr)}
  .workspace-page .hubRow>.actions{grid-column:1;grid-row:auto;justify-content:flex-start}
  .workspace-page .hubFiles{min-width:0}
  .workspace-page .archiveFile>.frow{flex:1 1 calc(100% - 56px)}
  /* A file's row on a phone is file-list.css's, the same on every page (Kareem, 30 November: «اربط الكل بشكل واحد»). */
}

/* 8) The windows: a long title wraps on two or three short lines in a smaller letter beside «×»; the settings window's
   city and two dates are one under the other (section 4). «نبّه»'s list opens inside the chat's head, never past the screen. */
@media (max-width:700px){
  :is(#modal,#pageDialog) .dialoghead{align-items:flex-start;gap:10px;padding:14px 16px}
  :is(#modal,#pageDialog) .dialoghead h2{min-width:0;font-size:16px;line-height:1.5;overflow-wrap:anywhere;text-wrap:balance}
  :is(#modal,#pageDialog) .dialoghead>button{flex:none}
  .workspace-page .chathead:has(>.chattools>.nudgemenu){position:relative}
  .workspace-page .chattools>.nudgemenu{position:static}
  .workspace-page .chattools>.nudgemenu>.nudgeitems{width:auto;max-width:290px;inset-inline-start:0;inset-inline-end:0;margin-inline-start:auto}
}

/* Decision 219 (batch 3, Kareem: «ادخل فى الثالثه»: what is too small for a finger, and the windows left). Every rule here is
   inside the phone's width too. The floors: a control takes at least 44×44 (a link inside a sentence is part of the
   sentence and keeps its size); letters at least 12px (the logo's line and the icons' marks, ✓ ▾ and the like, are drawn,
   not read); a box typed in at 16px, so a phone does not zoom in when it is tapped. The floors are !important: they only
   ever raise a size (min-height, min-width, a box's letters), and older rules with longer selectors set smaller ones. */
@media (max-width:700px){
  /* 9) The controls: buttons, the links drawn as buttons or as a line of their own, the menus' heads, the lists to pick
     from: 44 by 44. A link that is a line of its own is centred in its 44. */
  body :is(button,a.button,.button,summary,select,[role=button]):not(.sr-only){min-height:44px!important;min-width:44px!important}
  body input:not([type=checkbox],[type=radio],[type=range],[type=hidden],[type=file],[type=button],[type=submit],[type=color]){min-height:44px!important}
  .workspace-page :is(a.hoverbtn,a.docdown,a.frdown,a.linkbtn,a.r7open,a.r7preview){min-height:44px!important;min-width:44px!important}
  .workspace-page :is(a.rName,a.rFix,.rMonth>a,.tLine>a,.r7card a.projectname,.clientRow .nameline>a.projectname,.profileProject>a.projectname,a.monthReport){display:flex;align-items:center;min-height:44px}
  .workspace-page :is(a.crumblink,a.pageDialogFull,.ePageBack>a,a.inlineLink){display:inline-flex;align-items:center;min-height:44px!important;min-width:44px!important}
  .guestForm a.button{display:inline-flex;align-items:center;min-height:44px}
  .workspace-page a.projectname.inlineLink{display:inline-flex}
  .workspace-page :is(.rWork,.dWork) li>a{display:inline-flex;align-items:center;min-height:44px}
  .workspace-page .clientCard .cardTop h3>a{display:inline-flex;align-items:center;min-height:44px}
  /* A project's state on the client's cards («في المراجعة · مستني تسليم …») wraps; it was past the screen's left side. */
  .workspace-page .clientCard .cardTop .pill{white-space:normal;min-width:0}
  /* A person's «التفاصيل» (its window and its page): the month's days as on «حضوري» (section 3), so «اعتماد» and «⋯» on a
     day's request are on the screen, not past the table's left side. */
  .workspace-page .personDetails .dDaysWrap{overflow:visible}
  .workspace-page .personDetails .dDays,.workspace-page .personDetails .dDays>thead,.workspace-page .personDetails .dDays>tbody{display:block}
  .workspace-page .personDetails .dDays>thead>tr,.workspace-page .personDetails .dDays>tbody>tr{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
  .workspace-page .personDetails .dDays>thead th:nth-child(n+5){display:none}
  .workspace-page .personDetails .dDays>tbody>tr{border-top:1px solid #e3eaee}
  .workspace-page .personDetails .dDays td{border-top:0;padding:6px 8px;white-space:normal}
  .workspace-page .personDetails .dDays td:nth-child(n+5),.workspace-page .personDetails .dDays td[colspan]{grid-column:1/-1;padding-top:0}
  .workspace-page .personDetails .dDays td:nth-child(n+5):empty{display:none}
  .workspace-page .personDetails .dDays td.act{width:auto;text-align:start}
  /* «⋯» menus' items («تصدير CSV»، «إيقاف»، «أرشفة»). */
  .workspace-page .rPop :is(a,button){display:flex;align-items:center;min-height:44px}
  /* «بيانات حسابي» and the forms laid two by two: each field the screen's width (the phone's box was 26px wide). */
  .workspace-page .formflow>.field{flex:1 1 100%}
  .workspace-page .changeForm .formflow{grid-template-columns:minmax(0,1fr)}
  /* The month's attendance table (the owner's «الحضور الشهري», in its own scroll box): a name keeps 8em, it was one letter a line. */
  .workspace-page td .nameline>a.projectname{min-width:8em}
  /* «الأقسام»'s people: the name 8em and 44 high (it was 42px wide, a word a line). */
  .workspace-page td>a.projectname{display:flex;align-items:center;min-width:8em;min-height:44px}
  /* A month's arrows («‹ أكتوبر»، «ديسمبر ›») on «حضوري»، «الفريق» and «حساب الشهر». */
  .workspace-page :is(.monthNav,.dMonth)>a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px}
  .workspace-page :is(a.sortHead,a.pill,.rDone a){display:inline-flex;align-items:center;min-height:44px}
  .workspace-page a.sortHead{min-width:44px}
  .workspace-page .rToday{min-height:44px;align-items:center}
  .workspace-page a.waitingCount{min-width:44px;min-height:44px;border:12px solid transparent;background-clip:padding-box;box-sizing:border-box}
  :is(.publicMode,.auth-page,body) a.forgotPreview{display:inline-flex;align-items:center;min-height:44px}
  /* 10) The boxes typed in: 16px. */
  /* The lists' search («ابحث بالاسم أو الكود») takes its line, so its words fit at 16px; the sort under it. */
  .workspace-page .suiteToolbar>.searchBox{flex:1 1 100%}
  .workspace-page .suiteToolbar>select{flex:1 1 auto}
  body :is(input:not([type=checkbox],[type=radio],[type=range],[type=hidden],[type=file],[type=button],[type=submit],[type=color]),select,textarea){font-size:16px!important}
  /* 11) A tick or a choice: a bigger box, and its whole label (the words beside it) the target, 44 high. */
  body input:is([type=checkbox],[type=radio]){width:22px;height:22px;flex:none}
  body label:has(>input:is([type=checkbox],[type=radio])){min-height:44px}
  /* A tick with no words beside it (a file of the archive): the box a finger takes is 44 by 44, the square drawn in it 22,
     filled when ticked (the browser draws a tick only the size of its box). */
  body input[type=checkbox]:not(label *){appearance:none;-webkit-appearance:none;width:44px;height:44px;min-width:44px!important;min-height:44px!important;margin:0;padding:0;border:11px solid transparent;border-radius:0;background:#fff content-box;box-shadow:inset 0 0 0 2px #8a9ba5;cursor:pointer}
  body input[type=checkbox]:not(label *):checked{background-color:var(--teal,#087f78);box-shadow:inset 0 0 0 2px var(--teal,#087f78),inset 0 0 0 5px #fff}
  body input[type=checkbox]:not(label *):focus-visible{outline:2px solid var(--teal,#087f78);outline-offset:-9px}
  /* 12) Letters under 12px: each rule as its sheet has it (so nothing else changes size), and the browser's own <small> where
     the words around it are small («صلاحيات الوكيل»، a forwarded message's line). */
  .workspace-page :is(.agentAllows,.agentNever) small,.workspace-page small.forwarded,.workspace-page .vpart small{font-size:12px}
  /* chat-send-screen.css */
  .sendscreen .pickitem .fileicon{font-size:12px}
  .sendscreen .pickx{font-size:12px}
  .pickbadge{font-size:12px}
  .workspace-page .composer .pickitem b.pickbadge{font-size:12px}
  /* chat-wa.css */
  .workspace-page .expandedChat .bubble>.routebox>summary{font-size:12px}
  .workspace-page .bubble .vtime{font-size:12px}
  .workspace-page .draftpill{font-size:12px}
  .workspace-page .nudgefoot{font-size:12px}
  /* compact.css */
  .workspace-page .shell>header>.titlebar .eyebrow{font-size:12px}
  .workspace-page .teamPersonButtons .waitingCount,.workspace-page .teamStrays .waitingCount{font-size:12px}
  /* date-field.css */
  .dateSeg b{font-size:12px}
  /* file-viewer.css */
  .fricon{font-size:12px}
  /* final-delivery.css */
  .workspace-page .gateBadge{font-size:12px}
  .workspace-page .sheetTip{font-size:12px}
  .workspace-page .sheet .gateFixed{font-size:12px}
  .workspace-page .sheet .popNote{font-size:12px}
  /* public-preview.css */
  .eyebrow{font-size:12px}
  .demo{font-size:12px}
  .notice{font-size:12px}
  footer{font-size:12px}
  .rolebar small{font-size:12px}
  .portalstats .stat label{font-size:12px}
  .portalstats .stat small{font-size:12px}
  .bubblehead small{font-size:12px}
  .bubblehead>span{font-size:12px}
  .messageactions button{font-size:12px}
  .chatfile small{font-size:12px}
  .miniStages span{font-size:12px}
  .compactmoney button{font-size:12px}
  .compactchat b{font-size:12px}
  /* upload-tray.css */
  .upHead small{font-size:12px}
  .upIcon{font-size:12px}
  .upFoot{font-size:12px}
  /* workspace-adapter.css */
  .attendanceDays .pill{font-size:12px}
  .newMark{font-size:12px}
  .iconNowTag{font-size:12px}
  .workspace-page .vbody small{font-size:12px}
  .workspace-page .vfiles b{font-size:12px}
  .workspace-page .stageList small{font-size:12px}
  .workspace-page .bubble .msgfoot{font-size:12px}
  .workspace-page .bubble .msgfoot small{font-size:12px}
  .workspace-page .bubble.pending .sendstate{font-size:12px}
  .workspace-page .bubble.pending .sendstate button{font-size:12px}
  .workspace-page .bubble.pending .sendwhy{font-size:12px}
  .workspace-page .bubble .pill{font-size:12px}
  .workspace-page .expandedChat .project-event time{font-size:12px}
  .workspace-page .fwdmessage small{font-size:12px}
  .msgfoot .routebox>summary{font-size:12px}
  .routeitems small{font-size:12px}
  .chatProjectTitle>.chathead small{font-size:12px}
  .reactwho .row small{font-size:12px}
  .workspace-page .bubble .fileicon{font-size:12px}
  .workspace-page .bubble .docname small{font-size:12px}
  .workspace-page .composer .pickitem .fileicon{font-size:12px}
  .workspace-page .composer .pickitem small{font-size:12px}
  .workspace-page .composer .pickitem b{font-size:12px}
  .workspace-page .composer .pickx{font-size:12px}
  .workspace-page .composer .scrolldown b{font-size:12px}
  .attendanceMonthly th small{font-size:12px}
  /* yearly-report.css */
  .yrTable thead th small.pill{font-size:12px}
  .yrTable tbody tr.yrNow th.yrMonth small{font-size:12px}
  .yrApprox{font-size:12px}
}

/* Decision 219, Kareem on the pictures («اول صورة خلى الشاشة تكون كاملة فيها»): on a phone a window takes the whole
   screen, a sheet with no card around it and no dimmed margins: its head (the name, «×») stays at the top and the rest
   scrolls under it. Every window with content: a page's window (a person's «التفاصيل»، the project, the yearly report…)
   and the forms' window (the settings, a stage's files, a payment, a new project…). The small questions stay small cards:
   a request's question (askBox), deleting a project, «اعتمد دلوقتي». The sizes are !important: the windows' own widths
   on a computer are set by long selectors (a person's window: #pageDialog:has(…[data-person-details])). */
@media (max-width:700px){
  #pageDialog,#modal:not(:has(.askBox,form.deleteProject,form.approvenow)){width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;inset:0;border:0;border-radius:0!important;box-shadow:none}
  #pageDialog .pageDialogBody{height:100%;max-height:none}
  #modal:not(:has(.askBox,form.deleteProject,form.approvenow)) .dialoghead{position:sticky;top:0;z-index:6;background:#fff;border-bottom:1px solid var(--line,#e4ebee)}
  #modal:not(:has(.askBox,form.deleteProject,form.approvenow)) #dialogBody{min-height:100%}
}

/* Decision 223 (batch 4, Kareem: «ابدأ الدفعة الرابعة دلوقتي»: the account and personal pages). Inside the phone's width
   too. «ملف الموظف»: the person's name and line on their own, the services under them and «شغله وتخصصه» with «الصلاحيات
   والأمان» side by side under those (the name was a word a line beside them); «بيانات العقد» and every form laid two, three or four by two, one field
   a line (the fields were 70px wide). «بيانات حسابي» of a client: one box a line (the e-mail broke letter by letter). The
   project's picture: a picture's name on two lines under it; the file's box and the two position sliders one a line, each
   the screen's width and a finger's height (they were three side by side, a slider 87px). */
@media (max-width:700px){
  .workspace-page .staffProfile .profileId{flex-wrap:wrap;row-gap:12px}
  .workspace-page .staffProfile .profileId>.profileSide{flex:1 1 100%;max-width:none;flex-direction:row;flex-wrap:wrap;align-items:center}
  /* Kareem: «شغله وتخصصه» and «الصلاحيات والأمان» side by side on one row under the services' line, half each. The first
     is inside the line (<p class="workLine">…<button>): the line's box is let go (contents), a break after its words. */
  .workspace-page .staffProfile .profileSide{gap:8px;align-items:stretch}
  .workspace-page .staffProfile .profileSide .workLine{display:contents;text-align:start}
  .workspace-page .staffProfile .profileSide .workLine::after{content:'';flex:0 0 100%;order:1}
  .workspace-page .staffProfile .profileSide :is(.workLine>.workButton,a.button){order:2;flex:1 1 0;min-width:0;display:flex;align-items:center;justify-content:center;text-align:center;white-space:nowrap;padding-inline:8px}
  .workspace-page .staffProfile .profileContract .formgrid,.workspace-page .formgrid:is(.cols2,.cols3,.cols4){grid-template-columns:minmax(0,1fr)}
  .workspace-page .accountData dl{grid-template-columns:minmax(0,1fr)}
  .workspace-page .iconTile .iconName{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;overflow-wrap:anywhere}
  body input[type=range]{min-height:44px}
  .workspace-page .iconPicker .iconInputs{grid-template-columns:minmax(0,1fr)}
  .workspace-page .iconInputs input[type=range]{width:100%}
  .workspace-page .iconUpload input[type=file]{width:100%;min-height:44px}
  /* Decision 219's 12px floor for this batch's small letters (the viewer, the drawing size and «المدينة»'s help). */
  .editor .edTools [title="السُمك"]{font-size:12px}
  .fileviewer .fvthumbFallback{font-size:12px}
  .workspace-page .projectCityField .projectCityHelp{font-size:12px}
  /* «الدرايف» (29 November): the folder's chips (who sees it, the link) at the 12px floor too. */
  .driveChips span{font-size:12px}
}

/* Mobile «المزيد» (28 November, the approved 27 November mock): on 390 and 412 only, the project's secondary actions fold
   into one «المزيد» button beside the main one (mobile-more.js). */
@media (max-width:412px){
 .workspace-page .expandedDetails:not([data-mobile-more-open]) [data-mobile-more-secondary]{display:none}
 .workspace-page [data-mobile-more-menu]>summary,
 .workspace-page [data-mobile-more-duplicate]{display:none}
 .workspace-page .actionmenu[data-mobile-more-menu][open]{flex-basis:100%;min-width:0}
 .workspace-page [data-mobile-more-row]>[data-mobile-more-primary],
 .workspace-page [data-mobile-more-row]>form[data-mobile-more-primary]>button{order:-2}
 .workspace-page [data-mobile-more-row]>.mobileMoreButton{order:-1}
 .workspace-page .vturnDo[data-mobile-more-row]{column-gap:6px}
 .workspace-page .vturnDo[data-mobile-more-row]>.mobileMoreButton{padding-inline:8px}
 .workspace-page .expandedDetails[data-mobile-more-open] [data-mobile-more-row]>.mobileMoreButton{
  border-color:var(--teal);color:var(--teal)
 }
}
