/* The viewport layout applies only while Financial Pulse is active. */
body:has(#finance:not(.hide)) {height:100dvh; min-height:0; overflow:hidden}
.main:has(#finance:not(.hide)) {height:100dvh; min-height:0; overflow:hidden; padding:clamp(12px,2.1vw,32px)}
#finance:not(.hide) {height:100%; min-height:0; overflow:hidden}
.fp-shell {
  --fp-line:#37554c; --fp-subtle:#b3c8be; --fp-soft:#96b4a6; --fp-ink:#f4fff8;
  display:flex; flex-direction:column; gap:clamp(8px,1.7vh,18px); height:100%; min-height:0;
  width:min(100%,1520px); margin-inline:auto; color:var(--fp-ink); font-variant-numeric:tabular-nums;
}
.fp-shell * {box-sizing:border-box}
.fp-shell button,.fp-shell select,.fp-shell input {font:inherit;color:inherit}
.fp-shell button,.fp-shell select {cursor:pointer}
.fp-shell :focus-visible {outline:2px solid #c1fce0;outline-offset:2px}
.fp-head,.fp-heading,.fp-detail header {display:flex;align-items:center;justify-content:space-between;gap:14px}
.fp-head h1,.fp-heading h2,.fp-card h3,.fp-head p,.fp-heading p {margin:0}
.fp-head h1 {font-size:clamp(25px,3.1vw,44px);letter-spacing:-.055em;line-height:1.08}
.fp-head p,.fp-heading p {color:var(--fp-subtle);font-size:clamp(12px,1vw,15px);margin-top:5px}
.fp-shell select,.fp-shell input,.fp-detail header button {background:#0c241d;border:1px solid var(--fp-line);border-radius:8px;padding:7px 10px;color-scheme:dark;min-width:0}
.fp-control,.fp-mobile-nav {display:flex;align-items:center;gap:9px;color:var(--fp-subtle);font-size:13px}
.fp-nav {display:flex;align-items:center;gap:clamp(4px,1vw,16px);border-bottom:1px solid var(--fp-line)}
.fp-nav button,.fp-switch button {position:relative;background:transparent;color:var(--fp-subtle);border:0;font-size:14px;padding:9px 9px 12px;white-space:nowrap}
.fp-nav button[aria-current=page] {color:#b6ffdc;font-weight:700}
.fp-nav button[aria-current=page]::after {content:"";position:absolute;inset:auto 4px -1px;height:3px;border-radius:4px;background:#9eeac6}
.fp-mobile-nav,.fp-switch {display:none}
.fp-stats {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));background:linear-gradient(110deg,#183d31,#102c24);border:1px solid var(--fp-line);border-radius:14px}
.fp-stat {display:grid;gap:2px;margin:clamp(9px,1.7vh,18px) 0;padding:0 clamp(12px,2vw,30px);border-right:1px solid var(--fp-line)}
.fp-stat:last-child {border:0}
.fp-stat span,.fp-shell footer {font-size:12px;color:var(--fp-subtle)}
.fp-stat strong {font-size:clamp(19px,2vw,32px);letter-spacing:-.04em;line-height:1.15}
.fp-stat.received strong {color:#adf1d5}.fp-stat.spent strong {color:#c9c4ff}
.fp-heading h2 {font-size:clamp(20px,2vw,30px);letter-spacing:-.04em}
.fp-filters {display:flex;gap:6px;font-size:13px}.fp-filters input {width:clamp(150px,17vw,250px)}
.fp-panels {flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,1fr);gap:clamp(10px,1.3vw,22px)}
.fp-card {min-width:0;min-height:0;border:1px solid var(--fp-line);border-radius:15px;padding:clamp(12px,1.5vw,23px);display:flex;flex-direction:column;overflow:hidden;background:#102820}
.fp-visual {background:linear-gradient(145deg,#17392f,#10291f)}
.fp-card h3 {font-size:clamp(15px,1.4vw,21px);letter-spacing:-.035em;line-height:1.2}
.fp-graphic {flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:8px;margin-top:10px}
.fp-plot {display:block;width:100%;min-height:0;height:min(88%,360px)}
.fp-plot line {stroke:#52675d;stroke-width:.7}
.fp-plot text,.fp-ring text {fill:#ceded5;font:13px system-ui}
.fp-legend {display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:5px 12px;font-size:12px;color:#e4f3e9}
.fp-dot {display:inline-block;vertical-align:middle;width:9px;height:9px;margin-right:5px;border-radius:4px}
.fp-ring {min-height:0;max-height:76%;display:flex;justify-content:center}
.fp-ring svg {max-width:100%;height:auto;width:min(240px,42vh);min-height:0}
.fp-ring text {text-anchor:middle}.fp-ring .fp-ring-value {font-size:23px;font-weight:700;fill:#f3fcf6;letter-spacing:-.04em}
.fp-tip {display:block;text-align:center;min-height:18px;margin-top:4px;font-size:12px;color:#d1ebda}
.fp-ranked {display:grid;gap:clamp(4px,1.1vh,12px);min-height:0}
.fp-ranked div {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 10px;font-size:clamp(12px,1vw,15px)}
.fp-ranked span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fp-ranked i,.fp-ranked em {display:block;height:clamp(4px,1vh,10px);border-radius:5px}
.fp-ranked i {grid-column:1/-1;background:#233f34}
.fp-empty {text-align:center;color:var(--fp-subtle);font-size:14px}
.fp-detail header {min-height:24px;margin-bottom:10px}
.fp-detail header button {font-size:12px;padding:4px 8px}
.fp-scroll {overflow:auto;min-height:0;scrollbar-width:none;overscroll-behavior:contain}
.fp-scroll::-webkit-scrollbar {display:none}
.fp-scroll table {font-size:clamp(12px,.95vw,14px);width:100%;border-collapse:separate;border-spacing:0}
.fp-scroll :is(th,td) {padding:10px 5px;text-align:right;border-bottom:1px solid #ffffff12;line-height:1.25}
.fp-scroll th {font-size:10px;letter-spacing:.06em;background:#102820;color:var(--fp-soft);z-index:1}
.fp-scroll :is(td,th):first-child {text-align:left;white-space:normal;overflow-wrap:anywhere}
.fp-scroll td {white-space:normal}
.fp-scroll td:has(small),.fp-scroll table:has(td small) th:nth-child(2) {text-align:left}
.fp-scroll td small {display:block;color:var(--fp-soft);margin-top:3px;font-size:.86em}
.fp-scroll tbody tr:hover {background:#ffffff05}
.fp-link {background:transparent;border:0;color:#c1f5d8!important;text-align:inherit;font-weight:550!important;padding:0}
.fp-link:hover {text-decoration:underline}
.fp-shell footer {font-size:11px;line-height:1.35;color:var(--fp-soft)}
@media(max-width:900px) {
  .fp-shell {gap:10px}
  .fp-nav {gap:0;justify-content:space-between}
  .fp-nav button {padding-inline:4px;font-size:12px}
  .fp-heading {flex-wrap:wrap;gap:8px}
}
@media(max-width:720px),(max-height:530px) {
  .main:has(#finance:not(.hide)) {padding:10px}
  .fp-shell {gap:8px}
  .fp-head h1 {font-size:24px}
  .fp-head p {font-size:11px}
  .fp-nav {display:none}
  .fp-mobile-nav,.fp-switch {display:flex}
  .fp-mobile-nav select {flex:1}
  .fp-switch button {padding:5px 12px;font-size:12px;border-bottom:2px solid transparent}
  .fp-switch button[aria-pressed=true] {border-color:#adeaca;color:#c5ffdc}
  .fp-panels {grid-template-columns:minmax(0,1fr)}
  .fp-shell[data-pane=chart] .fp-detail,.fp-shell[data-pane=details] .fp-visual {display:none}
  .fp-stat {padding:0 7px;margin:8px 0}
  .fp-stat strong {font-size:clamp(14px,3vw,21px)}
  .fp-stat span {font-size:10px}
  .fp-heading h2 {font-size:18px}
  .fp-head .fp-control {display:grid;gap:2px;font-size:11px}
  .fp-head select {max-width:115px;padding:5px}
  .fp-filters {width:100%;gap:4px;font-size:12px}.fp-filters input {width:0;flex:1}.fp-filters select {max-width:115px}
  .fp-legend {font-size:10px}.fp-scroll :is(td,th) {padding:8px 4px}
}
@media(max-height:600px) {
  .fp-shell {gap:4px}.fp-heading p,.fp-head p {margin:0}
  .fp-stat {margin:4px 0}.fp-stat strong {font-size:17px}
  .fp-card {padding:9px}.fp-graphic {margin-top:4px}
  .fp-ranked {gap:3px}.fp-ranked div {font-size:11px}
  .fp-tip {min-height:12px;font-size:10px}.fp-shell footer {font-size:10px}
}
