/* Tax Return Review. FactualIQ palette on light: navy structure, one orange accent, work on white under a warm head band. */
:root {
  --orange: #e36d19; --orange-deep: #a8520e; --orange-tint: #fbe9dc; --orange-line: #f0c9a8;
  --navy: #163554; --navy-dark: #0e1a2b;
  --ink: #1d2733; --ink-2: #4c5866; --line: #d5dae3; --line-soft: #e6e9ef;
  --band: #f4efe6; --surface: #fff; --row: #f8f9fb; --inset: #f6f2ec;
  --good: #23633a; --good-tint: #e3f1e7;
  --blue: #1d4f91; --blue-tint: #e4edf9;
  --warn: #7a5300; --warn-tint: #fbf0d3;
  --bad: #9c2226; --bad-tint: #fbe6e6;
  --neutral: #3f4b59; --neutral-tint: #edf0f4;
  --radius: 6px;
  --sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --serif: "Playfair Display", Georgia, serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 14px/1.45 var(--sans); color: var(--ink); background: var(--surface); }
a { color: var(--navy); }
button, input, select, textarea { font: inherit; color: inherit; }

/* Top bar */
.topbar { height: 52px; display: flex; align-items: center; gap: 28px; padding: 0 24px; background: var(--navy-dark); color: #fff; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; }
.topnav { display: flex; gap: 22px; }
.topnav a { color: #c9d3df; text-decoration: none; font-weight: 500; padding: 15px 0 13px; border-bottom: 3px solid transparent; }
.topnav a.on { color: #fff; border-bottom-color: var(--orange); }
.acct { position: relative; margin-left: auto; }
.acct-who { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--orange); color: #fff; font-weight: 600; cursor: pointer; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 230px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; box-shadow: 0 8px 22px rgba(14,26,43,.14); display: grid; gap: 4px; }
.acct-label { margin: 0; color: var(--ink-2); text-transform: capitalize; font-size: 13px; }
.acct-mail { margin: 0 0 6px; font-weight: 500; }
.acct-item { color: var(--navy); text-decoration: none; font-weight: 500; padding: 4px 0; }
.acct-item:hover { text-decoration: underline; }

/* App mark: one periodic-table cell (oe-contract-manager AppTile), on a dark bar */

/* Head band */
.band { background: var(--band); padding: 18px 24px 0; }
.crumbs { display: flex; gap: 8px; color: var(--ink-2); margin-bottom: 6px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.head { display: flex; align-items: flex-start; gap: 18px; }
.head h1 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 26px; color: var(--navy-dark); line-height: 1.2; }
.head .grow { flex: 1; min-width: 0; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 8px; color: var(--ink-2); }
.facts b { color: var(--ink); font-weight: 600; }
.facts a { font-weight: 600; text-decoration: none; }
.facts a:hover { text-decoration: underline; }
.actions { display: flex; gap: 8px; align-items: center; flex: none; }
.stats { display: flex; gap: 36px; margin: 18px 0 2px; }
.stat .n { font-size: 24px; font-weight: 600; color: var(--navy-dark); font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .l { color: var(--ink-2); }

/* Tabs: a strip of separate underlines, orange on the active one */
.tabs { display: flex; gap: 24px; margin-top: 18px; }
.tab { border: 0; background: none; padding: 8px 0 9px; cursor: pointer; font-weight: 500; color: var(--ink-2); border-bottom: 3px solid #c5ccd6; display: inline-flex; gap: 8px; align-items: baseline; }
.tab.on { color: var(--navy-dark); font-weight: 600; border-bottom-color: var(--orange); }
.tab .ct { font-weight: 400; color: var(--ink); }

/* Buttons */
.btn { height: 34px; padding: 0 14px; border-radius: var(--radius); border: 0; background: var(--navy); color: #fff; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--navy-dark); }
.btn.accent { background: var(--orange-deep); }
.btn.accent:hover { background: #8e450b; }
.btn.ghost { background: var(--surface); color: var(--navy); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--navy); }
.btn.sm { height: 30px; padding: 0 11px; }
.btn:disabled { background: var(--line-soft); color: var(--ink-2); cursor: not-allowed; border: 0; }
.tip { position: relative; display: inline-flex; }
.tip > button:disabled { pointer-events: none; }
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 6px); z-index: 40; background: var(--tipbg, var(--navy-dark)); color: var(--tipfg, #fff); border: 1px solid var(--tipline, transparent); font-weight: 500; padding: 6px 10px; border-radius: 5px; white-space: nowrap; }
.actions [data-tip]:hover::after { left: auto; right: 0; }
select.year { height: 34px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0 10px; font-weight: 600; }

/* Page body */
.page { padding: 20px 24px 60px; }
.section + .section { margin-top: 30px; }
.section h2 { margin: 0 0 10px; font-size: 16px; font-weight: 600; color: var(--navy-dark); display: flex; gap: 10px; align-items: baseline; }
.section h2 .ct { color: var(--ink-2); font-weight: 500; }
.empty { color: var(--ink-2); padding: 14px 0; }

/* Tables: one size throughout, rule under the header only, faint banding */
table.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.grid th { text-align: left; font-weight: 600; color: var(--ink-2); padding: 8px 12px; border-bottom: 1.5px solid var(--navy); white-space: nowrap; }
.grid td { padding: 9px 12px; vertical-align: top; }
.grid tbody tr:nth-child(even of :not(.open-row)) td { background: var(--row); }
.grid .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.grid .nm { font-weight: 600; color: var(--navy); }
.grid .mu { color: var(--ink-2); }
.grid tr.link { cursor: pointer; }
.grid tr.link:hover td { background: var(--orange-tint); }
.grid a.pg { text-decoration: none; font-weight: 500; white-space: nowrap; }
.grid a.pg:hover { text-decoration: underline; }
.grid .act { text-align: right; white-space: nowrap; }
.grid .act .btn + .btn { margin-left: 6px; }

/* Chips: flat tints, small radius */
.chip { --tipbg: var(--neutral-tint); --tipfg: var(--neutral); display: inline-block; font-weight: 600; border-radius: 3px; padding: 1px 7px; white-space: nowrap; background: var(--neutral-tint); color: var(--neutral); }
.chip.good { background: var(--good-tint); color: var(--good); --tipbg: var(--good-tint); --tipfg: var(--good); }
.chip.blue { background: var(--blue-tint); color: var(--blue); --tipbg: var(--blue-tint); --tipfg: var(--blue); }
.chip.warn { background: var(--warn-tint); color: var(--warn); --tipbg: var(--warn-tint); --tipfg: var(--warn); }
.chip.bad { background: var(--bad-tint); color: var(--bad); --tipbg: var(--bad-tint); --tipfg: var(--bad); }
.chip.accent { background: var(--orange-tint); color: var(--orange-deep); --tipbg: var(--orange-tint); --tipfg: var(--orange-deep); }
.chip[data-tip]:hover::after { --tipline: currentColor; }

/* Upload drop */
.drop { border: 1.5px dashed var(--orange-line); background: #fffaf6; border-radius: 8px; padding: 26px 22px; display: flex; align-items: center; gap: 18px; }
.drop.over { border-color: var(--orange); background: var(--orange-tint); }
.drop .big { font-weight: 600; color: var(--navy-dark); font-size: 15px; }
.drop .mu { color: var(--ink-2); }

/* Return view: form list beside the form */
.reader { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.formnav { position: sticky; top: 12px; display: grid; gap: 2px; }
.formnav button { text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 5px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; color: var(--ink); }
.formnav button:hover { background: var(--row); }
.formnav button.on { background: var(--orange-tint); color: var(--navy-dark); font-weight: 600; box-shadow: inset 3px 0 0 var(--orange); }
.formnav .n { color: var(--ink-2); font-weight: 500; }
.formnav .mks { display: inline-flex; align-items: center; gap: 8px; }
.formnav .flag { color: var(--bad); font-weight: 600; }
.discrep, .stat .n.discrep, .tab .ct.discrep, .filter .ct.discrep, .figs dd.discrep, .grid td.discrep { color: var(--bad); font-weight: 600; }
.formhead { display: flex; align-items: baseline; gap: 14px; margin-bottom: 10px; }
.formhead h2 { margin: 0; font-size: 18px; color: var(--navy-dark); }
.formhead .src { color: var(--ink-2); }
.formhead .btn { align-self: center; margin-left: 4px; }
.grid td.flagged, .grid tbody tr:nth-child(even of :not(.open-row)) td.flagged { background: var(--bad-tint); color: var(--bad); font-weight: 600; }
.grid td.ln { width: 56px; color: var(--ink-2); font-weight: 600; }
.grid td.desc { min-width: 260px; }
table.grid.narrow { max-width: 900px; }
.grid th.colh, .grid td.colv { text-align: right; }
.grid td.txt { color: var(--ink); }

/* Open items */
.items tr.open-row > td { background: var(--surface) !important; padding: 0 12px 20px; }
.items tr.on > td { background: var(--orange-tint) !important; }
.items tr.on > td:first-child { box-shadow: inset 3px 0 0 var(--orange); }
.itembody { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; padding-top: 14px; }
.detail { margin: 0 0 12px; font-size: 14px; }
.evidence { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.evidence th { text-align: left; color: var(--ink-2); font-weight: 600; padding: 6px 10px; border-bottom: 1.5px solid var(--navy); }
.evidence td { padding: 7px 10px; }
.evidence tr:nth-child(even) td { background: var(--row); }
.decide { background: var(--inset); border-radius: 8px; padding: 14px 16px; display: grid; gap: 10px; align-content: start; }
.decide .btn.accent { justify-content: flex-start; }
.decide .lbl { font-weight: 600; color: var(--navy-dark); }
.decide .row { display: flex; gap: 8px; flex-wrap: wrap; }
.decide textarea { width: 100%; min-height: 64px; border: 1px solid var(--line); border-radius: 5px; padding: 8px; background: #fff; resize: vertical; }
.decide .res { color: var(--ink); }
.decide .res b { font-weight: 600; }
.thread { display: grid; gap: 12px; margin-top: 10px; }
.msg .who { font-weight: 600; color: var(--navy-dark); display: flex; gap: 10px; align-items: baseline; }
.msg .who .when { font-weight: 400; color: var(--ink-2); }
.msg .txt { white-space: pre-wrap; }
.msg.engine .who { color: var(--orange-deep); }
.compose { display: flex; gap: 8px; align-items: flex-end; }
.compose textarea { flex: 1; width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 5px; padding: 8px; resize: vertical; background: #fff; }
.disc { margin-top: 14px; }

/* Messages */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; gap: 8px; justify-items: end; }
.toast { background: var(--navy-dark); color: #fff; padding: 10px 14px; border-radius: 6px; max-width: 440px; display: flex; gap: 14px; align-items: baseline; animation: rise .18s ease-out; }
.toast.err { background: var(--bad); }
.toast .x { border: 0; background: none; color: #fff; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* Keyboard focus: a visible ring on every control and row */
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.grid tr.link:focus-visible { outline-offset: -2px; }
.grid tr.link:focus-visible td { background: var(--orange-tint); }
/* Confirmation sheet */
dialog.sheet { border: 0; border-radius: 10px; padding: 22px 24px; width: 440px; box-shadow: 0 18px 48px rgba(14,26,43,.24); color: var(--ink); }
dialog.sheet::backdrop { background: rgba(14,26,43,.35); }
dialog.sheet[open] { animation: rise .16s ease-out; }
dialog.sheet h2 { margin: 0 0 14px; font-size: 18px; color: var(--navy-dark); }
dialog.sheet dl { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; margin: 0 0 20px; }
dialog.sheet dt { color: var(--ink-2); }
dialog.sheet dd { margin: 0; font-weight: 600; }
dialog.sheet .row { display: flex; gap: 8px; justify-content: flex-end; }
.btn.danger { background: var(--bad); }
.btn.danger:hover { background: #7f1b1f; }
/* Empty state: what is missing and the next step */
.emptystate { padding: 36px 0; display: grid; gap: 8px; justify-items: start; }
.emptystate .et { font-size: 16px; font-weight: 600; color: var(--navy-dark); }
.emptystate .btn { margin-top: 8px; }

/* Sign-in */
body.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--band); }
.login-panel { width: 380px; background: var(--surface); border-radius: 10px; padding: 34px 32px 30px; box-shadow: 0 10px 30px rgba(14,26,43,.10); text-align: center; }
.brand .mark { width: 24px; height: 28px; flex: none; }
.login-mark .mark { width: 34px; height: 40px; }
.login-panel h1 { margin: 18px 0 0; font-family: var(--serif); font-size: 24px; color: var(--navy-dark); }
.login-brand { margin: 6px 0 0; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; color: var(--orange-deep); font-size: 12px; }
.login-lede { margin: 20px auto 0; max-width: 31ch; color: var(--ink-2); }
.login-form { margin-top: 26px; display: grid; gap: 10px; text-align: left; }
.login-form input { height: 38px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; }
.login-form .btn { justify-content: center; height: 38px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.login-msg { color: var(--ink-2); margin: 0; min-height: 0; }
.login-msg:empty { display: none; }

/* Users */
.user-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.user-add input, .user-add select, .grid select { height: 32px; border: 1px solid var(--line); border-radius: 5px; padding: 0 8px; background: #fff; }

.nw { white-space: nowrap; }
.formhead .src a { text-decoration: none; font-weight: 600; }
.formhead .src a:hover { text-decoration: underline; }
table.grid.parties { table-layout: fixed; }
.grid.parties td.ln { width: 56px; }
.grid.parties th:nth-child(1) { width: 56px; }
.grid.parties th:nth-child(2) { width: 260px; }
.grid.parties td.txt { text-align: right; }
.grid.parties th { white-space: normal; }
.grid .act .btn.sm { height: 26px; margin-top: -3px; margin-bottom: -3px; }
.filters { display: flex; gap: 6px; margin: 0 0 14px; }
.filter { border: 0; background: none; padding: 5px 10px; border-radius: 5px; cursor: pointer; color: var(--ink-2); font-weight: 500; display: inline-flex; gap: 6px; }
.filter:hover { background: var(--row); }
.filter.on { background: var(--orange-tint); color: var(--navy-dark); font-weight: 600; }
.filter .ct { font-weight: 600; color: var(--ink); }
select.inline { border: 0; background: transparent; font-weight: 600; color: var(--ink); padding: 0 2px; cursor: pointer; }
select.inline:hover { background: rgba(22,53,84,.06); border-radius: 4px; }
body.dropping #app { outline: 3px dashed var(--orange); outline-offset: -8px; }

/* Open items: one card per item, its documents inside it */
.cards { display: grid; gap: 16px; }
.card { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 16px 20px 18px; }
.card.on { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.card-head { display: flex; align-items: baseline; gap: 12px; padding-bottom: 12px; }
.card-head h3 { margin: 0; font-size: 16px; color: var(--navy-dark); }
.card-head .grow { flex: 1; }
.figs { display: flex; gap: 28px; margin: 0; }
.figs div { display: flex; gap: 6px; align-items: baseline; }
.figs dt { color: var(--ink-2); }
.figs dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.card .itembody { padding-top: 0; }
.evidence td.num { white-space: nowrap; }
.evidence a.pg { text-decoration: none; font-weight: 600; }
.evidence a.pg:hover { text-decoration: underline; }
.card .decide { align-self: start; }
select.inline { field-sizing: content; }
.empty-card { display: flex; align-items: center; gap: 16px; padding: 22px 20px; }
.empty-card .eg { width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; background: var(--neutral-tint); color: var(--neutral); flex: none; }
.empty-card.clear .eg { background: var(--good-tint); color: var(--good); }
.empty-card .eg svg { width: 24px; height: 24px; }
.empty-card .eb { flex: 1; display: grid; gap: 3px; }
.empty-card h3 { margin: 0; font-size: 16px; color: var(--navy-dark); }
.empty-card .ec { color: var(--ink-2); }
.empty-card .ea { display: flex; gap: 8px; }
.filters .scope { display: inline-flex; align-items: center; gap: 8px; margin-left: 12px; padding-left: 16px; border-left: 1px solid #cfd5de; font-weight: 600; color: var(--navy-dark); }
.page.tinted { background: #ecf0f5; min-height: calc(100vh - 214px); }
.page.tinted .filter:hover { background: #e0e6ee; }

/* Documents in a card open the preview */
.doclink, .pglink { border: 0; background: none; padding: 0; cursor: pointer; color: var(--navy); font: inherit; text-align: left; }
.doclink { display: inline-flex; gap: 7px; align-items: baseline; }
.pglink[data-show-rev]:hover { text-decoration: underline; }
.pglink { font-weight: 600; white-space: nowrap; }
.mk { display: inline-grid; place-items: center; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 3px; background: var(--navy); color: #fff; font-weight: 600; font-size: 9px; line-height: 1; flex: none; align-self: center; }
/* Preview drawer */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(820px, 58vw); z-index: 70; background: var(--surface); box-shadow: -14px 0 40px rgba(14,26,43,.22); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .22s ease-out; }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--band); }
.drawer-head .dt { flex: 1; min-width: 0; }
.drawer-head .dname { font-weight: 600; color: var(--navy-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dmarks { display: flex; gap: 4px; }
.dmarks .mk { border: 0; cursor: pointer; background: #c5ccd6; color: var(--navy-dark); }
.drawer-body { flex: 1; min-height: 0; overflow: auto; background: #e9edf2; padding: 4px 32px 40px; }
.pbox { position: relative; margin: 30px 0 0; background: #fff; box-shadow: 0 2px 10px rgba(14,26,43,.10); }
.pbox canvas { display: block; width: 100%; height: 100%; }
.pbox .pnum { position: absolute; left: 0; top: -22px; color: var(--ink-2); }
.pbox.cited { box-shadow: 0 0 0 2px var(--navy), 0 2px 10px rgba(14,26,43,.10); }
.pmark { position: absolute; border: 2px solid var(--navy); background: rgba(22,53,84,.10); border-radius: 3px; pointer-events: none; }
.ptag { position: absolute; left: -20px; min-width: 14px; height: 14px; padding: 0 3px; display: grid; place-items: center; border-radius: 3px; background: var(--navy); color: #fff; font-weight: 600; font-size: 9px; }
.ptag.page { left: 8px; }
.dmarks .mk { min-width: 22px; height: 22px; padding: 0 6px; font-size: 12px; border-radius: 4px; }

/* One color per marker number, the same on the card, in the preview header and on the PDF */
.c0 { --mc: #a8520e; --mt: rgba(168,82,14,.14); } .c1 { --mc: #163554; --mt: rgba(22,53,84,.12); } .c2 { --mc: #1d6b5a; --mt: rgba(29,107,90,.14); }
.c3 { --mc: #6d3f8f; --mt: rgba(109,63,143,.13); } .c4 { --mc: #1d4f91; --mt: rgba(29,79,145,.13); } .c5 { --mc: #8a2a2a; --mt: rgba(138,42,42,.12); }
.mk[class*=" c"], .ptag[class*=" c"] { background: var(--mc); color: #fff; }
.pmark[class*=" c"] { border-color: var(--mc); background: var(--mt); }
.dmarks .mk[class*=" c"] { opacity: .55; }
.dmarks .mk.on { opacity: 1; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--mc); }
.pmark.on { border-width: 3px; }
.ptag.on { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--mc); }

/* A document row is one target: a faint tone of the primary button on hover, focus and while previewed */
.evidence tr.evrow { cursor: pointer; }
.evidence tr.evrow:hover td, .evidence tr.evrow:focus-visible td { background: #f8eee5; }
.evidence tr.evrow.active td { background: #f3e2d3; }
.evidence tr.evrow:focus-visible { outline: 2px solid var(--orange-deep); outline-offset: -2px; }
/* Column headers: smaller than the body, mid gray, over a faint rule */
.grid th, .evidence th { font-size: 12px; font-weight: 600; color: #5b6775; border-bottom: 1px solid #cfd5de; }

/* Send: one round arrow button right of the text box, in the primary button's color */
.send { flex: none; width: 44px; height: 44px; border-radius: 6px; border: 0; background: var(--orange-deep); color: #fff; display: grid; place-items: center; cursor: pointer; }
.send:hover { background: #8e450b; }
.send svg { width: 18px; height: 18px; }
.send:disabled { background: var(--line); cursor: default; }
.send.busy svg { animation: nudge .8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(3px); } }
/* The tab underlines sit above the band's lower edge, not on it */
.band .tabs { padding-bottom: 14px; }
.funddata .code { font-weight: 600; color: var(--navy); }
.funddata th a { color: inherit; }
/* Fund Data: every section shares one column grid, so Line, Description and the amounts line up down the page */
.funddata table.grid { table-layout: fixed; width: 75%; max-width: none; }
.funddata .grid th:nth-child(1) { width: 64px; }
.funddata .grid th:nth-child(2) { width: auto; }
.funddata .grid th:nth-child(n+3) { width: 150px; }
.funddata .grid td.desc { min-width: 0; }
.funddata .grid td.colv { overflow-wrap: anywhere; }
.funddata .grid th { white-space: normal; overflow-wrap: anywhere; vertical-align: bottom; }
.funddata sup.fn { font-size: 10px; font-weight: 600; margin-left: 2px; }
.funddata .fd-note { color: var(--ink-2); margin: 4px 0 0; }
sup.fn { font-size: 10px; font-weight: 600; margin-left: 2px; }
.src-notes { margin-top: 6px; color: var(--ink-2); }
.src-notes p { margin: 2px 0; }
/* ---------- Change Order Signal design (co.factualiq.ai) ----------
   One cool paper ground with a faint camo cast; ink-camo type and heavy rules; Inter Tight for display;
   square controls; no striped rows. Orange marks where you are; green marks what you act on. */
:root {
  --display: "Inter Tight", "Inter", ui-sans-serif, system-ui, sans-serif;
  --camo: #1d382c; --camo-2: #24463a; --camo-tint: #e8efea;
  --paper: #f2f5f3; --paper-line: #dbe3de; --ink-camo: #14251d; --slate: #5d7486; --issue: #a3262b;
}
body:not(.login-page) { display: flex; flex-direction: column; min-height: 100vh; background: var(--paper); }
#app { flex: 1; display: flex; flex-direction: column; }
#app > .page, body > .page { flex: 1; }
/* Banner name in the display face */
.brand-name { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.brand .mark { width: 28px; height: 32px; }
.topnav a { font-family: var(--display); font-weight: 700; font-size: 15px; }
/* Head band: magazine scale, one big headline over a quiet deck of facts */
.band { background: var(--paper); border-bottom: 0; padding: 26px 40px 0; }
.band .crumbs { margin-bottom: 18px; }
.band .crumbs, .band .crumbs a { color: #5b6862; font-size: 13.5px; }
.band .head { align-items: center; }
.band .head h1 { font-family: var(--display); font-weight: 800; font-size: clamp(32px, 3.3vw, 48px); line-height: 1.02; letter-spacing: -0.025em; color: var(--ink-camo); max-width: 26ch; text-wrap: balance; }
dl.facts { display: flex; flex-wrap: wrap; gap: 8px 36px; margin: 20px 0 0; color: inherit; }
dl.facts dt { font-size: 12px; font-weight: 500; color: #5b6862; }
dl.facts dd { margin: 2px 0 0; font-size: 14.5px; font-weight: 500; color: var(--ink-camo); line-height: 1.35; max-width: 60ch; }
dl.facts dd a { font-weight: 600; color: var(--ink-camo); text-decoration: underline; text-decoration-color: var(--paper-line); text-decoration-thickness: 2px; text-underline-offset: 4px; }
dl.facts dd a:hover { text-decoration-color: var(--ink-camo); }
/* Head figures: display numerals, labels beneath */
.band .stats { display: flex; flex-wrap: wrap; gap: 14px 44px; margin: 22px 0 0; }
.band .stat .n { font-family: var(--display); font-weight: 700; font-size: clamp(24px, 2.2vw, 30px); letter-spacing: -0.025em; line-height: 1; color: var(--ink-camo); }
.band .stat .l { margin-top: 6px; font-size: 13px; font-weight: 500; color: #4f5d56; }
.band .stat .n.discrep { color: var(--issue); }
/* Tabs: no strip; the current tab carries the orange rule */
.band .tabs { margin-top: 22px; }
.tab { border-bottom: 3px solid transparent !important; }
.tab.on { border-bottom: 3px solid var(--orange) !important; color: var(--ink-camo); font-weight: 700; }
.tab:not(.on):hover { border-bottom: 3px solid var(--paper-line) !important; }
.band .tabs .tab .ct { font-weight: 500; }
.tab .ct.discrep { color: var(--issue); }
/* Buttons: square, ink, bold; the main action in camo */
.btn { border-radius: 0; font-family: var(--display); font-weight: 700; letter-spacing: -0.005em; box-shadow: none; }
.btn.accent, .btn.accent:hover { background: var(--camo); border: 2px solid var(--camo); color: #fff; }
.btn.accent:hover { background: var(--ink-camo); border-color: var(--ink-camo); }
.btn.ghost { background: transparent; border: 2px solid var(--ink-camo); color: var(--ink-camo); }
.btn.ghost:hover { background: var(--ink-camo); color: #fff; }
.btn.sm { border-width: 1.5px; }
.btn:disabled, .btn.ghost:disabled { background: transparent; border-color: var(--paper-line); color: #8a9891; }
select.year { height: 34px; border: 2px solid var(--ink-camo); border-radius: 0; background: transparent; font-family: var(--display); font-weight: 700; color: var(--ink-camo); }
/* Page body: the header's paper continues; sections are headings on a heavy rule */
.page, .page.tinted { background: var(--paper); padding: 28px 40px 60px; min-height: 0; }
.section + .section { margin-top: 40px; }
.section h2 { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; color: var(--ink-camo); margin: 0 0 4px; padding-bottom: 10px; border-bottom: 3px solid var(--ink-camo); }
.section h2 .ct { font-family: var(--sans); font-weight: 500; font-size: 15px; color: #5b6862; margin-left: 6px; }
.empty { color: #5b6862; }
/* Tables without rules or stripes: rows separated by space, gray only on hover */
.grid th, .evidence th { font-size: 12.5px; font-weight: 600; color: var(--ink-camo); border-bottom: 0; padding: 12px 12px 6px; background: none; }
.grid td, .evidence td { padding: 8px 12px; font-size: 14px; border: 0; }
.grid tbody tr:first-child td { padding-top: 10px; }
.grid tbody tr td, .grid tbody tr:nth-child(even of :not(.open-row)) td, .evidence tr:nth-child(even) td { background: none; }
.grid tbody tr:hover > td, .grid tr.link:hover td, .grid tr.link:focus-visible td,
.evidence tr.evrow:hover td, .evidence tr.evrow:focus-visible td { background: rgba(29,56,44,.05); }
.evidence tr.evrow.active td { background: rgba(29,56,44,.10); }
.evidence tr.evrow:focus-visible { outline-color: var(--ink-camo); }
.grid th:first-child, .grid td:first-child { padding-left: 0; }
.grid th:last-child, .grid td:last-child { padding-right: 0; }
.grid .nm { color: var(--ink-camo); }
.grid .mk { border-radius: 2px; }
.grid td.flagged, .grid tbody tr:nth-child(even of :not(.open-row)) td.flagged { background: var(--bad-tint); color: var(--issue); }
.grid td.flagged:first-child { padding-left: 12px; }
.grid td.discrep, .discrep { color: var(--issue); }
.grid .chip { background: none; padding: 0; font-weight: 600; }
.funddata .code { color: var(--ink-camo); }
/* Return reader: the form list marks where you are in orange; each form opens on a heavy rule */
.formnav button { border-radius: 0; color: var(--ink-camo); }
.formnav button:hover { background: rgba(29,56,44,.05); }
.formnav button.on { background: none; color: var(--ink-camo); font-weight: 700; box-shadow: inset 3px 0 0 var(--orange); }
.formnav .flag { color: var(--issue); }
.formhead { padding-bottom: 10px; margin-bottom: 4px; border-bottom: 3px solid var(--ink-camo); align-items: center; }
.formhead h2 { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; color: var(--ink-camo); }
.formhead .src, .src-notes, .fd-note { color: #5b6862; }
/* Open items: each item a block under a heavy rule, no box; the selected one carries the orange rule */
.filters { gap: 4px; margin-bottom: 22px; }
.filter { border-radius: 0; font-family: var(--display); font-weight: 700; color: var(--ink-camo); padding: 6px 12px; }
.filter:hover, .page.tinted .filter:hover { background: rgba(29,56,44,.06); }
.filter.on { background: var(--camo); color: #fff; }
.filter.on .ct, .filter.on .ct.discrep { color: #fff; }
.filter .ct.discrep { color: var(--issue); }
.filters .scope { border-left-color: var(--paper-line); color: var(--ink-camo); }
.cards { gap: 0; }
.card { background: none; border: 0; border-top: 3px solid var(--ink-camo); border-radius: 0; padding: 18px 0 34px; box-shadow: none; }
.card.on { border-color: var(--orange); box-shadow: none; }
.card-head { align-items: baseline; flex-wrap: wrap; row-gap: 8px; }
.card-head h3 { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.015em; line-height: 1.2; color: var(--ink-camo); }
.figs { gap: 32px; }
.figs dt { font-size: 13px; color: #4f5d56; }
.figs dd { font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--ink-camo); }
.figs dd.discrep { color: var(--issue); }
.detail { font-size: 15px; line-height: 1.55; color: var(--ink); max-width: 80ch; }
.evidence { background: #fff; }
.evidence th:first-child, .evidence td:first-child { padding-left: 14px; }
.evidence th:last-child, .evidence td:last-child { padding-right: 14px; }
.decide { background: #fff; border-radius: 0; border-left: 4px solid var(--ink-camo); padding: 14px 18px 16px; }
.decide .lbl { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--ink-camo); }
.decide textarea, .compose textarea { border: 2px solid var(--paper-line); border-radius: 0; }
.decide textarea:focus, .compose textarea:focus { outline: none; border-color: var(--ink-camo); }
.thread { background: #fff; border-left: 4px solid var(--ink-camo); padding: 14px 18px; }
.msg .who { color: var(--ink-camo); }
.msg.engine .who { color: var(--camo); }
.send { border-radius: 0; background: var(--camo); }
.send:hover { background: var(--ink-camo); }
.empty-card { background: none; border: 0; border-top: 3px solid var(--ink-camo); border-radius: 0; padding: 18px 0; }
.empty-card .eg { border-radius: 0; }
.empty-card h3 { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--ink-camo); }
.emptystate .et { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; color: var(--ink-camo); }
/* Preview drawer, sheets and messages in the same voice */
.drawer-head { background: var(--paper); }
.drawer-head .dname { font-family: var(--display); font-weight: 700; color: var(--ink-camo); }
dialog.sheet { border-radius: 0; border-top: 4px solid var(--camo); }
dialog.sheet h2 { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.015em; color: var(--ink-camo); }
.btn.danger { border: 2px solid var(--bad); }
.toast { border-radius: 0; background: var(--ink-camo); }
.toast.err { background: var(--bad); }
.acct-menu { border-radius: 0; border-top: 3px solid var(--ink-camo); }
.user-add input, .user-add select, .grid select { border: 2px solid var(--paper-line); border-radius: 0; height: 34px; background: #fff; }
/* Sign-in: paper ground, a white sheet under a heavy ink rule; logo and app name centered over the left-aligned form */
body.login-page { background: var(--paper); }
.login-panel { width: min(400px, calc(100vw - 32px)); background: #fff; border-radius: 0; border-top: 4px solid var(--ink-camo); box-shadow: 0 14px 40px rgba(20,37,29,.10); padding: 30px 32px 32px; text-align: left; }
.login-logo { display: block; width: 150px; height: auto; margin: 0 auto; }
.login-panel h1 { margin: 26px 0 0; font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: -0.035em; color: var(--ink-camo); text-align: center; }
.login-form { margin-top: 28px; gap: 12px; }
.login-form input { height: 44px; border: 2px solid var(--paper-line); border-radius: 0; padding: 0 12px; font-size: 15px; background: #fff; }
.login-form input:focus { outline: none; border-color: var(--ink-camo); }
.login-form .btn { height: 44px; font-size: 15px; }
.login-msg { font-size: 14px; color: #3d4a43; }
@media (max-width: 760px) { .band { padding: 20px 16px 0; } .page, .page.tinted { padding-left: 16px; padding-right: 16px; } .band .head h1 { font-size: 30px; } }
/* Trademark on the app name: small, raised, light */
sup.tm { font-family: var(--sans); font-weight: 500; font-size: .32em; vertical-align: top; position: relative; top: .25em; margin-left: .12em; letter-spacing: 0; }
/* Revised return expected: a flag under the facts, square in the revise color, leading to the items */
.expect { display: flex; align-items: center; gap: 12px; margin: 18px 0 0; font-size: 14.5px; color: var(--ink-camo); }
.expect::before { content: ""; flex: none; width: 12px; height: 12px; background: var(--warn); }
.expect b { font-family: var(--display); font-weight: 700; font-size: 16px; }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--ink-camo); cursor: pointer; text-decoration: underline; text-decoration-color: var(--paper-line); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.linkbtn:hover { text-decoration-color: var(--ink-camo); }
/* Form list heading: the form title's type and rule, level with it */
.navcol { position: sticky; top: 12px; }
.navcol .formnav { position: static; margin-top: 6px; }
.navhead, .formhead { min-height: 43px; }
.navhead { display: flex; align-items: center; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 3px solid var(--ink-camo); }
.navhead h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; color: var(--ink-camo); }
/* Fund Data values open their return at the line; the line is highlighted, not numbered */
.funddata td[data-fd] { cursor: pointer; }
.funddata td[data-fd]:hover, .funddata td[data-fd]:focus-visible { background: rgba(29,56,44,.07); text-decoration: underline; text-decoration-color: var(--ink-camo); text-underline-offset: 3px; }
.funddata td.fd-active { background: rgba(227,109,25,.14) !important; box-shadow: inset 0 -2px 0 var(--orange); }
.pmark.hl { border: 0; background: rgba(227,109,25,.22); border-radius: 0; mix-blend-mode: multiply; }
.pmark.hl.on { border-width: 2px; }
.drawer.plain .pbox.cited { box-shadow: 0 2px 10px rgba(14,26,43,.10); }
/* A table with no section heading above it (Returns, Uploads) carries the heavy rule under its column headings */
.page > table.grid > thead th, .page > .section > table.grid:first-child > thead th { border-bottom: 3px solid var(--ink-camo) !important; padding-bottom: 10px; }
.page > table.grid > tbody > tr:first-child td, .page > .section > table.grid:first-child > tbody > tr:first-child td { padding-top: 14px; }
