/* Accounting R9 candidate — scoped styles. Every rule is under an .axr-* class; tokens come from tokens.css. */

/* Persona strip (SAMPLE authority) */
.axr-persona { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 12px; padding: 8px 12px; background: var(--warning-bg); border: 1px dashed var(--warning-line); border-radius: var(--r-panel); }
.axr-sample { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--warning-text); background: var(--surface); border: 1px solid var(--warning-line); border-radius: 4px; padding: 2px 6px; }
.axr-pl { font-size: 13px; color: var(--warning-text); font-weight: 600; }
.axr-seg { flex-wrap: wrap; background: var(--surface); }
.axr-seg button { display: inline-flex; flex-direction: column; align-items: flex-start; height: auto !important; min-height: 36px; padding: 4px 10px !important; line-height: 1.15; }
.axr-seg button b { font-size: 12.5px; }
.axr-seg button span { font-size: 11.5px; font-weight: 500; color: var(--text-2); }
.axr-seg button[aria-pressed="true"] { box-shadow: inset 0 -3px 0 var(--accent), 0 0 0 1px var(--border-strong); }
.axr-pnote { flex: 1 1 140px; min-width: 0; font-size: 12px; color: var(--warning-text); }
.axr-reset { margin-left: auto; }

/* Add transaction menu */
.axr-add { position: relative; }
.axr-add > summary { list-style: none; cursor: pointer; }
.axr-add > summary::-webkit-details-marker { display: none; }
.axr-add-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 300px; padding: 6px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-panel); box-shadow: var(--shadow-pop); display: grid; gap: 2px; }
.axr-add-menu button { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--text); }
.axr-add-menu button:hover, .axr-add-menu button:focus-visible { background: var(--accent-tint); }
.axr-add-menu button span { display: grid; gap: 2px; }
.axr-add-menu small { color: var(--text-2); font-size: 12px; }

/* Result after a save */
.axr-result { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r-panel); background: var(--success-bg); border: 1px solid var(--success-line); color: var(--success-text); font-size: 13.5px; }
.axr-result.warn { background: var(--info-bg); border-color: #b9d0ea; color: var(--info-text); }
.axr-result > div { flex: 1; min-width: 0; }
.axr-result b { color: var(--text); }
.axr-result:focus { outline: none; box-shadow: var(--focus-ring); }

/* Group summary chips */
.axr-sum { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.axr-chip { display: inline-flex; align-items: baseline; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; color: var(--text); font-size: 13px; }
.axr-chip b { font-size: 16px; }
.axr-chip.review { border-color: var(--review-line); background: var(--review-bg); }
.axr-chip.zero { color: var(--text-2); }
.axr-chip:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* Task queues */
.axr-q { margin: 0 0 14px; padding: 0; overflow: hidden; }
.axr-qh { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.axr-qh > .i { color: var(--dom-maint); font-size: 18px; }
.axr-qh h2 { font-size: 15px; font-weight: 750; margin: 0; }
.axr-n { min-width: 24px; height: 22px; padding: 0 7px; border-radius: var(--r-pill); background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 700; display: inline-grid; place-items: center; }
.axr-n.zero { background: var(--neutral-bg); color: var(--text-2); border: 1px solid var(--neutral-line); }
.axr-qsub { font-size: 12.5px; color: var(--text-2); }
.axr-th, .axr-task { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(110px, .8fr) minmax(0, 1.6fr) 96px; gap: 12px; align-items: center; }
.axr-th { padding: 6px 14px; background: var(--table-head-bg); border-bottom: 1px solid var(--table-head-border); font-size: 12px; font-weight: 600; color: var(--text-2); }
.axr-th span:nth-child(2) { text-align: right; }
.axr-tasks { list-style: none; margin: 0; padding: 0; }
.axr-tasks li + li { border-top: 1px solid var(--table-row-border); }
.axr-task { padding: 9px 14px; color: var(--text); text-decoration: none; min-height: 44px; }
.axr-task:hover { background: var(--row-hover); }
.axr-task:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--focus); }
.axr-task.is-last { background: var(--row-selected); box-shadow: inset 3px 0 0 var(--accent); }
.axr-task > span { display: grid; gap: 1px; min-width: 0; }
.axr-c1 b { font-size: 14px; color: var(--key-link); overflow-wrap: anywhere; }
.axr-c2 { text-align: right; }
.axr-amt { font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; }
.axr-c3 b { font-size: 13px; }
.axr-c4 { font-size: 13px; font-variant-numeric: tabular-nums; }
.axr-empty { display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px; color: var(--text-2); font-size: 13.5px; }
.axr-empty .i { color: var(--success); }
.axr-wait { list-style: none; margin: 0; padding: 0; }
.axr-wait li { display: grid; grid-template-columns: 110px minmax(0, 1fr) 110px minmax(0, 1.2fr); gap: 10px; align-items: center; padding: 8px 14px; font-size: 13px; }
.axr-wait li + li { border-top: 1px solid var(--table-row-border); }
.axr-wait .num { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.axr-adj { margin-top: 4px; }
.axr-adj-h { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel) var(--r-panel) 0 0; border-bottom: 0; }

/* My work · integrated redesign: action filters → one row per transaction (left) → selected detail (right).
   Same split contract as Accident (.acc-split / .acc-card.on), written under .axr-* only. */
.axr-tabs .sec-tabs { flex-wrap: wrap; }
.axr-resource-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; padding: 4px 2px 12px; }
.axr-resource-links a { color: var(--primary, #254fa6); font-weight: 600; text-underline-offset: 3px; }
.axr-pane-empty { display: grid; place-content: center; min-height: 130px; color: var(--muted); }
.axr-wl-head label { display: flex; align-items: center; gap: 8px; }
.axr-wl-head select { flex: 1; min-width: 0; }
.axr-vf { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.axr-vb { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--r-panel); background: var(--surface); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; transition: border-color .14s, box-shadow .14s; }
.axr-vb-n { font-size: 18px; line-height: 1; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.axr-vb:hover { border-color: #9fb3c8; }
.axr-vb.on { background: var(--surface); color: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent), 0 3px 10px rgba(13, 36, 67, .1); }
.axr-vb.on .axr-vb-n { color: var(--accent); }
.axr-vb.zero .axr-vb-n { color: var(--text-2); font-weight: 650; }
.axr-vb.is-wait { background: var(--surface-sunken); }
.axr-vb:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.axr-split { display: grid; grid-template-columns: clamp(300px, 28%, 380px) minmax(0, 1fr); gap: 14px; align-items: start; }
.axr-wl { position: sticky; top: 0; max-height: calc(100dvh - var(--header-h) - var(--tabs-h) - 28px); display: flex; flex-direction: column; overflow: hidden; margin: 0; padding: 0; background: #f7f9fc; }
.axr-wl-head { display: grid; gap: 6px; padding: 10px; border-bottom: 1px solid var(--border); background: var(--surface); }
.axr-wl-head .search { max-width: none; }
.axr-wl-head .axr-count { margin: 0; font-size: 12.5px; }
.axr-wl-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 8px; }
.axr-wrs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.axr-wr { display: grid; gap: 2px; padding: 8px 11px 9px; border: 1px solid var(--border); border-left: 4px solid transparent; border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none; box-shadow: 0 1px 0 rgba(13, 36, 67, .04); transition: border-color .12s, box-shadow .12s; }
.axr-wr:hover { border-color: #9fb3c8; box-shadow: 0 3px 10px rgba(13, 36, 67, .09); }
.axr-wr.on { background: #f2f6ff; border-color: var(--st-prog-line, #9db7e6); border-left-color: var(--accent); box-shadow: 0 3px 12px rgba(36, 84, 189, .14); }
.axr-wr:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.axr-wr1 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.axr-wr-p { font-size: 14px; font-weight: 700; color: var(--key-link); overflow-wrap: anywhere; min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.axr-wr-amt { flex: none; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.axr-wr-s { display: flex; gap: 8px; justify-content: space-between; min-width: 0; font-size: 12.5px; color: var(--text-2); }
.axr-wr-s > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.axr-wr-no { flex: none; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.axr-wr-a { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.axr-wr-a b { color: var(--text); font-weight: 700; }
.axr-wr-a span { font-size: 12.5px; color: var(--text-2); }
.axr-wr-d { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.axr-wr.is-wait:not(.on) { background: var(--surface-sunken); }
.axr-wr.is-wait .axr-wr-a b { color: var(--text-2); font-weight: 650; }
.axr-wl .axr-empty { padding: 10px 6px; }
.axr-wl-cards { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; padding: 8px 10px; border: 1px dashed var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--key-link); font-size: 13px; font-weight: 600; text-decoration: none; }
.axr-wl-cards span { flex: 1; }
.axr-pane { min-width: 0; container: axrpane / inline-size; }
.axr-pane-empty { padding: 0; }
.axr-pe { display: flex; align-items: center; gap: 12px; padding: 18px 20px; }
.axr-pe > .i { font-size: 22px; color: var(--accent); }
.axr-pe b { display: block; font-size: 15px; color: var(--text); }
.axr-pe span { display: block; font-size: 13px; color: var(--text-2); }
.axr-pane-empty .legend-line { margin: 0; padding: 0 20px 16px; }
.axr-pane-back { display: none; }
.axr-pane .axr-rh { flex-wrap: wrap; }
.axr-full { white-space: nowrap; }
.axr-pane .rh-title { font-size: 19px; }
.axr-no { color: var(--text); font-weight: 700; }
.axr-gone { margin: 0 0 8px; padding: 8px 10px; border-radius: 6px; background: var(--info-bg); }
.axr-pane-original { margin: 0; }
.axr-more-details { margin-bottom: 12px; }
.axr-more-details > summary { padding: 10px 14px; font-weight: 650; }
.axr-document-lines { margin-top: 8px; }
.axr-document-lines > summary, .axr-more-details > summary { color: var(--key-link); cursor: pointer; }
.axr-more-body { padding: 4px 12px 10px; }
/* Work context (My work pane, All record): purpose · payee · amount → source proof → decision */
.axr-ctx { margin-bottom: 12px; }
.axr-ctx .facts.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.axr-k { display: block; margin-bottom: 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.axr-proof { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.axr-proof > div { min-width: 0; display: grid; gap: 3px; align-content: start; }
.axr-proof ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.axr-proof li { overflow-wrap: anywhere; font-size: 13px; }
.axr-ctx-dec { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.axr-ctx-dec .axr-tier { margin: 0 0 6px; font-size: 13px; }
.axr-chain { list-style: none; display: flex; flex-wrap: wrap; margin: 6px 0 0; padding: 0; }
.axr-chain li { flex: 1 1 0; min-width: 130px; display: grid; gap: 1px; padding: 6px 10px; border: 1px solid var(--border); font-size: 12.5px; }
.axr-chain li + li { border-left-width: 0; }
.axr-chain li:first-child { border-radius: 6px 0 0 6px; }
.axr-chain li:last-child { border-radius: 0 6px 6px 0; }
.axr-chain li b { color: var(--text); }
.axr-chain li span { color: var(--text-2); }
.axr-chain li.ok { background: var(--success-bg); }
.axr-chain li.ok span { color: var(--success-text); font-weight: 650; }
.axr-chain li.cur { background: var(--info-bg); box-shadow: inset 0 -3px 0 var(--accent); }
.axr-chain li.cur span { color: var(--info-text); font-weight: 700; }
.axr-chain li.na span { font-style: italic; }
/* All transactions record: history-first read view, with one hand-off to My work */
.axr-allwork { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--r-panel); background: var(--accent-tint); border: 1px solid #c6d5f3; font-size: 13.5px; }
.axr-allwork > .i { color: var(--accent); font-size: 18px; }
.axr-allwork > div { flex: 1; min-width: 0; display: grid; gap: 1px; }
.axr-allwork.is-wait, .axr-allwork.is-none { background: var(--surface-sunken); border-color: var(--border); }
.axr-allwork.is-none > .i { color: var(--text-2); }
.axr-allrec .axr-hist { margin-top: 0; }
@container axrpane (max-width: 640px) { .axr-ctx .facts.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .axr-proof { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .axr-ctx .facts.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .axr-proof { grid-template-columns: minmax(0, 1fr); } .axr-allwork { flex-wrap: wrap; } .axr-allwork .btn { width: 100%; min-height: 44px; justify-content: center; } .axr-chain li { flex-basis: 100%; } }
@container axrpane (max-width: 900px) { .axr-pane .two-col { grid-template-columns: minmax(0, 1fr); } }
@container axrwork (max-width: 1000px) { .axr-split { grid-template-columns: 280px minmax(0, 1fr); } }

/* All transactions */
.axr-filters { padding: 10px 12px; margin: 0 0 10px; display: grid; gap: 8px; }
.axr-frow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.axr-frow.wrap { align-items: flex-end; }
.axr-frow[hidden] { display: none; }
.axr-frow.wrap { flex-wrap: wrap; }
.axr-frow .search { flex: 1 1 320px; max-width: 460px; }
.axr-count { margin-left: auto; font-size: 13px; color: var(--text-2); }
.axr-f { display: grid; gap: 3px; font-size: 12px; color: var(--text-2); font-weight: 600; }
.axr-f .input, .axr-f .select { height: 32px; min-width: 0; width: 150px; font-weight: 400; }
.axr-f input[type="text"] { width: 120px; }
.axr-scope { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; color: var(--text-2); }
.axr-table tr.is-selected td { background: var(--row-selected); }
.axr-table tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.axr-table td .num { font-variant-numeric: tabular-nums; font-weight: 650; }
.axr-total { margin: 8px 2px 14px; font-size: 12.5px; color: var(--text-2); }
.axr-total b { color: var(--text); font-size: 14px; }

/* Transaction */
.axr-rh { align-items: center; }
.axr-dec-amt { display: grid; justify-items: end; gap: 0; padding: 4px 12px; border-left: 3px solid var(--accent); }
.axr-dec-amt span { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.axr-dec-amt b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1.15; }
.axr-dec-amt small { font-size: 11.5px; color: var(--text-2); }
.axr-taskbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--r-panel); background: var(--accent-tint); border: 1px solid #c6d5f3; }
.axr-tb-main { display: flex; gap: 10px; align-items: flex-start; flex: 1 1 360px; font-size: 13.5px; color: var(--text); }
.axr-tb-main > .i { color: var(--accent); font-size: 18px; margin-top: 1px; }
.axr-tb-main .cell-sub { display: inline; }
.axr-tb-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.axr-you { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: var(--r-pill); background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.axr-hint { display: flex; gap: 6px; align-items: center; margin: -4px 0 12px; font-size: 13px; color: var(--info-text); }
.axr-step { margin-bottom: 14px; }
.axr-lines { margin-top: 10px; border: 1px solid var(--table-border); border-radius: 6px; overflow-x: auto; }
.axr-lines .line-table th { background: var(--table-head-bg); border-bottom-color: var(--table-head-border); }
.axr-tier { margin: 0 0 8px; font-size: 13.5px; }
.axr-aps { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 6px; }
.axr-ap { display: grid; grid-template-columns: 120px auto minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 8px 10px; font-size: 13px; }
.axr-ap + .axr-ap { border-top: 1px solid var(--border); }
.axr-ap-who { font-weight: 700; }
.axr-stale { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; color: var(--warning-text); }
.axr-stale li { display: flex; gap: 6px; align-items: flex-start; }
.axr-pays { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.axr-pays li { display: flex; gap: 8px; align-items: flex-start; }
.axr-pays .i { margin-top: 2px; color: var(--text-2); }
.axr-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.axr-hist { margin: 14px 0; padding: 0; }
.axr-hist > summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; font-size: 14px; }
.axr-hist[open] > summary { border-bottom: 1px solid var(--border); }
.axr-hist .timeline { padding: 12px 14px; }
.axr-cmp tr.is-warn td { background: var(--warning-bg); }

/* Drawers */
.axr-dsum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-sunken); }
.axr-dsum > div { display: grid; gap: 1px; min-width: 0; }
.axr-dsum b { font-size: 15px; overflow-wrap: anywhere; }
.axr-srcs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; font-size: 13px; }
.axr-lin td { padding: 4px 4px; }
.axr-lin td:first-child { width: 44%; }
.axr-lin .input { height: 32px; }
.axr-lin [data-lineamt] { white-space: nowrap; font-variant-numeric: tabular-nums; }
.axr-cand { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; padding: 8px 10px; border-radius: 6px; background: var(--info-bg); color: var(--info-text); font-size: 13px; }
.axr-cand.is-cand { background: var(--review-bg); color: var(--review-text); }
.axr-checked { margin: 8px 0 0; font-weight: 600; }
.axr-packet { border: 1px solid var(--table-border); border-radius: 6px; padding: 12px 14px; background: #fff; font-size: 13px; display: grid; gap: 8px; }
.axr-packet header { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding-bottom: 6px; border-bottom: 2px solid var(--text); }
.axr-packet p { margin: 0; }
.axr-fail { margin-top: 12px; }

/* Stage 2 */
.axr-psel { display: none; }
.axr-held small { color: var(--warning-text); font-size: 11.5px; max-width: 320px; }
.axr-held .btn[aria-disabled="true"] { opacity: .7; cursor: not-allowed; border-style: dashed; }
.axr-ledger { border: 1px solid var(--table-border); border-radius: 6px; overflow-x: auto; }
.axr-ledger .line-table th { background: var(--table-head-bg); }
.axr-ledger tbody th { font-weight: 650; color: var(--text); white-space: nowrap; background: none; }
.axr-ledger td { white-space: nowrap; }
.axr-prior { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 0; font-size: 12.5px; color: var(--text-2); }
/* Unit 4 · source-page overlay text (inside Maintenance pages; same size as the surrounding cell text) */
.axr-srcst { color: var(--text-2); }
.axr-srcst b { color: var(--text); }
.axr-srcact { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 8px; }
.axr-srcact .cell-sub { flex: 1 1 240px; min-width: 0; }
.axr-started { margin-bottom: 10px; }
@media (max-width: 760px), (pointer: coarse) { .axr-srcact .btn { min-height: 44px; } }
/* Stage 3 */
.axr-orig { display: block; width: 100%; max-height: 70vh; object-fit: contain; border: 1px solid var(--table-border); border-radius: 6px; background: #fff; }
iframe.axr-orig { height: 70vh; }
.axr-acts.tight { margin-top: 0; gap: 6px; flex-direction: column; align-items: stretch; }
.axr-cardtbl td { white-space: normal; vertical-align: top; }
.axr-cardtbl td .cell-sub { display: block; }
.axr-cardtbl td .link-btn { text-align: left; overflow-wrap: anywhere; }
.axr-cmpbox { margin: 8px 0; }
.axr-revs { padding: 10px 14px; overflow-x: auto; }
.axr-f select, .axr-f input { font-size: 13px; }
@media print {
  body.axr-printing > *:not(dialog[open]) { display: none !important; }
  body.axr-printing dialog[open] { position: static; width: auto; max-height: none; box-shadow: none; border: 0; }
  body.axr-printing dialog[open] .drawer-head, body.axr-printing dialog[open] .drawer-foot, body.axr-printing dialog[open] .drawer-body > :not(.axr-packet) { display: none !important; }
  body.axr-printing dialog::backdrop { background: none; }
  .axr-packet { border: 0; font-size: 11pt; }
}

@media (max-width: 760px) {
  .axr-psel { display: block; flex: 1 1 200px; }
  .axr-psel .select { width: 100%; min-height: 44px; }
  .axr-seg { display: none; }
  .axr-persona { padding: 6px 10px; gap: 6px 8px; }
  .axr-held { max-width: none; width: 100%; }
  .axr-cardtbl .axr-acts .btn, .axr-acts .btn-sm { min-height: 44px; }
  .axr-step { padding: 10px 6px; }
  .axr-step .st { min-width: 0; padding: 0 1px; }
  .axr-step .st-label { font-size: 11px; overflow-wrap: anywhere; }
  .axr-th { display: none; }
  .axr-task { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "a b" "c c" "d d"; gap: 4px 10px; }
  .axr-c1 { grid-area: a; } .axr-c2 { grid-area: b; } .axr-c3 { grid-area: c; } .axr-c4 { grid-area: d; display: flex !important; gap: 4px; color: var(--text-2); }
  .axr-wait li { grid-template-columns: minmax(0, 1fr) auto; }
  .axr-pnote { display: none; }
  .axr-reset { margin-left: 0; }
  .axr-dec-amt { justify-items: start; border-left: 0; border-top: 3px solid var(--accent); padding: 6px 0 0; width: 100%; }
  .axr-tb-acts { margin-left: 0; width: 100%; }
  .axr-tb-acts .btn { flex: 1 1 auto; min-height: 44px; justify-content: center; }
  .axr-dsum { grid-template-columns: 1fr; }
  .axr-ap { grid-template-columns: 1fr auto; }
  .axr-ap .cell-sub { grid-column: 1 / -1; }
  .axr-f .input, .axr-f .select { width: 100%; }
  .axr-frow.wrap > .axr-f { flex: 1 1 140px; }
  .axr-seg button { min-height: 44px; }
  .axr-chip { min-height: 44px; }
  .axr-vb { min-height: 44px; }
}
/* My work single pane — decided by the width the page actually has (sidebar open or not), not the viewport:
   the list, or the selected transaction with Back to list. */
.axr-work { container: axrwork / inline-size; }
@container axrwork (max-width: 760px) {
  .axr-split { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .axr-wl { position: static; max-height: none; overflow: visible; }
  .axr-wl-body { overflow: visible; }
  .axr-split.has-sel .axr-wl { display: none; }
  .axr-split:not(.has-sel) .axr-pane { display: none; }
  .axr-split.has-sel .axr-pane-back { display: inline-flex; min-height: 44px; }
}
/* Card charges stack into one card per charge on tablets and phones, so the reconcile actions never sit off-screen. */
@media (max-width: 1024px) {
  .axr-cardwrap { overflow: visible; }
  .axr-cardtbl { min-width: 0 !important; width: 100%; }
  .axr-cardtbl thead { display: none; }
  .axr-cardtbl tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 12px; border-bottom: 1px solid var(--table-row-border); }
  .axr-cardtbl td { display: block; padding: 0; border: 0; text-align: left; }
  .axr-cardtbl td:nth-child(n+4) { grid-column: 1 / -1; }
  .axr-cardtbl .axr-acts.tight { flex-direction: row; flex-wrap: wrap; }
  .axr-cardtbl .axr-acts .btn { min-height: 44px; }
}
@media (pointer: coarse) { .axr-acts .btn, .axr-tb-acts .btn, .axr-cardtbl .btn { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .axr-task, .axr-chip, .axr-vb, .axr-wr { transition: none; } }

.axr-overview { padding: 16px 18px; }
.axr-overview-main, .axr-overview-state, .axr-section-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.axr-overview-main { justify-content: space-between; }
.axr-overview p { margin: 6px 0; }
.axr-overview-amount { display: grid; }
.axr-overview-amount b { font-size: 1.4rem; }
.axr-overview-state { margin-top: 8px; }
.axr-overview .axr-next { margin-top: 10px; }
.axr-section { border: 1px solid var(--line, #cad5e1); border-radius: 8px; background: var(--panel, white); overflow: hidden; }
.axr-section > summary { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 16px; cursor: pointer; }
.axr-section > summary::-webkit-details-marker { display: none; }
.axr-section > summary:focus-visible { outline: 2px solid #275ac3; outline-offset: -3px; }
.axr-section[open] > summary { background: #eef4fb; }
.axr-section-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; }
.axr-section-summary { color: #435c77; font-size: .92em; }
.axr-chevron { border: solid currentColor; border-width: 0 2px 2px 0; width: 8px; height: 8px; transform: rotate(45deg); margin-left: auto; flex: none; }
.axr-section[open] > summary .axr-chevron { transform: rotate(225deg); }

/* ---------- Unified entry (Phase A) ----------
 * Layout, list, selected header and task sections come from css/accident-entry.css (.acc-entry) and modules.css
 * (.acc-card / .acc-view / .acc-task / .task-h). Only the Accounting-specific bits inside them are styled here. */
.axr-entry .ac-top { display: flex; align-items: center; gap: 4px 8px; }
.axr-entry .axr-ac-state { margin-left: auto; }
.axr-entry .axr-ac-state .badge { font-size: 11.5px; }
.axr-entry .axr-ac-task { font-size: 12.5px; line-height: 1.4; color: var(--text-2); overflow-wrap: anywhere; }
.axr-entry .axr-ac-task b { color: var(--text); font-weight: 600; }
.axr-entry .axr-entry-task { display: grid; gap: 2px; margin: 8px 0 0; font-size: 13.5px; }
.axr-entry .axr-entry-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.axr-entry .acc-task-b .facts { margin: 0; }
.axr-paidwith { margin: 2px 0 0; font-size: 13.5px; }
/* Narrow selected transaction (scoped to .axr-entry; the shared Accident rules are unchanged): the page frame stays put and
 * the selected record scrolls in its own .ae-work, with its record header independently sticky — the same model the wide
 * layout uses. Tables keep their own horizontal scroll. */
@container acc-entry (max-width: 859px) {
  .axr-entry .ae-frame:has(.acc-split.has-sel) { height: calc(100dvh - var(--header-h) - var(--tabs-h) - 48px); min-height: 0; }
  /* The fixed-height frame is a flex column: the page head (title + its own wrapped "Add transaction" row) and the three
   * status boxes keep their natural height; only the split below gives up space. Without this the head shrank and its
   * wrapped Add button painted over the boxes (All transactions unclickable). */
  .axr-entry .ae-frame > .page-head, .axr-entry .ae-frame > .ae-status { flex-shrink: 0; }
  .axr-entry .acc-split.has-sel { flex: 1 1 auto; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  .axr-entry .acc-split.has-sel .ae-work { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 12px; }
  .axr-entry .acc-split.has-sel .ae-head { position: sticky; top: 0; z-index: 3; }
}
/* Phone width: the three status boxes are too narrow for label + count on one line ("All transactions" was clipped).
 * The full label sits above its count and may wrap at a space; nothing is clipped. Wider layouts keep one line. */
@container acc-entry (max-width: 559px) {
  .axr-entry .ae-status .acc-view { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; height: auto; min-height: 42px; padding: 6px 8px; }
  .axr-entry .ae-status .acc-view .av-top { white-space: normal; overflow: visible; min-width: 0; max-width: 100%; line-height: 1.25; }
  .axr-entry .ae-status .acc-view .av-n { line-height: 1.1; }
}
.axr-section-body { display: grid; min-width: 0; gap: 8px; padding: 12px; }
.axr-section-actions:empty { display:none; }
.axr-section-actions { flex-wrap: wrap; }
.axr-section-body .table-wrap { overflow-x: auto; max-width: 100%; }
@media(max-width: 700px) {
  .axr-section > summary { display: grid; grid-template-columns: minmax(0,1fr) 12px; gap: 2px 8px; }
  .axr-section-summary { grid-column: 1; }
  .axr-chevron { grid-column: 2; grid-row: 1 / span 2; }
}
.axr-pane > .axr-section { margin-top: 8px; }
.axr-wrs button.axr-wr { width: 100%; text-align: left; font: inherit; cursor: pointer; }

/* ---------- Workflow order 2026-11-19 (§12 badges, §11 mobile input) ---------- */
/* Status badges size to their lines: a long state ("Awaiting Accounting VP + President") wraps inside a taller badge instead
 * of overflowing a fixed 22 px box; the icon stays at the first line. Scoped to the Accounting entry. */
.axr-entry .badge { height: auto; min-height: 22px; white-space: normal; line-height: 1.3; padding-top: 2px; padding-bottom: 2px; text-align: left; align-items: flex-start; }
.axr-entry .badge .i { flex: 0 0 auto; margin-top: 1px; }
.axr-entry .acc-task-btn .at-st { min-width: 0; }
.axr-entry .acc-task-btn .at-n .i { width: 16px; height: 16px; }
/* Accounting drawers (marked .axr-dlg): one column that never grows past the drawer; wide tables scroll inside it, and the
 * footer buttons wrap, so fields, Submit and Close stay reachable at 390 px. Other modules' drawers are untouched. */
dialog.drawer:has(.axr-dlg) .drawer-form { grid-template-columns: minmax(0, 1fr); }
dialog.drawer:has(.axr-dlg) .drawer-body { grid-template-columns: minmax(0, 1fr); min-width: 0; }
dialog.drawer:has(.axr-dlg) .drawer-body > * { min-width: 0; }
/* 768 overlap (audit P1): a full-width field placed directly in the one-column drawer body ("span 2") created an implicit
 * second column, squeezing the note and the attachment area into a 0–26 px strip. Direct children span the one column. */
dialog.drawer:has(.axr-dlg) .drawer-body > .span2, dialog.drawer:has(.axr-dlg) .drawer-body > .fld { grid-column: 1 / -1; }
dialog.drawer:has(.axr-dlg) .table-wrap, dialog.drawer:has(.axr-dlg) .axr-lines { max-width: 100%; overflow-x: auto; }
dialog.drawer:has(.axr-dlg) .drawer-foot { flex-wrap: wrap; row-gap: 8px; }
@media (max-width: 559px) { dialog.drawer:has(.axr-dlg) .form-grid.c2 { grid-template-columns: minmax(0, 1fr); } dialog.drawer:has(.axr-dlg) .fld.span2 { grid-column: auto; } }
/* Workflow M2: typed source identity on cards; printed-vs-now differences; cost report; named invoice destination. */
dialog.drawer:has(.axr-dlg) [data-ax-maint-intake] { grid-column: 1 / -1; min-width: 0; display: grid; gap: 8px; }
dialog.drawer:has(.axr-dlg) [data-ax-maint-intake][hidden] { display: none; }
dialog.drawer:has(.axr-dlg) :is([data-overage-vendor], [data-overage-card])[hidden] { display: none; }
dialog.drawer:has(.axr-dlg) [data-ax-maint-href] { white-space: normal; height: auto; min-height: 32px; max-width: 100%; text-align: left; justify-content: flex-start; padding-top: 6px; padding-bottom: 6px; }
dialog.drawer:has(.axr-dlg) .axr-dest { min-width: 0; overflow-wrap: anywhere; }
.axr-entry .axr-ac-src { display: block; font-size: 12px; color: var(--text-2, #555); overflow-wrap: anywhere; }
dialog.drawer .axr-diff td, dialog.drawer .axr-diff th { background: var(--warning-bg); }
.axr-entry .axr-report { margin: 0 0 12px; }
.axr-entry .axr-report > summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 8px 12px; }
.axr-entry .axr-report-f { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 12px; padding: 0 12px 8px; }
.axr-entry .axr-report-f label { display: grid; gap: 2px; font-size: 12px; min-width: 0; }
.axr-entry .axr-report-f .input, .axr-entry .axr-report-f .select { min-width: 0; width: 100%; }
.axr-entry .axr-report-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 12px 8px; }
.axr-entry .axr-report .table-wrap { max-width: 100%; overflow-x: auto; }
/* Original viewer: a scrollable box; zoom sets the image / PDF frame width (100% = fit width) so the box scrolls both ways. */
.axr-zoombar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 8px; }
.axr-zoombar .axr-zoomv { min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }
.axr-orig-view { max-height: 72vh; max-width: 100%; overflow: auto; border: 1px solid var(--table-border); border-radius: 6px; background: var(--surface-2, #f4f4f4); }
.axr-orig-view:focus-visible { outline: 2px solid var(--focus, #2563eb); outline-offset: 2px; }
.axr-orig-view .axr-orig { max-width: none; max-height: none; border: 0; border-radius: 0; object-fit: initial; height: auto; }
.axr-orig-view iframe.axr-orig { height: 70vh; }
.axr-rep-sum { list-style: none; margin: 0 12px 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.axr-rep-sum li { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--line, #ddd); border-radius: 8px; min-width: 0; overflow-wrap: anywhere; }
.axr-rep-sum li span { font-size: 12px; color: var(--text-2, #555); }
.axr-rep-sum li small { font-size: 12px; color: var(--text-2, #555); }

/* ======================= Document UI (order 2026-11-19) =======================
 * Accident frame, folder boxes, list and sticky work header are reused as is; this block adds the approved document
 * arrangement. Colour meaning: blue = selection / your action, green = recorded completion, orange = attention,
 * neutral = waiting. Scoped to .axd (the Accounting entry) only. */
.axr-entry.axd .ae-status .acc-views { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; max-width: 880px; flex: 1 1 auto; }
.axr-entry.axd .ae-status .acc-views .acc-view { width: auto; min-width: 0; }
.axd .axd-doc { background: var(--panel, #fff); border: 1px solid var(--line, #dfe6ee); border-radius: 10px; }
.axd .axd-act-b { margin-left: auto; }
/* List card */
.axd .axd-card { display: grid; gap: 3px; }
.axd .axd-card .ac-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.axd .axd-amt { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: 0; }
.axd .axd-asset { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.axd .axd-card .ac-title { font-weight: 700; line-height: 1.3; }
.axd .axd-kind { font-size: 12px; color: var(--text-2); }
.axd .axd-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12.5px; color: var(--text-2); min-width: 0; }
.axd .axd-meta > span { overflow-wrap: anywhere; }
.axd .axd-ref { color: var(--brand, #2563eb); font-weight: 600; }
.axd .axd-ref.is-none { color: var(--text-3, #6b7a8c); font-weight: 500; }
.axd .axd-stage { display: flex; margin-top: 2px; }
.axd .axd-turn { display: flex; align-items: flex-start; gap: 6px; margin-top: 4px; padding-top: 6px; border-top: 1px dashed var(--line, #d5dee8); font-size: 12.5px; color: var(--brand, #2554c7); line-height: 1.35; }
.axd .axd-turn .i { width: 14px; height: 14px; flex: none; margin-top: 2px; }
/* Selected document */
.axd .axd-doc { display: flex; flex-direction: column; min-width: 0; padding: 0; overflow: visible; }
.axd .axd-head { position: sticky; top: 0; z-index: 4; display: grid; gap: 4px; padding: 14px 20px 12px; background: var(--panel, #fff); border-bottom: 1px solid var(--line, #dfe6ee); border-radius: 10px 10px 0 0; }
.axd .axd-h1 { display: flex; align-items: center; gap: 10px; min-width: 0; }
.axd .axd-h1 .axd-ref { font-size: 13.5px; font-weight: 700; }
.axd .axd-hstage { margin-left: auto; display: flex; }
.axd .axd-title { margin: 0; font-size: 20px; line-height: 1.25; font-weight: 750; color: var(--text); overflow-wrap: anywhere; }
.axd .axd-tags { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; font-size: 13px; color: var(--text-2); }
.axd .axd-tags b { color: var(--text); font-size: 14px; }
.axd .axd-body { display: grid; gap: 18px; padding: 16px 20px 20px; min-width: 0; }
.axd .axd-body > * { min-width: 0; margin: 0; }
.axd .axd-amount { display: grid; gap: 10px; }
.axd .axd-amount > div:first-child { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.axd .axd-big { font-size: 30px; line-height: 1.1; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.axd .axd-amount > div:first-child > span { color: var(--text-2); font-size: 14px; }
.axd .axd-money { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 10px 12px; background: var(--surface-2, #f5f8fb); border-radius: 8px; }
.axd .axd-money dt, .axd .axd-fields dt { font-size: 12px; color: var(--text-2); font-weight: 500; }
.axd .axd-money dd { margin: 2px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.axd .axd-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; margin: 0; }
.axd .axd-fields dd { margin: 3px 0 0; font-size: 14.5px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.axd .axd-fields .span2 { grid-column: 1 / -1; }
.axd .axd-fields .span2 dd { font-weight: 500; line-height: 1.45; }
.axd .axd-sec h3 { margin: 0 0 4px; padding-bottom: 8px; font-size: 14px; font-weight: 700; color: var(--text); border-bottom: 1px solid var(--line, #dfe6ee); }
/* Connected requests use the same document shell. Group the existing operator fields within it. */
.axd .axd-studio { background: var(--surface); border-radius: var(--r-panel); }
.axd .axd-studio .axd-h1 { flex-wrap: wrap; }
.axd .axd-studio .axd-hstage { min-width: 0; }
.axd .axd-studio .axd-hstage .badge { white-space: normal; }
.axd .axd-studio-actions { display: grid; gap: 10px; }
.axd .axd-studio-action-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.axd .axd-studio-action-head h3 { border: 0; margin: 0; padding: 0; }
.axd .axd-studio-operator { display: grid; gap: 4px; max-width: 350px; }
.axd .axd-studio-operator .select { width: 100%; }
.axd .studio-op { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: var(--r-control); }
.axd .studio-op > label:not(:has(input[type="checkbox"])), .axd .studio-op > fieldset { flex: 1 1 180px; min-width: 0; }
.axd .studio-op label:has(.input) { display: grid; gap: 4px; }
.axd .studio-op .input { width: 100%; min-width: 0; }
.axd .studio-op > fieldset { border: 0; margin: 0; padding: 0; }
@container acc-entry (max-width: 859px) {
  .axd .axd-studio-close { display: none; }
  .axr-entry.axd .axd-studio .axd-h1 .acc-back, .axd .axd-studio .studio-op .btn { min-height: 44px; }
}
.axd .axd-rows { list-style: none; margin: 0; padding: 0; }
.axd .axd-rows > li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding: 10px 2px; border-bottom: 1px solid var(--line-2, #edf1f5); min-width: 0; }
.axd .axd-row-main { display: grid; gap: 2px; flex: 1 1 220px; min-width: 0; }
.axd .axd-row-main b { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; overflow-wrap: anywhere; }
.axd .axd-row-main b .i { width: 15px; height: 15px; color: var(--text-2); }
.axd .axd-row-amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.axd .axd-note { display: flex; align-items: flex-start; gap: 6px; margin: 8px 0 0; font-size: 13px; color: var(--text-2); }
.axd .axd-note .i { width: 15px; height: 15px; flex: none; margin-top: 2px; }
/* Approval route: one column per step, a status bar on top (green done · blue now · orange changes · red declined · grey later) */
.axd .axd-route { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 16px; margin: 6px 0 0; padding: 0; }
.axd .axd-step { display: grid; align-content: start; gap: 2px; min-width: 0; font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.axd .axd-step-bar { display: block; height: 3px; border-radius: 2px; background: var(--line, #d5dee8); margin-bottom: 6px; }
.axd .axd-step b { color: var(--text); font-size: 13.5px; }
.axd .axd-step-who { color: var(--text); }
.axd .axd-step-st { font-weight: 600; }
.axd .axd-step.is-done .axd-step-bar { background: var(--success, #2f7d4f); }
.axd .axd-step.is-done .axd-step-st { color: var(--success-text, #256b41); }
.axd .axd-step.is-now .axd-step-bar { background: var(--brand, #2554c7); }
.axd .axd-step.is-now .axd-step-st { color: var(--brand, #2554c7); }
.axd .axd-step.is-warn .axd-step-bar { background: var(--warning, #c46a00); }
.axd .axd-step.is-warn .axd-step-st { color: var(--warning-text, #9a5200); }
.axd .axd-step.is-stop .axd-step-bar { background: var(--danger, #b42318); }
.axd .axd-step.is-stop .axd-step-st { color: var(--danger-text, #a3261b); }
/* Collapsible blocks (Items, Processing history): one chevron that turns */
.axd .axd-sub > summary { display: flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; list-style: none; border-top: 1px solid var(--line, #dfe6ee); }
.axd .axd-sub > summary::-webkit-details-marker { display: none; }
.axd .axd-sub > summary > span { color: var(--text-2); font-size: 13px; }
.axd .axd-sub > summary:focus-visible { outline: 2px solid var(--brand, #2554c7); outline-offset: 2px; border-radius: 4px; }
.axd .axd-chev { width: 14px; height: 14px; transition: transform .15s; }
.axd .axd-sub[open] > summary .axd-chev { transform: rotate(90deg); }
.axd .axd-sub .table-wrap { max-width: 100%; overflow-x: auto; }
.axd .axd-histt td { vertical-align: top; }
/* ONE execution area: sticky at the bottom of the document */
.axd .axd-act { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 10px 16px; padding: 12px 20px; background: #f3f6fa; border-top: 1px solid var(--line, #dfe6ee); border-radius: 0 0 10px 10px; }
.axd .axd-act.is-mine { background: #eef3fd; border-top-color: #c9d7f5; }
.axd .axd-act-t { margin: 0; flex: 1 1 260px; min-width: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.4; }
.axd .axd-act-t b { color: var(--text); }
.axd .axd-act-b { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.axd .axd-act-b .guarded { display: inline-grid; gap: 2px; }
.axd .axd-viewonly { font-size: 13px; color: var(--text-2); padding: 6px 2px; }
/* In-folder Filter: compact, on demand, beside the folder search (no extra summary row). */
.axd .acc-list-head:has(.axd-filter) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* Search keeps a readable width; when the list is narrower than search + Filter, Filter wraps below instead of squeezing it. */
.axd .acc-list-head .acc-find { flex: 1 1 220px; min-width: min(220px, 100%); }
/* The shared .search .input (components.css) is a fixed 300px with 30px right padding reserved for a clear button that
 * this search box does not render; inside the accounting list it fills its wrapper and keeps only the icon padding. */
.axd .acc-list-head .acc-find > .search { display: flex; flex: 1 1 auto; width: 100%; min-width: 0; max-width: none; }
.axd .acc-list-head .acc-find > .search > .input { width: 100%; max-width: none; min-width: 0; box-sizing: border-box; padding-right: 8px; text-overflow: ellipsis; }
.axd .axd-filter { flex: 0 0 auto; }
.axd .axd-filter > summary { list-style: none; cursor: pointer; gap: 4px; white-space: nowrap; }
.axd .axd-filter > summary::-webkit-details-marker { display: none; }
.axd .axd-filter[open] { flex-basis: 100%; }
.axd .axd-filter[open] > summary { margin-bottom: 8px; }
.axd .axd-fcount { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 9px; background: var(--brand, #2554c7); color: #fff; font-size: 11px; }
.axd .axd-filter-b { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; align-items: end; }
.axd .axd-filter-b label { display: grid; gap: 2px; font-size: 12px; color: var(--text-2); min-width: 0; }
.axd .axd-filter-b .select, .axd .axd-filter-b .input { width: 100%; min-width: 0; }
.axd .axd-filter-b .cell-sub { grid-column: 1 / -1; }
.axd .axd-more { position: relative; }
.axd .axd-more > summary { list-style: none; cursor: pointer; gap: 4px; }
.axd .axd-more > summary::-webkit-details-marker { display: none; }
.axd .axd-more > summary .axd-chev { transform: rotate(-90deg); }
.axd .axd-more[open] > summary .axd-chev { transform: rotate(90deg); }
.axd .axd-more-m { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 6; display: grid; gap: 4px; min-width: 220px; padding: 6px; background: var(--panel, #fff); border: 1px solid var(--line, #dfe6ee); border-radius: 8px; box-shadow: 0 8px 24px rgba(16, 32, 56, .16); }
.axd .axd-more-m .btn { justify-content: flex-start; width: 100%; }
.axd .axd-evidence-actions { margin: 8px 0 6px; }
.axd .axd-evidence-actions .axd-more-m {
  position: static; width: fit-content; max-width: 100%; min-width: 0; margin-top: 6px;
}

.axd .axd-h1 .axd-ref { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* Narrow (≤859): the page scrolls as one; only the compact document header (top) and the action bar (bottom) stay put —
 * the page head and the four folder boxes scroll away instead of staying fixed above the document. */
@container acc-entry (max-width: 859px) {
  .axr-entry.axd .ae-frame:has(.acc-split.has-sel) { height: auto; }
  .axr-entry.axd .acc-split.has-sel { display: block; }
  .axr-entry.axd .acc-split.has-sel .ae-work { overflow: visible; min-height: 0; padding-bottom: 0; }
  .axr-entry.axd .axd-head { padding: 10px 14px 10px; border-radius: 0; box-shadow: 0 1px 0 var(--line, #dfe6ee); }
  .axr-entry.axd .axd-body { padding: 14px 14px 18px; }
  .axr-entry.axd .axd-act { padding: 10px 14px; border-radius: 0; box-shadow: 0 -2px 8px rgba(16, 32, 56, .08); }
}
@container acc-entry (max-width: 559px) {
  .axr-entry.axd .ae-status .acc-views { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .axr-entry.axd .axd-h1 { gap: 8px; }
  .axr-entry.axd .axd-h1 .acc-back { padding: 0 6px; min-height: 30px; }
  .axr-entry.axd .axd-title { font-size: 16.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .axr-entry.axd .axd-tags { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; font-size: 12.5px; scrollbar-width: none; }
  .axr-entry.axd .axd-fields { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .axr-entry.axd .axd-big { font-size: 26px; }
  .axr-entry.axd .axd-act { gap: 6px; padding: 8px 12px; }
  .axr-entry.axd .axd-act-t { flex-basis: 100%; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .axr-entry.axd .axd-act-b { width: 100%; flex-wrap: nowrap; gap: 6px; margin-left: 0; }
  .axr-entry.axd .axd-act-b > .btn, .axr-entry.axd .axd-act-b > .axd-more > summary { min-height: 44px; padding: 0 10px; justify-content: center; white-space: nowrap; }
  .axr-entry.axd .axd-act-b > .btn-primary { flex: 1 1 auto; }
  .axr-entry.axd .axd-act-b > .btn:not(.btn-primary) { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .axr-entry.axd .axd-more-m { right: auto; left: 0; max-width: calc(100vw - 24px); }
  .axr-entry.axd .axd-act-b > .btn:not(.btn-primary) .i, .axr-entry.axd .axd-act-b > .axd-more > summary .i { display: none; }
  .axr-entry.axd .axd-act-b > .btn:not(.btn-primary), .axr-entry.axd .axd-act-b > .axd-more > summary { padding: 0 8px; }
  .axr-entry.axd .axd-route { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
