/* acv99a9 (owner 04/11, layout audit items 1-9). Loaded last. CSS only: no markup, script or data change.
   Colour fixes are scoped to the light original theme (.app.theme-original:not(.dark)); dark mode keeps its own colours.
   Padding on the left/right is symmetric or logical so Arabic (RTL) mirrors unchanged. */

/* ---------- 3. one darker secondary text colour (>= 4.5:1 on white, cream and the tinted card backgrounds) ---------- */
.app:not(.dark){--acv-soft:#566074;--acv99-muted:#566274}
.app.theme-original:not(.dark) :is(.a-heading p,.dash-heading p,.a-field>span,.a-help,.editor-tip p,.records-table th,.date-cell,.date-cell small,.contact-cell small,.list-footer,.under-list-note,.invoice-metrics>button>span,.invoice-metrics p,.dash-stat-head,.dash-stat>p,.dash-stat>p b,.dash-panel-heading p,.chart-key,.chart-caption,.workflow-card>button p,.workflow-footer,.expected-row small,.pulse-footer,.report-disclaimer,.report-doc-heading span,.portability-card p){color:var(--acv99-muted)!important}
.app.theme-original:not(.dark) :is(.la-crumb span[aria-hidden],.rc-group h3>button,.rc-group h3:not(:has(button))){color:#5f6779}
.app.theme-original:not(.dark) .rc-star{color:#8a6a00}
.app.theme-original:not(.dark) :is(.paper-parties small,.invoice-paper dt,.paper-notes p,.invoice-paper>footer,.invoice-paper header p,.paper-parties p,.paper-balance dt,.detail-history h3,.history-line small,.payment-history small,.history-line strong,.payment-history strong,.editor-sticky>span,.record-rail p,.record-rail p span,.attachments-section>strong,.acv89-c2,.acv86-ff-hist,.acv86-ff-hist span,.upload-drop p,.upload-drop small,.capture-grid p,.footnote,.panel>.footnote,.acv-logo-btn,.accent-custom span,.acv85-hint,.acv84-chip,.acv86-db-planned span,.acv86-db-pl-none,.acv85-steps li,.acv86-cp-late small,.acv84-set-pick span,.acv85-acct>span,.acv90-cnt,.acv90-cnt span,.acv89-cnt,.acv89-cnt span,.acv89-multi span){color:var(--acv99-muted)}
.app.theme-original:not(.dark) :is(.paper-notes h4,.detail-history h3,.attachments-section>strong){color:#3f4a5c}
.app.theme-original:not(.dark) .a-field{color:var(--acv99-muted)}
.app.theme-original:not(.dark) .exp-upsell{color:var(--soft)}
.app.theme-original:not(.dark) .connection-hero p{color:#4e5875}
.app.theme-original:not(.dark) .text-foreground\/60{color:#4e5875}
.model-dialog{--soft:#566274}
.capture-grid p{color:#566274}
.dark .capture-grid p{color:#a8b9cf}
#acv-side .zs-sec-title{color:rgba(201,205,235,.78)}
#acv-side.folded .zs-sec-title{color:#5f6779}

/* ---------- 2. readable type: th 12px, body/list text 13px, meta never under 12px ---------- */
html .app.accounting-app.theme-original:not(.dark) :is(table th,[data-slot=table-head]){font-size:12px!important}
html .app :is(.acv84-deliver-table,.acv86-pg-table,.acv85-table,.acv88-table,.acv89-exp-table,.acv97-table,.pb-table,.rc-table,.table-wrap,.records-table,.directory-table,.inv-items .inv-table) th{font-size:12px!important}
html .inv-items .inv-table th{color:#4e5875!important}
html .app :is(.acv84-einv-table,.acv86-vc-table,.acv87-cr-table,.acv-ch-table,.acv85-st-table,.ai-table) th{font-size:12px}
html .app .acv86-rv-table th{font-size:12px}
html .app.lite-a .acv-layout .la-search kbd,html .app .la-search kbd{font-size:12px}
html body #acv-side .zs-sec-title{font-size:12px}
/* 11 px / 10.5 px -> 12 px (labels, chips, captions that are secondary but must stay readable) */
html .app :is(.contact-initials,.acv86lv-caret,.invoice-metrics>button>span,.invoice-metrics p,.acvf-due,.acv85-acct>span,.acv85-st-eyebrow,.acv85-st-ageing span,.customer-select-row>button,.editor-sticky>span,.acvf-fold-btn,.invoice-paper small,.invoice-paper>footer,.paper-parties small,.paper-notes p,.acv-stats>button>strong small,.acv-stats>button>span small,.stats-grid>.stat>span,.stat h2 small,.finance-pill,.acv84-chip,.acv98-chip,.acv98-side b,.acv85-steps b,.acv84-steps button b,.acv84-tabs button span,.table-toolbar [data-slot=tabs-trigger] span,.acv86-db-age,.acv86-cp-tile span,.acv86-cp-tile small,.acv86-cp-late small,.acv86-cp-y span,.acv86-cp-x span,.acv89-tile span,.acv89-tile small,.acv89-cnt,.acv89-cnt span,.acv90-cnt,.acv90-cnt span,.acv99a-bar small,.lh-date,.accounting-workspace>.report-kpis span,.eyebrow,.a-eyebrow,.list-footer span,.under-list-note span,.acv90-rec-head small,.rc-presets button,.rc-dates label,.rc-title span,.rc-chips button,.rc-group h3>button,.rc-group h3:not(:has(button)),.rc-group>button,.rc-nav>button){font-size:12px!important}
html .app.accounting-app.theme-original:not(.dark) :is(.eyebrow,.a-eyebrow){font-size:12px!important}
html body #acv-acco .tag{font-size:12px;padding:1px 6px}
html body #acv-acco .x{font-size:14px}
html body #acv-acco-show{font-size:12px}
/* 12 / 12.5 px body, labels and buttons -> 13 px */
html .app :is(.a-actions button,.a-field>span,.acvf-back,.acv-notes-up,.editor-sticky button,.attachments-section>button,.attachments-section>strong,.acv85-hint,.acv-ch-tile span,.portability-card button,.portability-card p,.acvf-ghost,.acv84-link,.acv84-entry>button span,.acv84-set-pick span,.acv86-rv-tabletools button,.acv86-rv-ctl span,.acv86-rv-foot,.pb-report-notes p,.pb .pb-kpis small,.pb .pb-kpis span,.acvf-next button,.acv-step-go small,.acv99a-seg button,.acv86-cp-seg button,.acv85-typehelp,.acv-ch-stmt-head label,.acv-ch-link,.footnote,.upload-drop small,.acv86-db-planned span,.acv99a-tot,.acv99a-tot span,.acv99a-tot b,.acv85-ma-recon,.acv85-ma-recon span,.acv85-steps li,.ma-balance small,.acvf-hint,.list-footer,.list-footer span,.under-list-note,.under-list-note span,.panel-title>button,.acv-more>button,.acv94c-chip,.acv84-einv-send small,.acv84-einv-send-panel small,.dashboard-choice small,.pdf-card small,.ai-provider small,.plan-cycle span,.plan-save,.lh-bar-col small,.lh-action small,.lh-todo small,.lh-legend>span,.lh-kpi>span,.lh-kpi small,.ops-workspace .ops-workspace-metrics span,.ops-workpaper-metrics span,.acv-ch-feed-top>span,.acv-ch-feed-top>button,.record-rail strong,.record-rail b,.record-rail p,.app.lite-a .records-panel.has-detail .record-rail>button>p,.acv-ch-tile span,.exp-upsell,.acv86-db-pl-none,.exp-cta small){font-size:13px!important}
html .app .ops-note{font-size:13px!important}
html .app :is(.a-actions,.panel-title,.acv-more,.attachments-section) button{font-size:13px}
html .app .acv-ch-card dd{font-size:14px}
html .app .acv-ch-card dt{font-size:13px}
html .app :is(.app-footer,.app-footer span,.ops-footer-links a,.ops-footer-links button,.acv85-st-ageing strong,.acv89-multi span,.acv89-multi,.acv84-chip){font-size:13px!important}
html .app :is(.paper-notes h4){font-size:13px!important}
/* body copy that inherited 16 px inside cards is 14 px, so a 15-16 px heading is always larger than the text under it */
html .app main :is(.editor-section,.acv-po-form,.acv-ch-card,.detail-history){font-size:14px}

/* ---------- 6. one heading scale: h1 22/600, h2 16/600, h3 15/600 (never below the 13-14 px text under it) ---------- */
html body .app.lite-a.accounting-app:not(.acv99-a):not(.acv99-b):not(.acv99-c):not(.acv99-d) main h1{font-size:18px!important;font-weight:600;line-height:1.3;letter-spacing:-.01em}
/* create/edit forms and document detail keep 22px */
html body .app.lite-a.accounting-app:not(.acv99-a):not(.acv99-b):not(.acv99-c):not(.acv99-d) main:has(.inv-editor,.editor-sticky,.acv-po-form,.detail-panel,.acv-ch-grid) h1{font-size:22px!important}

html body .app.lite-a main :is(h2):not(.stat h2):not(.dash-stat h2){font-size:16px;font-weight:600;line-height:1.3}
html body .app.lite-a main :is(.detail-heading,.acv-ch-title) h2{font-size:22px;font-weight:600}
html body .app.lite-a main :is(.editor-section h3,.pc-page .editor-section h3,.pb .pb-subhead,.detail-history h3,.acv-ch-card h3,.acv-notes-head h3,.acv-ch-group-head h3,.acv84-auto .a-card h3,.a-card h3,.theme-option h2){font-size:15px;font-weight:600;line-height:1.3;letter-spacing:0;text-transform:none}
html body .app.lite-a main :is(.pc-page .editor-section h3,.pb .pb-subhead){color:var(--ink)}
html body .app.lite-a main .a-empty h3{font-size:16px}
html body .app.lite-a main .appearance-settings>h2,html body .app.lite-a main .theme-option h2{font-size:16px}
.app.lite-a .acv-layout .lh-card h2,.app.lite-a .acv-layout .lh-card-head h2{font-size:16px}
.app.lite-a main .rc-title h2,.app.lite-a main .rc-title h2{font-size:16px}

/* ---------- 1. one left edge for heading, description and content inside cards ---------- */
.a-card:not(.editor-section)>h2,.a-card:not(.editor-section)>p,.a-card:not(.editor-section)>h2+p,.a-card:not(.editor-section)>.a-actions{padding-left:23px;padding-right:23px}
@media (max-width:700px){.a-card:not(.editor-section)>h2,.a-card:not(.editor-section)>p,.a-card:not(.editor-section)>h2+p,.a-card:not(.editor-section)>.a-actions{padding-left:16px;padding-right:16px}}
/* cards that pad themselves: the heading, description and actions take no extra padding */
.a-card:is(.inv-card,.acv84-card,.rc-cat,.acv-settings-grid .a-card):not(.editor-section)>h2,
.a-card:is(.inv-card,.acv84-card,.rc-cat,.acv-settings-grid .a-card):not(.editor-section)>p,
.a-card:is(.inv-card,.acv84-card,.rc-cat,.acv-settings-grid .a-card):not(.editor-section)>h2+p,
.a-card:is(.inv-card,.acv84-card,.rc-cat,.acv-settings-grid .a-card):not(.editor-section)>.a-actions{padding-left:0;padding-right:0}
.a-card.rc-cat>h2+p{font-size:13px;line-height:1.5;color:var(--soft);margin-bottom:10px;padding-top:6px}
.acv-settings-grid button{padding-inline:0}
.panel>.acv89-empty,.panel>.a-muted.acv89-empty,.panel>p.a-muted{padding-inline:24px}
.acv-settings-grid h2{font-size:16px;margin:0 0 .5rem}
.acv-settings-grid button span{font-size:13px}
/* empty-state and help text inside section cards start on the card's own text edge */
.editor-section>.acv84-empty,.editor-section>.pb-help,.editor-section>.ops-note,.editor-section>.a-help{padding-inline:0}
.pb .editor-section .pb-help{padding-inline:0}
.app.lite-a .acv-layout .lh-card .lh-empty{padding-inline:0}
.theme-option>p{padding-inline:0}
.acv-ch-card .acv-ch-feed-top,.detail-history .history-line{padding-inline:0}

/* ---------- 4. cards sized to their content (the dashboard KPI row keeps its equal heights) ---------- */
.app.lite-a .accounting-workspace>.document-layout:has(>.records-panel.has-detail)>.records-panel{align-self:start;max-height:100%}
.pc-integrations .ops-download-grid,.ops-download-grid,.acv-settings-grid,.acv-home-grid,.lh-grid{align-items:start}
.acv-home-grid>.lh-card,.lh-grid>.lh-card{align-self:start}

/* ---------- 5. sidebar: the nav list scrolls above the pinned footer and fades out before it ---------- */
#acv-side .zs-scroll{padding-bottom:32px;scroll-padding-bottom:32px;-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 24px),transparent);mask-image:linear-gradient(to bottom,#000 calc(100% - 24px),transparent)}
#acv-side.folded .zs-scroll{-webkit-mask-image:none;mask-image:none}

/* ---------- 7. emails, IDs and column labels never break mid-word ---------- */
main.acv-audit th,main.acv-audit td{overflow-wrap:normal;word-break:normal;white-space:nowrap}
main.acv-audit :is(dd,.acv-audit-summary span){overflow-wrap:normal;word-break:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
main.acv-audit :is(summary,.acv-audit-detail){overflow-wrap:normal;word-break:normal}
.acv-ch-link,.acv-ch-table td,.acv-ch-table th{white-space:nowrap;overflow-wrap:normal;word-break:normal}
.directory-table th,.records-table th{white-space:nowrap;overflow-wrap:normal;word-break:normal}
.directory-table td,.records-table td{overflow-wrap:normal;word-break:normal}
.directory-table td:has(>.contact-email),.directory-table td:nth-child(3){white-space:nowrap}
.app.lite-a main .a-card.editor-section button{overflow-wrap:normal;word-break:normal}
.detail-heading h2{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.acv-ch-card dd{overflow-wrap:normal;word-break:normal;min-width:0;overflow:hidden;text-overflow:ellipsis}
.a-field>span,.rc-cat h2,.workflow-fields label,.acv86-rv-label{overflow-wrap:normal;word-break:normal}

/* ---------- 9. Acco mascot: shown only on the Overview, in its own right-hand gutter, so it never covers lists, tables or reports ---------- */
html:not([data-acvf-home="1"]) :is(#acv-acco,#acv-acco-show){display:none!important}
html:not([data-acvf-home="1"]) body:has(#acv-acco) .app main.main,html:not([data-acvf-home="1"]) body:has(#acv-acco-show) .app main.main{padding-bottom:0}
html body #acv-acco .bub{display:none!important}
html body #acv-acco .tag{letter-spacing:0;text-transform:none}
@media (min-width:1100px){html[data-acvf-home="1"] .app.lite-a main.main>.content{padding-inline-end:88px!important}}
@media (max-width:1099px){#acv-acco,#acv-acco-show{display:none!important}}
/* ---------- 8. phones: "Report a problem" and Sign out live in the menu drawer, so the top bar never runs past the edge;
   the customer/vendor Transactions tables scroll inside their own box ---------- */
@media (max-width:620px){
  header.la-top .acv86-br-btn{display:none}
  header.la-top .la-top-end{flex-wrap:wrap;overflow:visible}
  .acv-ch-groups,.acv-ch-group{min-width:0;max-width:100%}
  .acv-ch-table-wrap{overflow-x:auto;max-width:100%}
  .a-actions>button,.app.lite-a main .a-card.editor-section .a-actions>button{max-width:100%;white-space:normal;overflow-wrap:anywhere}
}