/* Collections (phase 10). The same type and colour rules as CheckCall, a look from the AR and billing world: a statement
   of account on paper, a ledger of accounts, the workflow's days as a track, and a desk console for the call.
   Type: Overpass for words, Martian Mono for every number (tabular). Colour carries meaning only: green promised or
   kept, amber needs attention (past due, disputed), red needs a person. Everything else is ink on paper. */
@font-face { font-family: "Overpass"; font-weight: 400; font-display: swap; src: url(/kit/fonts/overpass-400.woff2) format("woff2"); }
@font-face { font-family: "Overpass"; font-weight: 500 600; font-display: swap; src: url(/kit/fonts/overpass-600.woff2) format("woff2"); }
@font-face { font-family: "Overpass"; font-weight: 700 800; font-display: swap; src: url(/kit/fonts/overpass-700.woff2) format("woff2"); }
@font-face { font-family: "Martian Mono"; font-weight: 400 600; font-stretch: 75% 112.5%; font-display: swap; src: url(/kit/fonts/martian-mono-500.woff2) format("woff2"); }

* { box-sizing: border-box; }
html, body { margin: 0; background: #f4f1ea; }
body { -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.AR {
  --paper: #f4f1ea; --sheet: #fbfaf6; --ink: #22211e; --ink2: #555148; --ink3: #7a756a; --rule: #e2dccf; --rule2: #cdc5b4; --tone: #ece7dc;
  --ok: #2f7d4f; --att: #b8740b; --att-ink: #8a5808; --red: #c0392b; --neu: #8a8477;
  --face: #1d1f1e; --face2: #242726; --well: #121413; --hair: rgba(255, 255, 255, .08); --txt: #e8e5dc; --txt2: #b9b9b1; --txt3: #9b9d96; --kok: #62bd88; --katt: #e9ab3c; --kred: #f06a52;
  --g: 32px;
  font-family: "Overpass", sans-serif; color: var(--ink); font-size: 15px; line-height: 24px; background: var(--paper); min-height: 100vh;
}
.AR .num { font-family: "Martian Mono", monospace; font-stretch: 87.5%; font-variant-numeric: tabular-nums; }
.AR h1, .AR h2, .AR h3, .AR p, .AR dl, .AR dd, .AR ol, .AR ul { margin: 0; }
.AR ul, .AR ol { padding: 0; list-style: none; }
.AR a { color: inherit; text-decoration-color: var(--rule2); text-underline-offset: 3px; }
.AR a:hover { text-decoration-color: currentColor; }
.AR :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.AR .s-ok { color: var(--ok); } .AR .s-att { color: var(--att); } .AR .s-red { color: var(--red); } .AR .s-neu { color: var(--neu); }
.AR .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 8px; vertical-align: 1px; flex: none; }
.eyebrow { font-size: 11px; line-height: 16px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--ink3); }
@keyframes in { from { opacity: 0; transform: translateY(6px); } }
@keyframes fly { from { opacity: 0; transform: translateX(-24px); } }
@keyframes glow { from { background-color: rgba(184, 116, 11, .18); } }
@keyframes ping { from { box-shadow: 0 0 0 0 rgba(192, 57, 43, .45); } to { box-shadow: 0 0 0 10px rgba(192, 57, 43, 0); } }

/* ---------- header ---------- */
.ar-top { display: flex; align-items: center; gap: 24px; padding: 20px var(--g) 16px; }
.ar-mark { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.ar-mark svg { width: 56px; height: 18px; color: var(--ink); }
.ar-mark b { font-size: 15px; font-weight: 700; }
.ar-mark span { font-size: 13px; color: var(--ink3); }
.ar-nav { display: flex; gap: 20px; margin-left: auto; font-size: 13px; font-weight: 600; }
.ar-nav a { text-decoration: none; color: var(--ink2); }
.ar-nav a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.ar-status { padding: 0 var(--g); font-size: 13px; color: var(--ink2); min-height: 24px; }

/* ---------- the page: worklist on the left, the account on the right ---------- */
.ar-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 0; align-items: start; }
.ar-pane { padding: 8px var(--g) 40px; }
.ar-acct { background: var(--sheet); min-height: calc(100vh - 80px); padding: 24px var(--g) 40px; box-shadow: -1px 0 0 var(--rule); }

/* The worklist: a ledger of accounts. */
.wl-head { display: flex; align-items: baseline; gap: 16px; margin: 8px 0 12px; }
.wl-head h1 { font-size: 24px; line-height: 32px; font-weight: 700; }
.wl-head p { font-size: 13px; color: var(--ink3); }
.wl-filters { display: flex; gap: 16px; font-size: 13px; margin-bottom: 8px; }
.wl-filters button { background: none; border: 0; padding: 4px 0; color: var(--ink3); font-weight: 600; }
.wl-filters button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.wl { width: 100%; border-collapse: collapse; font-size: 13px; }
.wl th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); font-weight: 700; padding: 8px 8px 8px 0; border-bottom: 1px solid var(--rule2); }
.wl td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.wl th.r, .wl td.r { text-align: right; }
.wl tr { cursor: pointer; }
.wl tbody tr:hover td { background: rgba(0, 0, 0, .02); }
.wl tr[aria-selected="true"] td { background: var(--tone); }
.wl .nm b { display: block; font-weight: 700; font-size: 14px; }
.wl .nm span { color: var(--ink3); font-size: 12px; }
.wl .pc { font-size: 12px; line-height: 18px; color: var(--ink2); max-width: 220px; }
.wl tr.moved td { animation: glow 1.6s ease-out; }
.age { display: flex; gap: 2px; width: 96px; height: 6px; margin-top: 8px; }
.age i { flex: 1; background: var(--rule); }
.age i.f1 { background: #c9c1af; } .age i.f2 { background: var(--att); } .age i.f3 { background: #9b5a07; } .age i.f4 { background: var(--red); }

/* ---------- the account: a statement of account ---------- */
.st-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.st-head h2 { font-size: 24px; line-height: 32px; font-weight: 700; }
.st-head .eyebrow { margin-bottom: 4px; }
.st-sub { font-size: 13px; color: var(--ink2); }
.st-tot { text-align: right; }
.st-tot dd { font-size: 24px; line-height: 32px; font-weight: 600; }
.st-tot dt { font-size: 12px; color: var(--ink3); }
.track { position: relative; margin: 24px 0 8px; height: 44px; }
.track::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: var(--rule2); }
.track .day { position: absolute; top: 0; transform: translateX(-50%); text-align: center; font-size: 11px; line-height: 14px; color: var(--ink3); white-space: nowrap; }
.track .day i { display: block; width: 10px; height: 10px; margin: 6px auto 4px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px var(--rule2); }
.track .day.ai i { box-shadow: inset 0 0 0 2px var(--ink); background: var(--ink); }
.track .day.ai { color: var(--ink); font-weight: 700; }
.track .now { position: absolute; top: 4px; width: 2px; height: 16px; background: var(--att); transition: left .8s cubic-bezier(.2, .7, .2, 1); }
.track .now b { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--att-ink); white-space: nowrap; }
.inv { margin-top: 16px; }
.inv li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); animation: in .4s ease-out both; transition: opacity .5s; }
.inv .n { font-weight: 700; font-size: 14px; }
.inv .meta { grid-column: 1; font-size: 12px; color: var(--ink3); }
.inv .amt { text-align: right; font-size: 14px; }
.inv .lines { grid-column: 1 / -1; font-size: 12px; line-height: 18px; color: var(--ink2); display: flex; flex-wrap: wrap; gap: 0 16px; }
.inv .lines span.hit { color: var(--att-ink); font-weight: 700; text-decoration: line-through; text-decoration-thickness: 1px; }
.inv .state { grid-column: 1 / -1; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; display: flex; gap: 16px; flex-wrap: wrap; }
.inv li.promised { background: linear-gradient(90deg, rgba(47, 125, 79, .07), transparent 60%); }
.inv li.disputed { background: linear-gradient(90deg, rgba(184, 116, 11, .09), transparent 60%); }
.inv li.paid { opacity: .55; }
.checks { margin-top: 16px; font-size: 13px; line-height: 20px; }
.checks li { display: grid; grid-template-columns: 16px 180px minmax(0, 1fr); gap: 8px; padding: 4px 0; }
.checks .ok { color: var(--ok); } .checks .no { color: var(--red); }
.checks span:last-child { color: var(--ink2); }
.act { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 20px; }
.btn { height: 40px; padding: 0 16px; border: 0; border-radius: 2px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .35); }
.btn:disabled { opacity: .45; cursor: default; }
.lnk { background: none; border: 0; padding: 8px 0; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule2); text-underline-offset: 4px; }
.lnk:hover { text-decoration-color: currentColor; }
.note { font-size: 13px; color: var(--ink2); }

/* ---------- the call desk (the console) ---------- */
.desk { margin-top: 24px; background: var(--face); color: var(--txt); border-radius: 4px; padding: 16px 20px 20px; box-shadow: inset 0 0 0 1px var(--hair); }
.desk-bar { display: flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--txt2); }
.desk-bar .lamp { width: 8px; height: 8px; border-radius: 50%; background: var(--txt3); }
.desk-bar .lamp.on { background: var(--kok); box-shadow: 0 0 8px var(--kok); }
.desk-bar .lamp.red { background: var(--kred); animation: ping 1.2s ease-out infinite; }
.desk-bar .t { margin-left: auto; font-family: "Martian Mono", monospace; letter-spacing: 0; }
.tx { margin-top: 12px; max-height: 360px; overflow: auto; font-size: 14px; line-height: 22px; scrollbar-width: thin; }
.tx li { padding: 6px 0; animation: in .3s ease-out both; }
.tx li b { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--txt3); }
.tx li.contact b { color: var(--katt); }
.tx li.sys { color: var(--txt3); font-size: 13px; }
.tx li.sys.red { color: var(--kred); }
.say { display: flex; gap: 8px; margin-top: 12px; }
.say input { flex: 1; min-width: 0; height: 40px; border: 0; border-radius: 2px; background: var(--well); color: var(--txt); padding: 0 12px; }
.say .btn { background: var(--txt); color: var(--face); }
.desk .lnk { color: var(--txt2); text-decoration-color: rgba(255, 255, 255, .25); }
.desk .lvl { height: 4px; margin-top: 10px; background: var(--well); }
.desk .lvl i { display: block; height: 100%; width: 0; background: var(--kok); transition: width .1s; }

/* ---------- queues ---------- */
.qs { padding: 32px var(--g) 40px; background: var(--paper); }
.qs-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.qs-head h2 { font-size: 20px; line-height: 28px; font-weight: 700; }
.qs-head p { font-size: 13px; color: var(--ink3); }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px 32px; }
.qcol h3 { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.qcol h3 .num { font-weight: 600; }
.qcol.empty h3 { color: var(--ink3); border-bottom-color: var(--rule2); }
.qi { padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 13px; line-height: 19px; animation: fly .6s cubic-bezier(.2, .7, .2, 1) both; }
.qi b { display: block; font-weight: 700; }
.qi q { display: block; margin: 6px 0 0; padding-left: 10px; box-shadow: inset 2px 0 0 var(--rule2); color: var(--ink2); font-style: italic; quotes: "\201C" "\201D"; }
.qi .sure { display: flex; gap: 8px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--ink3); flex-wrap: wrap; }
.qi .bar { width: 48px; height: 4px; background: var(--rule); } .qi .bar i { display: block; height: 100%; background: var(--ink2); }
.qi .to { color: var(--ink2); }
.qi .err { color: var(--red); }
.qi .acts { display: flex; gap: 12px; }

/* ---------- the stand-in Billtrust (what the AR system shows) ---------- */
.bt { padding: 32px var(--g) 48px; background: var(--tone); }
.bt-head { display: flex; gap: 16px; align-items: baseline; margin-bottom: 16px; flex-wrap: wrap; }
.bt-head h2 { font-size: 20px; line-height: 28px; font-weight: 700; }
.bt-head p { font-size: 13px; color: var(--ink3); }
.bt-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.bt-cols h3 { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.feed li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 6px 0; font-size: 13px; line-height: 19px; border-bottom: 1px solid var(--rule2); animation: in .4s ease-out both; }
.feed time { color: var(--ink3); font-size: 12px; }
.feed .k-dispute { color: var(--att-ink); } .feed .k-promise { color: var(--ok); } .feed .k-error { color: var(--red); }

/* ---------- Bring your AR ---------- */
.byo { padding: 32px var(--g) 48px; }
.byo h2 { font-size: 20px; line-height: 28px; font-weight: 700; }
.byo p { font-size: 14px; color: var(--ink2); max-width: 64ch; margin-top: 4px; }
.drop { margin-top: 16px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.drop input[type=file] { font-size: 13px; }
.cols { font-family: "Martian Mono", monospace; font-size: 11px; line-height: 18px; color: var(--ink2); margin-top: 12px; }

/* ---------- owner area ---------- */
.ow { padding: 8px var(--g) 56px; max-width: 1200px; }
.ow h1 { font-size: 28px; line-height: 36px; font-weight: 700; }
.ow-tabs { display: flex; gap: 24px; margin: 16px 0 24px; font-size: 14px; font-weight: 700; flex-wrap: wrap; }
.ow-tabs button { background: none; border: 0; padding: 4px 0; color: var(--ink3); }
.ow-tabs button[aria-selected="true"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.lev { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 32px 48px; }
.lev section h2 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.lev label { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 12px; align-items: center; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--rule); }
.lev label small { display: block; color: var(--ink3); font-size: 12px; line-height: 16px; }
.lev input[type=number], .lev select, .lev input[type=text] { height: 32px; border: 0; background: var(--tone); border-radius: 2px; padding: 0 8px; font-family: "Martian Mono", monospace; font-size: 13px; width: 100%; }
.lev input[type=checkbox] { justify-self: end; width: 18px; height: 18px; accent-color: var(--ink); }
.conn li { display: grid; grid-template-columns: 220px 110px minmax(0, 1fr) auto; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 13px; line-height: 19px; align-items: start; }
.conn b { font-weight: 700; }
.conn .mode { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.conn .needs { color: var(--ink3); font-size: 12px; }
.res { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px 40px; }
.res dt { font-size: 13px; color: var(--ink2); }
.res dd { font-size: 28px; line-height: 40px; font-weight: 600; }
.res small { display: block; font-size: 12px; color: var(--ink3); }
.ow-err { color: var(--red); font-size: 13px; margin-top: 8px; }

@media (max-width: 960px) {
  .AR { --g: 16px; }
  .ar-grid { grid-template-columns: minmax(0, 1fr); }
  .ar-acct { box-shadow: 0 -1px 0 var(--rule); min-height: 0; }
  .bt-cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .ar-top { flex-wrap: wrap; gap: 8px 16px; padding-top: 16px; }
  .ar-nav { margin-left: 0; width: 100%; gap: 16px; overflow-x: auto; }
  .wl .pc, .wl th.pc { display: none; }
  .checks li { grid-template-columns: 16px minmax(0, 1fr); } .checks li span:last-child { grid-column: 2; }
  .conn li { grid-template-columns: minmax(0, 1fr) auto; } .conn li > :nth-child(3) { grid-column: 1 / -1; }
  .lev label { grid-template-columns: minmax(0, 1fr) 96px; }
}
/* Day labels at the ends of the track stay on the page; long API paths wrap on a phone. */
.track { margin-left: 28px; margin-right: 36px; }
.ow .feed .num { overflow-wrap: anywhere; }
@media (max-width: 960px) { .track .day { font-size: 10px; } .track .day:nth-child(even) { top: 26px; } .track { height: 64px; } .ow .feed .num { font-size: 13px; } }
@media (max-width: 960px) { .wl.cut tbody tr:nth-child(n+7) { display: none; } }
.lev select { font-family: "Overpass", system-ui, sans-serif; font-size: 13px; min-width: 200px; }
.lev label:has(select) { grid-template-columns: minmax(0, 1fr) 210px; }

/* ---------- the tour ---------- */
.tour { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 40px; padding: 8px var(--g) 48px; align-items: start; }
.t-left, .t-right { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.t-end { grid-column: 1 / -1; }
.t-end a.btn { color: #fff; text-decoration: none; display: inline-flex; align-items: center; }
.t-bt { background: var(--tone); padding: 16px 20px; border-radius: 2px; }
.t-bt .sb { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink3); }
.t-wl { margin-top: 8px; font-size: 13px; }
.t-wl li { display: grid; grid-template-columns: minmax(0, 1fr) 72px 44px; gap: 2px 12px; padding: 6px 0; border-bottom: 1px solid var(--rule); transition: background .6s, opacity .6s; }
.t-wl li .why { grid-column: 1 / -1; font-size: 11px; color: var(--ink3); }
.t-wl li .num { text-align: right; }
.t-wl li.me.hit { background: linear-gradient(90deg, rgba(184, 116, 11, .14), transparent 80%); }
.t-wl li.me.hit .why { color: var(--att-ink); font-weight: 700; }
.tour[data-phase="call"] .t-wl li:not(.me), .tour[data-phase="after"] .t-wl li:not(.me), .tour[data-phase="end"] .t-wl li:not(.me) { opacity: .45; }
.t-acct { }
.t-acct h2 { font-size: 24px; line-height: 32px; font-weight: 700; }
.t-checks { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; font-size: 12px; color: var(--ink3); opacity: 0; transition: opacity .6s; }
.t-checks .ok { color: var(--ok); margin-right: 4px; }
.tour.checked .t-checks { opacity: 1; }
.t-inv li { transition: background .6s, opacity .6s; }
.tour:not(.stated) .t-inv .amt { color: var(--ink3); }
.tour.readback .t-inv li.promised, .tour.readback .t-inv li.disputed { box-shadow: inset 2px 0 0 transparent; }
.t-call { }
.t-call .desk { margin-top: 0; }
.t-call .tx { height: 340px; max-height: none; }
.t-call .tx li span { white-space: pre-wrap; }
.t-q { opacity: .35; transition: opacity .6s; }
.t-wb { opacity: .35; transition: opacity .6s; }
.tour[data-phase="after"] .t-q, .tour[data-phase="after"] .t-wb, .tour[data-phase="end"] .t-q, .tour[data-phase="end"] .t-wb { opacity: 1; }
.t-q h2, .t-wb h2 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.t-q .qgrid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); min-height: 40px; }
.t-wb .feed li { animation: in .4s ease-out both; }
.t-ctl { display: flex; align-items: center; gap: 16px; }
.t-time { margin-left: auto; font-size: 12px; color: var(--ink3); }
.t-note { font-size: 12px; color: var(--ink3); }
.t-end { text-align: center; padding: 24px 0 8px; animation: in .6s ease-out both; }
.t-end p { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.t-end .act { justify-content: center; }
@media (max-width: 960px) {
  .tour { display: flex; flex-direction: column; gap: 24px; }
  .t-left, .t-right { display: contents; }
  .t-ctl { order: 0; } .t-bt { order: 1; } .t-acct { order: 2; } .t-call { order: 3; } .t-q { order: 4; } .t-wb { order: 5; } .t-end { order: 6; } .t-note { order: 7; }
  .t-call .tx { height: 260px; }
  .t-wl li:nth-child(n+6):not(.me) { display: none; }
}
@media (max-width: 960px) { .t-call { position: sticky; bottom: 8px; z-index: 2; } .t-call .tx { height: 132px; } .t-call .desk { box-shadow: 0 8px 24px rgba(0, 0, 0, .25); } }
