:root {
  --brand-900: #0b3b2e;
  --brand-800: #0e4a39;
  --brand-700: #0f5c45;
  --brand-100: #e3ede8;
  --brand-50: #f0f5f2;
  --brass: #9c7a2b;
  --paper: #f3f5f4;
  --surface: #ffffff;
  --ink: #13201b;
  --ink-2: #4b5852;
  --muted: #7e8984;
  --rule: #dce2df;
  --rule-strong: #c4cdc8;
  --danger: #b3352f;
  --good: #0c7a3e;
  --warn: #a86a00;

  --serif: "Source Serif 4", "Songti SC", "Noto Serif SC", "STSong", Georgia, serif;
  --sans: "IBM Plex Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;

  --rail-w: 232px;
  --radius: 3px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand-700); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; }
.rail {
  background: var(--brand-900);
  color: #dfe9e4;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.rail-head { padding: 26px 20px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand { font-family: var(--serif); font-size: 21px; font-weight: 600; color: #fff; text-decoration: none; }
.rail { overflow-y: auto; }
.rail-nav { display: flex; flex-direction: column; padding: 12px 0; gap: 1px; }
.rail-nav a {
  display: flex; align-items: center; gap: 8px; text-decoration: none; padding: 8px 20px 8px 17px; color: #b9cbc2;
  border-left: 3px solid transparent;
}
.rail-nav .rail-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-nav .rail-num { font-size: 11.5px; color: #86a396; }
.rail-nav .dot { margin-right: 0; }
.rail-section { font-size: 12px; color: #86a396; padding: 18px 20px 6px; }
.rail-add { background: none; border: 0; text-align: left; color: #86a396; font-size: 12.5px; padding: 6px 20px; cursor: pointer; }
.rail-add:hover { color: #fff; }
.rail-nav a:hover { color: #fff; }
.rail-nav a[aria-current="page"] { color: #fff; border-left-color: var(--brass); background: rgba(255,255,255,.04); }
.rail-foot { margin-top: auto; padding: 20px; }
.lang { display: inline-flex; border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); overflow: hidden; }
.lang button { background: none; border: 0; color: #9fb6ab; padding: 4px 12px; cursor: pointer; font-size: 12px; }
.lang button[aria-pressed="true"] { background: rgba(255,255,255,.12); color: #fff; }
.rail-version { margin-top: 10px; font-size: 12px; color: #a9c0b5; font-variant-numeric: tabular-nums; letter-spacing: .02em; }

.main { padding: 40px 48px 80px; min-width: 0; max-width: 1280px; outline: none; }
.page-kicker { font-size: 12.5px; color: var(--brass); font-weight: 600; margin-bottom: 4px; }

/* ------------------------------------------------------------ page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding-bottom: 20px; border-bottom: 2px solid var(--brand-900); margin-bottom: 32px; }
.page-head h1 { font-family: var(--serif); font-weight: 600; font-size: 32px; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
.page-head p { margin: 6px 0 0; color: var(--ink-2); }

/* ------------------------------------------------------------ buttons & inputs */
.btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink);
  padding: 7px 14px; border-radius: var(--radius); font-weight: 500; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-2); }
.btn-primary { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.btn-primary:hover { background: var(--brand-800); border-color: var(--brand-800); }
.btn-quiet { border-color: transparent; background: none; color: var(--brand-700); padding-inline: 8px; }
.btn-quiet:hover { border-color: transparent; text-decoration: underline; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; }

.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label, .field-label { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.field .hint { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--rule-strong); background: var(--surface);
  border-radius: var(--radius); padding: 7px 10px; min-height: 36px;
}
.input:focus { outline: none; border-color: var(--brand-700); box-shadow: 0 0 0 3px rgba(15,92,69,.12); }
.input:disabled { background: var(--paper); color: var(--muted); }
textarea.input { resize: vertical; min-height: 60px; }
.req::after { content: " *"; color: var(--danger); }

/* ------------------------------------------------------------ overview */
.kpis { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule); margin-bottom: 48px; }
.kpi { padding: 20px 24px 22px; border-left: 1px solid var(--rule); }
.kpi:first-child { border-left: 0; padding-left: 0; }
.kpis-5 { grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, 1fr)); }
.kpis-5 .kpi:first-child { grid-row: span 2; display: flex; flex-direction: column; justify-content: center; padding-right: 24px; }
.kpis-5 .kpi:nth-child(n+4) { border-top: 1px solid var(--rule); }
.kpi .warn { color: var(--warn); }
.kpi-label { color: var(--ink-2); font-size: 13px; }
.kpi-value { font-size: 26px; font-weight: 600; margin-top: 4px; line-height: 1.2; }
.kpi-hero .kpi-value { font-size: 44px; font-weight: 600; letter-spacing: -.02em; color: var(--brand-900); }
.kpi-unit { font-size: .45em; font-weight: 500; color: var(--ink-2); margin-right: 6px; letter-spacing: 0; }
.kpi-note { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi-value.is-alert { color: var(--warn); }

.exhibits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 48px; }
.exhibit { min-width: 0; }
.exhibit.span-2 { grid-column: 1 / -1; }
.ex-num { font-size: 12px; color: var(--brass); font-weight: 600; }
.ex-title { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.3; margin: 2px 0 4px; max-width: 34em; }
.ex-sub { color: var(--ink-2); font-size: 13px; margin: 0 0 16px; }
.ex-body { border-top: 1px solid var(--ink); padding-top: 16px; }
.ex-source { font-size: 11.5px; color: var(--muted); margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--rule); }

.empty { padding: 56px 0; max-width: 32em; }
.empty h2 { font-family: var(--serif); font-size: 24px; font-weight: 600; margin: 0 0 8px; }
.empty p { color: var(--ink-2); margin: 0 0 20px; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }

/* svg charts */
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--sans); font-size: 11.5px; fill: var(--ink-2); }
.chart .axis-text { fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart .grid { stroke: #e6eae8; stroke-width: 1; }
.chart .baseline { stroke: var(--rule-strong); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: default; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 10px; }
.chart-legend i { display: inline-block; width: 14px; height: 2px; vertical-align: 4px; margin-right: 6px; }
.chart-legend i.sq { width: 9px; height: 9px; border-radius: 2px; vertical-align: 0; }

.bars { display: grid; grid-template-columns: max-content 1fr max-content; gap: 10px 14px; align-items: center; }
.bars .bar-label { color: var(--ink); font-size: 13px; }
.bars .bar-track { height: 18px; position: relative; }
.bars .bar-fill { height: 100%; background: var(--brand-700); border-radius: 0 3px 3px 0; min-width: 2px; }
.bars .bar-value { font-size: 13px; text-align: right; }
.bars .bar-pct { color: var(--muted); margin-left: 8px; font-size: 12px; }

.attention { width: 100%; border-collapse: collapse; }
.attention td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.attention tr { cursor: pointer; }
.attention tr:hover td { background: var(--brand-50); }
.flag { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 2px; margin-right: 6px; white-space: nowrap; }
.flag-open { background: #fbf1dc; color: #7a4f00; }
.flag-files { background: #f7e4e2; color: #8c2a25; }

/* ------------------------------------------------------------ ledger */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.filters .input { width: auto; min-width: 140px; }
.filters .search { flex: 1 1 220px; }
.check { display: inline-flex; gap: 6px; align-items: center; color: var(--ink-2); font-size: 13px; cursor: pointer; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); }
table.ledger { width: 100%; border-collapse: collapse; min-width: 980px; }
.ledger th {
  text-align: left; font-weight: 600; font-size: 12px; color: var(--ink-2);
  padding: 10px 12px; border-bottom: 1px solid var(--ink); background: var(--surface); white-space: nowrap;
}
.ledger td { padding: 11px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ledger tbody tr { cursor: pointer; }
.ledger tbody tr:hover td { background: var(--brand-50); }
.ledger tr.voided td { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.ledger tfoot td { font-weight: 600; border-top: 1px solid var(--ink); border-bottom: 0; }
.ledger .r { text-align: right; }
.ledger .fid { color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.chain-cell { color: var(--ink); font-size: 12.5px; line-height: 1.7; }
.ledger .chain-cell { max-width: 300px; }
.cn { white-space: nowrap; }
.cn-acct { color: var(--muted); }
.cn-arrow { color: var(--muted); margin: 0 6px; }
.sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 2px; white-space: nowrap; }
.badge-open { background: #fbf1dc; color: #7a4f00; }
.badge-closed { background: var(--brand-100); color: var(--brand-800); }
.badge-voided { background: #eceeed; color: var(--muted); }
.badge-advance { background: #f7e4e2; color: #8c2a25; }
.badge-pay { background: var(--brand-900); color: #fff; }
.badge-xfer { background: #e6ebf3; color: #2f4d78; }
.badge-fund { background: var(--brand-100); color: var(--brand-800); }
.file-count { color: var(--ink-2); white-space: nowrap; }
.file-count.zero { color: var(--danger); }

/* ------------------------------------------------------------ drawer */
.drawer-scrim, .modal-scrim { position: fixed; inset: 0; background: rgba(9,26,20,.36); z-index: 40; }
.modal-scrim { z-index: 50; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); z-index: 41;
  background: var(--surface); overflow-y: auto; box-shadow: -16px 0 40px rgba(9,26,20,.16);
  animation: slide-in .22s ease-out;
}
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .drawer { animation: none; } }
.drawer-head { padding: 28px 32px 20px; border-bottom: 1px solid var(--rule); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.drawer-head .fid { color: var(--ink-2); font-size: 13px; display: flex; gap: 10px; align-items: center; }
.drawer-head h2 { font-family: var(--serif); font-size: 26px; font-weight: 600; margin: 6px 0 0; line-height: 1.25; }
.drawer-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.drawer-body { padding: 24px 32px 48px; }
.drawer-section { margin-bottom: 32px; }
.drawer-section h3 { font-size: 13px; font-weight: 600; margin: 0 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--ink); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; }
.facts .k { font-size: 12px; color: var(--ink-2); }
.facts .v { font-size: 15px; font-weight: 500; margin-top: 2px; }
.facts .v.big { font-size: 22px; font-weight: 600; color: var(--brand-900); }
.close-x { position: absolute; top: 20px; right: 20px; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 6px; }
.close-x:hover { color: var(--ink); }

/* files */
.dropzone { display: block;
  border: 1.5px dashed var(--rule-strong); border-radius: var(--radius); padding: 18px; text-align: center;
  color: var(--ink-2); cursor: pointer; background: var(--paper); font-size: 13px;
}
.dropzone.is-over { border-color: var(--brand-700); background: var(--brand-50); color: var(--brand-800); }
.file-list { list-style: none; margin: 12px 0 0; padding: 0; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.file-list .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .fsize { color: var(--muted); font-size: 12px; }
.file-path { font-size: 12px; color: var(--muted); margin-top: 10px; word-break: break-all; }

/* ------------------------------------------------------------ modal / form */
.modal-scrim { display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal { background: var(--surface); width: min(980px, 100%); border-radius: 4px; box-shadow: 0 24px 60px rgba(9,26,20,.28); position: relative; }
.modal.small { width: min(480px, 100%); }
.modal-head { padding: 24px 32px 16px; border-bottom: 1px solid var(--rule); }
.modal-head h2 { font-family: var(--serif); font-size: 24px; font-weight: 600; margin: 0; }
.modal-body { padding: 24px 32px; }
.modal-foot { padding: 16px 32px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--paper); border-radius: 0 0 4px 4px; }
.form-error { color: var(--danger); font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; }
.form-section { margin-top: 28px; }
.form-section > h3 { font-size: 15px; font-weight: 600; margin: 0 0 2px; }
.form-section > p { color: var(--ink-2); font-size: 13px; margin: 0 0 14px; }

/* ------------------------------------------------------------ flows */
.sankey-wrap { overflow-x: auto; }
.sankey-wrap svg { min-width: 760px; }
.sankey .node-rect { fill: var(--ink); }
.sankey .node-rect.is-balance { fill: var(--brass); }
.sankey .node-label { font-size: 12.5px; fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.sankey .node-sub { font-size: 11px; fill: var(--ink-2); font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.sankey .link { fill: none; stroke-opacity: .38; }
.sankey .link:hover, .sankey .link.is-hot { stroke-opacity: .7; }


/* ------------------------------------------------------------ tabs, toggles */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--rule-strong); margin: 0 0 24px; overflow-x: auto; }
.tabs a { text-decoration: none; color: var(--ink-2); padding: 10px 0; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--brand-900); }
.seg { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 4px 12px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--rule-strong); }
.seg button[aria-pressed="true"] { background: var(--brand-900); color: #fff; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 2px; }
.section-row h3 { font-size: 15px; font-weight: 600; margin: 0; }
.cur-tag { font-weight: 600; color: var(--ink); margin-left: 4px; }

/* ------------------------------------------------------------ account cards */
.acards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.acard { background: var(--surface); border: 1px solid var(--rule); padding: 16px 18px 12px; min-width: 0; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; font: inherit; color: inherit; border-radius: 2px; }
.acard:hover { border-color: var(--rule-strong); }
.acard.is-selected { border-color: var(--brand-900); box-shadow: inset 0 0 0 1px var(--brand-900); }
.acard.is-closed { opacity: .6; }
.acard-head { display: flex; align-items: center; gap: 8px; }
.acard-bank { font-weight: 600; font-size: 14.5px; }
.acard-tags { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.acard-cur { font-size: 12px; font-weight: 600; color: var(--ink-2); letter-spacing: .02em; }
.acard-name { color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.acard-balance { font-size: 26px; font-weight: 600; margin-top: 14px; color: var(--brand-900); line-height: 1.15; }
.acard-balance.neg { color: var(--danger); }
.acard-debt { margin-top: 6px; display: grid; gap: 2px; }
.acard-debt > div { font-size: 17px; font-weight: 600; color: var(--warn); display: flex; align-items: baseline; }
.acard-debt-k { font-size: 12px; font-weight: 500; margin-right: 8px; color: var(--warn); }
.acard-debt .acard-unit { color: var(--warn); }
.acard-unit { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-left: 6px; letter-spacing: .02em; }
.acard-balances { margin-top: 12px; display: grid; gap: 2px; }
.acard-balances > div { font-size: 18px; font-weight: 600; color: var(--brand-900); line-height: 1.3; display: flex; align-items: baseline; }
.acard-balances > div.neg { color: var(--danger); }
.acard-balances .acard-unit { margin: 0 8px 0 0; min-width: 2.8em; }
.acard-sub { font-size: 12.5px; color: var(--muted); min-height: 1.5em; }
.acard .split-bar.thin { height: 5px; margin-top: 10px; }
.acard-mix { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.acard-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 12px; }
.acard-foot .btn-quiet { padding: 0 2px; font-size: 12.5px; }
.acard-foot > span:last-child { display: flex; gap: 14px; }
.acard-add { border-style: dashed; background: transparent; justify-content: center; align-items: center; color: var(--brand-700); font-weight: 500; min-height: 170px; }
.acard-add .sub { margin-top: 4px; }
.sq.is-debt, .dbar-neg span.is-debt { background: repeating-linear-gradient(135deg, #8a948f 0 2px, #c9cfcc 2px 5px); }

table.stmt td { vertical-align: middle; }
.attention th.r { text-align: right; }
.chain-cell .cn, .attention .cn { white-space: normal; }
.attention thead th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 0 12px 6px 0; border-bottom: 1px solid var(--ink); }

/* ------------------------------------------------------------ utilities */
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 600; }
.r { text-align: right; }
.warn { color: var(--warn); }
.ok { color: var(--good); }
.bad { color: var(--danger); }
.normal { font-weight: 400; }
.upper { text-transform: uppercase; }
.mt { margin-top: 16px; }
.mt-s { margin-top: 6px; }
.mt-l { margin-top: 40px; }
.link { color: var(--brand-700); cursor: pointer; text-decoration: underline; text-decoration-color: rgba(15,92,69,.3); text-underline-offset: 2px; }
.link:hover { text-decoration-color: currentColor; }
.empty-row { padding: 32px 12px !important; cursor: default; }

/* ------------------------------------------------------------ page head actions */
.head-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.record { display: flex; align-items: center; gap: 6px; }
.record-label { font-size: 12px; color: var(--muted); margin-right: 4px; }

/* ------------------------------------------------------------ blocks */
.block { margin-bottom: 48px; }
.block-title { font-family: var(--serif); font-size: 21px; font-weight: 600; margin: 0 0 4px; }
.block-sub { color: var(--ink-2); font-size: 13px; margin: 0 0 16px; max-width: 44em; }
.block-title + .fcards, .block-title + .bcards { margin-top: 14px; }

/* funder cards */
.fcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.fcard { background: var(--surface); border: 1px solid var(--rule); border-top: 3px solid var(--c); padding: 16px 18px 14px; min-width: 0; }
.fcard.is-empty { border-top-color: var(--rule-strong); background: transparent; }
.fcard-head { display: flex; align-items: baseline; gap: 8px; }
.fcard-name { font-weight: 600; font-size: 15px; }
.fcard-id { font-size: 12px; color: var(--muted); }
.fcard-share { margin-left: auto; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.fcard-value { font-size: 28px; font-weight: 600; letter-spacing: -.01em; margin-top: 8px; line-height: 1.15; }
.fcard.is-empty .fcard-value { color: var(--muted); }
.fcard-value .unit { font-size: 13px; font-weight: 500; color: var(--ink-2); margin-right: 4px; letter-spacing: 0; }
.fcard-label { font-size: 12px; color: var(--muted); margin-top: 2px; }
.fcard-rows { margin: 10px 0 0; }
.fcard-rows div { display: flex; justify-content: space-between; padding: 5px 0; border-top: 1px solid var(--rule); font-size: 13px; }
.fcard-rows dt { color: var(--ink-2); }
.fcard-rows dd { margin: 0; font-weight: 500; }
.fcard-foot { font-size: 12px; color: var(--ink-2); margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--rule); }
.fcard-folder { font-size: 11.5px; color: var(--muted); margin: 8px 0 0; word-break: break-all; }

/* spent / fees / unspent bar, coloured by the funder (--c) */
.split-bar { display: flex; gap: 2px; height: 8px; margin-top: 14px; }
.split-bar.big { height: 12px; }
.split-bar span { display: block; min-width: 2px; }
.split-bar span:first-child { border-radius: 2px 0 0 2px; }
.split-bar span:last-child { border-radius: 0 2px 2px 0; }
.is-spent { background: var(--c, var(--brand-700)); }
.is-left { background: color-mix(in srgb, var(--c, var(--brand-700)) 28%, #fff); }
.is-cost { background: repeating-linear-gradient(135deg, #a7afab 0 2px, #d5dad7 2px 4px); }
.sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }

/* balance cards */
.bcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.bcard { background: var(--surface); border: 1px solid var(--rule); padding: 16px 18px 14px; min-width: 0; }
.bcard.is-empty { background: transparent; }
.bcard-head { display: flex; align-items: baseline; gap: 8px; }
.bcard-name { font-weight: 600; font-size: 15px; }
.bcard-head .kind { font-size: 11.5px; color: var(--muted); }
.bcard-value { font-size: 26px; font-weight: 600; margin: 6px 0 10px; color: var(--brand-900); }
.bcard.is-empty .bcard-value { color: var(--muted); margin-bottom: 4px; }
.bcard-accts { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.bcard-accts li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid var(--rule); }
.bcard-accts li > span:first-child { color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.bcard-accts li > span:last-child { flex-shrink: 0; }
.bcard-accts li.is-advance { color: var(--danger); }
.bcard-mix { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--rule); }
.bcard-mix .k { width: 100%; font-size: 11.5px; color: var(--muted); }

/* diverging stacked bars: holder balances by real funder */
.dbars { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; gap: 12px 16px; align-items: center; }
.dbar-label { font-size: 13px; }
.dbar-track { position: relative; height: 22px; }
.dbar-zero { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--ink-2); }
.dbar-pos, .dbar-neg { position: absolute; top: 0; bottom: 0; display: flex; gap: 2px; }
.dbar-pos { right: auto; width: 100%; }
.dbar-neg { left: auto; flex-direction: row-reverse; width: 100%; }
.dbar-pos span, .dbar-neg span { display: block; height: 100%; min-width: 2px; }
.dbar-pos span:last-child { border-radius: 0 3px 3px 0; }
.dbar-neg span:last-child { border-radius: 3px 0 0 3px; background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.35) 0 2px, transparent 2px 5px); }
.dbar-value { font-size: 13px; text-align: right; }

/* ------------------------------------------------------------ forms */
.form-lead { color: var(--ink-2); font-size: 13px; margin: 0 0 20px; max-width: 52em; }
.foot-btns { display: flex; gap: 8px; margin-left: auto; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 18px; align-items: start; }
.party { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; }
.grid-party .party { max-width: 640px; }
.grid-route { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); gap: 12px; align-items: start; }
.route-arrow { text-align: center; color: var(--muted); font-size: 18px; padding-top: 26px; }
.grid-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; align-items: start; }
.grid-amounts .span-2 { grid-column: span 2; align-self: center; }
.calc { font-size: 13px; color: var(--ink-2); }
.calc b { color: var(--ink); font-weight: 600; }
.ce-kind { font-size: 11.5px; color: var(--muted); margin-left: 6px; font-weight: 400; }

.table-scroll { overflow-x: auto; }
table.alloc { width: 100%; border-collapse: collapse; font-size: 13px; }
.alloc th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 6px 10px 6px 0; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.alloc td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.alloc th.r { text-align: right; }
.alloc .alloc-in { width: 150px; text-align: right; min-height: 32px; padding: 4px 8px; }
.alloc.read tbody tr { cursor: pointer; }
.alloc.read tbody tr:hover td { background: var(--brand-50); }
.alloc-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; }
.alloc-foot .alloc-add { width: auto; max-width: 320px; min-height: 32px; padding: 4px 8px; font-size: 13px; }

/* ------------------------------------------------------------ drawer content */
.route-line { font-size: 15px; }
.note { margin: 16px 0 0; color: var(--ink-2); white-space: pre-wrap; }
.stamp { font-size: 12px; color: var(--muted); }
.related { margin-top: 14px; font-size: 13px; }
.related .k { font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }
.related-row { padding: 4px 0; border-top: 1px solid var(--rule); }
.related-row a:not(.link) { color: var(--ink-2); }

.trace { list-style: none; margin: 0; padding: 0; position: relative; }
.trace::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 2px; background: var(--rule-strong); }
.trace li { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 14px; padding: 7px 0; position: relative; font-size: 13.5px; }
.trace .pin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--brand-700); background: var(--surface); margin-top: 4px; position: relative; }
.trace .trace-start .pin { background: var(--brand-700); }
.trace .is-pay .pin { border-color: var(--brand-900); background: var(--brand-900); }
.trace .trace-end .pin { border-color: var(--brass); background: var(--brass); }
.trace .badge { margin-right: 4px; }

/* ------------------------------------------------------------ tooltip & toast */
.tooltip {
  position: fixed; z-index: 60; pointer-events: none; background: var(--ink); color: #fff;
  font-size: 12.5px; padding: 8px 10px; border-radius: 3px; max-width: 280px; line-height: 1.45;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.tooltip .tt-row { display: flex; justify-content: space-between; gap: 16px; }
.tooltip .tt-head { color: #b9cbc2; margin-bottom: 4px; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 70;
  background: var(--brand-900); color: #fff; padding: 10px 18px; border-radius: 3px; font-size: 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.toast.is-error { background: var(--danger); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .exhibits { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis:not(.kpis-5) .kpi:nth-child(3) { border-left: 0; padding-left: 0; }
  .kpis:not(.kpis-5) .kpi:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .kpis-5 { grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, 1fr)); }
  .grid-amounts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.topbar, .rail-scrim { display: none; }

.open-amt { color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.fcard-value .open-amt { color: inherit; font-weight: inherit; font-size: .8em; }
.open-note { color: var(--muted); font-size: 12px; margin-top: 2px; }

.records { margin-top: 56px; }
.rl-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rl-filters .input, .rl-filters .search { width: 100%; min-width: 0; }
.rl-filters .search { grid-column: span 2; }
.rl-date { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); min-width: 0; }
.rl-date span { flex: none; width: 1.5em; }
.rl-date .input { flex: 1; }
.rl-filters #rlClear { justify-self: start; }
table.ledger.rl { min-width: 860px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.pager-btns { display: flex; align-items: center; gap: 10px; }

/* ------------------------------------------------------------ phone */
@media (max-width: 760px) {
  /* top bar + slide-in rail */
  .shell { grid-template-columns: minmax(0, 1fr); }
  .topbar {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 30;
    background: var(--brand-900); color: #fff;
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 8px calc(env(safe-area-inset-left, 0px) + 8px);
  }
  .topbar .brand { font-size: 18px; flex: none; }
  .topbar-title { flex: 1; min-width: 0; text-align: right; font-size: 13px; color: #9fb6ab;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-menu { width: 44px; height: 44px; flex: none; border: 0; background: none; cursor: pointer;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
  .topbar-menu span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 1px; }
  .rail {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 46; width: min(300px, 84vw); height: auto;
    transform: translateX(-100%); transition: transform .22s ease; visibility: hidden;
    padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .nav-open .rail { transform: none; visibility: visible; box-shadow: 16px 0 40px rgba(0,0,0,.25); }
  .nav-open { overflow: hidden; }
  .rail-scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(9,26,20,.4); }
  .rail-scrim[hidden] { display: none; }
  .rail-nav a { padding-block: 12px; }
  .rail-add { padding-block: 10px; }
  .rail-me-actions button { padding: 6px 0; font-size: 13px; }

  /* page */
  .main { padding: 20px 16px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .page-head { margin-bottom: 24px; padding-bottom: 14px; }
  .page-head h1 { font-size: 26px; }
  .kpi-hero .kpi-value { font-size: 34px; }
  .kpi { padding: 14px 14px 16px; }
  .kpi-value { font-size: 21px; }
  .kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis-5 .kpi:first-child { grid-column: 1 / -1; grid-row: auto; padding-left: 0; }
  .kpis-5 .kpi:nth-child(2), .kpis-5 .kpi:nth-child(4) { border-left: 0; padding-left: 0; }
  .kpis-5 .kpi:nth-child(n+2) { border-top: 1px solid var(--rule); }
  .exhibits { gap: 36px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-route, .grid-party .party, .grid-route .party { grid-template-columns: minmax(0, 1fr); }
  .route-arrow { display: none; }
  .grid-amounts, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head .head-actions { display: contents; }

  /* 出资 / 转账 / 付款 stay at the thumb */
  .page-head .record {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; gap: 8px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--surface); border-top: 1px solid var(--rule); box-shadow: 0 -6px 20px rgba(9,26,20,.08);
  }
  .page-head .record .btn { flex: 1; min-height: 44px; justify-content: center; text-align: center; }

  /* touch-sized controls; 16px text stops iOS from zooming into fields */
  .btn { min-height: 40px; }
  .input, select.input, textarea.input { font-size: 16px; min-height: 44px; }
  .filters .input { flex: 1 1 calc(50% - 5px); min-width: 0; width: auto; }
  .filters .search { flex-basis: 100%; }
  .rl-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabs { gap: 20px; }
  .tabs a { padding: 12px 0; }

  /* ledger rows become cards */
  .table-wrap { overflow: visible; background: none; border: 0; }
  table.ledger, table.ledger.rl { min-width: 0; }
  .ledger thead { display: none; }
  .ledger, .ledger tbody, .ledger tfoot, .ledger tr, .ledger td { display: block; }
  .ledger tbody tr { background: var(--surface); border: 1px solid var(--rule); border-radius: 4px;
    padding: 10px 14px; margin-bottom: 10px; }
  .ledger tbody tr:hover td { background: none; }
  .ledger td { border: 0; padding: 4px 0 4px 92px; text-align: right; max-width: none !important;
    line-height: 1.5; overflow-wrap: anywhere; }
  .ledger td::before { content: attr(data-label); float: left; margin-left: -92px; width: 88px;
    color: var(--muted); font-size: 12px; font-weight: 400; text-align: left; line-height: 1.9; }
  .ledger td::after { content: ""; display: table; clear: both; }
  .ledger td:empty, .ledger td[data-label=""]::before { display: none; }
  .ledger td[data-label=""] { padding-left: 0; }
  .ledger .chain-cell { font-size: 13px; line-height: 1.6; }
  .ledger .cn-arrow { margin: 0 4px; }
  .ledger td.fid { font-size: 12px; padding-bottom: 2px; }
  .ledger .cn { white-space: normal; }
  .ledger tfoot tr { padding: 4px 2px; }
  .ledger tfoot td { border: 0; padding: 2px 0; text-align: left; }
  .ledger tfoot td::before, .ledger tfoot td:empty { display: none; }

  /* forms open full screen, buttons pinned to the bottom */
  .modal-scrim { padding: 0; }
  .modal, .modal.small { width: 100%; min-height: 100vh; min-height: 100dvh; border-radius: 0; display: flex; flex-direction: column; }
  .modal > form { display: flex; flex-direction: column; flex: 1; }
  .modal-head { padding-top: calc(env(safe-area-inset-top, 0px) + 18px); }
  .modal-body { flex: 1; }
  .modal-foot { position: sticky; bottom: 0; z-index: 2; border-radius: 0;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .foot-btns { display: flex; gap: 8px; width: 100%; }
  .foot-btns .btn { flex: 1; min-height: 44px; justify-content: center; text-align: center; }
  .drawer { width: 100vw; }
  .drawer-head { padding-top: calc(env(safe-area-inset-top, 0px) + 20px); }
  .drawer-head, .drawer-body, .modal-head, .modal-body, .modal-foot { padding-left: 18px; padding-right: 18px; }
  .close-x { top: calc(env(safe-area-inset-top, 0px) + 10px); right: 8px; padding: 12px; }
  .table-scroll { -webkit-overflow-scrolling: touch; }

  /* sign-in */
}

/* ------------------------------------------------------------ sign-in */
/* brand lockup: mark + name, the other language small beside it */
.lockup { display: inline-flex; align-items: center; gap: 12px; }
.lockup-mark { width: 34px; height: 34px; flex: none; display: block; --mk-bg: #f3f5f4; --mk-fg: #0b3b2e; }
.lockup-mark svg { display: block; width: 100%; height: 100%; }
.lockup-text { display: flex; flex-direction: column; line-height: 1.1; }
.lockup-name { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.lockup-alt { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; opacity: .7; margin-top: 3px; }

/* sign-in page: brand panel left, form right; on phones a header band over the form */
.login { min-height: 100vh; background: var(--paper); }
.auth { display: grid; grid-template-columns: minmax(380px, 44%) minmax(0, 1fr); min-height: 100vh; }
.auth-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.auth-side, .auth-main, .auth-band { position: relative; overflow: hidden; }
.auth-side > :not(.auth-art), .auth-main > :not(.auth-art), .auth-band > :not(.auth-art) { position: relative; z-index: 1; }
.auth-side { display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 44px 56px 36px; color: #e6eee9; background: var(--brand-900); }
.auth-brand .lockup-name { color: #fff; }
.auth-kicker { color: #d4b062; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; margin: 0 0 14px; }
.auth-hero h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.3; margin: 0 0 32px; color: #fff; max-width: 15em; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; max-width: 26em; }
.auth-points li { display: grid; gap: 2px; padding-left: 16px; border-left: 2px solid rgba(212,176,98,.55); }
.auth-points b { color: #fff; font-weight: 600; font-size: 14px; }
.auth-points span { color: #a9c0b5; font-size: 13px; }
.auth-side-foot { margin: 0; font-size: 12px; color: #86a396; }

.auth-main { display: flex; flex-direction: column; min-width: 0; padding: 28px 40px 24px; }
.auth-top { display: flex; align-items: center; justify-content: flex-end; gap: 16px; min-height: 36px; }
.auth-band { display: none; }
.auth-lang { border-color: var(--rule-strong); background: rgba(255,255,255,.6); }
.auth-lang button { color: var(--ink-2); }
.auth-lang button[aria-pressed="true"] { background: var(--brand-100); color: var(--ink); }
.auth-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 0; }
.auth-form { width: min(400px, 100%); background: var(--surface); padding: 36px 36px 28px; border: 1px solid #e3e8e5;
  border-top: 3px solid var(--brand-700); box-shadow: 0 18px 48px rgba(11,59,46,.10); }
.auth-form h1 { font-family: var(--serif); font-weight: 600; font-size: 30px; margin: 0; letter-spacing: -.01em; }
.auth-sub { color: var(--ink-2); margin: 6px 0 28px; font-size: 13.5px; }
.auth-form .input { min-height: 42px; font-size: 15px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none;
  color: var(--brand-700); font-size: 12.5px; font-weight: 500; padding: 8px 10px; cursor: pointer; border-radius: var(--radius); }
.pw-toggle:hover { background: var(--brand-50); }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.auth-link { border: 0; background: none; padding: 0; color: var(--brand-700); font-size: 13px; cursor: pointer; }
.auth-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.auth-note { margin: 12px 0 0; padding: 10px 12px; background: var(--brand-50); border-left: 2px solid var(--brand-700);
  color: var(--ink-2); font-size: 12.5px; line-height: 1.6; }
.auth-error { min-height: 20px; margin-top: 14px; }
.auth-btn { width: 100%; min-height: 44px; margin-top: 4px; font-size: 15px; justify-content: center; }
.auth-btn:disabled { opacity: .75; cursor: progress; }
.auth-secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 18px 0 0; color: var(--muted); font-size: 12px; }
.auth-secure svg { width: 14px; height: 14px; flex: none; }
.auth-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; color: var(--muted); font-size: 12px; }

.auth-form-kick, .auth-art-phone { display: none; }

/* phones (layout L2, dark): wordmark top left, language top right, the k tile centred in the upper half,
   then the form on the dark field with underline fields; no card */
.auth-emblem { display: none; }
.wm { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.wm-zh { font-family: "Noto Serif TC", "Songti TC", "Noto Serif SC", var(--serif); font-weight: 700; font-size: 22px;
  letter-spacing: .22em; line-height: 1; color: #fff; }
.wm-en { font-family: "Libre Caslon Text", "Source Serif 4", Georgia, serif; font-size: 8.5px; letter-spacing: .5em;
  line-height: 1; color: #a9c0b5; }
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side, .auth-top, .auth-main > .auth-art:not(.auth-art-phone), .auth-band > .auth-art,
  .auth-band .auth-kicker, .auth-band-title, .auth-form h1, .auth-sub { display: none; }
  .auth-art-phone { display: block; }
  .auth-main { color: #fff; padding: 0 0 calc(env(safe-area-inset-bottom, 0px) + 20px);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"), var(--brand-900); }
  .auth-band { display: block; overflow: visible; background: none; padding: calc(env(safe-area-inset-top, 0px) + 18px) 24px 0; }
  .auth-band-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .auth-band .auth-lang { border-color: rgba(255,255,255,.25); background: none; }
  .auth-band .auth-lang button { color: #cfe0d7; }
  .auth-band .auth-lang button[aria-pressed="true"] { background: rgba(255,255,255,.14); color: #fff; }
  .auth-emblem { display: flex; justify-content: center; margin-top: clamp(48px, 10vh, 100px); padding-bottom: 32px; }
  .auth-tile { display: block; width: 96px; height: 96px; border-radius: 21px; --mk-bg: #f3f5f4; --mk-fg: var(--brand-900);
    box-shadow: 0 2px 4px rgba(0,0,0,.22), 0 12px 24px -6px rgba(0,0,0,.42), 0 30px 48px -18px rgba(0,0,0,.5); }
  .auth-tile .mk { display: block; width: 100%; height: 100%; }
  .auth-panel { align-items: center; padding: 24px 26px 28px; }
  .auth-form { width: min(420px, 100%); background: none; border: 0; box-shadow: none; padding: 0; }
  .auth-form-kick { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; color: #d4b062; font-size: 11px; letter-spacing: .26em; }
  .auth-form-kick::before, .auth-form-kick::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .4; }
  .auth-form .field > label { color: #a9c0b5; }
  .auth-form .input { background: transparent; color: #fff; border: 0; border-bottom: 1px solid rgba(255,255,255,.28);
    border-radius: 0; padding-left: 0; min-height: 44px; font-size: 16px; box-shadow: none; }
  .auth-form .input:focus { border-bottom-color: #fff; box-shadow: none; }
  .pw-wrap .input { padding-right: 56px; }
  .pw-toggle { color: #d4b062; right: 0; }
  .pw-toggle:hover { background: none; }
  .auth-form .check { color: #cfe0d7; }
  .auth-form input[type="checkbox"] { accent-color: #c9a24a; }
  .auth-link { color: #d4b062; }
  .auth-note { background: rgba(255,255,255,.07); border-left-color: #d4b062; color: #cfe0d7; }
  .auth-form [data-caps] { color: #f0c977; }
  .auth-error { color: #ffb4a8; }
  .auth-btn { min-height: 48px; background: #f3f5f4; border-color: #f3f5f4; color: var(--brand-900); font-weight: 600; letter-spacing: .3em; }
  .auth-btn:hover { background: #fff; border-color: #fff; }
  .auth-secure { color: #86a396; }
  .auth-foot { color: #86a396; padding: 0 16px; }
}

/* rail brand */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 28px; height: 28px; display: block; flex: none; --mk-bg: #f3f5f4; --mk-fg: #0b3b2e; }
.brand-mark svg { display: block; width: 100%; height: 100%; }
.rail-me { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.1); }
.rail-me-name { color: #fff; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.rail-me-role { color: #9fb6ab; font-size: 11px; font-weight: 400; margin-left: 4px; }
.rail-me-actions { display: flex; gap: 14px; margin-top: 4px; }
.rail-me-actions button { background: none; border: 0; padding: 0; color: #9fb6ab; font-size: 12px; cursor: pointer; }
.rail-me-actions button:hover { color: #fff; }
