/* Site type scale, taken from the accepted Property record and Tenancies table.
   Authored document/PDF canvases keep their own document typography. */
:root {
  --property-font: Inter, Arial, sans-serif;
  --property-body-size: 12px;
  --property-label-size: 11px;
  --property-table-heading-size: 10px;
  --property-input-size: 12px;
  --record-font: var(--property-font);
  --record-control-size: var(--property-input-size);
  --record-label-size: var(--property-label-size);
}
body, #main, .property-native .shell, dialog, .modal-back {
  font-family: var(--property-font);
  font-size: var(--property-body-size);
  font-weight: 400;
}
:is(#main, #modal, .shell, dialog.modal, .modal-back) :is(button,input,select,textarea) { font-family: var(--property-font); }
:is(#main,.shell .stage) :is(.page-heading,.page-head,.detail-heading) h1 {
  font-size: var(--property-heading-size,26px)!important;
  font-weight: 650!important; line-height: 1.25!important; letter-spacing: -.7px!important;
}
:is(#main,.shell .stage) :is(.page-heading,.page-head) p { font-size:12px!important; line-height:1.6!important; }
:is(#main,#modal,.shell .stage,dialog.modal,.modal-back) h2:not(.document-page *, .a4-canvas *, .ql-editor *, .es-page *, [contenteditable]) {
  font-size:15px; font-weight:600; line-height:1.5; letter-spacing:-.2px;
}
:is(#main,#modal,.shell .stage,dialog.modal,.modal-back) h3:not(.document-page *, .a4-canvas *, .ql-editor *, .es-page *, [contenteditable]) { font-size:12px; font-weight:550; }
:is(#modal,dialog.modal,.modal-back) :is(.modal-head h2,form>h2) { font-size:18px; font-weight:600; }
:is(#main,#modal) :is(input.control,select.control,textarea.control,.field-control),
:is(.shell,dialog.modal,.modal-back) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea):not(.document-page *, .a4-canvas *, .es-page *) {
  font-size:var(--property-input-size)!important; font-weight:400!important; line-height:1.5;
}
:is(#main,#modal,.shell,dialog.modal,.modal-back) :is(input,textarea)::placeholder { font-size:inherit; font-weight:400; }
:is(#main,#modal) .field > :is(span:not(.property-money-control),label),
:is(.shell,dialog.modal,.modal-back) :is(form>label,.form-grid>label,.field>label,.field>span) {
  font-size:11px!important; font-weight:550; color:var(--record-muted,#65736b);
}
:is(#main,#modal,.shell,dialog.modal,.modal-back) :is(.btn,.button,button.primary,button.secondary,.link-results button,.linked-result,.settings-nav button,.tab,.iw-tabs button,.iw-tabs a,.document-list-tabs a,.document-library-scope a,.list-filter,.list-filter>span) {
  font-size:12px!important; font-weight:550;
}
:is(#main,#modal,.shell,dialog.modal,.modal-back) :is(.form-note,.field small,.table-secondary,.job-next,.pagination,.property-filter-summary,.loading-inline) { font-size:11px!important; line-height:1.6; }
#main :is(.action-row strong,.setup-list strong,.support-item,.support-item strong,.check-step,.guidance-item p,.supplier p,.supplier a,.info-note,.preview-steps li) { font-size:12px; }
#main :is(.action-row small,.setup-list p,.info-note p,.guidance-item small) { font-size:11px; }
#main :is(.maintenance-card-heading,.pd-widget-title,.pd-widget-head h2) { font-size:12px; font-weight:550; }
#main .maintenance-summary-card small { font-size:11px; }
:is(#main,.shell) :is(.register,.ph-table,.base-list,.pr-table,.grid-wrap table) { font-size:12px; }
:is(#main,.shell) :is(.register td,.ph-table td,.base-row,.document-row,.esign-row,.people-row,.login-history-row,.pr-table-row,.pr-register td,.grid-wrap td) { font-size:12px!important; font-weight:400; }
:is(#main,.shell) :is(.register th,.ph-table th,.base-head,.head,.pr-table-head,.pr-register th,.grid-wrap th),
:is(#main,.shell) :is(.register th,.ph-table th,.base-head,.head,.pr-table-head,.pr-register th,.grid-wrap th) :is(button,span) { font-size:10px!important; font-weight:550; }
:is(#main,.shell) :is(.record-link,.ph-record-link,.document-row strong,.esign-row strong) { font-size:12px; font-weight:550; }
:is(#main,.shell) :is(.register,.ph-table,.base-list) .status { font-size:12px; font-weight:400; }
:is(#main,.shell) :is(.ph-record-type,.document-row small,.esign-row small) { font-size:11px; }
:is(#main,.shell) :is(.register,.ph-table) th { padding:0 10px; }
:is(#main,.shell) :is(.register,.ph-table) td { padding:12px 10px; }
.property-sort-button {
  display:inline-flex; align-items:center; justify-content:flex-start; gap:6px;
  max-width:100%; min-height:30px; padding:0; border:0; border-radius:3px;
  background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer;
}
.property-sort-button:hover { color:var(--record-text,#202124); }
.property-sort-button:focus-visible { outline:2px solid var(--record-text,#202124); outline-offset:3px; }
:is(#main,.shell) .property-sort-icon { flex:none; width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:1.6; }
[aria-sort=none] .property-sort-icon { color:#9aa5a1; }
.property-field-settings { position:absolute; right:7px; top:3px; padding:4px; border:0; background:transparent; }
.grid-wrap .field-header[data-property-field-sort] { padding-right:28px; }
@media(max-width:700px) {
  :root { --property-input-size:16px; }
  .property-sort-button { min-height:44px; }
}

/* Native dialogs use stronger component rules; keep their controls on this scale. */
.modal.portal-modal { font-family:var(--property-font); font-size:12px; }
.modal.portal-modal .portal-modal-title { font-size:18px!important; font-weight:600!important; }
.modal.portal-modal label { font-size:11px!important; font-weight:550!important; }
.modal.portal-modal input:not([type=checkbox]):not([type=radio]):not([type=color]):not(.form-title-input),
.modal.portal-modal select,.modal.portal-modal textarea,.shell .link-search-input input[type=search] {
  font-size:var(--property-input-size)!important; font-weight:400!important;
}
.modal.portal-modal footer button,.modal.portal-modal footer a { font-size:12px!important; font-weight:550!important; }
.shell :is(.iw-register,.cl-register,.pr-register,.mp-register,.dh-data-table) td { font-size:12px; }
.shell :is(.iw-register,.cl-register,.pr-register,.mp-register,.dh-data-table) th { font-size:10px; font-weight:550; }
@media(max-width:850px) {
  .shell :is(.base-list,.people-list,.login-history) > :is(.head,.base-head) { display:flex!important; flex-wrap:wrap; gap:12px; }
  .shell .document-library-register .document-row.head > span { grid-column:auto; }
}

@media(max-width:850px) {
  .shell .esign-row.head { min-width:0!important; }
  .shell .esign-row.head > span { display:block!important; }
  .shell .esign-library-row { min-width:0; grid-template-columns:minmax(0,1fr) 44px; }
  .shell .esign-library-row .esign-row { min-width:0; grid-template-columns:minmax(0,1fr); gap:6px; }
  .shell .esign-library-row .esign-row > span { display:block!important; }
}
@media(max-width:560px) {
  .shell .stage > header { gap:8px; }
  .shell .stage > header > strong { flex:1; min-width:0; max-width:none; }
  .shell .stage > header .header-actions { flex:0 0 auto; gap:4px; }
  .shell .stage > header .header-actions .search.universal-search { position:relative; flex:none; width:36px; min-width:36px; max-width:36px; height:38px; padding:9px; }
  .shell .stage > header .header-actions .search.universal-search input { color:transparent; padding:9px; }
  .shell .stage > header .header-actions .search.universal-search input::placeholder { color:transparent; }
  .shell .stage > header .header-actions .search.universal-search:focus-within { position:absolute; left:12px; right:12px; top:12px; width:auto; max-width:none; background:#fff; z-index:45; }
  .shell .stage > header .header-actions .search.universal-search:focus-within input { color:var(--ink); padding-left:36px; }
  .shell .stage > header .header-actions .search.universal-search:focus-within input::placeholder { color:var(--muted); }
  .shell .esign-library-row .esign-row strong,.shell .esign-library-row .esign-row small { display:block; }
}
/* Preserve the reference record's secondary text and selected-tab hierarchy. */
#main .ph-table td.ph-record-type { font-size:11px!important; }
#main .ph-tools .btn { font-size:11px!important; }
#main :is(.tab,[role=tab]) { font-weight:400; }
#main :is(.tab,[role=tab])[aria-selected=true] { font-weight:550; }
