/* Screen-only layout rules leave financial document printing unchanged. */
@media screen{
 :root{--ui-gap:16px;--ui-small:12px;--ui-body:14px;--ui-heading:24px}
 body{font-size:var(--ui-body);line-height:1.5}.shell{grid-template-columns:216px minmax(0,1fr)}.shell>aside{width:216px;padding:20px 12px}.shell>aside .brand{margin:0 8px 20px;font-size:19px;gap:9px}.shell>aside .workspace{margin:0 4px 16px;padding:10px}.shell>aside .nav-label{margin:12px 12px 6px}.shell>aside nav{display:block;overflow:visible}.shell>aside nav button{width:100%;padding:10px 12px;font-size:13px;line-height:1.4;margin:1px 0;white-space:normal}.shell>aside nav button span{display:inline-block;flex:none}.shell>aside .sidebar-foot{padding:14px 8px 0}.shell>main>header{min-height:70px;height:auto;padding:12px 24px;gap:14px}.shell .header-right{gap:10px}.shell .content{padding:24px;min-width:0}.shell .content h1{font-size:var(--ui-heading);line-height:1.25;letter-spacing:-.5px}.shell .content h2{font-size:17px;line-height:1.35}.shell .content h3{font-size:14px;line-height:1.4}.heading{gap:16px;margin-bottom:18px}.eyebrow{font-size:10px;margin-bottom:6px}.subtitle{font-size:13px;line-height:1.6}.panel{padding:18px;margin-bottom:16px}.panel-head{margin-bottom:13px;gap:12px;flex-wrap:wrap}.panels{gap:16px;margin-bottom:16px}.stats{gap:12px;margin-bottom:18px}.stat{padding:15px}.stat strong,.customer-account-dialog .stat strong{font-size:24px;line-height:1.25;margin:10px 0 7px;overflow-wrap:anywhere}.stat .label{font-size:12px;gap:8px}.stat small{font-size:12px;line-height:1.5}.badge{font-size:11px;line-height:1.4}.actions{gap:8px}.note{font-size:12px;line-height:1.6;padding:11px 13px;margin:12px 0}.field{font-size:13px;gap:5px;line-height:1.5}.field small,.setup-help{font-size:12px;line-height:1.5}.form-grid{gap:14px;margin-bottom:16px}input,select,textarea{font-size:14px;line-height:1.4;padding:9px 10px}.form-actions{gap:8px;margin-top:18px;flex-wrap:wrap}button,.button-link{font-size:13px;line-height:1.4;min-height:38px}.quick-grid button{font-size:13px;padding:13px 12px}.quick-grid small{font-size:12px}.quick-grid b{margin-bottom:6px}.business-switcher{font-size:11px}.business-switcher select{font-size:13px;max-width:210px}.shell>main>footer{padding:0 24px 18px;gap:12px;flex-wrap:wrap}.tracking-banner,.demo-banner,.subscription-notice,.storage-notice{padding-left:24px;padding-right:24px;font-size:12px}.filters{gap:10px}.filters label{max-width:none;min-width:140px;flex:1}.search{max-width:320px}.table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}.table-wrap>table{font-size:13px;table-layout:auto;min-width:600px}.table-wrap th{font-size:11px;line-height:1.4;letter-spacing:.35px;padding:10px 9px;white-space:nowrap}.table-wrap td{padding:11px 9px;max-width:280px;white-space:normal;overflow-wrap:anywhere;line-height:1.5}.table-wrap td.num{white-space:nowrap}.table-wrap td small{font-size:12px;margin-top:3px}.table-wrap td button{font-size:12px}.sales-register table{table-layout:auto!important;min-width:760px}.sales-register th,.sales-register td{width:auto!important;font-size:13px;padding:11px 9px}.sales-register th{font-size:11px}.sales-register .badge,.sales-register button{font-size:12px}.sales-register button{padding:7px}.table-wrap:focus-visible{outline:2px solid var(--green);outline-offset:2px}dialog{padding:22px;width:760px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overscroll-behavior:contain}dialog .heading{margin-bottom:16px}dialog .heading h1{font-size:21px;line-height:1.3;overflow-wrap:anywhere}dialog .heading>div{min-width:0}dialog .heading>button{min-width:40px;flex-shrink:0}dialog .panel{padding:16px}dialog.sales-invoice,dialog.customer-account-dialog,dialog.customer-payment-dialog,dialog.vendor-matching-dialog,dialog.purchase-entry-dialog{width:1240px;max-width:calc(100vw - 32px)}#modal-body{min-width:0}.line-editor,.sales-line,.purchase-item-line,.vendor-actual-line{min-width:0}.sales-line{padding:7px 0}.sales-line label,.sales-line .field{font-size:11px;text-transform:none;letter-spacing:0;line-height:1.4}.sales-line input,.sales-line select{height:36px;font-size:13px}.sales-line output{font-size:13px;min-height:36px;padding:9px 5px}.sales-line .line-tax-amount{font-size:11px;line-height:1.4}.sale-totals,.doc-summary{font-size:14px;max-width:100%}.doc-summary p{gap:12px}.check{align-items:flex-start;gap:9px;line-height:1.6;font-size:13px}.check input{width:18px;height:18px;margin-top:3px;flex-shrink:0}.inline-customer{padding:14px;min-width:0}.purchase-entry-dialog h2{font-size:17px;margin:18px 0 10px}.purchase-item-line label{font-size:12px}.purchase-item-line input,.purchase-item-line select{font-size:13px}.access-management table{min-width:540px}.access-management .access-role-panel table{min-width:420px}.document-scroll-hint{display:none}.mobile-nav-toggle,.nav-close,.nav-backdrop{display:none}.manual-layout{gap:18px}.manual-article{line-height:1.7}.manual-article h2{scroll-margin-top:20px}.global-settings-page .setup-card{padding:22px}.global-settings-page .setup-welcome{padding-bottom:16px}.global-settings-page .setup-welcome h1{font-size:28px}.global-settings-page .setup-progress{margin-bottom:18px}.settings-summary{margin-bottom:16px;padding:12px 16px}.subscription-plan h2{font-size:26px!important}.login{width:calc(100% - 32px);margin:5vh auto;padding:28px;max-width:460px}.login h1{font-size:25px}.login form{gap:12px}.login .field{margin:8px 0}.login .form-error:empty{margin:0}.login p{font-size:13px}.login button{min-height:42px}
 @media(max-width:1200px){.sales-line{grid-template-columns:100px minmax(140px,1.6fr) 80px 75px 100px 85px 100px 32px}.purchase-item-line{grid-template-columns:minmax(150px,1.3fr) minmax(150px,1.3fr) 70px 90px 75px 95px 32px}}
 @media(max-width:1024px){.shell{display:block}.shell>main{width:100%;min-width:0}.shell>aside{position:fixed;inset:0 auto 0 0;width:280px;max-width:calc(100vw - 54px);height:100dvh;z-index:1001;transform:translateX(-100%);transition:transform .18s ease;overflow-y:auto;padding:20px 14px;box-shadow:12px 0 36px #102e3433}.shell>aside .workspace,.shell>aside .sidebar-foot,.shell>aside .nav-label{display:block}.shell>aside .brand{margin-top:34px}.shell>aside nav{display:block;overflow:visible}.shell>aside nav button{display:flex;white-space:normal;min-height:44px;font-size:14px}.shell>aside nav button span{display:inline-block}.mobile-nav-toggle{display:block;min-width:44px;font-size:19px;padding:7px 10px}.nav-close{display:block;position:absolute;right:14px;top:12px;min-width:40px;min-height:40px;font-size:22px}.nav-backdrop:not([hidden]){display:block;position:fixed;inset:0;width:100%;height:100dvh;z-index:1000;background:#122e4566;border:0;border-radius:0}.workspace-nav-open{overflow:hidden}.workspace-nav-open .shell>aside{transform:translateX(0)}.shell>main>header{flex-wrap:wrap;align-items:center;padding:12px 20px;gap:12px}.shell .breadcrumb{flex:1;min-width:0}.shell .header-right{margin-left:auto;justify-content:flex-end}.shell .content{padding:20px}.panels{grid-template-columns:1fr}.sales-line{grid-template-columns:repeat(4,minmax(0,1fr));padding:12px;background:#f8faf9;border:1px solid var(--line);border-radius:8px;margin:8px 0;gap:10px}.sales-line>.field:nth-child(2){grid-column:span 2}.sales-line>button{margin:0;align-self:end;min-height:36px}.sales-line input,.sales-line select{height:40px}.sales-line .field{gap:5px;line-height:1.4}.purchase-item-line{grid-template-columns:repeat(3,minmax(0,1fr));padding:12px;border:1px solid var(--line);border-radius:8px;margin:8px 0;background:#f8faf9;gap:12px}.purchase-item-line>button{align-self:end;min-height:40px}.vendor-actual-line{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.line-editor:not(.sales-line){grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:10px;background:#f8faf9;border:1px solid var(--line);border-radius:8px}.reference-invoice{max-width:none;width:794px;min-height:1123px}.invoice-preview-dialog #modal-body{overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}.invoice-preview-dialog .document-scroll-hint{display:block;font-size:12px;position:sticky;left:0;color:var(--muted);max-width:calc(100vw - 70px);padding:0 0 10px}.customer-account-dialog .stats{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-account-dialog .panel-head .actions{gap:6px}.customer-account-dialog .panel-head .actions button{padding:8px 11px;min-height:40px}.access-management .access-role-panel td:first-child{white-space:normal}.manual-nav{position:static}.header-right .avatar{flex-shrink:0}}
 @media(max-width:650px){.shell>main>header{padding:10px 16px;gap:8px}.shell .breadcrumb{font-size:12px}.shell .breadcrumb b{margin-left:5px}.shell .header-right{width:100%;margin:0;gap:8px;justify-content:flex-start;flex-wrap:wrap}.shell .header-right>.muted,.shell .header-right>.avatar{display:none}.business-switcher{flex:1;min-width:135px}.business-switcher select{width:100%;max-width:none;min-height:42px;font-size:14px}.header-right .badge{max-width:100%;white-space:normal;font-size:11px}.header-right>button{margin-left:auto;min-height:42px}.shell .content{padding:16px}.shell .content h1{font-size:22px}.heading{flex-wrap:wrap;gap:12px;margin-bottom:16px}.heading>.actions{width:100%;gap:8px}.heading>.actions>*{font-size:13px}.heading>.actions button,.heading>.actions .button-link{flex:1;min-width:130px;text-align:center}.panel{padding:14px;margin-bottom:14px}.panel-head{align-items:flex-start}.stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:16px}.stat{padding:12px}.stat strong,.customer-account-dialog .stat strong{font-size:21px}.stat .label{font-size:12px}.stat small{font-size:11px}.quick-grid{gap:8px}.quick-grid button{padding:12px;font-size:13px}.quick-grid small{font-size:11px}.bars{gap:16px;padding:8px}.table-wrap>table{font-size:13px;min-width:580px}.table-wrap th{font-size:11px}.table-wrap td{padding:10px 8px}.form-grid{grid-template-columns:minmax(0,1fr);gap:12px}.form-grid>.full{grid-column:1/-1}.form-grid label{min-width:0}input,select,textarea{font-size:16px;min-height:44px}.field{font-size:13px}input[type=checkbox],input[type=radio]{min-height:0}.check input{width:20px;height:20px}.check{font-size:13px}.actions button,.form-actions button,.filters button{min-height:44px}.filters{display:flex;gap:10px}.filters>*,.filters label{flex:1 1 140px;max-width:none}.filters input{width:100%}.form-actions{gap:8px;margin-top:16px}.form-actions>*{flex:1 1 130px;text-align:center}dialog,dialog.sales-invoice,dialog.customer-account-dialog,dialog.customer-payment-dialog,dialog.vendor-matching-dialog,dialog.purchase-entry-dialog{padding:16px;width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);margin:auto}dialog .heading h1{font-size:20px}dialog .heading{flex-wrap:nowrap;gap:8px}.sales-line{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px;margin:10px 0;gap:10px}.sales-line>.field:nth-child(2){grid-column:auto}.sales-line label,.sales-line .field{font-size:12px}.sales-line input,.sales-line select{height:44px;font-size:16px;padding:9px 7px}.sales-line output{font-size:14px;min-height:44px;padding:12px 6px}.sales-line .line-tax-amount{font-size:12px}.sales-line>button{min-height:44px;min-width:44px;justify-self:end;width:44px;align-self:end}.purchase-item-line,.vendor-actual-line,.line-editor:not(.sales-line){grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.purchase-item-line input,.purchase-item-line select,.vendor-actual-line input{font-size:16px;min-height:44px}.purchase-item-line label,.vendor-actual-line label{font-size:12px}.purchase-item-line output{padding:12px 5px;font-size:14px}.purchase-entry-dialog h2{font-size:17px}.doc-summary{width:100%;margin-left:0;max-width:100%;padding:12px 0}.sale-totals{font-size:14px}.sale-output{margin-top:14px;padding-top:14px}.invoice-preview-dialog .reference-invoice{width:794px;max-width:none}.invoice-preview-dialog .heading{max-width:calc(100vw - 48px)}.document .doc-header{gap:14px;flex-wrap:wrap}.document .doc-header p{margin:6px 0}.business-document-mark{max-width:100%}.business-document-mark img{max-width:100%;height:auto}.customer-payment-dialog .allocation-amount{min-width:110px;width:110px}.customer-account-dialog .stats{gap:8px}.customer-account-dialog .stat strong{font-size:19px}.customer-account-dialog .panel{padding:12px}.manual-layout{grid-template-columns:minmax(0,1fr)}.manual-nav{display:grid;grid-template-columns:1fr 1fr;gap:6px;position:static}.manual-nav a{font-size:13px;padding:10px;white-space:normal}.manual-article h2{font-size:18px}.manual-article{padding:16px}.manual-article p{overflow-wrap:anywhere}.setup-progress{grid-template-columns:1fr 1fr;gap:5px 10px}.setup-progress li{font-size:12px;padding:9px 0}.global-settings-page .setup-card{padding:16px}.global-settings-page .setup-welcome h1{font-size:24px}.setup-colours{grid-template-columns:1fr}.branding-preview{grid-template-columns:1fr}.storage-summary{grid-template-columns:1fr;gap:20px}.access-management td{font-size:13px}.subscription-notice,.storage-notice,.tracking-banner,.demo-banner{padding:10px 16px;font-size:12px}.subscription-notice{gap:6px}.subscription-notice button{min-height:36px}.shell>main>footer{padding:0 16px 16px;font-size:11px}.login{padding:22px;margin:24px auto}.login .brand{margin-bottom:22px}.login h1{font-size:24px}.login .field{margin:6px 0}.login button{min-height:44px}.login input{font-size:16px}.welcome .welcome-nav{padding:16px 20px;gap:12px}.welcome .welcome-brand .limeledger-logo{width:205px;max-width:58vw}.welcome .welcome-nav .welcome-signin{min-height:44px;padding:9px 12px}.welcome .welcome-signin span{margin-left:8px}.welcome .welcome-hero-full{padding:0 20px 28px;height:690px}.welcome .welcome-hero-full h1{font-size:38px}.welcome .welcome-hero-full .welcome-actions button{min-height:46px}.welcome .welcome-hero-full .welcome-actions a{min-height:40px;display:inline-flex;align-items:center}.welcome .welcome-hero-full .welcome-intro{font-size:14px;line-height:1.65}.welcome .welcome-hero-full .welcome-small{font-size:12px}.welcome .welcome-features{padding:20px}.welcome .welcome-feature-grid p,.welcome .welcome-team p:last-child{font-size:13px}.welcome .welcome-team,.welcome .ctsl-footer{width:calc(100% - 40px)}.welcome .welcome-role-list span{font-size:12px}.welcome .ctsl-contact-grid p,.welcome .ctsl-contact-grid address,.welcome .ctsl-contact-grid a{font-size:12px}.welcome .ctsl-contact-grid h3{font-size:12px}.welcome .ctsl-footer-bottom button{min-height:44px}.welcome .ctsl-footer-bottom{gap:8px}#toast{left:16px;right:16px;bottom:max(16px,env(safe-area-inset-bottom));max-width:calc(100vw - 32px);font-size:13px;line-height:1.5}.setup-logo-preview{min-width:0}.location-grid{grid-template-columns:1fr}.location-card{padding:16px}.business-switcher span{font-size:11px}}
 @media(max-width:650px){.sales-line:has(.mobile-line-details){display:block;padding:0}.mobile-line-details>summary{padding:12px;font-size:13px;font-weight:600;line-height:1.6;color:#294b40;overflow-wrap:anywhere;cursor:pointer;min-height:46px}.mobile-line-details[open]>summary{border-bottom:1px solid var(--line)}.mobile-line-fields{padding:12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.mobile-line-fields>button{min-height:44px;min-width:44px;justify-self:end;width:44px;margin:0;align-self:end}.mobile-line-fields>.field:nth-child(2){grid-column:auto}}
 @media(prefers-reduced-motion:reduce){.shell>aside{transition:none}}
}

@media screen{.table-wrap td{vertical-align:top}.table-wrap td:has(button),.table-wrap td:has(input:not([type=checkbox])){min-width:130px}.table-wrap td button{white-space:nowrap;overflow-wrap:normal;word-break:normal}.table-wrap td[data-column="date"],.table-wrap td[data-column="due"],.table-wrap td[data-column="when"]{white-space:nowrap}}
@media screen and (max-width:650px){dialog .customer-account>.heading{flex-wrap:wrap}dialog .customer-account>.heading>div{width:100%}dialog .customer-account>.heading .actions{width:100%;display:flex;flex-wrap:wrap}dialog .customer-account>.heading .actions button{flex:1 1 130px;min-height:44px}.table-wrap td button{min-height:44px;font-size:13px}.table-wrap td:has(input[type=checkbox]){min-width:44px}}

@media screen and (max-width:650px){.customer-payment-dialog .table-wrap>table{display:block;width:100%;min-width:0}.customer-payment-dialog .table-wrap thead{display:none}.customer-payment-dialog .table-wrap tbody{display:block}.customer-payment-dialog .table-wrap tr{display:grid;grid-template-columns:28px minmax(0,1fr);gap:6px 10px;padding:12px;margin:10px 0;border:1px solid var(--line);border-radius:8px}.customer-payment-dialog .table-wrap td{display:block;padding:0;border:0;min-width:0!important;max-width:none;white-space:normal}.customer-payment-dialog .table-wrap td:first-child{grid-row:1/4}.customer-payment-dialog .table-wrap td:nth-child(3),.customer-payment-dialog .table-wrap td:nth-child(4){grid-column:2;text-align:left}.customer-payment-dialog .table-wrap td:nth-child(3)::before{content:"Outstanding: ";font-size:12px;color:var(--muted)}.customer-payment-dialog .table-wrap td:nth-child(4)::before{content:"Amount to apply";display:block;font-size:12px;color:var(--muted);margin:4px 0}.customer-payment-dialog .allocation-amount{width:100%;min-width:0}.customer-payment-dialog .allocation-check{width:22px;height:22px;min-height:0}}

@media screen{.shell .workspace,.shell .subtitle,.shell .content h1,.shell .content h2,.shell .content h3{overflow-wrap:anywhere}.shell .heading>div{min-width:0}.shell .panel-head h2{min-width:0}}

@media screen and (max-width:1024px){.mobile-nav-toggle,.nav-close,dialog .heading>button,.sales-line>button{min-width:44px;min-height:44px}.customer-account-dialog .panel-head .actions button{min-height:44px}.sales-line input,.sales-line select{height:44px}.sales-line label,.sales-line .field{font-size:12px}}
@media screen and (max-width:650px){.business-switcher select,.header-right>button,.subscription-notice button{min-height:44px}.welcome .welcome-eyebrow,.welcome .welcome-team .welcome-eyebrow,.welcome .welcome-section-heading .welcome-eyebrow{font-size:10px}.welcome .ctsl-contact-grid a{display:inline-block;min-height:26px;padding-top:2px;padding-bottom:2px}}

/* Authenticator setup remains readable on phones and tablets. */
.mfa-login{max-width:520px}.mfa-qr{text-align:center;margin:14px 0}.mfa-qr img{display:block;margin:0 auto;max-width:100%;height:auto;background:white;border-radius:8px}.mfa-qr .link{display:block;margin:8px auto}.mfa-login form{margin:16px 0}.mfa-login>.link{display:block;margin:12px 0}.mfa-codes{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:14px 0}.mfa-codes code{font-size:12px;overflow-wrap:anywhere;background:#f1f5f3;padding:8px;border-radius:5px}.mfa-saved{display:flex;align-items:center;gap:10px;margin:20px 0}.mfa-saved input{width:20px;height:20px;flex-shrink:0}#mfa-regenerate{max-width:420px}@media(max-width:440px){.mfa-codes{grid-template-columns:1fr}.mfa-login{margin:16px auto;padding:20px}}

.nav-group-label,.nav-settings summary{font-size:10px;font-weight:700;letter-spacing:.7px;text-transform:uppercase;color:var(--sidebar-contrast);opacity:.8;padding:10px 12px 5px;margin:0}.nav-settings{margin-top:10px;border-top:1px solid #ffffff24;padding-top:6px}.nav-settings summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:8px}.nav-settings summary::after{content:'▾';margin-left:auto}.nav-settings[open] summary::after{content:'▴'}.register-filters{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin-bottom:16px}.register-filters .field{min-width:160px;flex:1}.register-search{min-width:200px;max-width:380px}.contact-tabs button[aria-pressed="true"]{background:var(--green);color:var(--brand-contrast)}.nav-settings summary:focus-visible{outline:2px solid #b5dfcb;outline-offset:2px}@media(max-width:650px){.register-filters{gap:10px}.register-filters .field,.register-search{min-width:0;width:100%;max-width:none;flex-basis:100%}.contact-tabs{flex-wrap:wrap}.nav-settings summary{font-size:11px}}

.contact-payment-terms[hidden]{display:none!important}.contact-payment-terms{margin-bottom:0}

.lifecycle-banner{border:2px solid #a13a35;border-radius:6px;padding:12px;color:#8a2622;font-size:13px;line-height:1.6;margin:0 0 16px}.correction-controls{border-top:1px solid var(--line);padding-top:12px}.payment-reversed{color:#a13a35}#document-change-form textarea,#payment-reversal-form textarea{width:100%}@media print{.lifecycle-banner{color:#8a2622!important;break-inside:avoid}.correction-controls{display:none!important}}
