(1) The legislature intends that hearing examiners and courts in this state, when interpreting this section, be guided by federal case law, as of November 20, 1985, interpreting substantially similar provisions under the federal equal access to justice act, 5 USC 504.(2) In this section: (a) "Hearing examiner" means the agency or hearing examiner conducting the hearing.(b) "Nonprofit corporation" has the meaning designated in s. 181.0103(17).(c) "Small business" means a business entity, including its affiliates, which is independently owned and operated, and which employs 25 or fewer full-time employees or which has gross annual sales of less than $5,000,000.(d) "Small nonprofit corporation" means a nonprofit corporation which employs fewer than 25 full-time employees.(e) "State agency" does not include the citizens utility board.(f) "Substantially justified" means having a reasonable basis in law and fact.(3) In any contested case in which an individual, a small nonprofit corporation or a small business is the prevailing party and submits a motion for costs under this section, the hearing examiner shall award the prevailing party the costs incurred in connection with the contested case, unless the hearing examiner finds that the state agency which is the losing party was substantially justified in taking its position or that special circumstances exist that would make the award unjust.(4) In determining the prevailing party in cases in which more than one issue is contested, the examiner shall take into account the relative importance of each issue. The examiner shall provide for partial awards of costs under this section based on determinations made under this subsection.(5) If the hearing examiner awards costs under sub. (3), he or she shall determine the costs under this subsection, except as modified under sub. (4). The decision on the merits of the case shall be placed in a proposed decision and submitted under ss. 227.47 and 227.48. The prevailing party shall submit, within 30 days after service of the proposed decision, to the hearing examiner and to the state agency which is the losing party an itemized application for fees and other expenses, including an itemized statement from any attorney or expert witness representing or appearing on behalf of the party stating the actual time expended and the rate at which fees and other expenses were computed. The state agency which is the losing party has 15 working days from the date of receipt of the application to respond in writing to the hearing examiner. The hearing examiner shall determine the amount of costs using the criteria specified in s. 814.245(5) and include an order for payment of costs in the final decision.(6) A final decision under sub. (5) is subject to judicial review under s. 227.52. If the individual, small nonprofit corporation or small business is the prevailing party in the proceeding for judicial review, the court shall make the findings applicable under s. 814.245 and, if appropriate, award costs related to that proceeding under s. 814.245, regardless of who petitions for judicial review. In addition, the court on review may modify the order for payment of costs in the final decision under sub. (5).(7) An individual is not eligible to recover costs under this section if the person's properly reported federal adjusted gross income was $150,000 or more in each of the 3 calendar years or corresponding fiscal years immediately prior to the commencement of the case. This subsection applies whether the person files the tax return individually or in combination with a spouse.(8) If a state agency is ordered to pay costs under this section, the costs shall be paid from the applicable appropriation under s. 20.865(1) (a), (g) or (q).(9) Each state agency that is ordered to pay costs under this section or that recovers costs under sub. (10) shall submit a report annually, as soon as is practicable after June 30, to the chief clerk of each house of the legislature, for distribution to the appropriate standing committees under s. 13.172(3), the number, nature and amounts of the claims paid, the claims involved in the contested case in which the costs were incurred, the costs recovered under sub. (10) and any other relevant information to aid the legislature in evaluating the effect of this section.(10) If the examiner finds that the motion under sub. (3) is frivolous, the examiner may award the state agency all reasonable costs in responding to the motion. In order to find a motion to be frivolous, the examiner must find one or more of the following: (a) The motion was submitted in bad faith, solely for purposes of harassing or maliciously injuring the state agency.(b) The party or the party's attorney knew, or should have known, that the motion was without any reasonable basis in law or equity and could not be supported by a good faith argument for an extension, modification or reversal of existing law.1985 a. 52; Stats. 1985 s. 227.115; 1985 a. 182 ss. 33s, 57; 1985 a. 332 s. 253; Stats. 1985 s. 227.485; 1987 a. 186; 1997 a. 27, 79; 2003 a. 145. That the state loses a case does not justify the automatic imposition of fees and costs. An award depends upon whether the state's position had arguable merit. Behnke v. DHSS, 146 Wis. 2d 178, 430 N.W.2d 600 (Ct. App. 1988). This section requires a party who prevails in an agency's proposed decision to seek costs within 30 days of the proposed decision, thereby permitting the hearing examiner to make appropriate findings on entitlement to, and amount of, costs to be awarded. Any disputes regarding that decision can then be resolved, along with the merits of the underlying matter, in one final decision. Gordon v. State Medical Examining Board, 225 Wis. 2d 552, 593 N.W.2d 481 (Ct. App. 1999), 98-2144.