/* HG-OS-0017 · shared workflow UI. Canonical source in packages/design-system. */
.hg-wf{margin:18px 0 24px;padding:16px;border-block:2px solid var(--hg-ink);background:var(--hg-paper);color:var(--hg-ink)}
.hg-wf-head h3{font:900 clamp(1.7rem,3vw,2.8rem)/1 var(--hg-font-display,'Roboto Condensed',sans-serif);margin:0 0 6px}
.hg-wf-head p{line-height:1.5;font-size:.84rem;max-width:75ch;margin-bottom:20px}
.hg-wf-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.hg-wf-card{min-width:0;background:var(--hg-white);border:1px solid var(--hg-ink);padding:14px;display:flex;flex-direction:column;gap:10px}
.hg-wf-card:first-child{grid-row:auto}.hg-wf-card:last-child{grid-column:1/-1}
.hg-wf-card h4,.hg-wf-summary h4,.hg-wf-timeline h4{font:900 1.2rem/1.2 var(--hg-font-display,'Roboto Condensed',sans-serif);margin:0 0 8px}
.hg-wf-field{display:flex;flex-direction:column;gap:5px;font-size:.68rem;font-weight:900;letter-spacing:.025em;min-width:0}
.hg-wf-field input,.hg-wf-field select,.hg-wf-field textarea{width:100%;min-width:0;min-height:42px;padding:9px;border:1px solid var(--hg-ink);background:white;color:var(--hg-ink);font:500 .86rem/1.4 var(--hg-font-body,Inter,Arial,sans-serif);letter-spacing:0;resize:vertical}
.hg-wf-note{position:relative}
.hg-wf-note textarea{padding-right:56px;min-height:130px}
.hg-wf-voice{position:absolute;right:5px;top:6px;width:42px;height:42px;display:grid;place-items:center;padding:4px;border:1px solid var(--hg-ink);background:var(--hg-yellow);cursor:pointer}
.hg-wf-voice img{display:block;width:22px;height:22px;object-fit:contain}
.hg-wf-voice::before,.hg-wf-voice::after{content:none!important}
.hg-wf-voice.active{background:var(--hg-cobalt)}
.hg-wf-check{display:flex;gap:10px;font-size:.76rem;font-weight:600;line-height:1.4}
.hg-wf-check input{flex:0 0 auto}
.hg-wf-card .primary{min-height:44px;align-self:flex-start;margin-top:8px}
.hg-wf-feedback{min-height:1em;font-size:.78rem}
.hg-wf-feedback.error{color:var(--hg-action-dark)}
.hg-wf-summary,.hg-wf-timeline{margin-top:17px;padding:15px;border-top:1px solid var(--hg-ink)}
.hg-wf-summary p{font-size:.82rem;line-height:1.45;margin:5px 0}
.hg-wf-note-status{font-size:.74rem;margin:15px 0 0}
.hg-wf-pdf-dialog{width:min(96vw,960px);height:min(92vh,960px);padding:0;border:2px solid var(--hg-ink);background:var(--hg-paper)}
.hg-wf-pdf-dialog::backdrop{background:rgba(17,17,19,.75)}
.hg-wf-pdf-toolbar{display:flex;gap:10px;align-items:center;padding:10px;flex-wrap:wrap;border-bottom:2px solid var(--hg-ink)}
.hg-wf-pdf-toolbar strong{margin-right:auto}.hg-wf-pdf-toolbar .hg-wf-pdf-download{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;min-height:44px}.hg-wf-pdf-toolbar .hg-wf-pdf-download:focus-visible{outline:3px solid var(--hg-cobalt);outline-offset:2px}
.hg-wf-pdf-dialog iframe{display:block;width:100%;height:calc(100% - 75px);border:0;background:white}
@media(max-width:750px){.hg-wf-grid{grid-template-columns:1fr}.hg-wf-card:last-child{grid-column:auto}.hg-wf-card:first-child{grid-row:auto}.hg-wf-card:last-child{grid-column:1/-1}.hg-wf-pdf-dialog{height:96vh;width:98vw}.hg-wf-pdf-toolbar{gap:5px}.hg-wf-pdf-toolbar button{font-size:.73rem}}

/* HG-OS-0019 · financial ledger table; scoped, no inline presentation. */
.hg-wf-finance-table{width:100%;border-collapse:collapse;background:var(--hg-white);font:500 .78rem/1.45 var(--hg-font-body,Inter,Arial,sans-serif);table-layout:fixed}
.hg-wf-finance-table th,.hg-wf-finance-table td{border:1px solid var(--hg-ink);padding:10px 9px;text-align:left;vertical-align:top;overflow-wrap:anywhere}
.hg-wf-finance-table thead th{font-weight:900;background:var(--hg-yellow);letter-spacing:.035em}
.hg-wf-finance-table th:first-child{width:29%}.hg-wf-finance-table th:last-child,.hg-wf-finance-table td:last-child{width:21%}
.hg-wf-finance-table .hg-wf-money{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;font-weight:800}
.hg-wf-finance-table .hg-wf-quote-row th,.hg-wf-finance-table .hg-wf-quote-row td{background:var(--hg-paper);font-weight:800}
.hg-wf-finance-table .hg-wf-total-row th,.hg-wf-finance-table .hg-wf-total-row td{background:var(--hg-ink);color:var(--hg-paper);font-weight:900}
.hg-wf-disclaimer{margin-top:12px!important;padding:12px;border-left:4px solid var(--hg-cobalt);background:var(--hg-white);font-weight:800}
.hg-wf-note textarea{box-sizing:border-box}
.hg-wf-caption{font-size:.76rem!important;color:var(--hg-ink);line-height:1.5}
@media(max-width:520px){.hg-wf-finance-table{font-size:.68rem}.hg-wf-finance-table th,.hg-wf-finance-table td{padding:7px 5px}.hg-wf-finance-table .hg-wf-money{white-space:normal}}

/* HG-0034 · staff decisions and staged evidence (shared canonical CSS) */
.hg-wf-success,.hg-wf-authorized{display:inline-block;padding:9px 12px;margin:5px 8px 8px 0;border:2px solid #276a45;background:#e3f4e7;color:#19502f;font:900 12px/1.4 Arial,sans-serif}
.hg-wf-authorized{background:#e9efff;border-color:var(--hg-cobalt);color:#173da4}
.hg-wf-pending{font:900 13px/1.5 Arial,sans-serif;background:#fff0a6;color:#514000;border:2px solid #806400;padding:10px;margin:15px 0}
.hg-wf-evidence{display:flex;flex-direction:column;gap:12px;padding:18px;background:white;border:1.5px solid var(--hg-ink);margin:16px 0}
.hg-wf-evidence h4{font:900 clamp(17px,3vw,25px)/1.2 var(--hg-font-display,Arial,sans-serif);margin:0}
.hg-wf-evidence p{font-size:13px;line-height:1.5;margin:0}
.hg-wf-evidence input[type=file]:not([hidden]){padding:12px;border:1px solid var(--hg-ink);width:100%}
/* The intake and progress-evidence forms reuse the same .drop component. */
.hg-wf-evidence .hg-wf-drop{width:100%;margin:0;min-height:105px;cursor:pointer}
.hg-wf-evidence .hg-wf-drop:focus-visible{outline:3px solid var(--hg-cobalt);outline-offset:3px}
.hg-wf-evidence .hg-wf-drop input[hidden]{display:none}
.hg-wf-selected-files{font-size:.76rem!important;color:var(--hg-muted);overflow-wrap:anywhere}
.hg-wf-note input{padding-right:56px}
.hg-wf-note input,.hg-wf-note textarea{box-sizing:border-box}
.hg-wf-evidence progress{width:100%;height:17px;accent-color:var(--hg-cobalt)}
.hg-wf-evidence output{display:block;min-height:22px;font-weight:700;font-size:12px}
.hg-wf-evidence button{align-self:flex-start;min-height:44px}

/* HG-0034R4 — Dialogs instead of native JS alert/confirm/prompt */
.hg-wf-action-dialog{width:min(92vw,490px);max-height:90vh;overflow:auto;
 border:2px solid var(--hg-ink);padding:clamp(18px,4vw,30px);
 background:var(--hg-paper);color:var(--hg-ink);box-shadow:9px 9px 0 var(--hg-cobalt)}
.hg-wf-action-dialog::backdrop{background:rgba(17,17,19,.75)}
.hg-wf-action-dialog h2{font:900 clamp(1.5rem,4vw,2.1rem)/1.12 var(--hg-font-display,'Roboto Condensed',Arial,sans-serif);
 margin:0 0 15px;overflow-wrap:anywhere}
.hg-wf-action-description{font:500 1rem/1.6 var(--hg-font-body,Inter,Arial,sans-serif);
 white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 23px}
.hg-wf-action-buttons{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.hg-wf-action-buttons button{min-height:44px;min-width:116px;padding:10px 16px;cursor:pointer}
.hg-wf-action-buttons button:focus-visible{outline:3px solid var(--hg-cobalt);outline-offset:3px}
@media(max-width:480px){.hg-wf-action-buttons{flex-direction:column-reverse}
 .hg-wf-action-buttons button{width:100%}}

/* HG-0034R10: one photo gallery, matching controls, stable voice placement */
.hg-wf-photo-block{background:var(--hg-paper);gap:12px}
.hg-wf-photo-block .hg-evidence-gallery{margin:2px 0 0;width:100%;min-width:0}
.hg-wf-photo-block .actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.hg-wf-photo-block .actions button{max-width:100%;align-self:auto}
.hg-wf-linking{margin-top:16px}
.hg-wf-linking summary{cursor:pointer;font:900 clamp(17px,2vw,22px)/1.2 var(--hg-font-display,Arial,sans-serif);list-style:none}
.hg-wf-linking summary::before{content:'+';margin-right:12px;color:var(--hg-cobalt)}
.hg-wf-linking[open] summary::before{content:'−'}
.hg-wf-linking summary::-webkit-details-marker{display:none}
.hg-wf-linking summary:focus-visible{outline:3px solid var(--hg-cobalt);outline-offset:4px}
.hg-wf-linking-form{display:flex;flex-direction:column;gap:12px;padding-top:14px}
.hg-wf-note{position:relative;width:100%;min-width:0;max-width:100%;box-sizing:border-box}
.hg-wf-field .hg-wf-note>input,.hg-wf-field .hg-wf-note>textarea{box-sizing:border-box;display:block;width:100%;max-width:100%;min-width:0;padding-right:60px}
.hg-wf-note>.hg-wf-voice{right:8px;top:7px;z-index:2;box-sizing:border-box;max-width:42px;margin:0}
.hg-wf-note>input+.hg-wf-voice{top:50%;transform:translateY(-50%)}
@media(max-width:600px){.hg-wf-photo-block .actions button{width:100%}.hg-wf-photo-block{padding:12px}}
