/* Finance COS. Tilicho Labs type and colour, shared with Tilicho COS: Space Grotesk (display), IBM Plex Sans (body), IBM Plex Mono (labels) */
@font-face { font-family: 'Space Grotesk'; src: url('../fonts/space-grotesk-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('../fonts/space-grotesk-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('../fonts/ibm-plex-sans-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('../fonts/ibm-plex-sans-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('../fonts/ibm-plex-sans-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../fonts/ibm-plex-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../fonts/ibm-plex-mono-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --bg: #ffffff; --paper: #FBFBFA; --line: rgba(10, 14, 22, 0.10); --line-2: rgba(10, 14, 22, 0.16);
  --hi: #11161E; --lo: #525c69; --mut: #8a929c;
  --signal: #E00917; --signal-hover: #c30813; --signal-deep: #7E0A11; --signal-soft: rgba(224, 9, 23, 0.06);
  --ok: #1F8A63; --warn: #9A6200; --bad: #C2281D;
  --disp: 'Space Grotesk', system-ui, sans-serif; --body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); }
body { font: 14.5px/1.55 var(--body); color: var(--hi); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-family: var(--disp); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: 28px; } h3 { font-size: 15.5px; letter-spacing: -0.01em; }
p { margin: 0; } a { color: var(--signal); text-decoration: none; } a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
.lo { color: var(--lo); } .sm { font-size: 12.5px; margin-top: 10px; } .warn { color: var(--warn); }
.meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.03em; color: var(--mut); line-height: 1.5; }
.mono { font-family: var(--mono); font-size: 12px; color: var(--lo); }
.none { color: var(--mut); padding: 14px 0; } .ns { color: var(--mut); }
code { font-family: var(--mono); font-size: 12px; background: var(--paper); padding: 1px 5px; border-radius: 3px; border: 1px solid var(--line); }
pre.code { font-family: var(--mono); font-size: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; margin: 8px 0 12px; overflow-x: auto; }

.btn { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; line-height: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border-radius: 4px;
  border: 1px solid var(--line-2); background: var(--bg); color: var(--hi); cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--hi); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--signal); border-color: var(--signal); color: #fff; } .btn.primary:hover { background: var(--signal-hover); border-color: var(--signal-hover); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--lo); } .btn.sm { padding: 8px 11px; font-size: 11.5px; }
.btn.danger { color: var(--bad); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

/* shell */
#app { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--bg); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; flex-direction: column; gap: 8px; padding: 0 8px 18px; color: var(--hi); }
.brand:hover { text-decoration: none; } .brand img { height: 26px; width: auto; align-self: flex-start; }
.brand span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--signal-deep); }
.side nav { display: flex; flex-direction: column; gap: 1px; }
.ng { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mut); padding: 16px 8px 6px; }
.side nav a { padding: 7px 8px; border-radius: 4px; color: var(--lo); font-weight: 500; }
.side nav a:hover { background: var(--paper); text-decoration: none; color: var(--hi); }
.side nav a.on { background: var(--signal-soft); color: var(--signal-deep); }
.sf { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding: 0 8px; }
.who { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 13px; } .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
main { min-width: 0; padding: 0 0 60px; }
.page { max-width: 1180px; margin: 0 auto; padding: 28px 32px 0; display: flex; flex-direction: column; gap: 16px; } .page.wide { max-width: none; }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; } .ph p { margin-top: 6px; }
.pa { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.pills { display: inline-flex; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; background: var(--bg); }
.pills button { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.03em; padding: 8px 12px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--lo); cursor: pointer; white-space: nowrap; }
.pills button:last-child { border-right: 0; } .pills button:hover { color: var(--hi); } .pills button.on { background: var(--hi); color: #fff; }

.kpis { display: grid; gap: 12px; } .k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; min-width: 0; }
.kl { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mut); }
.kv { font-family: var(--disp); font-weight: 600; font-size: 25px; letter-spacing: -0.02em; margin: 6px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv.bad { color: var(--bad); } .kv.warn { color: var(--warn); }
.ks { font-size: 12.5px; color: var(--lo); min-height: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up { color: var(--ok); } .down { color: var(--bad); }

.card { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.ch { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px 0; flex-wrap: wrap; }
.ch .c { font-family: var(--mono); font-size: 11.5px; color: var(--mut); font-weight: 400; margin-left: 4px; }
.cb { padding: 12px 16px 16px; } .card.flush .cb { padding: 12px 0 4px; } .card.flush .cb > .pills, .card.flush .cb > p { margin: 0 16px 12px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.more { margin-top: 10px; font-size: 13px; }

.notice { border: 1px solid var(--line-2); border-left: 3px solid var(--warn); background: var(--bg); border-radius: 4px; padding: 10px 14px; font-size: 13.5px; }
.notice.ok { border-left-color: var(--ok); } .notice.bad { border-left-color: var(--bad); }
.notice.sample { margin: 16px 32px 0; border-left-color: var(--signal); background: var(--signal-soft); }

/* tables */
.tw { overflow-x: auto; }
.dt { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dt th { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; color: var(--mut); text-align: left; padding: 8px 16px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.dt td { padding: 8px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dt tr:last-child td { border-bottom: 0; }
.dt .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dt td.bad { color: var(--bad); } .dt td.good { color: var(--ok); }
.dt tr.tot td { font-weight: 600; border-top: 1px solid var(--line-2); background: var(--paper); }
.dt tr.sub td { font-weight: 500; color: var(--lo); background: var(--paper); }
.dt tr.sec td { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--signal-deep); padding-top: 16px; }
.dt .sub { font-size: 12px; color: var(--mut); }
.dt.pl td:first-child, .dt.pl th:first-child { position: sticky; left: 0; background: var(--bg); min-width: 220px; } .dt.pl tr.tot td:first-child, .dt.pl tr.sub td:first-child { background: var(--paper); }
.dt .tc { font-weight: 600; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; }
.pill { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em; padding: 2px 7px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--lo); white-space: nowrap; vertical-align: 1px; }
.pill.ok { color: var(--ok); border-color: rgba(31, 138, 99, .4); } .pill.warn { color: var(--warn); border-color: rgba(154, 98, 0, .4); } .pill.bad { color: var(--bad); border-color: rgba(194, 40, 29, .4); }

/* charts */
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; } .chart .zero { stroke: var(--line-2); stroke-width: 1; }
.chart .yt { font: 10.5px var(--mono); fill: var(--mut); text-anchor: end; } .chart .xt { font: 10.5px var(--mono); fill: var(--mut); text-anchor: middle; }
.chart .ln { stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; } .chart .ln.dash { stroke-dasharray: 5 5; }
.chart .pt { stroke: var(--bg); stroke-width: 2; }
.chart .fc { fill: rgba(10, 14, 22, 0.03); } .chart .fct { font: 10px var(--mono); fill: var(--mut); letter-spacing: .1em; text-transform: uppercase; }
.chart .band { fill: rgba(27, 175, 122, 0.14); }
.chart .hit { fill: transparent; } .chart .hit:hover { fill: rgba(10, 14, 22, 0.04); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--lo); margin-bottom: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; } .legend i.l { height: 2px; width: 14px; vertical-align: middle; border-radius: 0; }
.tip { position: fixed; z-index: 20; pointer-events: none; background: var(--hi); color: #fff; border-radius: 6px; padding: 8px 10px; font-size: 12.5px; display: flex; flex-direction: column; gap: 3px; min-width: 150px; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .4); }
.tip b { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; opacity: .7; }
.tip span { display: flex; align-items: center; gap: 6px; } .tip i { width: 8px; height: 8px; border-radius: 2px; flex: none; } .tip em { font-style: normal; margin-left: auto; padding-left: 14px; font-variant-numeric: tabular-nums; }
.tip .tt { border-top: 1px solid rgba(255, 255, 255, .2); padding-top: 3px; margin-top: 2px; }
.rank { display: flex; flex-direction: column; gap: 9px; }
.rk { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto; gap: 12px; align-items: center; font-size: 13.5px; }
.rl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rb { height: 8px; } .rb i { display: block; height: 8px; border-radius: 0 4px 4px 0; }
.rv { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; } .rv small { color: var(--mut); margin-left: 8px; display: inline-block; min-width: 30px; }

/* goals */
.gb { margin-bottom: 14px; } .gt { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; margin-bottom: 6px; flex-wrap: wrap; }
.bar { position: relative; height: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--mut); } .bar i.ok { background: var(--ok); } .bar i.warn { background: #D99A1F; } .bar i.bad { background: var(--bad); }
.bar u { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--hi); }
.flags { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; } .flags a { margin-left: 6px; white-space: nowrap; }
input, select { border: 1px solid var(--line-2); border-radius: 4px; padding: 8px 10px; background: var(--bg); min-width: 0; }
.gin { width: 110px; text-align: right; font-variant-numeric: tabular-nums; }

/* model */
.model { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
#mout { display: flex; flex-direction: column; gap: 16px; min-width: 0; } #mout .k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1400px) { #mout .k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mf { padding: 6px 16px 16px; position: sticky; top: 16px; }
fieldset { border: 0; padding: 0; margin: 12px 0 0; } legend { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--signal-deep); padding: 0 0 6px; }
.mf label { display: grid; grid-template-columns: minmax(0, 1fr) 122px; gap: 8px; align-items: center; font-size: 13px; color: var(--lo); margin-bottom: 6px; }
.mf label:has(input[name=_name]) { grid-template-columns: 1fr; }
.inp { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 4px; background: var(--bg); } .inp.inl { display: inline-flex; vertical-align: middle; }
.inp input { border: 0; background: transparent; width: 100%; padding: 7px 8px; text-align: right; font-variant-numeric: tabular-nums; color: var(--hi); } .inp input[name=_name], .inp input[type=month] { text-align: left; }
.inp em { font: normal 10.5px var(--mono); color: var(--mut); padding-right: 8px; white-space: nowrap; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* integrations */
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.flow li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
.flow .n { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font: 12px var(--mono); color: var(--lo); }
.flow li.done .n { background: var(--ok); border-color: var(--ok); color: #fff; } .flow li > div > b { display: block; margin-bottom: 4px; } .flow p { margin-bottom: 8px; }
.zcfg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; max-width: 760px; }
.zcfg label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--lo); } .zcfg .wide { grid-column: span 3; } .zcfg .btn { justify-self: start; }

.login { max-width: 360px; margin: 14vh auto 0; padding: 0 20px; display: flex; flex-direction: column; gap: 12px; grid-column: 1 / -1; } .login img { height: 32px; width: auto; align-self: flex-start; margin-bottom: 10px; }
.login form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--hi); color: #fff; padding: 10px 16px; border-radius: 6px; font-size: 13.5px; z-index: 30; max-width: 80vw; }

@media (max-width: 1000px) {
  #app { grid-template-columns: 1fr; } .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); } .side nav { flex-direction: row; flex-wrap: wrap; } .ng { display: none; } .sf { margin-top: 12px; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .k4, .two, .model { grid-template-columns: repeat(2, minmax(0, 1fr)); } .model, .two { grid-template-columns: 1fr; } .mf { position: static; } .page { padding: 20px 16px 0; } .notice.sample { margin: 12px 16px 0; }
}
@media (max-width: 560px) { .k4 { grid-template-columns: 1fr; } }
