:root {
  --paper: #ffffff; --panel: #f4f5f6; --ink: #0b0b0c; --ink-2: #3a3d42; --ink-3: #6c7077; --rule: #e2e4e7;
  --ok: #1f6b3a; --ok-bg: #e7f3eb; --warn: #8a5a00; --warn-bg: #fbf1dc; --bad: #8f1d2c; --bad-bg: #f8e4e6;
  --accent: #23356b; --accent-2: #1a2852; --accent-bg: #e9ecf6;
  --radius: 8px; --tap: 44px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--panel); color: var(--ink); font: 15px/1.5 Archivo, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
a { color: var(--accent); text-underline-offset: 2px; }
a:not([class]):hover { color: var(--accent-2); }
h1 { font-size: 24px; line-height: 1.2; margin: 0 0 4px; letter-spacing: -0.01em; }
@media (min-width: 720px) { h1 { font-size: 28px; } }
h2 { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 28px 0 10px; }
p { margin: 0 0 10px; }
.brand { color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .22em; font-size: 14px; display: flex; align-items: center; gap: 12px; }
.brand:hover { color: #fff; }
.brand__mark { height: 22px; width: auto; display: block; }
.icon { flex-shrink: 0; display: inline-block; }
.env { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: #f2c94c; color: var(--ink); padding: 2px 8px; border-radius: 99px; }
.skip { position: absolute; left: 12px; top: 12px; z-index: 60; background: #fff; color: var(--ink); padding: 8px 14px; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* Weave: the boxmarshall.com pattern, lit around the pointer */
.weave { position: relative; isolation: isolate; background-color: var(--ink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cpath d='M0 4 L11 -6 L22 4 M0 15 L11 5 L22 15 M0 26 L11 16 L22 26' fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='1.3'/%3E%3C/svg%3E"); background-size: 22px 22px; --mx: 18%; --my: 12%; }
.weave__glow, .weave__light { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.weave__glow { background: radial-gradient(520px circle at var(--mx) var(--my), rgb(255 255 255 / .07), transparent 62%); }
.weave__light { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cpath d='M0 4 L11 -6 L22 4 M0 15 L11 5 L22 15 M0 26 L11 16 L22 26' fill='none' stroke='%23ffffff' stroke-opacity='0.32' stroke-width='1.3'/%3E%3C/svg%3E"); background-size: 22px 22px; opacity: 0; transition: opacity .25s;
  -webkit-mask-image: radial-gradient(170px circle at var(--mx) var(--my), #000 0%, transparent 100%); mask-image: radial-gradient(170px circle at var(--mx) var(--my), #000 0%, transparent 100%); }
.weave.is-lit .weave__light { opacity: 1; }
.ghost { position: absolute; top: 50%; right: 0; translate: 38% -50%; height: 72vh; width: auto; color: #fff; opacity: .08; pointer-events: none; z-index: -1; }

/* Sidebar */
.side { color: #fff; display: flex; flex-direction: column; gap: 6px; padding: 22px 14px 18px; border-right: 1px solid rgb(255 255 255 / .12); overflow-y: auto; }
.side__head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.side__app { display: flex; align-items: center; gap: 8px; margin: 14px 8px 18px; }
.chip { display: inline-flex; align-items: center; border: 1px solid rgb(255 255 255 / .24); padding: 3px 9px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #a8a8a9; white-space: nowrap; }
.side__nav { display: grid; gap: 2px; }
.side__nav a, .side__foot a, .side__foot button { position: relative; display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 0 12px; color: #a8a8a9; text-decoration: none; font: inherit; font-weight: 500; border: 0; background: none; width: 100%; cursor: pointer; text-align: left; border-radius: 0; }
.side__nav a:hover, .side__foot a:hover, .side__foot button:hover { color: #fff; background: rgb(255 255 255 / .05); }
.side__nav a[aria-current="page"], .side__foot a[aria-current="page"] { color: #fff; background: #1a1b1e; }
.side__nav a[aria-current="page"]::before, .side__foot a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; background: #fff; }
.side .count { margin-left: auto; background: #fff; color: var(--ink); border-radius: 99px; font-size: 11px; padding: 0 7px; font-weight: 700; }
.side__foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgb(255 255 255 / .12); display: grid; gap: 2px; }
.side__foot form { margin: 0; }
.side__close, .mtop__menu { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); color: #fff; }
.mtop { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 0 8px 0 16px; min-height: 60px; color: #fff; border-bottom: 1px solid rgb(255 255 255 / .12); }
.mtop__menu { margin-left: auto; }
.side__scrim { position: fixed; inset: 0; z-index: 25; background: rgb(11 11 12 / .55); }
main { max-width: 1120px; margin: 0 auto; padding: 20px 16px 64px; width: 100%; }
@media (min-width: 960px) {
  body.has-side { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
  .side { position: sticky; top: 0; height: 100vh; }
  .mtop, .side__close, .side__scrim { display: none !important; }
  main { padding: 32px 40px 72px; }
}
@media (max-width: 959px) {
  .side { position: fixed; inset: 0 auto 0 0; z-index: 30; width: min(300px, 86vw); transform: translateX(-100%); visibility: hidden; transition: transform .22s cubic-bezier(.2, .7, .2, 1), visibility .22s; }
  .side.is-open, .side:target { transform: none; visibility: visible; transition: transform .22s cubic-bezier(.2, .7, .2, 1); }
}

/* Dark sign-in pages, themed after boxmarshall.com */
body.theme-dark { background: var(--ink); color: #fff; }
.stage { min-height: 100svh; overflow: hidden; display: flex; flex-direction: column; }
.stage__top { padding: 20px 24px; border-bottom: 1px solid rgb(255 255 255 / .12); }
.stage__main { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 1200px; padding: 48px 24px 64px; }
@media (min-width: 720px) { .stage__top { padding: 22px 40px; } .stage__main { padding: 64px 40px 80px; } }
.signin { max-width: 640px; }
.signin h1 { font-size: clamp(2.5rem, 1.2rem + 5vw, 5rem); line-height: .98; letter-spacing: -0.03em; font-weight: 600; margin: 28px 0 22px; }
.hollow { color: transparent; -webkit-text-stroke: 1.5px #fff; paint-order: stroke fill; }
.signin .lede { color: #a8a8a9; font-size: 18px; line-height: 1.6; max-width: 44ch; margin: 0 0 32px; }
.eyebrow { font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: #7c8088; margin: 48px 0 0; }
.theme-dark .btn:not(.btn--quiet):not(.btn--danger):not(.btn--ghost) { background: #fff; color: var(--ink); border-color: #fff; border-radius: 0; font-weight: 500; padding: 0 24px; min-height: 48px; }
.theme-dark .hint, .theme-dark .muted { color: #a8a8a9; }
.theme-dark a { color: #fff; }
.theme-dark .auth { margin: 0; width: 100%; max-width: 460px; }
.theme-dark .auth .card { background: #131416; border-color: rgb(255 255 255 / .12); border-radius: 12px; box-shadow: inset 0 1px 0 rgb(255 255 255 / .06); }
.theme-dark .auth input { background: #1a1b1e; color: #fff; border-color: rgb(255 255 255 / .24); }
.head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.head .sub { color: var(--ink-3); margin: 0; }
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; }
@media (min-width: 720px) { .card { padding: 20px; } }
.card + .card { margin-top: 12px; }
.grid > .card { margin-top: 0; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
@media (max-width: 480px) { .stat__v { font-size: 24px; } }
.stat__k { color: var(--ink-3); font-size: 13px; margin: 0; }
.stat__v { font-size: 30px; font-weight: 700; margin: 2px 0 0; letter-spacing: -0.01em; white-space: nowrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 18px; border-radius: 6px;
  border: 1px solid var(--ink); background: var(--ink); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn--quiet { background: var(--paper); color: var(--ink); border-color: var(--rule); }
.btn--danger { background: var(--paper); color: var(--bad); border-color: #e3b8be; }
.btn--block { width: 100%; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.side :focus-visible, .mtop :focus-visible, .theme-dark :focus-visible { outline-color: #fff; }
.btn, .side__nav a, .side__foot a, .side__foot button, .tabs a, a.row, a.action-item, a.stat--link, input, select, textarea, .search { transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s, opacity .15s, transform .08s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.list { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); }
.list li + li { border-top: 1px solid var(--rule); }
.row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 16px; text-decoration: none; color: inherit; min-height: 60px; }
a.row:hover { background: #fafafa; }
.row__main { min-width: 0; }
.row__title { font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.row__meta { color: var(--ink-3); font-size: 13px; margin: 0; }
.row__end { text-align: right; flex-shrink: 0; }
.amount { font-weight: 600; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--panel); color: var(--ink-2); white-space: nowrap; }
.badge[class*="badge--"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--paid { background: var(--ok-bg); color: var(--ok); }
.badge--overdue { background: var(--bad-bg); color: var(--bad); }
.badge--sent, .badge--issued { background: var(--accent-bg); color: var(--accent); }
.badge--void { background: var(--panel); color: var(--ink-3); text-decoration: line-through; }
.badge--draft { background: var(--warn-bg); color: var(--warn); }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 12px; padding-bottom: 2px; }
.tabs a { text-decoration: none; padding: 0 14px; min-height: 38px; display: inline-flex; align-items: center; border-radius: 99px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink-2); white-space: nowrap; font-size: 14px; }
.tabs a:hover { border-color: #c9ccd1; color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--accent); color: #fff; border-color: var(--accent); }
form.stack { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; align-content: start; }
.field > span, legend { font-weight: 600; font-size: 14px; }
.field small, .hint { color: var(--ink-3); font-size: 13px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid #c9ccd1; border-radius: 6px; min-height: var(--tap); padding: 8px 12px; width: 100%; }
select:not([multiple]):not([size]) { -webkit-appearance: none; appearance: none; padding-right: 40px; background-color: var(--paper); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236c7077' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px 16px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; cursor: pointer; }
select:not([multiple]):not([size]):disabled { cursor: not-allowed; opacity: .6; }
select::-ms-expand { display: none; }
@media (hover: hover) { select:not([multiple]):not([size]):not(:disabled):hover { border-color: var(--ink-3); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230b0b0c' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); } }
.theme-dark select:not([multiple]):not([size]) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23c9ccd1' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); }
textarea { min-height: 88px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 20px; min-width: 20px; min-height: 20px; height: 20px; padding: 0; accent-color: var(--ink); }
.check { display: flex; gap: 10px; align-items: center; min-height: var(--tap); }
.two { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .two { grid-template-columns: 1fr 1fr; } }
.two + .two { margin-top: 14px; }
fieldset { border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px; margin: 0; display: grid; gap: 10px; }
.line { display: grid; gap: 8px; grid-template-columns: 88px 1fr; padding: 12px; border: 1px solid var(--rule); border-radius: 6px; background: #fcfcfc; }
.line > .field:nth-child(-n+2) { grid-column: 1 / -1; }
.line + .line { margin-top: -4px; }
@media (min-width: 720px) { .line { grid-template-columns: 2fr 2fr 80px 160px; align-items: end; } .line > .field:nth-child(-n+2) { grid-column: auto; } }
.line > .field.line__plan { grid-column: 1 / -1; }
.line--plan > .field:nth-child(3) { grid-column: 1 / -1; }
@media (min-width: 720px) { .line--plan > .field:nth-child(3) { grid-column: auto; } }
.catalog-product { margin-top: 24px; }
.head--section { margin-bottom: 10px; align-items: center; }
.catalog-product__name { font-size: 18px; letter-spacing: 0; text-transform: none; color: var(--ink); margin: 0; }
.row__end form { margin-top: 6px; }
.line--recipient { grid-template-columns: 1fr 96px; }
.line--recipient > .field:nth-child(-n+2) { grid-column: auto; }
.line--recipient > .field:first-child { grid-column: 1 / -1; }
@media (min-width: 720px) { .line--recipient { grid-template-columns: 2fr 2fr 100px; } .line--recipient > .field:first-child { grid-column: auto; } }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin-bottom: 16px; }
.stat { margin: 0 !important; display: flex; flex-direction: column; gap: 2px; }
.stat .stat__k { display: flex; align-items: center; gap: 6px; }
.stat__meta { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 4px; }
.stat__meta--up { color: var(--ok); }
.stat__meta--down { color: var(--bad); }
a.stat--link { text-decoration: none; color: inherit; }
a.stat--link:hover { border-color: #c9ccd1; }
.dash { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 8px; }
@media (min-width: 900px) { .dash { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.dash__main, .dash__side { display: grid; gap: 12px; align-content: start; }
.dash .card + .card { margin-top: 0; }
.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card__head h2 { margin: 0; }
.card__head a { font-size: 14px; font-weight: 600; }
.card__head--bare { margin: 28px 0 10px; }
.chart { margin: 0; }
.chart + .chart { margin-top: 18px; }
.chart__cur { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-bottom: 6px; }
.chart__empty { margin: 0; padding: 24px 0; text-align: center; }
.ageing + .ageing { margin-top: 18px; }
.ageing__total { font-size: 20px; font-weight: 700; margin: 0 0 10px; }
.ageing__bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--panel); gap: 2px; }
.ageing__seg { display: block; height: 100%; }
.ageing__seg--current { background: var(--accent); }
.ageing__seg--late_1_30 { background: #d39b2a; }
.ageing__seg--late_31_60 { background: #c2410c; }
.ageing__seg--late_60_plus { background: var(--bad); }
.ageing__legend { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.ageing__legend li { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.ageing__dot { width: 10px; height: 10px; border-radius: 3px; }
.actions-list { list-style: none; margin: -4px -8px; padding: 0; }
.action-item { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 6px; text-decoration: none; color: inherit; min-height: var(--tap); }
a.action-item:hover { background: var(--panel); }
.action-item__body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.action-item__title { font-weight: 600; overflow-wrap: anywhere; }
.action-item__go { color: var(--ink-3); }
.caught-up { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ok); font-weight: 600; }
.crumb { margin: 0 0 6px; font-size: 14px; }
.statement-filter { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); align-items: end; margin-bottom: 12px; }
.statement { padding: 24px; }
.statement__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.statement__head p { margin: 0; }
.statement__issuer { font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }
.statement__title { font-size: 22px; letter-spacing: -0.01em; text-transform: none; color: var(--ink); margin: 4px 0 2px; }
.statement__label { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.statement__totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; margin: 16px 0; }
.statement__totals div { background: var(--panel); border-radius: 6px; padding: 10px 12px; }
.statement__totals dt { font-size: 13px; color: var(--ink-3); }
.statement__totals dd { margin: 2px 0 0; font-weight: 700; white-space: nowrap; }
.statement__due { background: var(--accent-bg) !important; }
.statement__due dd { color: var(--accent); font-size: 18px; }
.statement__none { padding: 16px 0; }
.statement__foot { margin: 16px 0 0; }
.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 8px 6px; border-bottom: 1px solid var(--rule); }
.ledger td { padding: 10px 6px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ledger .num { text-align: right; white-space: nowrap; }
.ledger__opening td { color: var(--ink-3); }
@media (max-width: 640px) {
  .ledger thead { display: none; }
  .ledger, .ledger tbody, .ledger tr, .ledger td { display: block; width: 100%; }
  .ledger tr { padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .ledger td { border: 0; padding: 2px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .ledger td::before { content: attr(data-label); color: var(--ink-3); text-align: left; }
  .ledger td:empty { display: none; }
}
@media print {
  .side, .mtop, .skip, .side__scrim, .no-print, .notice { display: none !important; }
  body.has-side { display: block; }
  body { background: #fff; }
  main { max-width: none; padding: 0; }
  .statement { border: 0; padding: 0; }
  a { color: inherit; text-decoration: none; }
  @page { margin: 16mm; }
}
.ihero { color: #fff; border-radius: 12px; overflow: hidden; padding: 22px 20px 20px; margin-bottom: 16px; border: 1px solid #1a1b1e; }
@media (min-width: 720px) { .ihero { padding: 30px 32px 26px; } }
.ihero .ghost { height: 150%; translate: 32% -50%; }
.ihero p { margin: 0; }
.ihero__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ihero__tags .chip { color: #fff; }
.ihero__pair { color: #a8a8a9 !important; font-size: 14px; }
.ihero__heading { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); line-height: 1.05; letter-spacing: -0.02em; font-weight: 600; margin: 16px 0 4px; color: #fff; }
.ihero__title { color: #a8a8a9; font-size: 16px; }
.ihero__figs { display: flex; flex-wrap: wrap; gap: 16px 40px; margin-top: 24px; padding-top: 18px; border-top: 1px solid rgb(255 255 255 / .12); }
.ihero__k { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #7c8088; }
.ihero__v { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; margin: 4px 0 2px !important; }
.ihero__m { color: #a8a8a9; font-size: 13px; }
.ihero__actions { margin-top: 22px; }
.ihero--compact { padding-bottom: 24px; }
.ihero__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ihero__row .ihero__heading { margin-bottom: 0; }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; border-radius: 0; font-weight: 500; }
.btn--ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / .24); border-radius: 0; font-weight: 500; }
.ihero :focus-visible { outline-color: #fff; }
.search { display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid #c9ccd1; border-radius: var(--radius); padding: 0 4px 0 12px; margin: 0 0 12px; color: var(--ink-3); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.search input { border: 0; padding: 8px 4px; min-width: 0; flex: 1; background: transparent; }
.search input:focus-visible { outline: none; }
.search .btn { min-height: 40px; padding: 0 14px; }
@media (max-width: 719px) { .search .btn { min-height: var(--tap); } .tabs a { min-height: var(--tap); } .tabs { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); padding-right: 28px; } }
.timeline { list-style: none; margin: 0; padding: 4px 16px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); }
.timeline__item { display: flex; gap: 12px; padding: 10px 0; position: relative; }
.timeline__item:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 42px; bottom: -10px; width: 2px; background: var(--rule); }
.timeline__icon { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--panel); color: var(--ink-2); position: relative; z-index: 1; }
.timeline__icon--ok { background: var(--ok-bg); color: var(--ok); }
.timeline__icon--bad { background: var(--bad-bg); color: var(--bad); }
.timeline__icon--accent { background: var(--accent-bg); color: var(--accent); }
.timeline__body { min-width: 0; padding-top: 3px; }
.timeline__text { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.notice { border-radius: var(--radius); padding: 12px 16px; margin: 0 0 16px; font-weight: 500; }
.notice--ok { background: var(--ok-bg); color: var(--ok); }
.notice--error { background: var(--bad-bg); color: var(--bad); }
.notice--warn { background: var(--warn-bg); color: var(--warn); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.totals { display: grid; gap: 6px; max-width: 360px; margin-left: auto; }
.totals div { display: flex; justify-content: space-between; gap: 16px; }
.totals .grand { font-size: 20px; font-weight: 700; border-top: 1px solid var(--rule); padding-top: 8px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; overflow-wrap: anywhere; }
.muted { color: var(--ink-3); }
.empty { padding: 32px 20px; text-align: center; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty p { margin: 0; max-width: 46ch; }
.empty__icon { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-bg); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.empty__title { color: var(--ink); font-weight: 600; font-size: 16px; }
.empty__action { margin-top: 10px; }
.danger-zone { border-color: #e3b8be; }
.auth { max-width: 420px; margin: 10vh auto 0; }
.auth .card { padding: 28px; }
.auth h1 { margin-bottom: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
details > summary { cursor: pointer; font-weight: 600; min-height: var(--tap); display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; overflow-wrap: anywhere; list-style: none; position: relative; padding-right: 28px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: translateY(-70%) rotate(45deg); transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
details[open] > summary::after { transform: translateY(-30%) rotate(225deg); }
details > summary.btn--icon::after { content: none; }
.summary__sub { flex-basis: 100%; font-weight: 400; }
.stage__main.pay { justify-content: flex-start; width: 100%; max-width: 640px; margin: 0 auto; }
.pay__for { color: #a8a8a9; margin: 0 0 6px; font-size: 17px; }
.pay__amount { font-size: clamp(2.5rem, 1.4rem + 4.5vw, 4.25rem); line-height: 1; letter-spacing: -0.03em; font-weight: 600; margin: 0 0 12px; white-space: nowrap; }
.pay__due { color: #a8a8a9; margin: 0 0 28px; }
.pay__cta { margin: 0 0 10px; }
.pay__cta .btn { min-height: 56px; font-size: 17px; }
.pay__pdf { margin: 14px 0 0; }
.pay__pdf a { display: inline-flex; align-items: center; gap: 6px; }
.pay__docs { display: grid; gap: 10px; margin: 20px 0 0; }
.pay__foot { padding: 20px 24px 28px; color: #7c8088; font-size: 13px; text-align: center; border-top: 1px solid rgb(255 255 255 / .12); }
.panel { background: #131416; border: 1px solid rgb(255 255 255 / .12); border-radius: 12px; box-shadow: inset 0 1px 0 rgb(255 255 255 / .06); padding: 20px 22px; margin-top: 28px; }
.panel h2 { margin-top: 0; }
.theme-dark h2 { color: #7c8088; }
.theme-dark .list { background: transparent; border: 0; border-radius: 0; }
.theme-dark .list li + li { border-top-color: rgb(255 255 255 / .12); }
.theme-dark .row { padding-left: 0; padding-right: 0; }
.theme-dark .row__title { color: #fff; }
.theme-dark .row__meta, .theme-dark .kv dt { color: #7c8088; }
.theme-dark .kv dd { color: #fff; }
.pay__fallback { font-size: 15px; color: #a8a8a9; }
.pay__fallback h2 { margin-top: 0; }

/* Button states: one hover vocabulary, only where hover exists */
@media (hover: hover) {
  .btn:hover { background: #26282c; border-color: #26282c; color: #fff; }
  .btn--quiet:hover { background: var(--panel); border-color: #c9ccd1; color: var(--ink); }
  .btn--danger:hover { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
  .btn--light:hover, .theme-dark .btn:not(.btn--quiet):not(.btn--danger):not(.btn--ghost):hover { background: transparent; border-color: #fff; color: #fff; }
  .btn--ghost:hover { background: #fff; border-color: #fff; color: var(--ink); }
  a.row:hover, a.action-item:hover, a.stat--link:hover { color: inherit; }
}
.mtop__menu, .mtop__menu:hover, .side__close, .side__close:hover, .theme-dark a:not(.btn):hover, .ihero a:not(.btn):hover { color: #fff; }
.nowrap { white-space: nowrap; }
.btn:active:not([aria-disabled="true"]):not([aria-busy="true"]) { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; opacity: .85; }
.btn[aria-busy="true"]::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Fields that failed validation */
[aria-invalid="true"] { border-color: var(--bad) !important; box-shadow: 0 0 0 1px var(--bad); }
.field--error > span { color: var(--bad); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--accent); }

/* Notices arrive, they do not pop */
.notice { animation: notice-in .26s cubic-bezier(.16, 1, .3, 1); }
@keyframes notice-in { from { opacity: 0; transform: translateY(-6px); } }
.theme-dark .notice--warn { background: rgb(242 201 76 / .1); color: #f2c94c; border: 1px solid rgb(242 201 76 / .3); }
.theme-dark .notice--error { background: rgb(229 72 77 / .12); color: #ff9da1; border: 1px solid rgb(229 72 77 / .35); }
.theme-dark .notice--ok { background: rgb(76 195 120 / .12); color: #8fe0ab; border: 1px solid rgb(76 195 120 / .35); }

/* Drawer scrim fades with the panel */
.side__scrim { opacity: 0; pointer-events: none; transition: opacity .22s cubic-bezier(.2, .7, .2, 1); }
.side__scrim.is-open { opacity: 1; pointer-events: auto; }
body.menu-open { overflow: hidden; }

/* Draft action bar stays in reach */
.actionbar { position: sticky; bottom: 0; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  margin: 8px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgb(244 245 246 / .94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-top: 1px solid var(--rule); }
.actionbar__hint { margin: 0; color: var(--ink-3); font-size: 13px; max-width: 60ch; }
.actionbar .actions { margin-left: auto; }
@media (max-width: 719px) { .actionbar__hint { display: none; } .actionbar .actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .actionbar { margin: 8px 0 0; border: 1px solid var(--rule); border-radius: var(--radius); bottom: 12px; } }

/* Disclosure cards for secondary tasks */
.disclosure { padding: 0; }
.disclosure > summary { padding: 12px 44px 12px 16px; }
.disclosure > summary::after { right: 18px; }
.disclosure > :not(summary) { margin: 0 16px 16px; }
.disclosure + .disclosure { margin-top: 12px; }

/* Page to page continuity: the shell stays, the content cross-fades */
@view-transition { navigation: auto; }
.side { view-transition-name: side; }
.mtop { view-transition-name: mtop; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

.crumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumb a { color: var(--ink-3); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.crumb span[aria-hidden] { color: var(--ink-3); }

/* Collected chart as HTML so labels stay legible at every width */
.bars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; height: 220px; }
.bars__col { display: grid; grid-template-rows: auto 1fr auto; gap: 6px; text-align: center; min-width: 0; }
.bars__value { font-size: 13px; font-weight: 700; color: var(--ink); min-height: 18px; white-space: nowrap; }
.bars__track { position: relative; background: var(--accent-bg); border-radius: 6px; overflow: hidden; }
.bars__bar { position: absolute; left: 0; right: 0; bottom: 0; background: var(--accent); opacity: .5; border-radius: 6px 6px 0 0; transform-origin: bottom; animation: bar-in .6s cubic-bezier(.16, 1, .3, 1) both; }
.bars__col--now .bars__bar { opacity: 1; }
.bars__label { font-size: 13px; color: var(--ink-3); }
.bars__col:nth-child(2) .bars__bar { animation-delay: .04s; } .bars__col:nth-child(3) .bars__bar { animation-delay: .08s; }
.bars__col:nth-child(4) .bars__bar { animation-delay: .12s; } .bars__col:nth-child(5) .bars__bar { animation-delay: .16s; }
.bars__col:nth-child(6) .bars__bar { animation-delay: .2s; }
@keyframes bar-in { from { transform: scaleY(0); } }
@media (max-width: 480px) { .bars { gap: 6px; height: 180px; } .bars__value { font-size: 12px; } }

/* Home on phones: what needs doing comes before the charts */
@media (max-width: 899px) { .dash { display: flex; flex-direction: column; } .dash__side { order: -1; } }
.stat--alert { border-color: #e3b8be; }
.stat--alert .stat__v { color: var(--bad); }
.stat__v--empty { font-size: 18px; font-weight: 600; color: var(--ink-3); }

/* Rows open from anywhere on the row */
.list .row { position: relative; }
.row__link { color: inherit; text-decoration: none; }
.row__link::after { content: ""; position: absolute; inset: 0; }
.row:has(.row__link):hover { background: #fafafa; }
.row__end form, .row__end .btn { position: relative; z-index: 1; }

/* Invoice header footnote */
.ihero__foot { margin-top: 16px; display: grid; gap: 10px; }
.ihero__foot .notice { margin: 0; }
.ihero .notice--warn { background: rgb(242 201 76 / .1); color: #f2c94c; border: 1px solid rgb(242 201 76 / .3); }
.ihero form { margin: 0; }

/* Pay page states: the moments a client remembers */
.pay-state { display: grid; justify-items: start; gap: 6px; max-width: 520px; }
.pay-state__icon { width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgb(255 255 255 / .24); color: #fff; margin-bottom: 18px; }
.pay-state--ok .pay-state__icon { border-color: rgb(76 195 120 / .5); color: #8fe0ab; }
.pay-state--muted .pay-state__icon { color: #a8a8a9; }
.pay-state__title { font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem); line-height: 1.02; letter-spacing: -0.03em; font-weight: 600; margin: 0 0 10px; }
.pay-state__body { color: #a8a8a9; font-size: 17px; line-height: 1.6; display: grid; gap: 14px; }
.pay-state__body p { margin: 0; }
.pay__foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.pay__foot a { color: #fff; }
.copyable { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
@media (max-width: 719px) { .btn--sm { min-height: var(--tap); } }
.progress { display: block; width: 100%; max-width: 320px; height: 2px; background: rgb(255 255 255 / .12); overflow: hidden; margin: 4px 0 6px; }
.progress span { display: block; width: 35%; height: 100%; background: #fff; animation: progress 1.4s cubic-bezier(.4, 0, .2, 1) infinite; }
@keyframes progress { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

.btn--sm { flex: none; white-space: nowrap; }

/* Imports: staged invoices waiting for approval */
.import-group + .import-group { margin-top: 24px; }
.import-group__head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 10px; }
.import-group__name { font-size: 18px; letter-spacing: 0; text-transform: none; color: var(--ink); margin: 0; overflow-wrap: anywhere; }
.import-group__head .row__meta { margin: 0; }
.import__top { display: grid; grid-template-columns: var(--tap) minmax(0, 1fr); grid-template-areas: "pick head" ". amount" ". meta"; column-gap: 4px; padding: 4px 16px 8px 4px; }
.import__pick { grid-area: pick; display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); cursor: pointer; }
.import__head { grid-area: head; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: var(--tap); }
.import__head .row__title { overflow-wrap: anywhere; }
.import__amount { grid-area: amount; margin: 0 0 4px; font-size: 18px; font-weight: 700; }
.import__meta { grid-area: meta; min-width: 0; }
.import__meta .row__meta { margin: 0 0 2px; overflow-wrap: anywhere; }
.import__extra { display: grid; gap: 8px; padding: 0 16px 8px 52px; }
.import__extra .notice { margin: 0; font-size: 14px; }
.import__extra details > summary { font-size: 14px; min-height: 36px; }
.import__extra details[open] { padding-bottom: 8px; }
.import__extra .ledger { margin: 4px 0 12px; }
.import__extra .totals { margin: 0 0 8px; }
.import__reject > summary { color: var(--bad); }
.notice a { color: inherit; font-weight: 700; }
.notice p { margin: 0 0 4px; }
.chip--imported { border-color: rgb(255 255 255 / .5); color: #fff; }
.actionbar--select .btn { white-space: nowrap; }
@media (max-width: 719px) {
  .actionbar--select { flex-wrap: nowrap; gap: 8px; }
  .actionbar--select .actions { width: auto; display: flex; flex: none; margin-left: auto; }
}
@media (min-width: 720px) {
  .import__top { grid-template-columns: var(--tap) minmax(0, 1fr) auto; grid-template-areas: "pick head amount" ". meta amount"; }
  .import__amount { padding-top: 12px; text-align: right; margin: 0; }
  .import__extra { padding-left: 52px; }
}
@media (max-width: 560px) {
  .theme-dark .kv { display: grid; grid-template-columns: 1fr; gap: 2px; }
  .theme-dark .kv dd { margin: 0 0 12px; }
}

/* Connect-an-agent guide */
.guide { margin: 12px 0; }
.guide__body { display: grid; gap: 14px; }
.guide__steps { margin: 0; padding-left: 20px; display: grid; gap: 18px; }
.guide__steps > li::marker { font-weight: 700; color: var(--ink); }
.guide__step { margin: 0 0 4px; font-weight: 600; }
.guide__client { font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--ink); margin: 16px 0 2px; }
.guide__notes { margin: 0; padding: 12px 16px 12px 32px; background: var(--panel); border-radius: 6px; color: var(--ink-2); font-size: 14px; display: grid; gap: 6px; }
.snippet { position: relative; margin-top: 8px; }
.snippet__code { margin: 0; padding: 12px 84px 12px 14px; background: #0b0b0c; color: #e6e7e9; border-radius: 6px; font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-all; overflow-x: auto; }
.snippet__code:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.snippet__copy { position: absolute; top: 8px; right: 8px; background: #26282c; color: #fff; border-color: #3a3d42; }
@media (hover: hover) { .snippet__copy:hover { background: #fff; color: var(--ink); border-color: #fff; } }
@media (max-width: 559px) { .snippet__code { padding-right: 14px; padding-top: 52px; } }

/* Consent screen when an app asks to connect over MCP */
.stage:has(.consent) { overflow: auto; }
.stage:has(.consent) .stage__main { justify-content: flex-start; }
.consent { display: grid; gap: 12px; }
.consent__levels { border: 0; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.consent__levels legend { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: 0; margin-bottom: 8px; }
.pick { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 8px; cursor: pointer; transition: border-color .15s, background .15s; }
.pick:hover { border-color: var(--accent); }
.pick:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); }
.pick input { margin: 2px 0 0; flex: none; }
.pick__body { display: grid; gap: 3px; min-width: 0; }
.pick__body small { color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.consent__deny { margin-top: 2px; }
.consent .btn--quiet { background: transparent; color: #fff; border-color: rgb(255 255 255 / .28); }
.consent .btn--quiet:hover { background: rgb(255 255 255 / .06); border-color: #fff; }
.theme-dark .consent__levels legend { color: #7c8088; }
.theme-dark .pick { border-color: rgb(255 255 255 / .18); }
.theme-dark .pick:hover { border-color: rgb(255 255 255 / .42); background: rgb(255 255 255 / .03); }
.theme-dark .pick:has(input:checked) { border-color: #fff; background: rgb(255 255 255 / .06); }
.theme-dark .pick input { accent-color: #fff; }
.theme-dark .pick__body small { color: #a8a8a9; }

/* Settings: an overview strip that doubles as jump links, then three titled groups */
.settings .hint, .group__sub { max-width: 72ch; }
.overview { display: grid; grid-template-columns: 1fr; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); margin: 4px 0 0; overflow: hidden; }
.overview a { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; min-height: var(--tap); color: var(--ink); text-decoration: none; transition: background-color .15s; }
.overview a + a { border-top: 1px solid var(--rule); }
.overview .icon { color: var(--accent); margin-top: 2px; }
.overview a > span { display: grid; gap: 2px; min-width: 0; }
.overview b { font-weight: 600; }
.overview small { color: var(--ink-3); font-size: 13px; line-height: 1.4; }
.overview a.overview--warn .icon, .overview a.overview--warn .overview__flag { color: var(--warn); }
.overview a.overview--bad .icon, .overview a.overview--bad small { color: var(--bad); }
@media (hover: hover) { .overview a:hover { background: var(--panel); } }
@media (min-width: 720px) { .overview { grid-template-columns: repeat(3, 1fr); } .overview a + a { border-top: 0; border-left: 1px solid var(--rule); } }
.group { margin-top: 44px; scroll-margin-top: 16px; }
.group__title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; text-transform: none; color: var(--ink); margin: 0 0 4px; }
.group__sub { color: var(--ink-3); margin: 0 0 16px; }
.part { display: grid; gap: 10px; scroll-margin-top: 16px; }
.part + .part { margin-top: 36px; }
.part > p { margin: 0; }
.part__title, .card__title { font-size: 16px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--ink); margin: 0; }
.formset { border: 0; border-radius: 0; border-top: 1px solid var(--rule); padding: 16px 0 0; margin: 4px 0 0; }
.formset > legend { float: left; width: 100%; padding: 0; margin: 0 0 2px; font-size: 14px; font-weight: 700; }
.formset > .hint { margin: 0; }
.bank + .bank { border-top: 1px solid var(--rule); }
.bank__state { font-weight: 400; font-size: 13px; color: var(--ink-3); }
.bank__fields { padding: 4px 0 12px; }
.vat:not(:has(input[name="enabled"]:checked)) .vat__fields { display: none; }
.row--top { align-items: flex-start; }
.rename > summary { display: inline-flex; font-weight: 500; font-size: 13px; color: var(--accent); padding-right: 20px; }
.rename > summary::after { width: 6px; height: 6px; border-color: var(--accent); }
.rename__form { display: flex; gap: 8px; align-items: center; max-width: 420px; padding-bottom: 4px; }
.rename__form input { flex: 1; min-width: 0; }
.picks { border: 0; border-radius: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.picks > legend { padding: 0; margin: 0 0 6px; }
.disclosure__body { padding-top: 4px; }
#history > summary .hint { font-weight: 400; }
.snippet__code { white-space: pre; word-break: normal; overflow-wrap: normal; }
.part > *, .guide__body > *, .guide__steps > li, .snippet { min-width: 0; }
@media (max-width: 959px) { html { scroll-padding-top: 76px; } }
.audit-bad { color: var(--bad); font-weight: 600; margin: 0; }
.tap-link { display: inline-flex; align-items: center; min-height: var(--tap); }

/* Tasks: a board of columns on a laptop, one column at a time behind tabs on a phone */
.board-filter { display: flex; gap: 8px; align-items: center; margin: 0 0 14px; max-width: 420px; }
.board-filter select { flex: 1; min-width: 0; }
.board { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 12px; }
.board__col { display: none; background: var(--panel); border-radius: var(--radius); padding: 10px; min-width: 0; }
.board__col--active { display: block; }
.board__title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: none; color: var(--ink-2); margin: 2px 4px 10px; }
.board__n, .board-tabs__n { font-weight: 600; color: var(--ink-3); font-size: 12px; }
.board-tabs__n { margin-left: 6px; }
@media (max-width: 899px) { .board__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
.board-tabs a[aria-current="page"] .board-tabs__n { color: rgb(255 255 255 / .8); }
.board__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.board__empty { margin: 4px; color: var(--ink-3); font-size: 13px; }
.board__col.is-over { outline: 2px dashed var(--accent); outline-offset: -2px; }
@media (min-width: 900px) {
  .board-tabs { display: none; }
  .board { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
  .board__col { display: block; }
}
.tcard { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 10px 12px; display: grid; gap: 6px; }
.tcard[draggable="true"] { cursor: grab; }
.tcard.is-dragging { opacity: .5; }
.tcard__title { font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; line-height: 1.35; }
.tcard__title:hover { text-decoration: underline; }
.tcard__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin: 0; font-size: 12px; color: var(--ink-3); }
.tcard__due { display: inline-flex; align-items: center; gap: 4px; }
.tcard__due--late { color: var(--bad); font-weight: 600; }
.tcard__prio { font-weight: 600; }
.tcard__prio--1 { color: var(--bad); }
.tcard__prio--2 { color: var(--warn); }
.tcard__move > summary { min-height: 32px; font-size: 13px; font-weight: 500; color: var(--ink-3); display: inline-flex; padding-right: 20px; }
.tcard__move > summary::after { width: 6px; height: 6px; }
.tcard__moves { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.tcard__moves .btn { min-height: 36px; padding: 0 10px; font-size: 13px; }
.task-desc, .task-comment { white-space: pre-wrap; overflow-wrap: anywhere; margin: 12px 0 0; }
.task-comment { margin: 4px 0 0; }
.task-comment-form { margin-top: 12px; }
.task-section { margin-top: 28px; }
.task-section .head--section h2 { margin: 0; }
.task-archive { margin-top: 20px; }
.task-board-link { margin: 8px 0 0; }
.bill-tasks__row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--rule); }
.bill-tasks__row:first-of-type { border-top: 0; }
.bill-tasks__title { font-weight: 600; overflow-wrap: anywhere; }
.bill-tasks__amount { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.linear-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-2); }
.linear-stat { font-size: 20px; }
.linear-failed { margin: 0; padding-left: 18px; }
.linear-map { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 8px 0; border-top: 1px solid var(--rule); }
.linear-map label { font-weight: 600; }
@media (min-width: 720px) { .linear-map { grid-template-columns: 1fr 1fr; align-items: center; } }

/* Client files and logos */
.avatar { width: var(--avatar, 32px); height: var(--avatar, 32px); border-radius: 6px; flex-shrink: 0; object-fit: contain; background: var(--paper); border: 1px solid var(--rule); }
.avatar--initials { display: inline-flex; align-items: center; justify-content: center; background: var(--accent-bg); color: var(--accent); border-color: transparent; font-weight: 700; font-size: calc(var(--avatar, 32px) * .38); letter-spacing: .02em; }
.row > .avatar { align-self: center; }
.row > .avatar + .row__main { flex: 1; }
.head__lead { display: flex; gap: 14px; align-items: center; min-width: 0; }
.tcard__client { display: inline-flex; align-items: center; gap: 6px; }
.tcard__client .avatar { border-radius: 4px; }
.btn--icon { width: var(--tap); padding-left: 0; padding-right: 0; justify-content: center; }
.badge--accent { background: var(--accent-bg); color: var(--accent); }
.flist { list-style: none; margin: 0; padding: 0; }
.frow { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; }
.frow + .frow { border-top: 1px solid var(--rule); }
.frow__icon { width: 40px; height: 40px; border-radius: 6px; background: var(--panel); color: var(--ink-2); display: grid; place-items: center; flex-shrink: 0; overflow: hidden; }
.frow__icon img { width: 100%; height: 100%; object-fit: contain; }
.frow__main { flex: 1; min-width: 0; }
.frow__title { margin: 0; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.frow__title a { color: var(--ink); text-decoration: none; }
.frow__title a:hover { color: var(--accent); text-decoration: underline; }
.frow__meta { margin: 2px 0 0; color: var(--ink-3); font-size: 13px; }
.frow__note { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.frow__end { display: flex; gap: 6px; align-items: flex-start; flex-shrink: 0; }
.frow__more > summary { list-style: none; }
.frow__more > summary::-webkit-details-marker { display: none; }
.frow__more[open] > summary { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }
.frow__menu { position: absolute; left: 12px; right: 12px; top: calc(100% - 6px); z-index: 5; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; box-shadow: 0 12px 32px rgb(11 11 12 / .14); }
.frow__actions { flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--rule); }
@media (min-width: 720px) { .frow__menu { left: auto; width: 380px; } }
.files__add { display: grid; gap: 12px; margin-top: 12px; }
.files__add > .card { margin: 0; }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px 16px; border: 1.5px dashed var(--rule); border-radius: var(--radius); text-align: center; color: var(--ink-2); cursor: pointer; transition: border-color .15s, background-color .15s; }
.drop:hover, .drop.is-over { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.drop__title { font-weight: 600; color: var(--ink); }
.drop__hint { font-size: 13px; color: var(--ink-3); }
.drop__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upq { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.upq__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 14px; }
.upq__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.upq__meta { color: var(--ink-3); font-size: 13px; text-align: right; }
.upq__bar { grid-column: 1 / -1; width: 100%; height: 6px; -webkit-appearance: none; appearance: none; border: 0; border-radius: 99px; background: var(--panel); overflow: hidden; }
.upq__bar::-webkit-progress-bar { background: var(--panel); border-radius: 99px; }
.upq__bar::-webkit-progress-value { background: var(--accent); border-radius: 99px; transition: width .2s; }
.upq__bar::-moz-progress-bar { background: var(--accent); border-radius: 99px; }
.upq__item.is-done .upq__meta { color: var(--ok); }
.upq__item.is-failed .upq__meta { color: var(--bad); grid-column: 1 / -1; text-align: left; }
.upq__item.is-failed .upq__bar::-webkit-progress-value { background: var(--bad); }
.upq__item.is-failed .upq__bar::-moz-progress-bar { background: var(--bad); }
.flist.card { padding: 0; }
.files { margin-top: 28px; }
.files > .card__head { margin-bottom: 10px; }

/* Split stage for sign-in, enrol and step-up: a plain working side beside a patterned brand panel */
.stage--split { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; overflow: visible; overflow-x: clip; }
.stage--split .stage__art { grid-column: 1; grid-row: 1; position: relative; overflow: hidden; isolation: isolate; height: 132px; background: #131416; border-bottom: 1px solid rgb(255 255 255 / .1); }
.stage--split .stage__top { grid-column: 1; grid-row: 1; align-self: start; position: relative; z-index: 1; border-bottom: 0; }
.stage--split .stage__main { grid-column: 1; grid-row: 2; width: 100%; }
.stage__weave { position: absolute; inset: -40px; z-index: -2; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cpath d='M0 4 L11 -6 L22 4 M0 15 L11 5 L22 15 M0 26 L11 16 L22 26' fill='none' stroke='%23ffffff' stroke-opacity='0.08' stroke-width='1.3'/%3E%3C/svg%3E"); background-size: 22px 22px; }
.stage__art::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(90% 70% at 100% 0%, rgb(255 255 255 / .06), transparent 70%), linear-gradient(to left, transparent 55%, rgb(19 20 22 / .85)); }
.stage__mark { position: absolute; right: -22%; top: 50%; height: 150%; translate: 0 -50%; color: #fff; opacity: .12; }
.stage__mark .ghost { position: static; translate: none; height: 100%; width: auto; opacity: 1; display: block; }
.signin h1 { margin-bottom: 36px; }
@media (min-width: 960px) {
  .stage--split { grid-template-columns: minmax(0, 1fr) minmax(380px, 42%); }
  .stage--split .stage__art { grid-column: 2; grid-row: 1 / -1; height: auto; min-height: 100svh; border-bottom: 0; border-left: 1px solid rgb(255 255 255 / .1); }
  .stage--split .stage__art::after { background: radial-gradient(80% 60% at 70% 20%, rgb(255 255 255 / .05), transparent 70%), linear-gradient(to right, rgb(19 20 22 / .9), transparent 30%); }
  .stage__mark { right: auto; left: 50%; height: auto; width: min(72%, 460px); translate: -50% -50%; opacity: .14; }
  .stage__mark .ghost { width: 100%; height: auto; }
}

/* Bank accounts in Settings: grouped by currency, default marked */
.banks { border-top: 1px solid var(--rule); padding-top: 12px; }
.banks__cur { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--ink-3); }
.banks__none { margin: 0 0 8px; font-size: 14px; }
.banks .bank summary .badge { margin-left: 8px; }
.bank__actions { padding: 4px 0 12px; }
.bank--add { border-top: 1px solid var(--rule); }
.bank-pick { margin: 6px 0 16px; max-width: 480px; }

/* Client notes timeline */
.note-add textarea { min-height: 84px; }
.note-add__row { display: flex; gap: 12px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.note-add__row .field { flex: 0 1 200px; }
.notes .timeline { list-style: none; margin: 12px 0 0; padding: 0; }
.note { position: relative; padding: 14px 16px 14px 34px; }
.note + .note { border-top: 1px solid var(--rule); }
.note::before { content: ""; position: absolute; left: 16px; top: 21px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.note__head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.note__date { font-weight: 600; }
.note__by { color: var(--ink-3); font-size: 13px; display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.note__more { margin-left: auto; }
.note__more > summary { list-style: none; min-height: 36px; width: 36px; }
.note__more > summary::-webkit-details-marker { display: none; }
.note__menu { position: absolute; left: 12px; right: 12px; top: 52px; z-index: 5; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; box-shadow: 0 12px 32px rgb(11 11 12 / .14); }
@media (min-width: 720px) { .note__menu { left: auto; width: 420px; } }
.note__actions { padding-top: 12px; border-top: 1px solid var(--rule); }
.note__body { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.note__edited { margin: 4px 0 0; font-size: 12px; color: var(--ink-3); }
.note__head { padding-right: 44px; }
.note__more { position: absolute; top: 8px; right: 12px; margin: 0; }
.note__menu { top: 50px; }

/* Requests and conversations */
.seg { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.seg__item { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 600; }
.seg__item:hover { border-color: var(--ink-3); color: var(--ink); }
.seg__item--on { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }
.badge--req-new { background: var(--accent-bg); color: var(--accent); text-decoration: none; }
.badge--req-accepted { background: var(--ok-bg); color: var(--ok); }
.badge--req-declined, .badge--req-merged { background: var(--panel); color: var(--ink-3); }
.requests { margin-top: 28px; }
.reqs { list-style: none; margin: 0; padding: 0; }
.reqs.card { padding: 0; }
.req { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; padding: 14px 16px; }
.req + .req { border-top: 1px solid var(--rule); }
.req__main { flex: 1 1 320px; min-width: 0; }
.req__title { margin: 0; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.req__title a { color: var(--ink); text-decoration: none; }
.req__title a:hover { color: var(--accent); text-decoration: underline; }
.req__meta { margin: 2px 0 0; color: var(--ink-3); font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.req__quote { margin: 10px 0 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--panel); border-radius: 0 6px 6px 0; }
.req__quote-by { margin: 0; font-size: 12px; color: var(--ink-3); }
.req__quote-text { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.req__link { margin: 8px 0 0; display: flex; gap: 6px; align-items: center; font-size: 14px; }
.req__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.req__actions form { margin: 0; }
.requests__actions { margin-top: 12px; flex-wrap: wrap; align-items: center; }
.convs { list-style: none; margin: 12px 0 0; padding: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); }
.convs li + li { border-top: 1px solid var(--rule); }
.req-triage { display: grid; gap: 12px; margin-top: 12px; }
.req-triage .card + .card { margin-top: 0; }
.req-triage .card > form.stack { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
.chat { margin-top: 20px; }
.chat__day { margin: 0 0 8px; }
.chat__list { list-style: none; margin: 0; padding: 0; }
.chat__list.card { padding: 0; }
.msg { padding: 10px 16px; scroll-margin-top: 80px; }
.msg + .msg { border-top: 1px solid var(--rule); }
.msg:target { background: var(--accent-bg); }
.msg__head { margin: 0; display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
.msg__head time { color: var(--ink-3); font-size: 12px; }
.msg__body { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg__foot { margin: 4px 0 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; }
.msg__make { color: var(--ink-3); }
.msg__make:hover { color: var(--accent); }

/* PRDs */
.badge--prd-draft { background: var(--panel); color: var(--ink-2); }
.badge--prd-in_review { background: var(--warn-bg); color: var(--warn); }
.badge--prd-approved { background: var(--ok-bg); color: var(--ok); }
.badge--prd-archived { background: var(--panel); color: var(--ink-3); }
.prds { margin-top: 28px; }
.prd-moves { margin-bottom: 16px; flex-wrap: wrap; }
.prd-layout { display: grid; gap: 16px; align-items: start; }
.prd-layout { grid-template-areas: "progress" "doc" "side"; }
.prd-progress { grid-area: progress; }
.prd-doc { grid-area: doc; min-width: 0; }
.prd-side { grid-area: side; }
@media (min-width: 1100px) {
  .prd-layout { grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "doc progress" "doc side"; grid-template-rows: auto 1fr; }
}
.prd-side .card + .card { margin-top: 0; }
.prd-side { display: grid; gap: 12px; }
.prose { padding: 20px 24px; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3 { color: var(--ink); text-transform: none; letter-spacing: -0.01em; }
.prose h1 { font-size: 24px; margin: 24px 0 8px; }
.prose h2 { font-size: 19px; font-weight: 700; margin: 24px 0 8px; }
.prose h3 { font-size: 16px; font-weight: 700; margin: 18px 0 6px; }
.prose p, .prose ul, .prose ol { margin: 0 0 12px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 4px; }
.prose li:has(> input[type="checkbox"]) { list-style: none; margin-left: -22px; padding-left: 26px; position: relative; }
.prose li > input[type="checkbox"]:first-child { position: absolute; left: 0; top: .3em; margin: 0; }
.prose input[type="checkbox"] { accent-color: var(--accent); }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--panel); padding: 1px 5px; border-radius: 4px; }
.prose pre { background: var(--panel); padding: 12px; border-radius: 6px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 0 0 12px; padding: 4px 12px; border-left: 3px solid var(--rule); color: var(--ink-2); }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 12px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--rule); padding: 6px 10px; text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 20px 0; }
.prd-reqs, .prd-links, .prd-versions { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.prd-reqs li { display: flex; gap: 8px; align-items: flex-start; }
.prd-reqs li .icon { margin-top: 3px; color: var(--ink-3); }
.prd-reqs li.is-done { color: var(--ink-3); }
.prd-versions li.is-current > a { font-weight: 700; }
.prd-versions__note { margin: 2px 0 0; color: var(--ink-2); font-size: 13px; }
.prd-editor { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; line-height: 1.55; min-height: 420px; }
.req-prd { margin-top: 12px; }
.req-prd__row select { flex: 1 1 200px; min-width: 0; }
.prd-side .card > form.stack { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--rule); }
.prd-links li { line-height: 1.4; }

/* Confirm dialog (shell.js turns every data-confirm into this) */
html:has(dialog.modal[open]) { overflow: hidden; }
.modal { width: min(440px, calc(100% - 32px)); max-width: none; padding: 0; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 64px rgb(11 11 12 / .24); }
.modal::backdrop { background: rgb(11 11 12 / .48); }
.modal[open] { animation: modal-in .18s cubic-bezier(.2, .8, .2, 1); }
.modal[open]::backdrop { animation: modal-fade .18s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes modal-fade { from { opacity: 0; } }
.modal__box { padding: 24px; }
.modal__title { margin: 0; font-size: 19px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); text-transform: none; }
.modal__body { margin: 8px 0 0; color: var(--ink-2); }
.modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.btn--destructive { background: var(--bad); border-color: var(--bad); color: #fff; }
@media (hover: hover) { .btn--destructive:hover { background: #741624; border-color: #741624; color: #fff; } }
@media (max-width: 480px) {
  .modal { margin: auto auto 16px; }
  .modal__box { padding: 20px; }
  .modal__actions { flex-direction: column-reverse; }
  .modal__actions .btn { width: 100%; }
}

/* Payment suggestions from bank statements */
.badge--sug-invoice { background: var(--accent-bg); color: var(--accent); }
.badge--sug-payout { background: var(--ok-bg); color: var(--ok); }
.badge--sug-money_out { background: var(--warn-bg); color: var(--warn); }
.sug__line { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.sug__alloc { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.sug__alloc li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; align-items: baseline; padding: 6px 10px; background: var(--panel); border-radius: 6px; }
.sug__alloc li > span:first-child { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.sug__alloc li > :last-child { margin-left: auto; white-space: nowrap; font-weight: 600; }
.sug__details { margin-top: 8px; font-size: 14px; }
.sug__details summary { cursor: pointer; color: var(--ink-2); }
.sug-inline { margin-top: 16px; border-color: var(--accent); }
.sug-inline .card__title { display: flex; align-items: center; gap: 8px; margin: 0; }
.sug-inline .list { border: 0; }
.sug-inline__item { padding: 10px 0; }
.sug-inline__item + .sug-inline__item { border-top: 1px solid var(--rule); }
.sug-inline__item .check { align-items: flex-start; }
.sug-inline__item .notice { margin: 8px 0 0; }
.sug-inline__item .row__meta { margin: 4px 0 0 37px; }

/* Approved imports summary */
.import-done { display: grid; gap: 4px; padding: 14px 16px; }
.import-done p { margin: 0; }
.import-done__title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; }
.import-done__text { font-weight: 500; color: var(--ink-2); }
.import-done__totals { display: flex; flex-wrap: wrap; gap: 4px 16px; font-weight: 500; }
.badge--new { background: var(--accent-bg); color: var(--accent); }
.import-done-list li.is-new { box-shadow: inset 3px 0 0 var(--accent); background: linear-gradient(90deg, var(--accent-bg), transparent 60%); }
.import-done-list .row__end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.row__sub { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
@media (max-width: 600px) {
  .import-done-list .row { flex-direction: column; align-items: stretch; gap: 6px; }
  .import-done-list .row__end { flex-direction: row; align-items: baseline; justify-content: space-between; text-align: left; }
}

/* Home polish */
.stat { container-type: inline-size; }
.stat__v { font-size: clamp(20px, 11.5cqi, 30px); font-variant-numeric: tabular-nums; }
.stat__cur { font-size: .5em; font-weight: 600; color: var(--ink-3); letter-spacing: .04em; margin-right: .35em; vertical-align: .32em; }
.bars__track { background: transparent; border-bottom: 1px solid var(--rule); border-radius: 0; overflow: visible; }
.bars__bar { border-radius: 4px 4px 0 0; opacity: .4; }
.chart--compact .bars { height: 120px; }
.actions-list--recent .action-item__title { font-weight: 500; }

/* Expenses */
.exp-filter { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); align-items: end; margin: 12px 0; }
.exp-filter .actions { flex-wrap: nowrap; }
.exp-total { margin: 4px 0 12px; }
.exp-list .row { align-items: flex-start; }
.exp-list .row__main { flex: 1; }
.exp__icon { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--panel); color: var(--ink-2); }
.exp__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0; }
.exp__cat { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.exp__src { font-size: 12px; color: var(--ink-3); }
.badge--exp { background: var(--accent-bg); color: var(--accent); }
.badge--exp-none { background: var(--warn-bg); color: var(--warn); }
.tag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 99px; border: 1px solid var(--rule); font-size: 12px; color: var(--ink-2); }
.tag--accent { border-color: var(--accent); color: var(--accent); }
.exp--review { border-bottom: 1px solid var(--rule); }
.exp__fix { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 0 12px 12px 60px; }
.exp__fix select { flex: 1 1 200px; max-width: 320px; }
@media (max-width: 719px) { .exp__fix { padding-left: 12px; } .exp__fix select { max-width: none; } .exp__fix .btn { flex: 1 1 100%; } }
.exp-detail { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 960px) { .exp-detail { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; } }
.exp-side { display: grid; gap: 12px; }
.exp-side .card { margin: 0; }
.exp-side h2, .exp-detail h2 { margin: 0 0 8px; font-size: 17px; }
.exp__line { font-size: 13px; overflow-wrap: anywhere; color: var(--ink-2); }
.exp-upload { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.exp-upload input[type=file] { flex: 1 1 200px; min-width: 0; }
.rcheck { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.rcheck li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.rcheck__ok { color: var(--ok); } .rcheck__bad { color: var(--bad); } .rcheck__muted { color: var(--ink-3); }
.cat-list { display: grid; gap: 12px; }
.cat { display: grid; gap: 8px; margin: 0; }
.cat__form { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .cat__form { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } .cat__foot { grid-column: 1 / -1; } }
.cat__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Spending insights */
.seg__gap { flex: 0 0 12px; }
.stat__v--bad { color: var(--bad); }
.ichart { margin: 0; }
.ibars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; height: 220px; }
.ibars__col { display: grid; grid-template-rows: auto 1fr auto; gap: 6px; text-align: center; min-width: 0; }
.ibars__value { font-size: 12px; font-weight: 700; min-height: 16px; white-space: nowrap; }
.ibars__value--ok { color: var(--ok); } .ibars__value--bad { color: var(--bad); }
.ibars__label { font-size: 12px; color: var(--ink-3); }
.ibars__track { position: relative; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--rule); }
.ibars__stack { display: flex; flex-direction: column-reverse; width: 100%; max-width: 44px; min-height: 2px; border-radius: 4px 4px 0 0; overflow: hidden; transform-origin: bottom; animation: bar-in .6s cubic-bezier(.16, 1, .3, 1) both; }
.ibars__seg { display: block; flex-basis: 0; min-height: 1px; }
.ibars__col:not(.ibars__col--now) .ibars__stack { opacity: .82; }
.ibars__track--pair { gap: 3px; }
.ibars__in, .ibars__out { display: block; width: 45%; max-width: 20px; border-radius: 3px 3px 0 0; transform-origin: bottom; animation: bar-in .6s cubic-bezier(.16, 1, .3, 1) both; }
.ibars__in { background: #6b8f4e; } .ibars__out { background: var(--accent); }
.ilegend { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.ilegend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; font-size: 14px; }
.ilegend a, .ilegend span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ilegend__dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.ilegend__pct { color: var(--ink-3); font-size: 13px; }
.ilegend--inline { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.ilegend--inline li { display: flex; gap: 8px; }
.ilegend--inline .ilegend__dot { width: 12px; height: 12px; max-width: none; animation: none; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.hbars__top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.hbars__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.hbars__track { display: block; height: 8px; background: var(--panel); border-radius: 99px; margin: 6px 0 4px; overflow: hidden; }
.hbars__bar { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
@media (prefers-reduced-motion: reduce) { .ibars__stack, .ibars__in, .ibars__out { animation: none; } }
.stats--four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
@media (max-width: 899px) { .dash--insights .dash__side { order: 0; } }

/* Payments page */
.seg__count { margin-left: 6px; min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--panel); color: var(--ink-2); font-size: 12px; line-height: 20px; text-align: center; }
.seg__item--on .seg__count { background: var(--paper); color: var(--accent); }
.sug-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0 0 12px; }
.sug-sum__in { color: var(--ok); font-weight: 600; }
.sug-sum__out { color: var(--ink-2); font-weight: 600; }
.sug-group { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 16px 0 8px; }
.sug-group:first-of-type { margin-top: 4px; }
.import__extra details > summary { position: relative; display: inline-flex; align-items: center; width: fit-content; padding-right: 22px; }
.pay-ways { margin-top: 12px; }
.pay-ways ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 900px) { .pay-ways ul { grid-template-columns: 1fr 1fr; } }
.pay-ways li { display: flex; gap: 12px; align-items: flex-start; }
.pay-ways__icon { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-bg); color: var(--accent); }
.pay-ways__title { margin: 0 0 2px; font-weight: 600; }
.pay-ways li .row__meta { margin: 0; }
.pay-ways__link { margin: 4px 0 0; font-size: 14px; }

/* Charts */
.chart-tip { position: fixed; z-index: 50; pointer-events: none; display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; background: #0b0b0c; color: #fff; font-size: 13px; box-shadow: 0 8px 24px rgb(11 11 12 / .22); max-width: 240px; }
.chart-tip b { font-size: 12px; letter-spacing: .04em; color: #c9ccd1; font-weight: 600; }
.chart-tip[hidden] { display: none; }
.spark { display: block; width: 100%; height: 30px; margin-top: 8px; overflow: visible; }
.spark__area { fill: var(--accent); opacity: .1; }
.spark__line { fill: none; stroke: var(--accent); stroke-width: 1.75; }
.spark__dot { fill: var(--accent); }
.spark--in .spark__area { fill: var(--ok); } .spark--in .spark__line { stroke: var(--ok); } .spark--in .spark__dot { fill: var(--ok); }
.flow { margin: 0; }
.flow__svg { display: block; width: 100%; height: auto; overflow: visible; }
.flow__grid { stroke: var(--rule); stroke-dasharray: 3 4; }
.flow__zero { stroke: #c9ccd1; }
.flow__tick text, .flow__month { font-size: 12px; fill: var(--ink-3); font-family: inherit; }
.flow__col--now .flow__month { fill: var(--ink); font-weight: 600; }
.flow__bar { transform-box: fill-box; transform-origin: bottom; animation: bar-in .7s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i) * 45ms); transition: opacity .15s; }
.flow__bar--in { fill: #6b8f4e; }
.flow__bar--out { fill: var(--accent); }
.flow__hit { fill: transparent; cursor: default; }
.flow__svg:has(.flow__hit.is-tipped) .flow__col:not(:has(.is-tipped)) .flow__bar { opacity: .35; }
.flow__col:has(.is-tipped) .flow__month { fill: var(--ink); font-weight: 600; }
.flow__net { fill: none; stroke: #c2862e; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1s .35s ease-out forwards; pointer-events: none; }
.flow__dot { fill: var(--paper); stroke: #c2862e; stroke-width: 2.5; pointer-events: none; }
.flow__dot--neg { stroke: var(--bad); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.flow__key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.flow__key span { display: inline-flex; align-items: center; gap: 6px; }
.flow__sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.flow__sw--in { background: #6b8f4e; } .flow__sw--out { background: var(--accent); }
.flow__sw--net { height: 3px; border-radius: 2px; background: #c2862e; }
.flow + .flow { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--rule); }
.card:has(> .donut) { container-type: inline-size; }
.donut { margin: 0; display: grid; gap: 16px; align-items: center; grid-template-columns: 1fr; }
@container (min-width: 520px) { .donut { grid-template-columns: minmax(140px, 200px) minmax(0, 1fr); } }
.donut__svg { width: 100%; max-width: 200px; justify-self: center; overflow: visible; }
.donut__track { fill: none; stroke: var(--panel); stroke-width: 22; }
.donut__seg { fill: none; stroke-width: 22; transition: stroke-width .15s, opacity .15s; animation: ring-in .8s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i) * 70ms); }
.donut__svg:has(.is-tipped) .donut__seg:not(.is-tipped) { opacity: .4; }
.donut__seg.is-tipped { stroke-width: 28; }
@keyframes ring-in { from { opacity: 0; } }
.donut__total { font-size: 26px; font-weight: 700; fill: var(--ink); font-family: inherit; }
.donut__label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; fill: var(--ink-3); font-family: inherit; }
.donut__legend { margin: 0; }
.stat .spark { margin-top: auto; padding-top: 8px; }
@media (prefers-reduced-motion: reduce) { .flow__bar, .donut__seg { animation: none; } .flow__net { animation: none; stroke-dashoffset: 0; } }

/* Calm sidebar: plain at the top, the chevron pattern fading in towards the bottom */
.side--calm { background-color: var(--ink); background-image: none; }
.side--calm::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cpath d='M0 4 L11 -6 L22 4 M0 15 L11 5 L22 15 M0 26 L11 16 L22 26' fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='1.3'/%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, transparent 22%, rgb(0 0 0 / .55) 62%, #000 100%); mask-image: linear-gradient(180deg, transparent 0%, transparent 22%, rgb(0 0 0 / .55) 62%, #000 100%); }

/* Client controls */
.inline-form { display: contents; }
.btn--starred svg { fill: #c2862e; stroke: #c2862e; }
.client-star { display: inline-flex; vertical-align: -2px; margin-right: 6px; color: #c2862e; }
.client-star svg { fill: currentColor; }
.row__title .badge { margin-left: 8px; vertical-align: 1px; }
.badge--bad { background: var(--bad-bg); color: var(--bad); }
.client-hold { display: grid; gap: 8px; }
.client-hold p { margin: 0; }
.client-hold form { margin: 0; }
.client-status { margin-top: 16px; }
.client-status.stack { gap: 0; }
.client-status__head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.client-status__head .card__title { margin: 0; }
.client-status__row { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--rule); }
.client-status__text { display: grid; gap: 2px; flex: 1 1 260px; min-width: 0; max-width: 62ch; }
.client-status__k { margin: 0; font-weight: 600; color: var(--ink); }
.client-status__k--bad { color: var(--bad); }
.client-status__row .hint { margin: 0; }
.client-status__blacklist { border-top: 1px solid var(--rule); }
.client-status__blacklist > summary { list-style: none; cursor: pointer; border-top: 0; padding-bottom: 14px; }
.client-status__blacklist > summary::-webkit-details-marker { display: none; }
.client-status__blacklist > summary::after { content: none; }
.client-status__open { color: var(--bad); border-color: #e3b8be; pointer-events: none; }
.client-status__blacklist > summary:hover .client-status__open { background: #fbeef0; }
.client-status__blacklist > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.client-status__open-label, .client-status__blacklist[open] .client-status__closed-label { display: none; }
.client-status__blacklist[open] .client-status__open-label { display: inline; }
.client-status__blacklist[open] .client-status__open { color: var(--ink-2); border-color: var(--rule); }
.client-status__form { max-width: 62ch; padding: 0 0 6px; }
.client-status__void { border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 8px; margin: 0; }
.client-status__void legend { font-weight: 600; padding: 0 4px; }
/* Task labels */
.tlabel { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 0 8px; border-radius: 99px; border: 1px solid var(--rule); background: var(--paper); font-size: 12px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.tlabel::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--label, var(--ink-3)); }
.tcard__labels { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; }
.label-picks { border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; margin: 0; display: grid; gap: 12px; }
.label-picks legend { font-weight: 600; padding: 0 4px; }
.label-picks__list { display: flex; flex-wrap: wrap; gap: 8px; }
.label-pick { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); cursor: pointer; }
.label-pick input:checked + .tlabel { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); }

/* Collapsible sidebar */
.side__toggle { display: none; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 6px; background: none; color: #a8a8a9; cursor: pointer; }
.side__toggle:hover { color: #fff; background: rgb(255 255 255 / .06); }
@media (min-width: 960px) {
  .side__toggle { display: inline-flex; }
  body.has-side { transition: grid-template-columns .2s cubic-bezier(.2, .7, .2, 1); }
  body.side-collapsed { grid-template-columns: 68px minmax(0, 1fr); }
  .side-collapsed .side { padding: 18px 10px; overflow: visible; }
  .side-collapsed .side__head { flex-direction: column; gap: 14px; padding: 0; }
  .side-collapsed .side .brand { font-size: 0; gap: 0; letter-spacing: 0; }
  .side-collapsed .side__app { display: none; }
  .side-collapsed .side__nav { margin-top: 14px; }
  .side-collapsed .side__nav a, .side-collapsed .side__foot a, .side-collapsed .side__foot button { justify-content: center; padding: 0; gap: 0; }
  .side-collapsed .side__nav a > span:not(.count), .side-collapsed .side__foot a > span, .side-collapsed .side__foot button > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .side-collapsed .side .count { position: absolute; top: 8px; right: 10px; min-width: 8px; height: 8px; padding: 0; font-size: 0; }
  .side-collapsed .side [data-tip-side]:hover::after, .side-collapsed .side [data-tip-side]:focus-visible::after {
    content: attr(data-tip-side); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); z-index: 40; pointer-events: none;
    padding: 5px 9px; border-radius: 6px; background: #0b0b0c; border: 1px solid rgb(255 255 255 / .14); color: #fff; font-size: 13px; font-weight: 500; white-space: nowrap; box-shadow: 0 6px 18px rgb(0 0 0 / .3);
  }
}
@media (prefers-reduced-motion: reduce) { body.has-side { transition: none; } }

/* Tasks, Linear style */
main:has(.tasks-wide) { max-width: none; }
.kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; margin-left: 6px; border-radius: 4px; border: 1px solid currentColor; font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; opacity: .55; }
.hint .kbd { margin: 0 2px; }
.btn .kbd { border-color: rgb(255 255 255 / .5); }
@media (hover: none) { .kbd { display: none; } }
.sicon { flex-shrink: 0; }
.sicon--backlog { color: var(--ink-3); } .sicon--todo { color: var(--ink-2); } .sicon--in_progress { color: #c2862e; } .sicon--done { color: var(--accent); } .sicon--canceled { color: var(--ink-3); }
.picon { flex-shrink: 0; color: var(--ink-3); }
.picon--1 { color: #e5484d; } .picon--2, .picon--3, .picon--4 { color: var(--ink-2); }
.ttools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin: 0 0 16px; }
.ttools__filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1 1 520px; margin: 0; }
.ttools__filters select { width: auto; min-width: 140px; flex: 0 1 180px; }
.ttools__search { position: relative; display: flex; align-items: center; flex: 1 1 220px; max-width: 340px; }
.ttools__search > svg { position: absolute; left: 12px; color: var(--ink-3); pointer-events: none; }
.ttools__search input { padding-left: 36px; padding-right: 34px; width: 100%; }
.ttools__search .kbd { position: absolute; right: 10px; margin: 0; color: var(--ink-3); }
.ttools__search input:focus + .kbd { display: none; }
.ttools__clear { font-size: 14px; }
.ttools__view { margin: 0; flex-wrap: nowrap; }
.ttools__view .seg__item { gap: 6px; }
.smenu { position: relative; display: inline-flex; }
.smenu > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; cursor: pointer; padding: 0; }
.smenu > summary::-webkit-details-marker { display: none; }
.smenu > summary::after { content: none !important; }
.smenu > summary:hover { background: var(--panel); }
.smenu__list { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; min-width: 168px; padding: 4px; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 10px 28px rgb(11 11 12 / .14); display: grid; }
.smenu__list form { margin: 0; }
.smenu__item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 14px; color: var(--ink); text-align: left; cursor: pointer; }
.smenu__item:hover, .smenu__item:focus-visible { background: var(--panel); }
.smenu__item[aria-current="true"] { font-weight: 600; }
.tcard { gap: 4px; padding: 10px 12px 12px; }
.tcard__top { display: flex; align-items: center; gap: 6px; min-height: 24px; margin: -2px -4px 0; }
.tcard__id { font-size: 12px; color: var(--ink-3); }
.tcard__pri { margin-left: auto; display: inline-flex; padding: 0 4px; }
.tcard__title { font-weight: 500; }
.tcard__labels { margin: 2px 0 0; }
.tcard__meta { margin-top: 2px; }
.board__title { gap: 8px; }
.tgroup__add { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; color: var(--ink-3); }
.tgroup__add:hover { background: var(--paper); color: var(--ink); }
@media (min-width: 720px) {
  .board { grid-template-columns: repeat(4, minmax(260px, 1fr)); overflow-x: auto; padding-bottom: 4px; }
}
.tlist { display: grid; gap: 18px; margin-bottom: 12px; }
.tgroup { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); overflow: visible; }
.tgroup__head { display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 8px 6px 14px; font-size: 14px; font-weight: 600; background: var(--panel); border-bottom: 1px solid var(--rule); border-radius: var(--radius) var(--radius) 0 0; }
.tgroup__head .tgroup__add:hover { background: var(--paper); }
.tgroup__n { font-weight: 500; color: var(--ink-3); font-size: 13px; }
.tgroup__rows { list-style: none; margin: 0; padding: 0; }
.trow { display: grid; grid-template-columns: 18px 24px minmax(0, 1fr); grid-template-areas: "pri status title" ". . end"; align-items: center; column-gap: 8px; row-gap: 4px; padding: 8px 12px; border-top: 1px solid var(--rule); }
.trow:first-child { border-top: 0; }
.trow:hover { background: #f8f9fa; }
.trow__pri { grid-area: pri; display: inline-flex; }
.trow__id { display: none; font-size: 12px; color: var(--ink-3); }
.trow .smenu { grid-area: status; }
.trow__title { grid-area: title; color: var(--ink); text-decoration: none; font-weight: 500; overflow-wrap: anywhere; line-height: 1.35; }
.trow__title:hover { text-decoration: underline; }
.trow__end { grid-area: end; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12px; color: var(--ink-3); }
.trow__labels { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.trow__client { display: inline-flex; align-items: center; gap: 6px; }
.trow__client .avatar { border-radius: 4px; }
@media (min-width: 900px) {
  .trow { grid-template-columns: 18px 72px 24px minmax(0, 1fr) auto; grid-template-areas: "pri id status title end"; min-height: 44px; padding: 4px 12px; }
  .trow__id { display: block; grid-area: id; }
  .trow__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
  .trow__end { flex-wrap: nowrap; justify-content: flex-end; }
  .trow__end > * { white-space: nowrap; }
}
.tpage { display: grid; gap: 16px; align-items: start; }
.tpage__sub { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tpage__sub .mono { margin-left: 6px; color: var(--ink-3); }
.tprops { display: grid; gap: 10px; }
.tprop { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.tprop__k { font-size: 13px; color: var(--ink-3); padding: 0; }
.tprop select, .tprop input { min-height: 38px; }
.tprop--labels { align-items: start; }
.tprop--labels legend { float: left; width: 76px; padding-top: 10px; }
.tprop--labels .label-picks__list { gap: 4px 6px; }
.tprops__info { margin: 12px 4px 0; font-size: 14px; }
.task-body { min-height: 72px; }
@media (min-width: 1080px) {
  .tpage { grid-template-columns: minmax(0, 1fr) 320px; }
  .tpage__side { grid-column: 2; grid-row: 1; position: sticky; top: 24px; }
  .tpage__main { grid-column: 1; grid-row: 1; min-width: 0; }
}

.ttools__go[hidden] { display: none; }
.tgroup__head { text-transform: none; letter-spacing: 0; color: var(--ink); }
@media (min-width: 720px) { .board { grid-template-columns: repeat(4, minmax(220px, 1fr)); } }
.tprop--labels { display: block; }
.tprop--labels legend { float: none; width: auto; padding: 0 0 8px; }
.tprops .label-pick { min-height: 30px; position: relative; }
.tprops .label-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tprops .label-pick input:focus-visible + .tlabel { outline: 2px solid var(--accent); outline-offset: 2px; }
.tprops .label-pick .tlabel { cursor: pointer; }
.ttools__filters select { flex: 0 1 158px; min-width: 120px; }
.ttools__search { flex: 1 1 200px; }

/* Invoice adjustments */
.badge--written_off { background: var(--panel); color: var(--ink-3); border-color: var(--rule); }

.adj { margin-top: 24px; }
.adj__list { margin-bottom: 12px; }
.adj__item--rejected .row__title, .adj__struck { color: var(--ink-3); }
.adj__struck { text-decoration: line-through; }
.adj__decide { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-start; padding: 0 16px 12px; }
.adj__decide form { margin: 0; }
.adj__reject { flex: 1 1 240px; }
.adj__reject > summary { min-height: 40px; color: var(--bad); }
.adj__kinds { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.adj__rest { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--rule); display: grid; gap: 8px; }
.pay__adjusted { margin: 8px 0 0; max-width: none; }
.adj__reject > summary { display: inline-flex; align-items: center; width: fit-content; padding-right: 22px; position: relative; }

/* Sign-in art: pinned, no parallax */
@media (min-width: 960px) { .stage--split .stage__art { position: sticky; top: 0; height: 100svh; min-height: 0; } }

/* Invoice page */
.ihero__client { color: inherit; text-decoration: none; }
.ihero__client:hover, .ihero__client:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
main:has(.ipage) { container-type: inline-size; }
.ipage { display: grid; gap: 8px 28px; margin-top: 8px; }
@container (min-width: 860px) {
  .ipage { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .ipage__side { position: sticky; top: 16px; }
}
.ipage__main > h2:first-child, .ipage__side > :first-child { margin-top: 16px; }
.ipage__totals { margin-top: 12px; }
.ipage__empty { margin: 0 0 8px; }
.ipage__side .card { margin-bottom: 12px; }
.ipage__side h2 { margin-top: 20px; }
.iclient__head { display: flex; gap: 12px; align-items: center; }
.iclient__head .avatar { border-radius: 8px; flex-shrink: 0; }
.iclient__name { margin: 2px 0 0; font-size: 18px; letter-spacing: 0; text-transform: none; color: var(--ink); }
.iclient__name a { color: inherit; }
.iclient__owes { margin: 12px 0; font-weight: 600; }
.client-link__url { overflow-wrap: anywhere; font-size: 13px; }

/* Adjustment removal */
.adj__item--removed .row__title { color: var(--ink-3); }
.adj__evidence { white-space: pre-line; }
.adj__removal { padding: 0 16px 12px; }
.adj__removal-note { margin: 0 0 8px; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--wash, rgb(35 53 107 / .05)); font-size: 14px; }
.adj__removal .adj__decide { padding: 0; }
.adj__remove { padding: 0 16px 12px; }
.adj__remove > summary { display: inline-flex; align-items: center; width: fit-content; min-height: 40px; padding-right: 22px; position: relative; color: var(--ink-2); }

.adj__reject > summary, .adj__remove > summary { padding: 8px 30px 8px 0; }
.adj__reject > summary::after, .adj__remove > summary::after { right: 8px; }
.adj__remove > :not(summary) { margin: 0 0 4px; }
.adj__kinds .check { display: block; padding: 8px 0; min-height: 0; }
.adj__kinds .check input { vertical-align: -2px; margin: 0 8px 0 0; }

/* Payment changes */
.chg-group { margin-bottom: 24px; }
.chg__why { margin: 6px 0 0; font-size: 14px; color: var(--ink); }
.chg__split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 24px; }
.chg__split > div, .chg .import__extra > * { min-width: 0; }
.chg .import__top { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "amount" "meta"; padding-left: 16px; }
.chg .import__extra { padding-left: 16px; }
@media (min-width: 720px) {
  .chg__split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .chg .import__top { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head amount" "meta meta"; }
}
.chg__split .stat__k { margin: 0 0 4px; }
.chg__decide { padding: 4px 0 0; }
.chg .sug__alloc li > span:only-child { white-space: normal; margin-left: 0; font-weight: 400; }

/* Client credit */
.credit { margin-top: 8px; }
.credit__card { display: grid; gap: 12px; }
.credit__balance { margin: 0; font-size: 18px; font-weight: 700; }
.credit__list { margin: 0; }
.credit__moves { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.credit__moves li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; }
.credit__moves li > span:first-child { flex: 1 1 220px; min-width: 0; color: var(--ink-2); }
.credit__out { color: var(--ink-2); }
.credit .disclosure { margin-top: 12px; }

/* Payers */
.payers__card { display: grid; gap: 14px; }
.payers__policy { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.payers__policy .field { flex: 1 1 260px; margin: 0; }
.payers__group .stat__k { margin: 0 0 6px; }
.payers__list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.payers__list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; padding: 6px 10px; background: var(--panel); border-radius: 6px; font-size: 14px; }
.payers__list li > span { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.payers .disclosure { margin: 0; }

.payers__policy > :first-child { flex: 1 1 240px; margin: 0; }
.payers__hint { flex-basis: 100%; margin: 0; }
.payers__list li { flex-wrap: nowrap; }
.payers__list .btn { min-height: 32px; padding: 4px 12px; font-size: 13px; flex-shrink: 0; }
.payers__list form { margin: 0; }

/* Invoice history */
.ihist { display: grid; gap: 12px; }
.ihist__title { margin: 0; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); }
.ihist__block .stat__k { margin: 0 0 6px; }
.ihist__agreed { margin: 0; font-weight: 700; }
.ihist__list, .ihist__notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.ihist__list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; }
.ihist__list li > span:first-child { flex: 1 1 140px; min-width: 0; }
.ihist__right { white-space: nowrap; }
.ihist__old { color: var(--ink-3); text-decoration: line-through; }
.ihist__note--old { color: var(--ink-3); }
.ihist { container: ihist / inline-size; }
.ihist__empty { margin: 0; }
.ihist__actions { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--rule); }
.ihist .disclosure { margin: 0; }
.ihist .two { grid-template-columns: minmax(0, 1fr); }
@container ihist (min-width: 440px) { .ihist .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.ihist input, .ihist select { min-width: 0; width: 100%; box-sizing: border-box; }
.ihist input[type="file"] { width: auto; max-width: 100%; }
.ihist__rows { display: grid; gap: 8px; }
.ihist__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 8px; }
.ihist__row > input[type="date"] { grid-column: 1 / -1; }
.ihist__row--head { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.ihist__row--head > span:last-child { display: none; }
@container ihist (min-width: 400px) {
  .ihist__row { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.2fr); }
  .ihist__row > input[type="date"] { grid-column: auto; }
  .ihist__row--head > span:last-child { display: block; }
}
.ihist__row:not(.ihist__row--head) + .ihist__row:not(.ihist__row--head) { padding-top: 8px; border-top: 1px dashed var(--rule); }
@container ihist (min-width: 400px) { .ihist__row:not(.ihist__row--head) + .ihist__row:not(.ihist__row--head) { padding-top: 0; border-top: 0; } }
.ihist__sum { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ihist__sum[data-state="over"] { color: var(--bad); }
.ihist__sum[data-state="exact"] { color: var(--ok); }
.ihist .disclosure > form + form { margin-top: 0; }
.badge--inst-paid { background: var(--ok-wash, #e7f5ec); color: var(--ok, #1d6b3a); }
.badge--inst-overdue { background: var(--bad-wash, #fbe9e9); color: var(--bad, #a12121); }
.note--superseded .note__body { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.note__links { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }

.sug__evidence { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.sug__evidence q { color: var(--ink-2); }

/* Accounts */
.accts { list-style: none; margin: 0; padding: 0; }
.acct { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.acct:last-child { border-bottom: 0; }
.acct__main { flex: 1 1 260px; min-width: 0; }
.acct__main .row__meta { margin: 2px 0 0; }
.acct__lines { display: flex; gap: 16px; margin: 0; }
.acct__lines div { text-align: right; }
.acct__lines dt { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.acct__lines dd { margin: 2px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.acct__todo { color: var(--bad, #a12121); }
.accts__grid { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 960px) { .accts__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.gaps__list { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }
.owner { display: grid; gap: 12px; }
.owner__net { margin: 0; font-size: 18px; font-weight: 700; }
.owner__year { width: 100%; border-collapse: collapse; font-size: 14px; }
.owner__year th, .owner__year td { padding: 6px 0; border-bottom: 1px solid var(--rule); text-align: left; font-weight: 400; }
.owner__year thead th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.owner__year .num { text-align: right; font-variant-numeric: tabular-nums; }
.owner .disclosure { margin: 0; }
.accts__grid > .card { margin: 0; }

/* Subscriptions */
.subs__card { display: grid; gap: 12px; }
.subs__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.subs__list > li { padding: 8px 10px; background: var(--panel); border-radius: 6px; }
.subs__row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 14px; }
.subs__item { flex: 1 1 220px; min-width: 0; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.subs__qty { color: var(--ink-2); white-space: nowrap; }
.subs__total { white-space: nowrap; font-weight: 700; }
.subs__edit { margin: 4px 0 0; }
.subs__edit > summary { min-height: 32px; padding: 4px 30px 4px 0; font-size: 13px; color: var(--ink-2); }
.subs__edit > summary::after { right: 8px; }
.subs__edit > :not(summary) { margin: 0 0 8px; }
.subs__sum { margin: 0; font-weight: 700; }
.subs .disclosure { margin: 0; }
.subs__draft { margin: 0; }
.ihist .disclosure > summary { padding-left: 0; padding-right: 32px; }
.ihist .disclosure > summary::after { right: 4px; }
.ihist .disclosure > :not(summary) { margin: 0 0 14px; }
.client-status__blacklist > summary { font-weight: 400; }
.client-status__blacklist[open] .client-status__sum { display: none; }

/* PRD list */
.prd-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 4px 0 16px; }
.prd-tools .seg { margin: 0; }
.prd-tools__client { display: flex; gap: 8px; align-items: center; }
.prd-tools__client select { width: auto; min-width: 200px; max-width: 280px; }
.prd-group + .prd-group { margin-top: 20px; }
.prd-group__title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 8px; font-size: 14px; }
.prd-group__n { color: var(--ink-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.prd-group__hint { color: var(--ink-3); font-weight: 400; font-size: 13px; }
.prows > li + li { border-top: 1px solid var(--rule); }
.prow { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; color: inherit; text-decoration: none; }
.prow:hover { background: var(--panel); }
.prow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.prow__icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--panel); color: var(--ink-2); }
.prow__main { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.prow__title { font-weight: 600; overflow-wrap: anywhere; }
.prow__meta { font-size: 13px; color: var(--ink-3); }
.prow__progress { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.prow__reqs { display: inline-flex; align-items: center; gap: 8px; }
.prow__bar { display: inline-block; width: 64px; height: 6px; border-radius: 99px; background: var(--rule); overflow: hidden; }
.prow__bar > span { display: block; height: 100%; background: var(--ok); }
.prow__chip { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); }
.prow__chip--warn { color: var(--warn, #8a5a00); }
.prow__end { flex: none; padding-top: 2px; }
.prd-pick { max-width: 480px; }
.prd-group__title { text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: 700; }
.prd-group__hint { text-transform: none; letter-spacing: 0; }
.prow__reqs, .prow__progress > span { white-space: nowrap; }
.prow__main { grid-template-columns: minmax(0, 1fr); }

/* PRD page */
.prd-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.prd-meta .badge { font-size: 13px; padding: 3px 10px; }
.prd-moves { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.prd-moves .actions { margin: 0; }
.prd-moves__end .btn { border-color: transparent; background: transparent; color: var(--ink-2); }
.prd-moves__end .btn:hover { color: var(--bad); background: var(--panel); }
.prd-progress { display: grid; gap: 10px; align-content: start; }
.prd-progress__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.prd-progress__head .card__title { margin: 0; }
.prd-progress__count { font-size: 13px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.prd-progress__bar { display: block; height: 6px; border-radius: 99px; background: var(--rule); overflow: hidden; }
.prd-progress__bar > span { display: block; height: 100%; background: var(--ok); }
.prd-reqs__group { display: grid; gap: 6px; }
.prd-reqs__heading { margin: 4px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.prd-reqs__task { font-size: 12px; font-weight: 600; white-space: nowrap; }
.prd-reqs__none { font-size: 12px; color: var(--ink-3); white-space: nowrap; margin-left: 4px; }
.prd-reqs li .icon { flex: none; }
.prd-done { margin: 0; }
.prd-done > summary { padding-left: 0; font-size: 14px; color: var(--ink-2); }
.prd-done > :not(summary) { margin: 0 0 10px; }
.prd-progress form { margin: 0; }
.prd-toc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 10px; font-size: 13px; }
.prd-toc__k { color: var(--ink-3); font-weight: 600; }
.prd-toc a { color: var(--ink-2); text-decoration: none; }
.prd-toc a:hover { color: var(--accent); text-decoration: underline; }
.prose h1[id], .prose h2[id], .prose h3[id] { scroll-margin-top: 80px; }
.prose .issue-ref { font-variant-numeric: tabular-nums; white-space: nowrap; }
.prose li:has(> input[type="checkbox"]:checked) { color: var(--ink-3); }

/* Client page */
.client-group > h2:first-child, .client-group > :first-child > h2:first-child { margin-top: 28px; }
.note-add__toggle, .files__toggle { margin: 0 0 12px; }
.note-add__toggle > summary, .files__toggle > summary { font-weight: 600; }
.credit__proposal { display: grid; gap: 6px; padding: 14px 16px; }
.credit__proposal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.credit__proposal-title { margin: 0; font-weight: 700; }
.credit__proposal-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; color: var(--ink-3); }
.credit__reason { margin: 0; max-width: 72ch; font-size: 14px; color: var(--ink-2); }
.credit__decide { margin-top: 6px; align-items: flex-start; }
.credit__reject > summary { display: inline-flex; align-items: center; min-height: 40px; padding: 0 36px 0 14px; border: 1px solid var(--rule); border-radius: var(--radius); color: var(--ink); font-weight: 600; }
.credit__proposal .adj__decide { padding: 0; }
.credit__reject > summary { padding-right: 36px; }
.credit__proposal .adj__reject { flex: 0 1 auto; }

/* Client page: tabs and side rail */
.cpage { display: grid; gap: 16px; margin-top: 12px; grid-template-areas: "summary" "main" "rail"; }
.cpage__summary { grid-area: summary; min-width: 0; }
.cpage__main { grid-area: main; min-width: 0; }
.cpage__rail { grid-area: rail; display: grid; gap: 12px; align-content: start; min-width: 0; }
@media (min-width: 1100px) {
  .cpage { grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "main summary" "main rail"; grid-template-rows: auto 1fr; column-gap: 24px; }
  .cpage__summary .stats { grid-template-columns: 1fr; gap: 8px; }
  .cpage__summary .stat { padding: 12px 14px; }
  .cpage__summary .stat__v { font-size: 20px; }
}
.cpage__credit { margin: 8px 0 0; font-size: 14px; font-weight: 600; }
.cpage__rail .client-status { margin: 0; }
.cpage__main > .client-group:first-of-type > :first-child h2, .cpage__main h2:first-child { margin-top: 20px; }
.needs { margin: 0 0 4px; padding: 12px 14px; border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--paper); }
.needs__title { margin: 0 0 6px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.needs__list { list-style: none; margin: 0; padding: 0; display: grid; }
.needs__list a { display: flex; align-items: center; gap: 10px; min-height: 36px; color: var(--ink); text-decoration: none; font-size: 14px; }
.needs__list a > span { flex: 1; min-width: 0; }
.needs__list a .icon:first-child { color: var(--accent); flex: none; }
.needs__list a .icon:last-child { color: var(--ink-3); flex: none; }
.needs__list a:hover > span { text-decoration: underline; }
.ctabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 12px 0 0; border-bottom: 1px solid var(--rule); }
.ctabs::-webkit-scrollbar { display: none; }
.ctabs a { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none; }
.ctabs a:hover { color: var(--ink); }
.ctabs a.is-on { color: var(--ink); border-bottom-color: var(--accent); }
.ctabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ctabs__n { min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--panel); color: var(--ink-2); font-size: 12px; line-height: 20px; text-align: center; }
.rail-card { display: grid; gap: 8px; }
.rail-card .card__title { margin: 0; }
.rail-card .card__head { margin: 0; }
.rail-contact { border-top: 1px solid var(--rule); padding: 8px 0; }
.rail-contact:first-of-type { border-top: 0; }
.rail-contact > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 14px; }
.rail-contact > summary::-webkit-details-marker { display: none; }
.rail-contact__name { font-weight: 600; }
.rail-contact__tags { display: inline-flex; gap: 4px; }
.rail-contact__email { flex-basis: 100%; color: var(--ink-3); font-size: 13px; overflow-wrap: anywhere; }
.rail-add { margin: 0; }
.rail-add > summary { padding-left: 0; font-size: 14px; }
.rail-kv { margin: 0; font-size: 14px; }
.cpage__rail .two { grid-template-columns: 1fr; }
@media (max-width: 1099px) {
  .cpage__summary .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cpage__summary .stat { padding: 10px 12px; }
  .cpage__summary .stat__v { font-size: 17px; }
  .cpage__summary .stat__meta { font-size: 12px; }
  .cpage__summary .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.cpage__main h2:not(.needs__title):not(.card__title):not(.sr-only) { margin-top: 24px; }

/* Client page follow-ups */
.glance { display: grid; gap: 14px; padding: 16px 18px; }
.glance__main + .glance__main { padding-top: 12px; border-top: 1px solid var(--rule); }
.glance__k { margin: 0; font-size: 13px; color: var(--ink-3); }
.glance__v { margin: 2px 0 0; font-size: 26px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.glance__v--zero { color: var(--ink-3); }
.glance__meta { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
.glance__late { color: var(--bad); font-weight: 600; }
.glance__list { margin: 0; padding-top: 12px; border-top: 1px solid var(--rule); display: grid; gap: 10px; font-size: 14px; }
.glance__list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.glance__list dt { color: var(--ink-3); flex: none; }
.glance__list dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 0; }
.glance__sub { display: block; font-weight: 400; font-size: 12px; color: var(--ink-3); }
@media (max-width: 1099px) { .glance { grid-template-columns: minmax(0, 1fr); } .glance__v { font-size: 22px; } }
.rail-contact > summary { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: start; gap: 2px 10px; }
.rail-contact__avatar { width: 32px; height: 32px; border-radius: 99px; display: grid; place-items: center; background: var(--accent-bg); color: var(--accent); font-size: 12px; font-weight: 700; }
.rail-contact__body { display: grid; gap: 2px; min-width: 0; }
.rail-contact__top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.rail-contact__role { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.rail-contact__line { font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; }
.rail-contact__edit { font-size: 13px; font-weight: 600; color: var(--accent); padding-top: 6px; }
.rail-contact[open] .rail-contact__edit { color: var(--ink-3); }
.cinv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 16px 0 12px; }
.cinv-tools__search { flex: 1 1 220px; max-width: 320px; margin: 0; }
.cinv-tools__seg { margin: 0; }
.dlg > summary { list-style: none; }
.dlg > summary::-webkit-details-marker { display: none; }
.dlg > summary::after { content: none; }
.dlg[open] > .dlg__panel { margin-top: 12px; padding: 16px; border: 1px solid var(--rule); border-radius: var(--radius); }
.modal--form { width: min(520px, calc(100% - 32px)); }
.modal--form .dlg__panel { display: grid; gap: 12px; }
.modal--form .modal__actions { margin-top: 8px; }
.modal--form form.modal__actions { margin-top: 4px; }
.client-status__danger { color: var(--bad); border-color: #e3b8be; }
.cpage .needs { padding: 10px 14px 6px; }
.cpage .needs .needs__title { margin: 2px 0 2px; }
.cpage__main .ctabs + * { margin-top: 0; }
.cpage__main .ctabs + * > :first-child, .cpage__main .ctabs + * > :first-child > h2:first-child, .cpage__main .ctabs + * > .card__head:first-child h2 { margin-top: 20px; }
.rail-contact > summary { font-weight: 400; }
.rail-contact > summary::after { content: none; display: none; }
.rail-contact__edit { align-self: start; }
.cpage__main .ctabs + * > .card__head:first-child h2 { margin-top: 0; }

/* Client area */
.rail-contact__portal { grid-column: 2 / -1; font-size: 12px; font-weight: 600; color: var(--ok); }
.rail-contact__access { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rail-contact__access form { margin: 0; }
.portal-signin, .portal-home { width: min(440px, 100%); margin: 0 auto; display: grid; gap: 14px; }
.portal-signin__title, .portal-home__title { margin: 0; font-size: 26px; line-height: 1.2; color: #fff; text-transform: none; letter-spacing: -0.01em; }
.portal-signin__lead, .portal-home__who { margin: 0; color: rgb(255 255 255 / .72); }
.portal-signin__form { display: grid; gap: 10px; }
.portal-signin__form input { width: 100%; }
.portal-home__k { margin: 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgb(255 255 255 / .56); }
.portal-empty { padding: 16px; border: 1px solid rgb(255 255 255 / .16); border-radius: 10px; color: rgb(255 255 255 / .8); }
.portal-empty p { margin: 0; }
.rail-contact__access .btn { min-height: 34px; padding: 0 12px; font-size: 13px; }
.share-toggle .is-shared { color: var(--ok); }
.btn--sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.prd-moves__end { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.portal-home__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.portal-group { display: grid; gap: 8px; margin-top: 8px; }
.portal-group__title { margin: 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgb(255 255 255 / .56); }
.portal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.portal-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid rgb(255 255 255 / .14); border-radius: 10px; background: rgb(255 255 255 / .04); color: #fff; text-decoration: none; }
.portal-item--link:hover { background: rgb(255 255 255 / .08); }
.portal-item__main { min-width: 0; }
.portal-item__title { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.portal-item__meta { margin: 2px 0 0; font-size: 13px; color: rgb(255 255 255 / .64); }
.portal-item__end { text-align: right; flex: none; display: grid; gap: 4px; justify-items: end; }
.portal-item__amount { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.portal-item__links { margin: 0; font-size: 13px; color: rgb(255 255 255 / .72); }
.portal-item__links a, .portal-doc a, .portal-home a { color: #fff; }
.portal-bar { display: block; width: 72px; height: 6px; border-radius: 99px; background: rgb(255 255 255 / .16); overflow: hidden; }
.portal-bar > span { display: block; height: 100%; background: #6fd39b; }
.portal-bar--big { width: 100%; height: 8px; }
.portal-doc { width: min(760px, 100%); margin: 0 auto; display: grid; gap: 14px; }
.portal-doc__crumb { margin: 0; font-size: 14px; }
.portal-tracker { display: grid; gap: 10px; padding: 16px; border: 1px solid rgb(255 255 255 / .14); border-radius: 10px; background: rgb(255 255 255 / .04); }
.portal-tracker__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.portal-tracker__pct, .portal-tracker__tasks { margin: 0; font-size: 14px; color: rgb(255 255 255 / .8); }
.portal-tracker__heading { margin: 4px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: rgb(255 255 255 / .56); }
.portal-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.portal-checks li { display: flex; gap: 10px; align-items: baseline; color: rgb(255 255 255 / .85); }
.portal-checks li.is-done { color: rgb(255 255 255 / .56); }
.portal-checks__mark { flex: none; width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgb(255 255 255 / .3); display: inline-grid; place-items: center; font-size: 12px; transform: translateY(3px); }
.is-done .portal-checks__mark { background: #6fd39b; border-color: #6fd39b; color: #0b0b0c; }
.is-active .portal-checks__mark { border-color: #f2c94c; color: #f2c94c; }
.portal-prose { background: #fff; color: var(--ink); border-radius: 10px; }
.portal-prose a { color: var(--accent); }
.rail-contact { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: start; gap: 2px 10px; padding: 10px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.rail-contact:first-of-type { border-top: 0; }
.rail-contact .rail-contact__portal { grid-column: auto; }
.rail-contact > .dlg > summary.btn { min-height: 30px; padding: 0 10px; font-size: 13px; }
.rail-card > .dlg { margin-top: 4px; }
.dlg__section { display: grid; gap: 2px; padding-top: 8px; border-top: 1px solid var(--rule); }
.dlg__k { margin: 0; font-weight: 600; font-size: 14px; }
.dlg__section .hint { margin: 0; }
.dlg__more { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: 1px solid var(--rule); }
.dlg__more form { margin: 0; }
.modal--form .two { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .modal--form .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* Client page tabs as a segmented control, and a calmer Needs you card */
.cpage .ctabs { display: flex; gap: 2px; width: fit-content; max-width: 100%; margin: 14px 0 0; padding: 3px; border: 0; border-radius: 10px; background: #e9eaed; overflow-x: auto; }
.cpage .ctabs a { min-height: 34px; margin: 0; padding: 0 12px; border: 0; border-radius: 7px; color: var(--ink-2); font-weight: 600; }
.cpage .ctabs a:hover { color: var(--ink); background: rgb(255 255 255 / .55); }
.cpage .ctabs a.is-on { color: var(--ink); background: var(--paper); box-shadow: 0 1px 2px rgb(11 11 12 / .08), 0 0 0 1px rgb(11 11 12 / .04); }
.cpage .ctabs__n { min-width: 0; padding: 0; background: none; color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums; line-height: inherit; }
.cpage .ctabs a.is-on .ctabs__n { color: var(--ink-2); }
.cpage .needs { border: 1px solid #d9deea; border-left-width: 1px; background: #f4f6fb; }
.cpage .needs__list a .icon:first-child { color: var(--ink-2); }
.portal-home__head .btn { white-space: nowrap; }

/* Vault */
.creds .card__head { display: flex; justify-content: space-between; align-items: center; }
.cred-list { list-style: none; margin: 0; padding: 0; }
.cred { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 12px 16px; border-top: 1px solid var(--rule); }
.cred:first-child { border-top: 0; }
.cred__icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--panel); color: var(--ink-2); }
.cred__main { min-width: 0; display: grid; gap: 2px; }
.cred__title { margin: 0; font-weight: 600; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cred__meta { margin: 0; font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; }
.cred-once { align-self: end; min-height: 44px; }
.portal-secret { display: grid; gap: 4px; }
.portal-secret__k { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: rgb(255 255 255 / .56); }
.portal-secret__row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid rgb(255 255 255 / .18); border-radius: 8px; background: rgb(255 255 255 / .06); }
.portal-secret__row code { flex: 1; min-width: 0; color: #fff; font-size: 15px; overflow-wrap: anywhere; background: none; }
.share-prop { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--rule); }
.share-prop:first-child { border-top: 0; }
.prd-tools__client { flex-wrap: wrap; }
.prd-tools__client input[type=search] { width: 220px; }
.prd-match { margin: -6px 0 14px; font-size: 14px; color: var(--ink-3); }
.prd-match a { margin-left: 8px; }
@media (max-width: 640px) { .prd-tools__client, .prd-tools__client input[type=search], .prd-tools__client select { width: 100%; max-width: none; } }

/* Contact dialog */
.contact-flags { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 0; align-content: start; }
.contact-flags legend { padding: 0; margin-bottom: 4px; }
.contact-flags .check { min-height: 36px; }
.contact-portal { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding-top: 14px; margin-top: 4px; }
.contact-portal__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.contact-portal__actions form, .modal__actions--split form { margin: 0; }
.modal__actions--split { justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px solid var(--rule); }
.modal__actions-end { display: flex; gap: 8px; margin-left: auto; }
@media (max-width: 560px) { .contact-portal { grid-template-columns: 1fr; } .contact-portal__actions { justify-content: flex-start; } .modal__actions--split { flex-direction: column-reverse; align-items: stretch; } .modal__actions-end { margin-left: 0; } .modal__actions-end .btn { flex: 1; } }

/* Invoice filters */
.inv-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.inv-tools .tabs { margin: 0; }
.inv-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inv-filters select { width: auto; min-width: 150px; max-width: 240px; }
.inv-summary { margin: 0 0 12px; }
@media (max-width: 640px) { .inv-filters { width: 100%; } .inv-filters select { flex: 1 1 calc(50% - 4px); min-width: 0; max-width: none; } .inv-filters #inv-client { flex-basis: 100%; } }
/* View all links sit at the right of their section heading */
.view-all { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.view-all:hover { text-decoration: underline; text-underline-offset: 3px; }
.view-all svg { transition: transform .15s ease; }
.view-all:hover svg { transform: translateX(2px); }
@media (prefers-reduced-motion: reduce) { .view-all svg { transition: none; } }
.head__end { display: inline-flex; align-items: center; gap: 12px; }
.head__count { margin-left: 8px; font-size: 14px; font-weight: 500; color: var(--ink-3); }
.task-section > .head--section { align-items: center; }
