.ex-workspace { flex:1; min-width:0; overflow:auto; container-type:inline-size; color:var(--ex-ink); scrollbar-color:var(--ex-border) transparent; }
.ex-content { width:100%; max-width:1290px; margin:0 auto; padding:clamp(18px,3.2cqw,44px); font-size:14px; line-height:1.5; }
.ex-heading,.ex-toolbar,.ex-subhead,.ex-actions,.ex-ledger-head,.ex-total,.ex-detail-top { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.ex-heading,.ex-subhead,.ex-ledger-head,.ex-total { justify-content:space-between; }
.ex-heading { margin-bottom:24px; }
.ex-workspace h1,.ex-workspace h2,.ex-detail-top strong { color:var(--ex-ink); font-family:var(--ex-heading); font-weight:500; }
.ex-workspace h1 { font-size:clamp(27px,3.5cqw,39px); line-height:1.2; letter-spacing:-.025em; overflow-wrap:anywhere; }
.ex-workspace h2 { font-size:21px; line-height:1.25; }
.ex-workspace button,.ex-workspace select,.ex-workspace input,.ex-workspace textarea { font:inherit; color:var(--ex-ink); }
.ex-workspace button,.ex-workspace select { cursor:pointer; }
.ex-workspace button,.ex-workspace select,.ex-workspace input:not([hidden]),.ex-workspace textarea { border:1px solid var(--ex-border); border-radius:7px; background:var(--ex-paper); padding:8px 12px; min-width:0; }
.ex-workspace button { display:inline-flex; align-items:center; justify-content:center; gap:7px; font-size:13px; font-weight:650; }
.ex-workspace button:hover { background:var(--ex-alt); }
.ex-workspace button.ex-primary { color:var(--ex-action-text); background:var(--ex-action); border-color:var(--ex-action); }
.ex-workspace .ex-primary:hover { filter:brightness(1.16); }
.ex-workspace button:disabled { opacity:.55; cursor:wait; }
.ex-workspace :focus-visible { outline:2px solid var(--ex-accent); outline-offset:2px; }
.ex-workspace ::selection { background:var(--ex-action); color:var(--ex-action-text); }
.ex-tabs { display:flex; flex-wrap:wrap; gap:6px; border-bottom:1px solid var(--ex-border); margin-bottom:18px; }
.ex-tabs button { gap:7px; border:0; border-radius:0; border-bottom:2px solid transparent; color:var(--ex-secondary); padding:10px 13px; background:none; }
.ex-tabs button[aria-pressed=true] { border-color:var(--ex-accent); color:var(--ex-ink); }
.ex-tabs small,.ex-subhead small { font-family:inherit; font-size:12px; font-weight:600; color:var(--ex-secondary); font-variant-numeric:tabular-nums; }
.ex-toolbar { margin-bottom:18px; gap:8px; }
.ex-toolbar select { max-width:235px; font-size:13px; }
.ex-search { display:flex; align-items:center; gap:8px; flex:1; min-width:180px; height:38px; border:1px solid var(--ex-border); background:var(--ex-paper); border-radius:7px; padding:0 10px; color:var(--ex-secondary); }
.ex-workspace .ex-search input { width:100%; height:100%; background:none; border:0; padding:0; font-size:13px; }
.ex-ledger,.ex-panel { border:1px solid var(--ex-border); border-radius:12px; background:var(--ex-paper); }
.ex-ledger { overflow:hidden; }
.ex-ledger-head,.ex-total { padding:16px 20px; }
.ex-ledger-head>span,.ex-total,.ex-client,.ex-muted,.ex-history span,.ex-doc small,.ex-label,.ex-facts dt { color:var(--ex-secondary); font-size:12px; }
.ex-ledger table { width:100%; border-collapse:collapse; font-size:13px; }
.ex-ledger th { background:var(--ex-alt); color:var(--ex-secondary); font-size:11px; font-weight:650; text-align:left; }
.ex-ledger td,.ex-ledger th { padding:11px 10px; border-top:1px solid var(--ex-border); }
.ex-ledger td:first-child,.ex-ledger th:first-child { padding-left:20px; }
.ex-ledger td:last-child,.ex-ledger th:last-child { padding-right:20px; }
.ex-ledger td:first-child { width:43%; }
.ex-ledger tbody tr { cursor:pointer; }
.ex-ledger tbody tr:hover,.ex-ledger tbody tr:focus-within { background:var(--ex-alt); }
.ex-workspace .ex-title,.ex-workspace .ex-link,.ex-workspace .ex-back { color:var(--ex-ink); background:none; border:0; padding:0; text-align:left; }
.ex-workspace .ex-title { display:inline; font-size:14px; line-height:1.35; overflow-wrap:anywhere; }
.ex-workspace .ex-title:hover,.ex-workspace .ex-link,.ex-workspace .ex-back:hover { text-decoration:underline; text-underline-offset:.2em; }
.ex-client { margin-top:3px; }
.ex-billing { display:inline-block; color:var(--ex-warn); background:var(--ex-warn-bg); border-radius:5px; padding:3px 8px; font-size:12px; font-weight:650; }
.ex-billing.is-billed { color:var(--ex-good); background:var(--ex-good-bg); }
.ex-ledger .ex-number { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; font-weight:650; }
.ex-ledger .ex-unknown { font-size:12px; font-weight:450; color:var(--ex-secondary); }
.ex-total { background:var(--ex-alt); border-top:1px solid var(--ex-border); }
.ex-total b { margin-left:5px; color:var(--ex-ink); font-size:15px; font-variant-numeric:tabular-nums; }
.ex-empty { padding:32px 20px; text-align:center; }
.ex-empty button { margin-top:12px; }
.ex-workspace .ex-back { display:inline-flex; margin-bottom:14px; color:var(--ex-secondary); }
.ex-panel { padding:clamp(16px,2.2cqw,28px); }
.ex-detail,.ex-form { max-width:850px; }
.ex-detail { display:grid; gap:14px; }
.ex-related,.ex-heading-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.ex-related { padding:12px 0; border-bottom:1px solid var(--ex-border); }
.ex-related:last-child { padding-bottom:0; border:0; }
.ex-related strong { margin-left:auto; }
.ex-detail-top { border-bottom:1px solid var(--ex-border); padding-bottom:18px; }
.ex-detail-top strong { display:block; font-size:30px; line-height:1.2; font-variant-numeric:tabular-nums; }
.ex-detail-top button { margin-left:auto; }
.ex-facts,.ex-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 24px; }
.ex-facts { margin:20px 0 24px; }
.ex-facts dd,.ex-notes,.ex-history strong,.ex-doc span { overflow-wrap:anywhere; }
.ex-notes { white-space:pre-wrap; margin-top:8px; }
.ex-doc { display:flex; align-items:center; gap:9px; padding:10px 0; color:var(--ex-accent); text-underline-offset:.2em; }
.ex-doc small { margin-left:auto; }
.ex-subhead { margin-bottom:12px; }
.ex-history { list-style:none; }
.ex-history li { margin-top:12px; }
.ex-history strong,.ex-history span,.ex-field span { display:block; }
.ex-history strong,.ex-field span { font-size:13px; font-weight:650; }
.ex-field span { margin-bottom:5px; }
.ex-form fieldset { min-width:0; padding:0; border:0; }
.ex-form input,.ex-form textarea,.ex-form select { width:100%; }
.ex-form textarea { resize:vertical; }
.ex-wide { grid-column:1 / -1; }
.ex-actions { justify-content:flex-end; margin-top:18px; }
.ex-error,.ex-message { margin:0 0 16px; padding:10px 12px; background:var(--ex-warn-bg); color:var(--ex-warn); border-radius:6px; }
.ex-message { background:var(--ex-good-bg); color:var(--ex-good); }
@container (max-width:760px) {
  .ex-ledger th:nth-child(3),.ex-ledger td:nth-child(3) { display:none; }
  .ex-ledger td:first-child { width:46%; }
}
@container (max-width:570px) {
  .ex-content { padding:18px 12px; }
  .ex-heading { gap:8px; margin-bottom:15px; }
  .ex-tabs { gap:0; }
  .ex-tabs button { padding:9px 8px; }
  .ex-search { flex-basis:100%; }
  .ex-toolbar select { flex:1; max-width:100%; }
  .ex-ledger th:nth-child(2),.ex-ledger td:nth-child(2) { display:none; }
  .ex-ledger td,.ex-ledger th { padding:10px 5px; }
  .ex-ledger td:first-child,.ex-ledger th:first-child { padding-left:10px; }
  .ex-ledger td:last-child,.ex-ledger th:last-child { padding-right:10px; }
  .ex-ledger-head,.ex-total { padding:14px 10px; }
  .ex-form-grid { grid-template-columns:minmax(0,1fr); gap:12px; }
  .ex-detail-top button { margin-left:0; }
}
