/* Round 4. Measured from Mercury's live demo (light), 19 Nov:
   body 15/24 weight 400; labels 13/20 tertiary; column heads 12/20 +.2px; section titles 19/28;
   page titles 28/36 display cut, weight ~380; big numbers display ~40, decimals/units at ~60% size;
   cards white, radius 12, soft two-layer shadow, no border; pill buttons on a 10% grey;
   nav rows 30px radius 8; table rows ~50px; detail opens as a floating panel, radius 24. */
/* Inter 4.001, variable (optical size and weight), served by SổXanh itself: the security policy allows no outside
   fonts. SIL Open Font License 1.1; the copyright and licence travel inside the file. */
@font-face { font-family: Inter; src: url("/assets/inter.ttf") format("truetype"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  --ink: #1e1e2a;
  --ink-2: #363644;
  --ink-3: #575766;
  --ink-4: #636374;
  --line: rgba(87, 90, 118, .18);
  --line-2: rgba(87, 90, 118, .28);
  --fill: rgba(112, 115, 147, .10);
  --fill-2: rgba(112, 115, 147, .16);
  --page: #fbfbfd;
  --accent: #4659db;
  --accent-wash: rgba(70, 89, 219, .09);
  --bill-share: #3344b8;
  --green: #036e43;
  --ease: cubic-bezier(.2, .7, .2, 1); /* every movement on the page eases out the same way */
  --amber: #8a4b00; --amber-line: rgba(196, 122, 0, .38); --amber-wash: rgba(255, 186, 51, .14);
  --mark: rgba(255, 205, 41, .45); --mark-line: rgba(204, 146, 0, .9);
  --card-shadow: 0 0 2px rgba(175, 178, 206, .56), 0 1px 4px rgba(4, 4, 52, .10);
  --float-shadow: 0 0 2px rgba(175, 178, 206, .65), 0 0 3px rgba(0, 0, 0, .09), 0 12px 16px rgba(0, 0, 0, .01), 0 22px 28px rgba(0, 0, 0, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: #fff; color: var(--ink); font: 400 15px/24px Inter, system-ui, sans-serif; font-optical-sizing: auto; font-feature-settings: "tnum" 1, "cv11" 1, "ss03" 1; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* Shell */
.app { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100dvh; }
.app > div { min-width: 0; }
.side { padding: 12px 8px; display: flex; flex-direction: column; gap: 1px; position: sticky; top: 0; height: 100dvh; border-right: 1px solid var(--line); background: #fff; }
.org { display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 8px; margin-bottom: 10px; font-size: 14px; }
.org .logo { width: 24px; height: 24px; border-radius: 6px; display: inline-grid; place-items: center; flex: none; overflow: hidden; }
.org .logo svg { width: 100%; height: 100%; display: block; }
.org-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 500; }
.org > span:last-child { color: var(--ink-3); margin-left: auto; font-size: 12px; } /* Only the year label is pushed right; the logo stays in line with the nav icons. */
.nav { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 8px; border-radius: 8px; color: var(--ink-2); font-size: 15px; }
.nav.side-act { border: 0; background: none; width: 100%; text-align: left; cursor: pointer; }
.nav:hover { background: var(--fill); }
.nav.on { background: var(--fill); color: var(--ink); }
.nav.is-unused { color: var(--ink-4); opacity: .72; }
.nav.is-unused:hover, .nav.is-unused.on { opacity: 1; color: var(--ink-2); }
.nav svg { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
.nav .count { margin-left: auto; font-size: 13px; color: var(--ink-3); }
.nav.sub { padding-left: 34px; color: var(--ink-3); }
.nav.sub.on { color: var(--ink); }
.side hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.top { height: 52px; display: flex; align-items: center; gap: 16px; padding: 0 24px; position: sticky; top: 0; background: #fff; z-index: 15; }
.search { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 15px; }
.search svg { width: 15px; height: 15px; }
.top .grow { flex: 1; }
.main { max-width: 1016px; margin: 0 auto; padding: 18px 24px 96px; }

/* Primitives */
.page-title { display: flex; align-items: center; gap: 12px; }
.page-title h1 { font-size: 28px; line-height: 36px; font-weight: 380; letter-spacing: -.01em; }
.page-title .actions { margin-left: auto; display: flex; gap: 8px; }
.title-tip { position: relative; display: inline-flex; align-items: center; max-width: 100%; border-radius: 6px; cursor: default; }
.title-tip:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.title-popover { position: absolute; left: 0; top: calc(100% + 8px); z-index: 35; width: max-content; max-width: min(440px, calc(100vw - 64px)); padding: 11px 14px; border-radius: 10px; background: var(--ink); color: #fff; font: 400 13.5px/20px Inter, system-ui, sans-serif; letter-spacing: 0; box-shadow: 0 10px 28px rgba(4, 4, 52, .18), 0 2px 6px rgba(4, 4, 52, .10); opacity: 0; visibility: hidden; transform: translateY(-3px); pointer-events: none; transition: opacity .15s var(--ease), transform .15s var(--ease), visibility 0s linear .15s; }
.title-popover:empty { display: none; }
.title-tip:hover .title-popover, .title-tip:focus-visible .title-popover { opacity: 1; visibility: visible; transform: translateY(0); transition: opacity .15s var(--ease), transform .15s var(--ease), visibility 0s; }
.elec-account-bar { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; }
.elec-account-btn { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 5px; padding: 1px 9px; border: 0; border-radius: 7px; background: var(--fill); color: var(--ink); font-size: 15.5px; line-height: 24px; font-weight: 500; text-align: left; cursor: pointer; transition: background .12s, color .12s; }
.elec-account-v { font-weight: 400; color: var(--ink-2); font-variant-numeric: tabular-nums; transition: color .12s; }
.elec-account-btn:hover { background: var(--accent-wash); color: var(--accent); }
.elec-account-btn:hover .elec-account-v { color: var(--accent); }
.elec-account-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border: 0; border-radius: 9999px; background: var(--fill); color: var(--ink-2); font-size: 15px; cursor: pointer; white-space: nowrap; }
.pill:hover { background: var(--fill-2); }
.pill svg { width: 14px; height: 14px; }
.pill.primary { background: var(--accent); color: #fff; }
.pill.primary:hover { background: #3849c4; }
.pill.danger { background: #fdecea; color: #8a1c12; }
.pill.danger:hover { background: #fadbd8; }
.pill:disabled { opacity: .45; cursor: not-allowed; }
.pill:disabled:hover { background: var(--fill); }
.pill.primary:disabled:hover, .pill.dark:disabled:hover { background: var(--accent); }
.pill.danger:disabled:hover { background: #fdecea; }
.settings-view .card.bal { max-width: 680px; }
.settings-block { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 0; }
.settings-block:first-child { padding-top: 0; }
.settings-block + .settings-block { border-top: 1px solid var(--line); }
.settings-block h2 { font-size: 15px; line-height: 22px; font-weight: 500; color: var(--ink); }
.settings-block .say { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: var(--ink-3); max-width: 440px; }
.settings-block.danger h2 { color: #8a1c12; }
.card { background: #fff; border-radius: 12px; box-shadow: var(--card-shadow); }
.label { font-size: 13px; line-height: 20px; color: var(--ink-3); letter-spacing: .1px; }
.num { font-size: 40px; line-height: 48px; font-weight: 340; letter-spacing: -.025em; color: var(--ink); }
.num small { font-size: 22px; font-weight: 360; letter-spacing: -.01em; color: var(--ink); margin-left: 4px; }
.unconfirmed-total { color: var(--ink-3); font-size: 28px; line-height: 36px; }
.unconfirmed-total.is-unused { color: var(--ink); }
.unconfirmed-total.status-warning { color: var(--amber); font-size: 28px; line-height: 36px; }
.status-ready { color: var(--green); }
.status-warning { color: var(--amber); }
.hero-trigger { display: inline-flex; align-items: center; gap: 12px; border: 0; background: none; padding: 6px 12px 6px 10px; margin: -6px -12px -6px -10px; border-radius: 12px; font: 400 32px/40px Inter, system-ui, sans-serif; letter-spacing: -.02em; color: var(--amber); cursor: pointer; text-align: left; text-decoration: none; max-width: calc(100% + 22px); transition: background .15s var(--ease); }
.hero-trigger:hover, .hero-trigger.is-open { background: var(--amber-wash); }
.hero-trigger:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.hero-trigger:disabled { opacity: .55; cursor: not-allowed; }
.hero-trigger:disabled:hover { background: none; }
.hero-arrow { width: 30px; height: 30px; border-radius: 9999px; background: var(--amber); color: #fff; display: inline-grid; place-items: center; flex: none; transition: transform .18s var(--ease), background .15s; }
.hero-arrow svg { width: 15px; height: 15px; }
.hero-lead-icon { display: inline-grid; place-items: center; flex: none; }
.hero-lead-icon svg { width: 20px; height: 20px; }
.hero-trigger.is-headline .hero-lead-icon svg, .hero-trigger.is-md .hero-lead-icon svg { width: 18px; height: 18px; }
.hero-trigger.is-sm .hero-lead-icon svg { width: 15px; height: 15px; }
.hero-trigger:not(:disabled):hover .hero-arrow { transform: translateX(3px); background: #743e00; }
.hero-trigger.is-open .hero-arrow { background: #743e00; }
.hero-trigger.is-headline, .hero-trigger.is-md { font-size: 19px; line-height: 27px; font-weight: 420; letter-spacing: -.01em; gap: 9px; padding: 4px 10px 4px 8px; margin: -4px -10px -4px -8px; border-radius: 10px; }
.hero-trigger.is-headline .hero-arrow, .hero-trigger.is-md .hero-arrow { width: 24px; height: 24px; }
.hero-trigger.is-headline .hero-arrow svg, .hero-trigger.is-md .hero-arrow svg { width: 13px; height: 13px; }
.hero-trigger.is-sm { font-size: 14.5px; line-height: 20px; font-weight: 500; letter-spacing: 0; gap: 7px; padding: 3px 8px 3px 6px; margin: -3px -8px -3px -6px; border-radius: 8px; }
.hero-trigger.is-sm .hero-arrow { width: 20px; height: 20px; }
.hero-trigger.is-sm .hero-arrow svg { width: 11px; height: 11px; }
.hero-trigger.is-accent { color: var(--accent); }
.hero-trigger.is-accent:hover, .hero-trigger.is-accent.is-open { background: var(--accent-wash); }
.hero-trigger.is-accent:focus-visible { outline-color: var(--accent); }
.hero-trigger.is-accent .hero-arrow { background: var(--accent); }
.hero-trigger.is-accent:not(:disabled):hover .hero-arrow, .hero-trigger.is-accent.is-open .hero-arrow { background: #3849c4; }
.pending-section .list tr.doubt td.r { color: var(--amber); }
.pending-section .list tr.doubt td:first-child::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); margin-right: 8px; vertical-align: 1px; }
.card .just { margin-top: 8px; }
.highlight-period { color: var(--ink); background: var(--amber-wash); }
.section-title { display: flex; align-items: baseline; gap: 14px; margin: 36px 0 8px; }
/* A page with no total yet (no records) opens straight on its first table, the same 16px under the title as a total. */
.page-title + .section-title, .cards[hidden] + #elec-pending:empty + .section-title { margin-top: 16px; }
.section-title h2 { font-size: 19px; line-height: 28px; }
.section-title .dim { font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.section-title a, .link { color: var(--accent); font-size: 15px; }
.section-title .right { margin-left: auto; display: flex; gap: 8px; }
/* A state that is not plain is said in quiet words beside the line, never as a boxed tag (rule 19): grey for a fact
   (an estimate), amber for what still needs the preparer (a bill not counted). */
.list td .hold { color: var(--amber); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; font-size: 13px; line-height: 20px; color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber-line); white-space: nowrap; }
.tag.grey { color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.unit { font-size: 12px; color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
table.list { width: 100%; border-collapse: collapse; }
.list th { text-align: left; font-size: 13px; line-height: 20px; font-weight: 400; color: var(--ink-3); letter-spacing: .1px; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.list td { height: 50px; padding: 0 8px; border-bottom: 1px solid var(--line); white-space: nowrap; color: var(--ink); }
.list .r { text-align: right; }
.list .dim { color: var(--ink-3); }
.list tr.row { cursor: pointer; }
.list tr.row.still { cursor: default; }
.list tr.row:not(.still):hover td { background: rgba(112, 115, 147, .05); }
.list tr.sel td, .list tr.row.sel:hover td { background: var(--accent-wash); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10px; font-weight: 500; letter-spacing: .02em; color: var(--ink-2); background: #eef0f6; vertical-align: middle; margin-right: 12px; }
.avatar.dash { background: none; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-4); }

:root { --ease: cubic-bezier(.2, .7, .2, 1); --t: .32s; }
.app[hidden], #startup[hidden] { display: none; }
#startup { padding-top: 48px; }
#startup p { margin: 12px 0; }
.app { transition: grid-template-columns var(--t) var(--ease); }
.app:is(.compact, .side-collapsed) { grid-template-columns: 60px minmax(0, 1fr); }
.side { overflow: hidden; transition: padding var(--t) var(--ease); }
.side .nav, .side .org { white-space: nowrap; }
.app:is(.compact, .side-collapsed) .side .nav { font-size: 0; gap: 0; justify-content: center; padding: 0; }
.app:is(.compact, .side-collapsed) .side .nav .count, .app:is(.compact, .side-collapsed) .side .org-name, .app:is(.compact, .side-collapsed) .side .org > span:last-child { display: none; }
.app:is(.compact, .side-collapsed) .side .org { font-size: 0; gap: 0; justify-content: center; padding: 0; }
.nav.side-toggle { margin-top: auto; color: var(--ink-3); }
.nav.side-toggle:hover { color: var(--ink); }
/* Search: a real field, aligned with the page column, that says what you can find and where it will take you. */
.top { padding: 0; }
/* The search lines up with the page column; the language and account sit at the window's right edge. */
.top .inner { width: 100%; max-width: none; margin: 0; padding: 0 24px 0 max(24px, calc((100% - 1016px) / 2 + 24px)); display: flex; align-items: center; gap: 10px; transition: max-width var(--t) var(--ease), padding var(--t) var(--ease); }
.app.compact .top .inner { max-width: none; margin: 0; padding: 0 28px; }
.top .inner:has(.search) .grow { display: none; }
.search { position: relative; flex: 1 1 240px; max-width: 460px; margin-right: auto; min-width: 0; }
.language { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border-radius: 9999px; color: var(--ink-2); font-size: 14px; white-space: nowrap; text-decoration: none; transition: background .12s; }
.language:hover { background: var(--fill); text-decoration: none; }
.lang-flag { width: 18px; height: 12px; border-radius: 2.5px; flex: none; box-shadow: 0 0 0 1px var(--line); display: block; }
.upload-status { margin: 12px 16px; color: var(--ink-2); white-space: pre-wrap; }
[hidden] { display: none !important; }
.search > svg { position: absolute; left: 14px; top: 10px; width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
.search input { width: 100%; height: 36px; border: 0; outline: 0; border-radius: 9999px; padding: 0 44px 0 40px; background: var(--fill); font-size: 15px; color: var(--ink); transition: background .12s, box-shadow .12s; }
.search input::placeholder { color: var(--ink-3); }
.search input:hover { background: var(--fill-2); }
.search input:focus { background: #fff; box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-wash); }
.search kbd { position: absolute; right: 10px; top: 8px; font: 12px/20px Inter; color: var(--ink-3); background: #fff; border-radius: 6px; padding: 0 7px; box-shadow: var(--card-shadow); pointer-events: none; transition: opacity .12s; }
.search input:focus ~ kbd, .search input:not(:placeholder-shown) ~ kbd { opacity: 0; }
.menu { position: absolute; left: 0; right: 0; top: 44px; background: #fff; border-radius: 16px; box-shadow: var(--float-shadow); padding: 6px; display: none; z-index: 40; max-height: 60vh; overflow: auto; }
.menu.on { display: block; }
.menu .grp { font-size: 13px; line-height: 18px; color: var(--ink-3); padding: 10px 12px 4px; letter-spacing: .1px; }
.menu button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; width: 100%; border: 0; background: none; height: 40px; padding: 0 12px; border-radius: 10px; font-size: 15px; color: var(--ink); cursor: pointer; text-align: left; }
.menu button b { font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu button b mark { background: none; color: var(--accent); }
.menu button span { color: var(--ink-3); font-size: 14px; white-space: nowrap; }
.menu button.hi { background: var(--fill); }
.menu .none { padding: 14px 12px; color: var(--ink-3); font-size: 14px; }

.work { display: grid; grid-template-columns: minmax(0, 1fr) 0px; transition: grid-template-columns var(--t) var(--ease); }
/* With the page open, the list keeps exactly its measured column (plus its padding) and the original page takes all
   the rest of the window: no strip of empty page between the table and the paper (Long, 22 Nov 2026). A width the
   preparer dragged wins. */
.work { --col: 564px; min-width: 0; }
.work:has(.ov), .work:has(.files) { --col: 680px; }
.work.ev { grid-template-columns: minmax(0, calc(var(--col) + 56px)) minmax(360px, 1fr); }
.work.ev.sized { grid-template-columns: minmax(0, 1fr) clamp(340px, var(--evid-w), max(340px, calc(100% - var(--col) + 60px))); } /* the page panel stays beside the list whatever width was saved */
/* The page panel's left edge can be dragged; the width is remembered in this browser. */
.work { position: relative; }
.evid-grip { position: absolute; top: 0; bottom: 0; left: calc(var(--col) + 56px - 5px); width: 10px; cursor: col-resize; z-index: 6; display: none; }
.work.ev .evid-grip { display: block; }
.evid-grip::after { content: ""; position: sticky; top: calc(50dvh - 20px); display: block; margin: calc(50dvh - 20px) auto 0; width: 4px; height: 40px; border-radius: 2px; background: var(--line-2); opacity: 0; transition: opacity .15s; }
.evid-grip:hover::after, .work.resizing .evid-grip::after { opacity: 1; }
.work.resizing, .work.resizing * { transition: none !important; user-select: none; cursor: col-resize; }
.work:not(.ev) .evid { border-left-width: 0; } /* closed panel takes no width at all, so nothing overflows sideways */
.main { container-type: inline-size; width: 100%; max-width: 1016px; min-width: 0; transition: max-width var(--t) var(--ease), padding var(--t) var(--ease); }
.work.ev .main { max-width: calc(var(--col) + 56px); padding-left: 28px; padding-right: 28px; margin-inline: auto; }
@media (max-width: 1180px) and (min-width: 721px) {
  .work.ev { grid-template-columns: minmax(0, calc(var(--col) + 40px)) minmax(340px, 1fr); }
  .work.ev .main { max-width: calc(var(--col) + 40px); padding-left: 20px; padding-right: 20px; }
  .evid-grip { left: calc(var(--col) + 40px - 5px); }
}

.cards { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 16px; }
.bal { display: flex; flex-direction: column; }
.bal .in { padding: 0 24px 18px; }
.bal .head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 32px; }
.bal .head:not(:has(.pills > :not([hidden]))) { min-height: 0; }
.bal .head:not(:has(.pills > :not([hidden]))) .crumbs { min-height: 22px; }
.bal .head:has(> .crumbs:empty):not(:has(.pills > :not([hidden]))) { display: none; }
.crumbs { display: flex; align-items: center; gap: 6px; min-height: 32px; font-size: 15px; line-height: 22px; color: var(--ink-3); } /* Small grey label over the big number (Mercury). 19 px was tried and competed with the title and the number. */
.crumbs:empty { display: none; }
.crumbs a { color: var(--ink-3); cursor: pointer; }
.crumbs a:hover { color: var(--accent); }
.crumbs b { font-weight: 400; color: var(--ink); }
.crumbs i { font-style: normal; color: var(--ink-4); }
.crumbs .back { width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--fill); color: var(--ink-3); cursor: pointer; font-size: 14px; line-height: 22px; padding: 0; margin-left: 4px; }
.crumbs .back:hover { background: var(--fill-2); color: var(--ink); }
.lvl1 .bal .head .pills { display: none; }
.bal .head { width: min(564px, 100%); } /* Same column as the chart and the table, so "+ Add statement" ends on their right edge. */
.bal .head .pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.bal .head:has(> .crumbs:empty) .pills { justify-content: flex-start; }
.bal .head .pill { padding: 0 12px; font-size: 14px; }
.headline { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 2px; width: min(564px, 100%); }
.headline .num { transition: opacity .12s; min-height: 55px; } /* "No statement" takes the same minimum height as a figure, so the chart never shifts for it */
.bal:not(:has(.chart:not([hidden]))) .headline .num { min-height: 0; line-height: 36px; margin-top: 6px; }
.headline .num:has(> .hero-trigger) { min-height: 0; line-height: 27px; margin-top: 8px; }
.num:has(.fig-part) { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 28px; }
.num .fig-part { display: inline-flex; align-items: baseline; white-space: nowrap; }
.warn:empty { display: none; } /* nothing to say takes no room */
.warn { margin-top: 16px; max-width: 564px; font-size: 14px; line-height: 20px; color: var(--ink-2); display: flex; gap: 8px; align-items: flex-start; }
.warn svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.warn .link { border: 0; padding: 0; background: none; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* Chart: each bar is one calendar month, the counted bills spread over their days (the Higg FDM figures). The bar
   is one shape: the bills inside it show only when one is chosen, where its share of each month it touches darkens. */
.chart { --gap: min(12px, 2.128cqw); display: flex; gap: var(--gap); height: 172px; margin-top: 20px; align-items: stretch; width: min(564px, 100%); } /* 36 px bars and 12 px gaps at full width; both shrink together in a narrow column. cqw: the chart is as wide as the page column (min 564). */
.m { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.m .stack { width: 100%; max-width: 36px; margin: 0 auto; }
.stack { display: flex; flex-direction: column-reverse; align-items: stretch; }
/* The bar is painted once, as one shape: its pieces are transparent unless chosen or estimated, so no seam can show
   between them. */
.bar { display: flex; flex-direction: column-reverse; background: #c3c9f6; border-radius: 4px 4px 2px 2px; overflow: hidden; transition: background .2s, opacity .2s; }
.seg { height: var(--h); }
.stack, .chart .none, .ml { cursor: pointer; }
.chart .m:not(.sel):has(.ml:hover, .stack:hover) .stack { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); border-radius: 5px 5px 3px 3px; }
.chart:has(.m.sel) .m:not(.sel) .bar { opacity: .35; }
.chart .m.sel .bar { opacity: 1; background: var(--accent); }
.chart .m.sel .none:not(.cap) { box-shadow: inset 0 0 0 1.5px var(--accent); }
/* Days with no bill: a whole month, or a hatched cap on top of the counted days, sized at the account's usual daily use. */
.chart .none { height: 72px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line-2); background: repeating-linear-gradient(135deg, var(--line) 0 3px, transparent 3px 7px); position: relative; }
.chart .none.cap { height: var(--h); border-radius: 4px 4px 0 0; margin-bottom: 2px; }
.chart .none:hover, .chart .m:not(.sel):has(.ml:hover) .none:not(.cap) { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
/* Month labels share Overview's pill hover and bold selected state. */
.ml { margin: 6px 2px 0; padding: 3px 0 5px; border-radius: 6px; position: relative; transition: background .15s, color .15s; font-size: 13px; line-height: 18px; color: var(--ink-3); text-align: center; white-space: nowrap; overflow: hidden; }
.chart .m:not(.sel):has(.stack:hover, .none:hover) .ml, .chart .m:not(.sel) .ml:hover { background: var(--fill); color: var(--ink); }
.chart .m.sel .ml { background: transparent; color: var(--ink); font-weight: 700; }


/* The table is as wide as the chart above it (564 px), so the page has one column edge. Columns fit their content:
   period, then kWh right-aligned, then the statement number; 32 px between columns. No avatars: every row is EVN, which the line under the title already says. */
table.list { width: min(564px, 100%); }
.list-scroll { width: min(578px, 100%); padding-right: 14px; max-height: 292px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.elec-list-head { width: min(680px, 100%); align-items: center; }
.elec-list-head .pill, .source-list-head .pill { padding: 0 12px; font-size: 14px; }
.source-list-head { width: min(564px, 100%); align-items: center; }
.list-scroll.elec-list-scroll { width: min(694px, 100%); }
.list-scroll > table.list, #diesel .list-scroll > table.list { width: 100%; }
.list-scroll thead th { position: sticky; top: 0; z-index: 1; background: #fff; border-bottom: 0; box-shadow: inset 0 -1px 0 var(--line); }
.list .nw { white-space: nowrap; }
/* In a narrow column the account ID and statement number give way cleanly so nothing overflows sideways. */
@container (max-width: 600px) {
  .elec-list th:nth-child(4), .elec-list td:nth-child(4) { display: none; }
}
@container (max-width: 420px) {
  .list th:nth-child(3), .list td:nth-child(3) { display: none; }
  .list th:nth-child(2), .list td:nth-child(2) { padding-right: 0; }
  .list th:first-child, .list td:first-child { padding-right: 20px; }
  .list td:first-child { white-space: normal; line-height: 20px; }
  .list td .tag { display: flex; width: max-content; margin: 2px 0 0; } /* a tag takes its own line under the period */
}
.list th, .list td { padding: 0 24px 0 0; }
.list th { padding-top: 6px; padding-bottom: 6px; }
/* A little room at both edges, so a selected row's highlight never touches its text (Long, 22 Nov 2026). */
.list th:last-child, .list td:last-child { padding-right: 10px; }
.list th:first-child, .list td:first-child { padding-left: 10px; width: 100%; }
.list tr.row td:first-child { padding-left: 10px; }
.list td.p { font-size: 15px; }
.list td .tag { margin-left: 10px; }
.list tr.gone { display: none; }
#rows tr.sel:has(+ .bill-allocation) td { border-bottom-color: transparent; }
#rows tr.sel:has(~ .bill-allocation.current-month) td, #rows tr.sel:has(~ .bill-allocation.current-month):hover td { background: none; }
#rows tr.bill-allocation { cursor: pointer; }
#rows tr.bill-allocation.note { cursor: default; }
#rows tr.bill-allocation td { height: 32px; padding-top: 4px; padding-bottom: 4px; border-bottom-color: transparent; font-size: 14px; line-height: 21px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
#rows tr.bill-allocation td:first-child { padding-left: 24px; }
#rows tr.bill-allocation.last td { border-bottom-color: var(--line); }
#rows tr.bill-allocation strong, #rows tr.bill-allocation td.r b { font-weight: 500; }
#rows tr.bill-allocation td:first-child .dim { margin-left: 16px; }
#rows tr.bill-allocation.current-month td:nth-child(1),
#rows tr.bill-allocation.current-month td:nth-child(2) { background: var(--accent-wash); color: var(--ink); }
#rows tr.bill-allocation.current-month td:nth-child(1) { border-radius: 6px 0 0 6px; }
#rows tr.bill-allocation.current-month td:nth-child(2) { border-radius: 0 6px 6px 0; }
#rows tr.bill-allocation.current-month td .dim { color: var(--ink-2); }
#rows tr.bill-allocation.note td { height: auto; padding-top: 2px; white-space: normal; color: var(--ink-3); }
#bill-kwh { white-space: normal; }
.list .more td { height: 44px; color: var(--accent); cursor: pointer; }
.list .more td:hover { text-decoration: underline; text-underline-offset: 2px; }

/* Evidence pane: opens beside the list and takes the room the sidebar and identity card gave up. */
.evid { position: sticky; top: 52px; height: calc(100dvh - 52px); border-left: 1px solid var(--line); background: #f4f4f7; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); overflow: hidden; min-width: 0; }
.eh { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px 0; background: #fff; min-width: 0; }
.evid > .eh:has(+ #file-viewer) { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
/* Files: the values read from the open page, one group per record, above the page; it scrolls on its own when a page
   holds many records (a stock card, a fill log), so the page itself keeps its room. */
.evid > .file-reads { background: #fff; border-bottom: 1px solid var(--line); max-height: 40dvh; overflow: auto; padding-bottom: 12px; }
.file-read-t { padding: 14px 20px 0; font-size: 14px; line-height: 20px; color: var(--ink-3); overflow-wrap: anywhere; }
.file-read .figs { padding-top: 8px; }
.evid > .file-reads + #file-viewer { grid-row: 4; }
.eh > div:first-child { min-width: 0; }
.eh .t { font-size: 15px; overflow-wrap: anywhere; }
.eh .s { font-size: 14px; line-height: 20px; color: var(--ink-3); overflow-wrap: anywhere; }
.eh .grow { flex: 1; }
.eh .nav2 { display: flex; gap: 4px; flex: none; }
.eh .iconb { flex: none; }
.iconb { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--fill); color: var(--ink-2); cursor: pointer; display: grid; place-items: center; font-size: 15px; }
.iconb:hover { background: var(--fill-2); }
.figs { display: flex; gap: 8px; padding: 14px 20px 0; background: #fff; }
.fig { all: unset; box-sizing: border-box; display: grid; gap: 4px; padding: 9px 12px 11px; border-radius: 12px; background: #fff; box-shadow: var(--card-shadow); cursor: pointer; flex: 1 1 0; min-width: 0; transition: box-shadow .15s; }
.fig small { font-size: 13px; line-height: 18px; color: var(--ink-3); }
.fig b { font-weight: 400; font-size: 17px; line-height: 24px; color: var(--ink); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fig:hover { box-shadow: 0 0 0 1px var(--line-2), var(--card-shadow); }
.fig.on { box-shadow: 0 0 0 2px var(--accent), var(--card-shadow); }
.line { margin: 0; padding: 12px 20px 14px; background: #fff; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 20px; color: var(--ink-2); display: flex; gap: 8px; align-items: flex-start; }
.line svg { width: 16px; height: 16px; color: var(--green); flex: none; margin-top: 2px; }
.line.held { color: #5c3a00; }
.line b { font-weight: 600; }
.evidence-action { display: block; border: 0; padding: 0; margin-top: 6px; background: none; color: var(--accent); cursor: pointer; }
.evidence-action:hover { text-decoration: underline; }
.line.held svg { color: var(--amber); }
.eh .s a.doc { color: var(--accent); }
.eh .s a.doc:hover { text-decoration: underline; }
/* The shared page viewer (viewer.js): the same zoom, pinch and whole-page toggle for every original in the app. */
.viewer { position: relative; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr); background: #f4f4f7; }
.viewer > .escroll { min-height: 0; outline: none; cursor: zoom-out; }
.viewer.whole > .escroll { cursor: zoom-in; }
.viewer > .escroll:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.viewer .paper { opacity: 0; }
.zoombar { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 2px; padding: 3px; border-radius: 9999px; background: #fff; box-shadow: var(--card-shadow); }
/* Stronger than the form panel's own button style (forms.css), so the bar looks the same wherever a page shows. */
.viewer .zoombar button[data-z] { display: grid; place-items: center; width: 28px; height: 28px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer; }
.viewer .zoombar button[data-z]:hover { background: var(--fill); color: var(--ink); }
.viewer .zoombar svg { width: 16px; height: 16px; }
.figure-parts { position: absolute; inset: 8px auto auto 12px; max-width: calc(100% - 24px); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; padding: 4px 8px; border-radius: 8px; background: #fff; box-shadow: var(--card-shadow); font-size: 12px; }
.figure-parts select { max-width: 100%; font: inherit; }
.escroll { overflow: auto; position: relative; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%), linear-gradient(to bottom, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%); -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%), linear-gradient(to bottom, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%); mask-composite: intersect; }
.paper { position: relative; margin: 16px auto 32px; background: #fff; border-radius: 4px; box-shadow: var(--card-shadow); overflow: hidden; transition: opacity .14s; transform-origin: 0 0; will-change: transform; }
.paper img { display: block; width: 100%; }
.paper .mark { position: absolute; background: rgba(255, 205, 41, .14); box-shadow: inset 0 0 0 1px rgba(204, 146, 0, .35); border-radius: 2px; transition: background .15s, box-shadow .15s; }
.paper .mark.hot { background: rgba(82, 102, 235, .18); box-shadow: inset 0 0 0 2px var(--accent); }
.paper .mark.on { background: var(--mark); box-shadow: inset 0 0 0 2px var(--mark-line); }
/* A mark on a word's own corners is a highlighter wash: no outline over the text, multiplied into the paper. */
.paper .mark.quad { box-shadow: none; border-radius: 0; background: rgba(255, 214, 64, .34); mix-blend-mode: multiply; transition: opacity .2s, background .15s; }
.paper .mark.quad.on { background: rgba(255, 205, 41, .5); box-shadow: none; }
.paper .mark.quad.doubt { background: rgba(255, 168, 0, .48); }
.paper .mark.quad.hot { background: rgba(82, 102, 235, .22); }
.paper .mark.quiet { opacity: 0; }
.paper .mark.quiet.hot { opacity: 1; }
.paper .mark:not(.quiet) { cursor: zoom-in; }
.paper .mark.quiet { pointer-events: none; }
.viewer.focused .mark:not(.on) { opacity: 0; pointer-events: none; }
.viewer.focused .mark.on.hot { background: var(--mark); box-shadow: inset 0 0 0 2px var(--mark-line); }
.viewer.focused .mark.quad.on.hot { background: rgba(255, 205, 41, .5); box-shadow: none; }
.letter { max-width: 520px; margin: 20px auto; background: #fff; border-radius: 16px; box-shadow: var(--card-shadow); padding: 22px 26px; color: var(--ink-2); }
.letter .meta { display: grid; grid-template-columns: 70px 1fr; gap: 4px 12px; font-size: 14px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.letter .meta b { font-weight: 400; color: var(--ink); }
.letter p + p { margin-top: 12px; }


.figs { gap: 8px 28px; padding: 16px 20px 0; flex-wrap: wrap; }
.evid .figs .fig { box-shadow: none; padding: 0 0 8px; border-radius: 0; flex: 0 1 auto; }
.evid .figs button.fig { border-bottom: 2px solid var(--line-2); }
.evid .figs button.fig:disabled { cursor: default; border-color: transparent; }
.evid .figs button.fig:not(:disabled):hover, .evid .figs .fig.on { border-color: var(--accent); }
.evid .figs button.fig:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.evid .figs .fig.on b { color: var(--accent); }


.bal { background: none; box-shadow: none; border-radius: 0; }
.bal .in { padding: 0 0 18px; }

@media (max-width: 720px) {
  .app, .app:is(.compact, .side-collapsed) { grid-template-columns: minmax(0, 1fr); }
  .app .side { display: none; }
  .top .inner, .app.compact .top .inner { padding-inline: 16px; gap: 12px; }
  .main { padding-inline: 16px; }
  .work.ev { grid-template-columns: minmax(0, 1fr); }
  .work.ev .main, .work:not(.ev) .evid { display: none; }
  .work.ev .evid { border-left: 0; height: calc(100dvh - 52px); }
  .evid .line { padding-inline: 16px; }
}

/* Keyboard focus on charts and the bill list: one visible ring, the same accent as selection. */
.chart [tabindex]:focus-visible, .ov .yh button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
#rows tr.row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.chart [tabindex]:focus:not(:focus-visible), .ov .yh button:focus:not(:focus-visible), #rows tr.row:focus:not(:focus-visible) { outline: none; }

/* An estimated share keeps the counted colour, with light stripes so it never reads as a measured figure. */
.seg.estseg { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .55) 0 3px, transparent 3px 7px); }
.line.estimate { color: var(--ink-2); }
.line.estimate svg { color: var(--accent); }

.chart-figure { margin: 0; width: min(564px, 100%); }
.chart-figure .chart { width: calc(100% + 16px); margin: 14px -8px 0; padding: 8px 8px 4px; height: 184px; border-radius: 10px; transition: background .15s var(--ease), box-shadow .15s var(--ease); }
.chart-note { margin: 8px 0 0; text-align: center; font-size: 15px; line-height: 22px; color: var(--ink-3); }
.chart-note:empty { display: none; }
.chart-note-trigger { position: relative; display: inline-flex; align-items: center; cursor: default; transition: color .15s var(--ease); }
.chart-note-trigger:hover, .chart-note-trigger:focus-visible { color: var(--ink); outline: none; }
.chart-note-trigger .title-popover { display: none; }
.chart-figure:has(.chart-note-trigger:hover, .chart-note-trigger:focus-visible) .chart { background: rgba(112, 115, 147, .06); box-shadow: inset 0 0 0 1px var(--line-2); }
.outside-section { margin: 24px 0 0; width: min(578px, 100%); }
.outside-section > summary { cursor: pointer; font-size: 14px; line-height: 20px; color: var(--ink-3); padding: 6px 0; user-select: none; }
.outside-section > summary:hover { color: var(--ink); }
.outside-section > .list-scroll, .outside-section > table.list { margin-top: 6px; }
#diesel table.list { width: min(564px, 100%); } /* One column edge, as on electricity. Lists show what a line is, its quantity and the number printed on it; the original opens beside, so no file names. */
#diesel .list th:first-child, #diesel .list td:first-child { width: auto; }
#diesel .list td:nth-child(2) { width: 100%; } /* what the line is takes the room; dates and quantities keep their width and never wrap */
/* Energy overview: one row per source; the state says what is left, and an unconfirmed source can be settled in place. */
#diesel table.summary td:first-child a { color: var(--accent); }
.state.ok { color: var(--green); }
.state.open { color: var(--amber); }
#diesel table.summary td:nth-child(3) { white-space: nowrap; } /* a state is a word or two */
#diesel table.summary td:first-child { white-space: normal; padding-top: 14px; padding-bottom: 14px; }
#diesel table.summary td:first-child a { white-space: nowrap; }
#diesel table.summary .why { display: block; font-size: 13px; line-height: 18px; color: var(--ink-3); margin-top: 2px; }

/* Stored fuel as a reconciliation statement (fuel.js): opening + deliveries − closing = used, then where it went.
   Every line with an original opens it in the evidence panel; an amber line is a problem and opens what settles it. */
.stmt { margin-top: 8px; width: min(564px, 100%); }
.stmt .r { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 16px; padding: 10px 8px; border-radius: 8px; cursor: pointer; outline: none; }
.stmt .r:hover { background: rgba(112, 115, 147, .05); }
.stmt .r:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.stmt .r.sel, .stmt .r.sel:hover { background: var(--accent-wash); }
.stmt .r.still { cursor: default; }
.stmt .r.still:hover { background: none; }
.stmt .r span { color: var(--ink-3); font-size: 14px; margin-left: 8px; }
.stmt .r .note { display: block; margin: 3px 0 0; font-size: 14px; line-height: 20px; color: var(--ink-3); }
.stmt .r a.stmt-act { margin-left: 8px; font-size: 14px; color: var(--accent); text-decoration: none; }
.stmt .r a.stmt-act:hover { text-decoration: underline; text-underline-offset: 2px; }
/* The default (grey) pill: the issue at the top of the page and its highlight already point here. */
.stmt .r button.stmt-act { height: 28px; padding: 0 12px; margin-left: 10px; font: 400 14px/1 Inter, system-ui, sans-serif; vertical-align: 1px; }
.stmt .r b { font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stmt .r.open > div, .stmt .r.open b { color: var(--amber); }
.eh .nav2 { align-items: center; font-size: 13px; color: var(--ink-3); }
.eh .nav2 .count { min-width: 32px; text-align: center; }
.line .dim { color: var(--ink-3); }

/* Folder intake on the energy overview: a drop target and the outcome of the last batch. */
.card.bal.dropping { outline: 2px dashed var(--accent); outline-offset: 4px; }
.intake { margin: 18px 0 8px; }
.intake h2 { font-size: 16px; margin: 0 0 8px; }
.intake-counts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.intake-count { background: var(--fill); border-radius: 9999px; padding: 3px 12px; font-size: 14px; }
.intake-count.failed, .intake-count.unsupported { background: #fdecea; color: #8a1c12; }
.intake details { border-top: 1px solid var(--line, #e5e7eb); padding: 6px 0; }
.intake summary { cursor: pointer; font-size: 14px; }
.intake ul { list-style: none; margin: 6px 0; padding: 0; max-height: 280px; overflow: auto; }
.intake li { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; padding: 2px 0; }

/* The energy overview (overview.js): the year's one page. The answer and the one next step first; then each source
   as a row of twelve months and the figure Higg FEM takes; a row opens in place; a record opens beside, and a
   doubtful one is checked there. One column, measured from its content (design.md rule 12). */
.ov .answer { font-size: 32px; line-height: 40px; font-weight: 360; letter-spacing: -.02em; margin: 0; transition: color .4s; }
.ov .ov-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 8px; max-width: 680px; }
.ov .ov-row:has(.say:empty):has(.go:empty) { display: none; }
.ov .ov-row .say { margin: 0; max-width: 564px; color: var(--ink-2); font-size: 14px; line-height: 21px; }
.ov .say { margin: 6px 0 0; max-width: 564px; color: var(--ink-2); font-size: 14px; line-height: 21px; }
.ov .go { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ov .go:empty { display: none; }
.ov .ov-extra, .files .files-extra { margin-top: 12px; max-width: 564px; display: grid; gap: 8px; }
.ov .ov-extra:empty { display: none; }
.files .files-fold > summary { cursor: pointer; font-size: 14px; line-height: 20px; color: var(--ink-3); user-select: none; }
.files .files-fold > summary:hover { color: var(--ink); }
.files .files-fold ul { list-style: none; margin: 6px 0 0; padding: 0; max-height: 200px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.files .files-fold li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 5px 2px; font-size: 14px; line-height: 20px; }
.files .files-fold li .text-button { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-align: left; }
.files .files-fold li .text-button:hover { text-decoration: underline; }
.files .files-fold li .dim { color: var(--ink-3); text-align: right; }
.pill.dark { background: var(--accent); color: #fff; }
.pill.dark:hover { background: #3849c4; }
.pill.dark kbd { font: 500 11px/16px Inter, system-ui; color: rgba(255,255,255,.75); margin-left: 4px; }
.ov .fade { transition: opacity .18s; }
.ov .fade.out { opacity: 0; }
.ov-locked { display: grid; gap: 12px; justify-items: start; max-width: 600px; letter-spacing: normal; } /* not the overview's tighter display spacing */
/* The page's status sentence: body size, like Report review's summary and the Utility account button (15.5/24). */
.ov-locked-say { margin: 0; font-size: 15.5px; line-height: 24px; font-weight: 400; color: var(--ink-2); }
.inline-nav-ref { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px 1px 7px; margin: 0 2px; border-radius: 7px; background: var(--fill); color: var(--ink); font-size: 15.5px; line-height: 24px; font-weight: 500; text-decoration: none; vertical-align: baseline; transition: background .12s, color .12s; }
.inline-nav-ref svg { width: 15px; height: 15px; flex: none; color: var(--ink-3); transition: color .12s; }
.inline-nav-ref:hover { background: var(--accent-wash); color: var(--accent); }
.inline-nav-ref:hover svg { color: var(--accent); }
.ov [data-answer-box]:has([data-answer]:empty):has(.say:empty):has(.go:empty):has(.ov-extra:empty) { display: none; }
.ov .year, .ov .bal .head { width: min(680px, 100%); }
.ov .year { margin-top: 26px; --name: 172px; --mfig: 126px; --fig: 150px; }
.ov [data-answer-box]:has([data-answer]:empty):has(.say:empty):has(.go:empty):has(.ov-extra:empty) ~ .year { margin-top: 6px; }
.ov .year.scoped, .ov:has(.year.scoped) .bal .head { width: min(var(--scoped-w, 788px), 100%); }
.ov .year { container: year / inline-size; overflow-x: auto; }

.ov .yr { display: grid; grid-template-columns: var(--name) repeat(12, minmax(16px, 1fr)); align-items: end; }
.ov .year.scoped .yr { grid-template-columns: var(--name) repeat(12, minmax(16px, 1fr)) var(--mfig); }
.ov .year:not(.scoped) [data-mfig-head], .ov .year:not(.scoped) .mfig { display: none; }
.ov .yh { font-size: 13px; color: var(--ink-3); height: 26px; align-items: center; }
.ov .yh button { all: unset; cursor: pointer; text-align: center; border-radius: 6px; line-height: 22px; transition: background .15s, color .15s; white-space: nowrap; overflow: hidden; min-width: 0; }
.ov .yh .m-num { display: none; }
.ov .year.compact-months .yh .m-full { display: none; }
.ov .year.compact-months .yh .m-num { display: inline; }
.ov .year.tight-months .yh { font-size: 11.5px; }
.ov .year.wrap-names .src .name-copy { white-space: normal; line-height: 17px; overflow: visible; text-overflow: clip; }
.ov .yh button:hover { background: var(--fill); color: var(--ink); }
.ov .yh button.on { background: transparent; color: var(--ink); font-weight: 700; }
.ov .yh .r { text-align: right; padding-right: 10px; }
.ov .src { border-top: 1px solid var(--line); }
/* A source not used this year: its row stays in its place, greyed, with no chart; it opens the source's page. */
.ov .src.is-unused > .yr { color: var(--ink-4); text-decoration: none; }
.ov .src.is-unused .name { opacity: .72; } /* as greyed in the sidebar */
.ov .src.is-unused .name > svg, .ov .src.is-unused .name small { color: inherit; }
.ov .src.is-unused > .yr:hover .name { opacity: 1; }
.ov .src > .yr { min-height: 58px; padding: 0; cursor: pointer; border-radius: 8px; transition: background .15s; }
.ov .src > .yr:hover:not(:has(.cell:hover)) { background: rgba(112, 115, 147, .04); }
.ov .src.open:not(.scoped) > .yr, .ov .src.open:not(.scoped) > .yr:hover { background: var(--accent-wash); }
.ov .src .name { display: flex; align-items: center; gap: 8px; align-self: center; padding: 4px 12px 4px 10px; font-size: 15px; line-height: 20px; min-width: 0; }
.ov .src .name > svg { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
.ov .src .name-copy { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ov .src .name small { display: block; font-size: 13px; color: var(--ink-3); }
.ov .src .fig { all: unset; align-self: center; text-align: right; padding: 4px 10px 4px 0; font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; border-radius: 6px; }
.ov .src .fig small { color: var(--ink-3); font-size: 13px; margin-left: 3px; }
.ov .src .fig em { display: block; font-style: normal; font-size: 13px; color: var(--ink-3); line-height: 18px; }
.ov .src .fig.warn b, .ov .src .fig.warn em .w { color: var(--amber); }
.ov .src .fig em span { display: block; white-space: nowrap; }
.ov .src .fig.ask { cursor: default; font-size: 14px; }
.ov .src .fig b { overflow: visible; } /* the panel's .fig b may cut long text; a figure for Higg FEM is never cut */
.ov .src .fig.ask b { font-size: 14px; line-height: 20px; }
.ov .src .mfig { align-self: center; text-align: right; padding: 4px 10px 4px 0; font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ov .src .mfig b { font-weight: 400; font-size: 17px; line-height: 24px; color: var(--ink); letter-spacing: -.01em; }
.ov .src .mfig small { color: var(--ink-3); font-size: 13px; margin-left: 3px; }
.ov .src .mfig em { display: block; font-style: normal; font-size: 13px; color: var(--ink-3); line-height: 18px; }
.ov .src .mfig em span { display: block; white-space: nowrap; }
/* Bars keep the electricity chart's proportion (36 px bars, 12 px gaps): a bar is three quarters of its month. */
.ov .cell { position: relative; align-self: stretch; display: flex; align-items: flex-end; justify-content: center; padding: 5px 0 13px; cursor: pointer; }
.ov .cell:not(.cur):not(.miss):hover .bar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.ov .bar { width: 75%; border-radius: 3px 3px 1px 1px; background: #c5cbf6; transition: height .45s var(--ease), background .2s, opacity .2s, box-shadow .15s; min-height: 2px; }
.ov .cell.miss .bar { height: 40px !important; background: repeating-linear-gradient(135deg, transparent 0 3px, rgba(112,115,147,.22) 3px 4px); box-shadow: inset 0 0 0 1px rgba(112,115,147,.18); }
.ov .cell.miss:not(.cur):hover .bar { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.ov .src.scoped .cell .bar { opacity: .35; }
.ov .src.scoped .cell.cur:not(.miss) .bar { opacity: 1; background: var(--accent); }
.ov .src.scoped .cell.miss.cur .bar { opacity: 1; box-shadow: inset 0 0 0 1.5px var(--accent); }
.source-state { width: min(564px, 100%); margin-top: 6px; }
.source-state-note { margin: 0; font-size: 15px; line-height: 22px; color: var(--ink-2); overflow-wrap: anywhere; }
.source-state-note .dim { color: var(--ink-3); }
.source-state-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
/* A source opens in place; what is below makes room. */
.ov .more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .34s var(--ease); }
.ov .src.open .more { grid-template-rows: 1fr; }
.ov .more > div { overflow: hidden; }
.ov .inside { padding: 6px 0 22px; }
#diesel .ov .inside .list-scroll { width: 100%; padding-right: 14px; max-height: 230px; margin-top: 10px; } /* the overview's column, not a source screen's 564 px */
#diesel .ov .src.scoped .inside .list-scroll { width: 100%; }
#diesel .ov .inside .list { width: 100%; margin-top: 0; }
.ov .inside .list td { height: 42px; font-size: 14px; }
.ov .inside .list td:nth-child(2) { width: 100%; }
.ov .inside .list tr.doubt td.r { color: var(--amber); }
.ov .inside > .say { padding: 0 10px; }
.ov .inside-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 12px 10px 0; }
.ov .inside .to { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; color: var(--accent); text-decoration: none; }
.ov .inside .to:hover { text-decoration: underline; text-underline-offset: 2px; }
.ov .inside-unused { border: 0; background: none; padding: 0; font: inherit; font-size: 14px; color: var(--ink-3); cursor: pointer; }
.ov .inside-unused:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.ov .inside-unused:disabled { opacity: .4; cursor: not-allowed; color: var(--ink-3); text-decoration: none; }
.ov .inside .to svg, .with-icon svg { width: 15px; height: 15px; flex: none; }
.with-icon { display: inline-flex; align-items: center; gap: 5px; }
.ov .intake-line { margin: 10px 0 0; font-size: 14px; color: var(--ink-3); }
.ov .intake-line:empty { display: none; }
/* The record beside: the evidence panel, plus one decision when the reader was unsure. */
.evid .fig input { all: unset; width: 100%; font-size: 17px; line-height: 24px; color: var(--ink); border-bottom: 1.5px solid var(--mark-line); }
.evid .fig input::placeholder { color: var(--amber); font-size: 14px; }
.evid .verdict { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.evid .verdict .why { flex: 1 0 100%; display: flex; gap: 8px; }
.evid .verdict .why input { flex: 1; font: inherit; font-size: 14px; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px; }
.evid .checks { margin: 6px 0 0; font-size: 14px; color: #5c3a00; }
/* The last decision and its undo, in place (overview.js, showDone). */
.just { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.just:empty { display: none; }
.ov .just { margin-top: 10px; }
.evid .just { padding: 10px 20px; background: var(--fill); }
.just button { border: 0; background: none; padding: 0; margin-left: 6px; color: var(--accent); font: inherit; cursor: pointer; }

/* When the overview column narrows, sizeColumns() switches month headers to 1..12 and sizes --name from real text width.
   Container queries only tighten secondary typography — never shrink --name below the measured label width. */
@container year (max-width: 760px) {
  .ov .year.scoped .src .name { font-size: 14px; }
  .ov .year.scoped .src .name small { display: none; }
  .ov .year.scoped .src .fig, .ov .year.scoped .src .mfig { font-size: 14px; }
  .ov .year.scoped .src .fig b, .ov .year.scoped .src .mfig b { font-size: 15px; }
}
@container year (max-width: 640px) {
  .ov .src .name { font-size: 14px; }
  .ov .src .name small { display: none; }
  .ov .src .fig { font-size: 14px; }
}
@container year (max-width: 610px) {
  .ov .src .name { padding: 4px 8px; font-size: 13px; }
  .ov .year.scoped .src .fig,
  .ov .year.scoped .src .mfig { font-size: 13px; }
  .ov .year.scoped .src .fig b,
  .ov .year.scoped .src .mfig b { font-size: 14px; }
  .ov .year.scoped .yh { font-size: 12px; }
}

/* The Higg FEM entry & checklist beside the overview: flat, typographic, zero box-in-box clutter. */
.evid:has(.fem-panel), .evid:has(.checklist-panel) { display: flex; flex-direction: column; background: #fff; min-width: 0; overflow: hidden; }
.evid:has(.fem-panel) .eh, .evid:has(.checklist-panel) .eh { padding: 18px 24px 12px; align-items: center; }
.evid:has(.fem-panel) .eh .t, .evid:has(.checklist-panel) .eh .t { font-size: 15px; font-weight: 500; }
.checklist-panel { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 24px 32px; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; min-width: 0; }
.checklist-item { padding: 14px 0; min-width: 0; }
.checklist-item + .checklist-item { border-top: 1px solid var(--line); }
.checklist-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.checklist-title { font-size: 15px; line-height: 22px; font-weight: 500; color: var(--ink); }
.checklist-title svg { color: var(--ink-3); }
.checklist-link { border: 0; background: none; padding: 0; font: inherit; font-size: 14px; line-height: 20px; color: var(--accent); cursor: pointer; text-decoration: none; white-space: nowrap; }
.checklist-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.checklist-link:disabled { opacity: .4; cursor: not-allowed; color: var(--ink-3); text-decoration: none; }
.checklist-note { margin: 5px 0 0; font-size: 14px; line-height: 21px; color: var(--ink-2); }
.checklist-notes { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.fem-panel { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px 24px 32px; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 18px; min-width: 0; }
.fem-panel > * { min-width: 0; }
.fem-warn { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0 14px; border-bottom: 1px solid var(--line); color: var(--amber); font-size: 14px; line-height: 20px; }
.fem-warn svg { width: 16px; height: 16px; color: var(--amber); flex: none; margin-top: 2px; }
.fem-warn .pill { margin-top: 10px; }
.fem-warn-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; line-height: 20px; }
.fem-open-link { display: inline-flex; margin-top: 10px; }
.fem-group + .fem-group { padding-top: 20px; border-top: 1px solid var(--line); }
.fem-kicker { font-size: 13px; font-weight: 500; letter-spacing: .01em; color: var(--ink-3); margin-bottom: 4px; }
.fem-hero { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fem-num { font-size: 36px; line-height: 44px; font-weight: 340; letter-spacing: -.025em; color: var(--ink); font-variant-numeric: tabular-nums; }
.fem-num small { font-size: 20px; font-weight: 360; letter-spacing: -.01em; color: var(--ink-3); margin-left: 5px; }
.fem-hero .pill.copied, .fem-panel .text-button.copied { color: var(--green); }
.fem-specs { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.fem-spec-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 2px 0; font-size: 14px; line-height: 21px; min-width: 0; }
.fem-spec-row > span { color: var(--ink-3); font-size: 14px; white-space: nowrap; flex: none; }
.fem-spec-row > b { font-weight: 400; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.fem-panel .text-button { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: 14px; text-decoration: none; }
.fem-panel .text-button:hover { text-decoration: underline; text-underline-offset: 2px; }
.fem-comment { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); min-width: 0; }
.fem-comment-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.fem-comment-head > span { font-size: 13px; color: var(--ink-3); }
.fem-comment p { font-size: 14px; line-height: 21px; color: var(--ink-2); overflow-wrap: anywhere; }
.fem-empty { padding: 8px 0; font-size: 14px; line-height: 21px; color: var(--ink-2); }
.fem-empty .pill { margin-top: 12px; }
.fem-tools { border-top: 1px solid var(--line); padding-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.fem-fdm > summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ink); user-select: none; }
.fem-fdm > summary:hover { color: var(--accent); }
.fem-fdm-body { margin-top: 10px; padding-bottom: 12px; overflow-x: auto; }
.fem-fdm-body .fdm { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.fem-fdm-body .fdm td { padding: 6px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fem-fdm-body .fdm tr:last-child td { border-bottom: 0; }
.fem-fdm-body .fdm td.r { text-align: right; padding-left: 16px; }
.fem-fdm-acts { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; }
.fem-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.fem-footer a.pill { text-decoration: none; }

/* Tài liệu (files.js): every file honestly classified, multi-facet filtering, visible-order sort. */
.files .bal .in { padding: 0 0 8px; }
.files .bal .head { width: 100%; min-height: 32px; }
.files .answer { font-size: 32px; line-height: 40px; font-weight: 360; letter-spacing: -.02em; margin: 0; color: var(--amber); }
.answer-link { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; }
.answer-link:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }
.files .say { margin: 6px 0 0; max-width: 680px; color: var(--ink-2); font-size: 14px; line-height: 21px; }
.files .intake-line { margin: 10px 0 0; font-size: 14px; color: var(--ink-3); }
.files .intake-line:empty { display: none; }
.files-bar { margin: 12px 0 0; display: grid; gap: 10px; }
.files-strip-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; }
.files-status-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.files-status-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9999px; background: #fff; color: var(--ink-3); font-size: 13px; cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.files-status-pill:hover { background: var(--fill); color: var(--ink); }
.files-status-pill.is-warn { border-color: var(--amber-line); color: var(--amber); }
.files-status-pill.on { background: var(--accent-wash); border-color: var(--accent); color: var(--accent); font-weight: 500; }
.files-status-pill.on:hover { background: rgba(70, 89, 219, .14); color: var(--accent); }
.files-status-pill.is-warn.on { background: var(--amber-wash); border-color: var(--amber); color: var(--amber); font-weight: 500; }
.files-status-pill.is-warn.on:hover { background: rgba(255, 186, 51, .22); color: var(--amber); }
.files-status-num { font-variant-numeric: tabular-nums; opacity: .78; }
.files-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.files-search { position: relative; flex: 1 1 240px; min-width: 180px; }
.files-search svg { position: absolute; left: 11px; top: 10px; width: 15px; height: 15px; color: var(--ink-3); pointer-events: none; }
.files-search input { width: 100%; height: 36px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 12px 0 34px; font: inherit; font-size: 14px; background: #fff; outline: 0; transition: border-color .12s, box-shadow .12s; }
.files-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.files-filter-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; color: var(--ink-2); font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.files-filter-btn:hover { background: var(--fill); color: var(--ink); }
.files-filter-btn.on { border-color: var(--accent); color: var(--accent); background: var(--accent-wash); }
.files-filter-btn svg { width: 15px; height: 15px; }
.files-pop-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.evid:has(.files-filter-panel) { display: flex; flex-direction: column; background: #fff; }
.files-filter-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; background: #fff; }
.files-filter-panel > .eh { padding: 18px 24px 10px; align-items: center; }
.files-filter-panel > .eh .t { font-size: 19px; line-height: 26px; font-weight: 500; letter-spacing: -.01em; color: var(--ink); }
.files-filter-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 24px 24px; display: grid; align-content: start; gap: 22px; }
.files-filter-group { display: grid; gap: 8px; }
.files-pop-label { font-size: 13px; font-weight: 500; color: var(--ink-3); letter-spacing: .01em; }
.files-pop-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.files-pop-pill { min-height: 30px; padding: 4px 11px; border: 1px solid var(--line-2); border-radius: 7px; background: #fff; color: var(--ink-2); font-size: 13.5px; line-height: 19px; text-align: left; overflow-wrap: anywhere; cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.files-pop-pill:hover { background: var(--fill); color: var(--ink); }
.files-pop-pill.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }
.files-filter-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--line); background: #fff; }
.files-filter-acts { display: flex; align-items: center; gap: 14px; }
.files-filter-foot .text-button { border: 0; background: none; padding: 0; color: var(--ink-3); font-size: 14px; cursor: pointer; }
.files-filter-foot .text-button:hover:not(:disabled) { color: var(--ink); text-decoration: underline; }
.files-filter-foot .text-button:disabled { opacity: .4; cursor: default; }
.files-count { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.files-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.files-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border: 0; border-radius: 6px; background: var(--fill); color: var(--ink-2); font-size: 13px; cursor: pointer; }
.files-chip:hover { background: var(--fill-2); color: var(--ink); }
.files-clear-all { border: 0; background: none; padding: 0 4px; color: var(--accent); font-size: 13px; cursor: pointer; }
.files-clear-all:hover { text-decoration: underline; }
.files-table-wrap { margin-top: 10px; }
.files-scroll { width: 100%; }
#diesel .files table.files-table { width: 100%; }
#diesel .files .files-table th { padding: 8px 10px; font-size: 13px; color: var(--ink-3); border-bottom: 1px solid var(--line); white-space: nowrap; width: auto; }
#diesel .files .files-table th.sorted { color: var(--ink); font-weight: 500; }
.files-table .sort-btn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.files-table .sort-btn:hover { color: var(--ink); }
.files-table .sort-arrow { font-size: 11px; opacity: .4; }
.files-table th.sorted .sort-arrow { opacity: 1; }
#diesel .files .files-table td { height: auto; padding: 10px; border-bottom: 1px solid var(--line); line-height: 20px; font-size: 14px; vertical-align: middle; white-space: normal; width: auto; }
#diesel .files .files-table .col-file { width: 46%; }
#diesel .files .files-table .col-src { white-space: nowrap; }
#diesel .files .files-table .col-mon { white-space: nowrap; font-variant-numeric: tabular-nums; }
#diesel .files .files-table .col-out { text-align: right; }
.file-name-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.file-name { font-weight: 450; color: var(--ink); overflow-wrap: anywhere; }
.file-ext { flex: none; font-size: 11px; line-height: 16px; color: var(--ink-4); letter-spacing: .03em; }
.file-path { font-size: 13px; line-height: 18px; color: var(--ink-3); margin-top: 1px; }
.files .list td.w { color: var(--amber); font-weight: 450; }
.files-empty { padding: 36px 16px; text-align: center; color: var(--ink-3); font-size: 14px; display: grid; gap: 8px; justify-items: center; }
.files-empty .text-button { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font-size: 14px; }
.files-empty .text-button:hover { text-decoration: underline; }
.files-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 10px 4px; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.files-pager-nav { display: flex; align-items: center; gap: 10px; }
.files-pager-nav .pill { height: 30px; padding: 0 12px; font-size: 13px; }
.files-pager-nav .pill:disabled { opacity: .4; cursor: default; pointer-events: none; }
.files-pager-page { min-width: 44px; text-align: center; color: var(--ink-2); }
@container (max-width: 580px) {
  #diesel .files .files-table .col-mon { display: none; }
}
@container (max-width: 460px) {
  #diesel .files .files-table .col-src { display: none; }
}
.evid .used { margin: 0; padding-left: 18px; }
.evid .file-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 10px; }
.evid .file-acts .evidence-action, .evid .file-acts .text-button { margin: 0; border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: 14px; text-decoration: none; }
.evid .file-acts .pill { height: 30px; padding: 0 12px; font-size: 14px; }
.evid .file-hist-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; line-height: 18px; }
.evid .file-hist-item strong { font-weight: 500; color: var(--ink-2); }
.evid .file-hist-note { color: var(--ink-3); }
.evid .file-hist-item small { margin-left: auto; font-size: 12px; color: var(--ink-4); font-variant-numeric: tabular-nums; white-space: nowrap; }
.evid .pad { padding: 20px; }
/* Switch report modal */
.switch-filter { margin-bottom: 12px; }
.report-choices { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-height: 55vh; overflow-y: auto; }
.report-choice { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; color: var(--ink); transition: background .12s; }
.report-choice + .report-choice { border-top: 1px solid var(--line); }
.report-choice:hover { background: var(--page); }
.report-choice.on { background: var(--accent-wash); }
.report-choice.loading { opacity: .6; pointer-events: none; }
.report-choice-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--fill); color: var(--ink-3); display: grid; place-items: center; flex: none; }
.report-choice-icon svg { width: 16px; height: 16px; }
.report-choice.on .report-choice-icon { background: rgba(70, 89, 219, .14); color: var(--accent); }
.report-choice-body { flex: 1; min-width: 0; }
.report-choice strong { display: block; font-weight: 500; font-size: 15px; line-height: 21px; overflow-wrap: anywhere; }
.report-choice small { display: block; font-size: 13px; line-height: 18px; color: var(--ink-3); }
.report-badge { flex: none; font-size: 13px; line-height: 20px; padding: 2px 9px; border-radius: 9999px; background: rgba(70, 89, 219, .12); color: var(--accent); font-weight: 500; white-space: nowrap; }
.report-arrow { flex: none; font-size: 14px; color: var(--ink-4); opacity: 0; transition: opacity .12s, transform .12s; }
.report-choice:hover .report-arrow { opacity: 1; transform: translateX(2px); }
.switch-empty { margin: 0; padding: 16px; font-size: 14px; color: var(--ink-3); }
.switch-footer { display: flex; justify-content: flex-start; margin-top: 14px; }
/* A report's name is the factory's own words: it wraps to a second line rather than losing its end. */
.app:not(.compact):not(.side-collapsed) .side .org { height: auto; min-height: 36px; padding-block: 6px; white-space: normal; }
.app:not(.compact):not(.side-collapsed) .side .org-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
#rows td[colspan] { text-align: left; }
.work.sized .evid-grip { left: auto; right: calc(clamp(340px, var(--evid-w), max(340px, calc(100% - var(--col) + 60px))) - 5px); }
.evid .fem-empty .pill { margin-top: 12px; }
.viewer:is(.whole, .focused) .escroll { -webkit-mask-image: none; mask-image: none; }
.viewer.whole .paper { margin-block: 16px; }
.viewer.focused .paper { margin: 0; }
.page-view-error { margin: 16px; color: var(--amber); }
.new-report { width: min(27rem, calc(100% - 32px)); padding: 22px 24px 24px; color: var(--ink); background: #fff; border: 0; border-radius: 16px; box-shadow: var(--float-shadow); }
.new-report::backdrop { background: rgba(20, 20, 36, .35); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.dialog-head h2 { margin: 0; font-size: 19px; line-height: 26px; font-weight: 500; }
.dialog-head .nav2 { margin-left: auto; display: flex; align-items: center; gap: 4px; flex: none; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dialog-head .nav2 .count { min-width: 32px; text-align: center; }
.dialog-head .nav2 .iconb:disabled { opacity: .35; cursor: default; pointer-events: none; }
.dialog-note { margin: 0 0 14px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.new-report label { display: grid; gap: 6px; margin-bottom: 14px; }
.new-report label > span { font-size: 14px; line-height: 20px; color: var(--ink-3); }
.new-report input { width: 100%; height: 38px; font: inherit; font-size: 15px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; outline: 0; background: #fff; transition: border-color .12s, box-shadow .12s; }
.new-report input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.new-report [role=alert] { margin: 0 0 12px; font-size: 14px; color: var(--amber); }
.new-report .pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.new-report .pills button:disabled { opacity: .45; cursor: not-allowed; }
.dialog-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--ink-4); font-size: 13px; }
.dialog-or::before, .dialog-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.dialog-import { display: flex; flex-wrap: wrap; gap: 8px; }
.evid .fig select { max-width: 100%; font: inherit; }
.evid:has(> .viewer) { display: flex; flex-direction: column; }
.evid > .viewer { flex: 1; min-height: 100px; }
.evid:has(> .viewer) > :is(.line, .figs) { max-height: 30%; overflow: auto; }
.evid .figs:has([data-field], .fig:nth-child(5)) { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(145px, 100%), 1fr)); }
.evid-grip:focus-visible::after { opacity: 1; background: var(--accent); }
.mobile-nav { display: none; }
@media (max-width: 720px) {
  .mobile-nav { display: block; margin: 8px 16px 0; max-width: calc(100% - 32px); font: inherit; }
  .app.compact .mobile-nav { display: none; }
  .work.ev.sized { grid-template-columns: minmax(0, 1fr); }
  .work.ev .evid-grip { display: none; }
  .ov .yr { min-width: 520px; }
  .ov .year.scoped .yr { min-width: 632px; }
  .ov:has(.yr) { overflow-x: auto; }
}

/* U6: Drag-and-drop empty state */
.drop-empty { margin-top: 12px; width: min(564px, 100%); padding: 16px 20px; border: 1px dashed var(--line-2); border-radius: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.drop-empty.dropping, .ov .card.bal.dropping .drop-empty { border-color: var(--accent); background: var(--accent-wash); }
.drop-empty .drop-hint { flex: 1 1 220px; font-size: 14px; line-height: 20px; color: var(--ink-3); }

/* Auth login card, sidebar account footer, settings account/members, & overview sign-off */
.pill:disabled, .nav.side-act:disabled, .stmt .r button.stmt-act:disabled { opacity: .45; cursor: not-allowed; }
.ov .src .fig.ask button:disabled, .evidence-action:disabled, .evid .file-acts .text-button:disabled { opacity: .4; cursor: not-allowed; color: var(--ink-3); text-decoration: none; }
.ov .src .name small { overflow: hidden; text-overflow: ellipsis; }
.new-report select { width: 100%; height: 38px; font: inherit; font-size: 15px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; color: var(--ink); outline: 0; }
.new-report select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }

body.is-auth { background: var(--page); }
body.is-auth #startup { max-width: none; margin: 0; padding: 24px 16px 40px; min-height: 100dvh; display: grid; place-items: center; }
.auth-shell { width: min(432px, 100%); }
.auth-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding: 0 4px; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-3); padding: 4px 8px; margin-left: -8px; border-radius: 9999px; transition: background .12s, color .12s; }
.auth-back:hover { background: var(--fill); color: var(--ink); }
.auth-topbar .language { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); padding: 4px 8px; border-radius: 9999px; transition: background .12s, color .12s; }
.auth-topbar .language:hover { background: var(--fill); color: var(--ink); }
.auth-card { width: 100%; padding: 26px 26px 22px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--card-shadow); }
.auth-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.auth-brand { display: flex; align-items: center; gap: 9px; }
.auth-brand .logo { width: 26px; height: 26px; border-radius: 7px; display: inline-grid; place-items: center; flex: none; overflow: hidden; }
.auth-brand .logo svg { width: 100%; height: 100%; display: block; }
.auth-wordmark { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.auth-card h1 { margin: 0 0 4px; font-size: 22px; line-height: 28px; font-weight: 500; letter-spacing: -.015em; }
.auth-card p { margin: 0 0 16px; color: var(--ink-3); font-size: 14px; line-height: 20px; }
.auth-card .auth-sub { margin-bottom: 18px; }
.auth-card label { display: block; margin-bottom: 12px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.auth-card input { display: block; width: 100%; height: 42px; margin-top: 5px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; font-weight: 400; color: var(--ink); outline: 0; transition: border-color .12s, box-shadow .12s; }
.auth-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.auth-card input.is-invalid { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192, 57, 43, .12); }
.auth-pw-wrap { position: relative; display: block; margin-top: 5px; }
.auth-pw-wrap input { margin-top: 0; padding-right: 44px; }
.auth-pw-toggle { position: absolute; right: 1px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: inline-grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--ink-3); cursor: pointer; transition: background .12s, color .12s; }
.auth-pw-toggle:hover { background: var(--fill); color: var(--ink); }
.auth-pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.auth-submit { width: 100%; justify-content: center; height: 42px; margin-top: 4px; font-weight: 500; }
.auth-card [role="alert"] { color: #8a1c12; background: #fdecea; border: 1px solid rgba(192, 57, 43, .22); border-radius: 8px; padding: 9px 12px; font-size: 13.5px; line-height: 19px; margin: 2px 0 12px; }
.auth-card .auth-note { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; margin: 0 0 16px; border-radius: 9px; background: var(--amber-wash); border: 1px solid var(--amber-line); color: var(--amber); font-size: 13.5px; line-height: 19px; }
.auth-note-icon { flex: none; margin-top: 2px; }
.auth-demo { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.auth-demo-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.auth-demo-head h2 { margin: 0; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-3); }
.auth-demo-head span { font-size: 12px; color: var(--ink-4); }
.demo-list { display: grid; gap: 6px; }
.demo-acct { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 50px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--page); text-align: left; cursor: pointer; transition: border-color .12s, background .12s; }
.demo-acct:hover { border-color: var(--line-2); background: #fff; }
.demo-acct:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.demo-acct:disabled { opacity: .6; cursor: wait; }
.demo-acct.is-loading { border-color: var(--accent); background: var(--accent-wash); }
.demo-acct-main { display: grid; gap: 1px; min-width: 0; }
.demo-acct-role { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; line-height: 18px; color: var(--ink); }
.demo-acct-role strong { font-weight: 500; }
.demo-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.demo-dot.is-green { background: var(--green); }
.demo-dot.is-accent { background: var(--accent); }
.demo-dot.is-muted { background: var(--ink-4); }
.demo-acct-scope { font-size: 12px; line-height: 16px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-acct-go { display: inline-flex; align-items: center; gap: 5px; flex: none; font-size: 12px; color: var(--ink-3); }
.demo-acct-go code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; padding: 2px 6px; border-radius: 6px; background: var(--fill); color: var(--ink-2); }
.demo-acct:hover .demo-acct-go { color: var(--accent); }
.auth-demo .auth-demo-note { margin: 10px 0 0; font-size: 12px; line-height: 17px; color: var(--ink-4); }
@media (max-width: 420px) {
  .auth-card { padding: 20px 18px 18px; }
  .demo-acct { gap: 8px; padding: 8px 9px; }
  .demo-acct-go code { font-size: 11px; padding: 2px 5px; }
}

.top-identity { display: inline-flex; align-items: center; gap: 10px; flex: none; min-width: 0; }
.top-company { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 8px 0 4px; border-radius: 9999px; color: var(--ink); font-size: 14px; text-decoration: none; max-width: 196px; transition: background .12s; }
.top-company:hover, .top-company[aria-current="page"] { background: var(--fill); }
.top-company-name { font-weight: 500; color: var(--ink); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.top-identity-sep { width: 1px; height: 16px; background: var(--line); flex: none; }
.company-mark { width: 24px; height: 24px; border-radius: 6px; display: inline-grid; place-items: center; flex: none; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; overflow: hidden; }
.company-mark.has-img { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.company-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.company-mark.is-lg { width: 40px; height: 40px; border-radius: 10px; font-size: 16px; }
.avatar.has-img { background: #fff; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.is-lg { width: 40px; height: 40px; margin-right: 0; font-size: 15px; font-weight: 600; background: var(--accent-wash); color: var(--accent); }
.member-cell { display: flex; align-items: center; gap: 10px; }
.member-cell .avatar { margin-right: 0; flex: none; font-size: 11px; font-weight: 600; background: var(--accent-wash); color: var(--accent); }
.logo-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.logo-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.top-account { position: relative; flex: none; }
.top-account-btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 8px 0 4px; border: 0; border-radius: 9999px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; max-width: 180px; transition: background .12s; }
.top-account-btn:hover, .top-account-btn[aria-expanded="true"], .top-account-btn.is-current { background: var(--fill); }
.top-account-btn .avatar { width: 24px; height: 24px; margin-right: 0; flex: none; font-size: 11px; font-weight: 600; background: var(--accent-wash); color: var(--accent); }
.top-account-name { color: var(--ink-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.top-account-caret { width: 12px; height: 12px; flex: none; color: var(--ink-3); }
.top-account-menu { position: absolute; right: 0; top: calc(100% + 6px); width: max-content; min-width: 232px; max-width: 300px; background: #fff; border-radius: 14px; box-shadow: var(--float-shadow); padding: 6px; z-index: 45; display: grid; gap: 2px; }
.top-account-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; min-width: 0; }
.top-account-head .avatar { margin-right: 0; flex: none; background: var(--accent-wash); color: var(--accent); font-size: 12px; font-weight: 600; }
.top-account-head-copy { min-width: 0; display: grid; gap: 1px; }
.top-account-head strong { font-size: 14px; line-height: 19px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-account-head small { font-size: 12.5px; line-height: 17px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-account-item { display: flex; align-items: center; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; text-decoration: none; }
.top-account-item:hover { background: var(--fill); }
.top-account-item.is-danger { color: #8a1c12; }
.top-account-item.is-danger:hover { background: #fdecea; }
@media (max-width: 960px) {
  .top-account-name { display: none; }
}
@media (max-width: 560px) {
  .top-company-name { display: none; }
}

.settings-stack { margin-top: 16px; }
.settings-stack-block { flex-direction: column; align-items: stretch; gap: 10px; }
.account-inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 440px; }
.account-inline-form input { flex: 1 1 220px; height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; font: inherit; font-size: 14px; outline: 0; }
.account-inline-form input:focus, .account-pw-form input:focus, .member-filters input:focus, .member-filters select:focus, .approval-return-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.account-pw-fold summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--accent); user-select: none; }
.account-pw-form { display: grid; gap: 10px; margin-top: 12px; max-width: 380px; }
.account-pw-form label { display: grid; gap: 4px; font-size: 13px; color: var(--ink-3); }
.account-pw-form input { height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; font: inherit; font-size: 14px; color: var(--ink); outline: 0; }
.report-settings-form { display: grid; gap: 16px; max-width: 440px; }
.report-settings-form > label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink); }
.report-settings-form > label > input { height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; font: 400 14px/20px Inter, system-ui, sans-serif; color: var(--ink); background: #fff; outline: 0; transition: border-color .12s, box-shadow .12s; }
.report-settings-form > label > input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.report-settings-form .report-year-field > input { width: 120px; }
.account-pw-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 2px; }
.account-status { margin: 0; font-size: 13px; line-height: 19px; color: var(--green); }
.account-status:empty { display: none; }
.account-status.is-error { color: #8a1c12; }

.member-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.member-head h2 { font-size: 16px; line-height: 22px; font-weight: 500; color: var(--ink); }
.member-head .say { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); }
.member-op { margin-bottom: 10px; }
.member-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.member-filters input { flex: 1 1 200px; height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; font: inherit; font-size: 14px; outline: 0; }
.member-filters select { height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; outline: 0; }
.member-table-wrap { overflow-x: auto; }
#diesel table.list.member-list { width: 100%; }
.member-list th, .member-list td { padding: 8px 16px 8px 0; }
.member-list th:first-child, .member-list td:first-child { width: auto; padding-left: 0; }
.member-list th:last-child, .member-list td:last-child { padding-right: 0; }
/* The action column is as wide as its Edit buttons; "You" sits centred under them, as the same 32px row. */
.member-list th:last-child, .member-list td:last-child { width: 1%; text-align: center; }
.member-you { display: inline-flex; align-items: center; height: 32px; font-size: 15px; color: var(--ink-3); }
/* On a phone each member is two short lines: who (name, username), then role and access lined up under the name, with
   Edit beside both. Four columns never fit 390px: the Access column fell off the edge and names broke after every word. */
@media (max-width: 640px) {
  .member-list thead { display: none; }
  /* Role and access flow as one line under the name and wrap together; the action sits in a fixed-width
     slot on the right, so "You" centres under Edit on every row. */
  .member-list tr { --member-act: 60px; position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 10px calc(var(--member-act) + 12px) 10px 38px; border-bottom: 1px solid var(--line); }
  :lang(vi) .member-list tr { --member-act: 104px; }
  .member-list tbody tr:last-child { border-bottom: 0; }
  #diesel table.list.member-list td { display: block; height: auto; padding: 0; border: 0; white-space: normal; width: auto; text-align: left; }
  #diesel table.list.member-list td:nth-child(1) { flex: 1 0 100%; margin-left: -38px; }
  #diesel table.list.member-list td:nth-child(2) { font-size: 13.5px; color: var(--ink-2); }
  #diesel table.list.member-list td:nth-child(3) { white-space: nowrap; }
  #diesel table.list.member-list td:nth-child(4) { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: var(--member-act); text-align: center; }
  .member-cell strong { overflow-wrap: anywhere; }
}
.member-list td { height: 50px; font-size: 14px; }
.member-list tbody tr:last-child td { border-bottom: 0; }
.member-sub { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 400; }
.member-state { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 9999px; font-size: 12.5px; }
.member-state.is-active { background: rgba(3, 110, 67, .09); color: var(--green); }
.member-state.is-inactive { background: var(--amber-wash); color: var(--amber); }
.member-pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 12px; font-size: 13px; }
.member-history { margin-top: 16px; }
.member-history summary { cursor: pointer; font-size: 14px; color: var(--ink-3); user-select: none; }
.member-history summary:hover { color: var(--ink); }
.member-history-list { list-style: none; margin: 8px 0 0; padding: 0; }
.member-history-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; font-size: 13.5px; }
.member-history-list li small { white-space: nowrap; flex: none; }

.approval-state { font-weight: 500; color: var(--ink-2); }
.approval-state.is-approved { color: var(--green); }
.approval-state.is-submitted, .approval-state.is-returned, .approval-state.is-changed { color: var(--amber); }
.approval-return-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.approval-return-form input { flex: 1 1 240px; height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; font: inherit; font-size: 14px; outline: 0; }
.approval-history summary { cursor: pointer; font-size: 13px; color: var(--ink-3); user-select: none; }
.approval-history summary:hover { color: var(--ink); }
.approval-history ul { list-style: none; margin: 6px 0 0; padding: 0; }
.approval-history li { padding: 5px 0; font-size: 13px; color: var(--ink-2); }
.approval-history li p { margin: 2px 0 0; color: var(--ink-3); }

.empty-workspace .card.bal { max-width: 680px; }
.empty-workspace .empty-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ro-note { margin: 8px 0 0; font-size: 13px; color: var(--ink-3); }

/* Report review, and the same issues at the top of each section (issues.js). Flat rows on white, like the rest:
   an amber mark, what is wrong in one line, why in a quieter second line; the whole row is the link. */
.issues-host { margin-top: 16px; }
.issues-note { margin: 0 0 8px; font-size: 14px; line-height: 20px; color: var(--ink-3); }
/* Pages still being read: a small turning ring beside each "still reading" line, and beside Files in the sidebar. */
.reading-spin, .is-reading .side .nav[data-nav="files"]::after { box-sizing: border-box; flex: none; width: 13px; height: 13px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: reading-spin .9s linear infinite; }
.reading-spin { display: inline-block; margin-right: 7px; vertical-align: -1px; }
.is-reading .side .nav[data-nav="files"]::after { content: ""; margin-left: auto; }
.is-reading .app:is(.compact, .side-collapsed) .side .nav[data-nav="files"] { position: relative; }
.is-reading .app:is(.compact, .side-collapsed) .side .nav[data-nav="files"]::after { position: absolute; top: 3px; right: 13px; width: 9px; height: 9px; border-width: 1.5px; }
@keyframes reading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .reading-spin, .is-reading .side .nav[data-nav="files"]::after { animation-duration: 3s; } }
.issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; width: min(680px, 100%); }
.issues li { display: grid; min-width: 0; }
.issue { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 16px minmax(0, 1fr) 16px; gap: 10px; align-items: start; padding: 7px 10px; margin-inline: -10px; border-radius: 8px; cursor: pointer; color: var(--ink); transition: background .12s; }
.issue:hover { background: var(--fill); }
.issue:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.issue-icon { color: var(--amber); padding-top: 3px; }
.issue-icon svg, .issue-go svg { width: 16px; height: 16px; display: block; }
.issue-body { min-width: 0; }
.issue-title { display: block; font-size: 15.5px; line-height: 22px; font-weight: 500; overflow-wrap: anywhere; }
.issue-detail { display: block; margin-top: 1px; font-size: 14px; line-height: 20px; color: var(--ink-3); overflow-wrap: anywhere; }
.issue-go { padding-top: 3px; color: var(--ink-4); opacity: 0; transition: opacity .12s, transform .12s, color .12s; }
.issue:hover .issue-go, .issue:focus-visible .issue-go { opacity: 1; color: var(--accent); transform: translateX(2px); }
.issue-aside { all: unset; justify-self: start; margin: 0 0 6px 26px; font-size: 14px; line-height: 20px; color: var(--accent); cursor: pointer; }
.issue-aside:hover { text-decoration: underline; text-underline-offset: 2px; }
.issue-aside:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.issues-host + .cards { margin-top: 20px; }
.issues-host:not([hidden]) + .section-title, .issues-host:not([hidden]) + [data-early-pending] + .section-title { margin-top: 28px; }

.review-summary { margin: 16px 0 0; font-size: 15.5px; line-height: 24px; color: var(--ink-2); } /* same as .ov-locked-say */
.review-section { width: min(680px, 100%); }
.mock-links { list-style: none; margin: 16px 0 0; padding: 0; width: min(680px, 100%); }
.mock-links li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.mock-links li + li { border-top: 1px solid var(--line); }
.mock-name { margin: 0; font-size: 15.5px; line-height: 22px; font-weight: 500; color: var(--ink); }
.mock-say { margin: 2px 0 0; font-size: 14px; line-height: 22px; color: var(--ink-3); }
/* A finished report: what comes next, one row each: what it is, where it stands, one action. */
.review-finish { width: min(680px, 100%); margin-top: 4px; display: grid; gap: 2px; }
.finish-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; min-height: 40px; }
.finish-label { font-size: 14px; line-height: 20px; color: var(--ink-3); }
.finish-detail { font-size: 14px; line-height: 20px; color: var(--ink-2); min-width: 0; }
.finish-acts { display: flex; gap: 6px; justify-content: flex-end; }
.finish-more { display: grid; gap: 8px; padding-left: 152px; }
.finish-more > :empty, .finish-more:not(:has(> :not(:empty):not([hidden]))) { display: none; }
.finish-more .link-list { margin: 0; }
@media (max-width: 640px) {
  .finish-row { grid-template-columns: minmax(0, 1fr) auto; padding: 4px 0; }
  .finish-label { grid-column: 1 / -1; }
  .finish-more { padding-left: 0; }
}

/* Accounts (account.js): organization switcher, links people receive, verifier links. */
.top-org { position: relative; flex: none; }
button.top-company { border: 0; background: transparent; font: inherit; cursor: pointer; }
.top-org-menu { right: auto; left: 0; }
.top-org-item { height: auto; min-height: 40px; padding: 6px 10px; justify-content: space-between; gap: 12px; }
.top-org-item svg { width: 16px; height: 16px; flex: none; color: var(--accent); }
.top-org-copy { display: grid; gap: 1px; min-width: 0; }
.top-org-copy span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.top-org-copy small { font-size: 12.5px; color: var(--ink-3); }
.top-org-settings { border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; }
.top-view-note { font-size: 13.5px; color: var(--ink-3); white-space: nowrap; }
.settings-block > .pills { display: flex; flex-wrap: wrap; gap: 8px; flex: none; }
.org-list, .link-list { list-style: none; margin: 4px 0 0; padding: 0; width: min(560px, 100%); }
.link-list { width: 100%; }
.org-list li, .link-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; font-size: 14px; line-height: 20px; }
.org-list li + li, .link-list li + li { border-top: 1px solid var(--line); }
.invite-pending { margin-top: 16px; }
.invite-pending h3 { font-size: 14px; font-weight: 500; color: var(--ink-2); margin: 0; }
.link-box { display: flex; gap: 8px; align-items: center; margin: 4px 0 8px; }
.link-box input { flex: 1 1 auto; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; font: inherit; font-size: 13px; color: var(--ink-2); background: var(--fill); outline: 0; }
.link-note { margin-bottom: 8px; }
.reset-block { margin: 4px 0 12px; }
.reset-block .dialog-note { margin: 6px 0 0; }
.share-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.share-form input { flex: 1 1 240px; height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; font: inherit; font-size: 14px; outline: 0; }
.share-form select { height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; font: inherit; font-size: 14px; }
.share-form input:focus, .share-form select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.auth-tabs { display: flex; gap: 4px; padding: 3px; margin: 0 0 14px; border-radius: 9999px; background: var(--fill); }
.auth-tabs button { flex: 1 1 0; height: 30px; border: 0; border-radius: 9999px; background: transparent; color: var(--ink-3); font: inherit; font-size: 13px; cursor: pointer; }
.auth-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.auth-card .auth-note { color: var(--amber); }
.auth-card .auth-foot { margin: 14px 0 0; font-size: 13px; text-wrap: balance; }
.auth-card .pills { display: flex; flex-wrap: wrap; gap: 8px; }
.review-section > .section-title { margin: 28px 0 6px; }
/* A thin line between sections, the same width as the issues; the first section has none. */
.review-section + .review-section { margin-top: 22px; border-top: 1px solid var(--line); }
.review-section + .review-section > .section-title { margin-top: 18px; }
.review-section.is-done > .section-title { margin-bottom: 0; }
/* Name and status share one baseline: icons are centred beside their text but take no part in that baseline, so the
   grey status lines up with the name, not with the bottom of the icon. */
.review-section .review-name { display: inline-flex; align-items: baseline; gap: 8px; color: var(--ink); font-size: inherit; }
.review-section .review-name svg { align-self: center; }
.review-name svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.review-section .review-name:hover, .review-section .review-name:hover svg { color: var(--accent); }
.review-done { display: inline-flex; align-items: baseline; gap: 5px; font-size: 14px; color: var(--green); }
.review-done svg { width: 15px; height: 15px; flex: none; align-self: center; }

/* What an issue is about: a ring with 8px of room inside, around exactly the table, rows, months or line, lit while
   the issue is hovered and flashed when it is opened (drawn by issues.js). It sits over the page and never takes clicks. */
.issue-ring { position: absolute; z-index: 30; pointer-events: none; border-radius: 10px; box-shadow: 0 0 0 2px var(--accent); background: var(--accent-wash); mix-blend-mode: multiply; }
.issue-ring.is-flash { animation: issue-ring 2.4s var(--ease) both; }
@keyframes issue-ring { 0%, 45% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .issue-ring.is-flash { animation-duration: .01s; } }

/* A line the stock balance still needs (a missing count, fuel with no destination): it says so, in amber. */
.stmt .r.missing b { color: var(--amber); font-weight: 500; }
