/* Monitor-specific layout. Brand typography, colours, cards and tables come from style.css. */
html{scroll-padding-top:90px}
.badge{display:inline-flex;align-items:center;padding:5px 9px;border:1px solid var(--line);border-radius:999px;background:var(--accent-soft);color:var(--ink);font-size:11px;font-weight:800;white-space:nowrap}
.notice{margin:12px 0;padding:13px 16px;border:1px solid var(--line);border-radius:10px;background:var(--accent-soft);color:var(--ink);font-size:12px;line-height:1.7}
.notice.error{background:rgba(146,83,77,.08);border-color:rgba(146,83,77,.18);color:#92534d}
[hidden]{display:none!important}
/* Network page uses the same hero, section spacing and metrics as network.html. */
.metrics .metric{min-width:0}
.metrics .metric>span{text-transform:uppercase}
.metrics .metric>small{display:block;margin-top:12px;color:var(--muted);font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.metrics .metric b{overflow-wrap:anywhere;font-variant-numeric:tabular-nums lining-nums}
.metrics .metric b.version{font-size:16px}
.network-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:16px;flex-wrap:wrap}
.network-head-actions .api-updated{gap:8px;flex-wrap:wrap}
/* Preserve the last known state while background refresh is in flight. */
.network-head-actions .api-updated::before{display:block;flex-shrink:0;background:var(--muted);box-shadow:none}
.network-head-actions .api-updated[data-state="ok"]::before{background:var(--green);box-shadow:0 0 0 3px rgba(69,122,90,.09)}
.network-head-actions .api-updated[data-state="warning"]::before{background:#a17e25}
.network-head-actions .api-updated[data-state="error"]::before{background:#92534d}
.network-head-actions .status{font-size:12px;color:var(--muted)}
.network-head-actions .status[data-state="warning"]{color:#7f651c}
.network-head-actions .status[data-state="error"]{color:#92534d}
#collector[data-state="ok"]{color:var(--green)}
#collector[data-state="warning"],#collector[data-state="error"]{color:#92534d}
.monitor-subhead{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:32px 0 16px}
.monitor-subhead h4{font-size:20px;letter-spacing:-.025em;margin:0}
.monitor-subhead .muted{font-size:12px}
#filters{display:flex;align-items:flex-end;justify-content:flex-end;gap:9px;flex-wrap:wrap}
#filters select,#filters input{font:inherit;font-size:13px;background:var(--paper-2);color:var(--ink);border:1px solid var(--line);border-radius:9px;padding:10px 12px;min-width:0}
#custom{display:flex;gap:8px}
#custom label{font-size:11px;color:var(--muted)}
#custom input{display:block;margin-top:3px;max-width:145px}
.panel{min-width:0}
.panel-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}
.panel-head h4{margin:0}
.muted,.label,.footnote,.empty{color:var(--muted)}
.panel-head>.muted{font-size:12px}
.chart{height:290px;position:relative;min-width:0}
.chart.short{height:240px}
.footnote{margin:18px 0 0;font-size:12px;line-height:1.7}
.table-panel{margin-top:20px}
.table-scroll{overflow-x:auto;overscroll-behavior-x:contain}
.treasury-table{table-layout:auto}
.treasury-table.monitor-anomalies{min-width:520px}
.address-button{padding:0;border:0;background:transparent;color:var(--ink);font:inherit;font-weight:700;text-align:left;overflow-wrap:anywhere;cursor:pointer}
.address-button:hover{text-decoration:underline}
.label{display:block;font-size:11px;margin-top:4px;overflow-wrap:anywhere}
.bar{height:4px;margin-top:6px;margin-left:auto;border-radius:999px;background:var(--accent);max-width:100%}
.empty{padding:20px 16px}
.pager{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:18px;font-size:12px;color:var(--muted)}
button{cursor:pointer}
button:disabled{opacity:.35;cursor:default}
.signal{font-weight:700;text-transform:capitalize;white-space:nowrap}
.anomaly-values{display:flex;flex-wrap:wrap;gap:10px 28px;margin:0}
.anomaly-values>div{min-width:100px;max-width:100%}
.anomaly-values dt{color:var(--muted);font-size:11px;margin-bottom:4px}
.anomaly-values dd{margin:0;font-weight:700;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.anomaly-reason{margin:12px 0 0;color:var(--muted);font-size:12px;line-height:1.7}
.warning{color:#7f651c}
.monitor-footer .footer-row{align-items:flex-start}
.monitor-footer .footer-row>strong{white-space:nowrap}
.monitor-footer .footer-row>span:nth-child(2){max-width:700px}
#refreshNote{white-space:nowrap}
dialog{max-width:1050px;width:calc(100% - 32px);max-height:88vh;padding:24px;border:1px solid var(--line);border-radius:var(--radius);background:var(--paper-2);color:var(--ink);box-shadow:var(--shadow)}
dialog::backdrop{background:rgba(32,33,31,.55)}
.dialog-head{display:flex;justify-content:space-between;align-items:center;gap:20px;background:var(--paper-2);padding-bottom:14px}
.dialog-head h2{font-size:24px;letter-spacing:-.035em;margin:0}
.branches{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;margin-top:20px}
.branches h3{font-size:18px;letter-spacing:-.025em}
.block{padding:15px;margin-top:10px;border:1px solid var(--line);border-radius:10px;background:var(--paper);overflow-wrap:anywhere;font-size:12px}
.block strong{display:block;font-size:15px}
.block p{margin:6px 0}
.detail-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}
.sr{position:absolute;width:1px;height:1px;clip:rect(0,0,0,0);overflow:hidden}
:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
@media(max-width:980px){.monitor-footer .footer-row{flex-wrap:wrap}}
@media(max-width:640px){.network-head-actions{justify-content:flex-start;gap:10px}.network-head-actions .api-updated{white-space:normal}}
@media(max-width:640px){#filters{justify-content:flex-start}.panel-head{align-items:flex-start;flex-wrap:wrap}.chart{height:260px}.chart.short{height:230px}.branches{grid-template-columns:minmax(0,1fr)}dialog{padding:18px}.dialog-head h2{font-size:20px}#filters select{max-width:100%}.pager{gap:9px}.pager button{padding:8px 10px}.monitor-footer .footer-row{gap:12px}.notice{font-size:11px}.monitor-subhead{align-items:flex-start;gap:12px}}

/* Preserve metric layout when enabling GRLC.eu's [data-api] transitions. */
.metrics .metric b[data-api] { display:block; }


/* Smooth live updates v2. Only values/rows that actually change are animated. */
@keyframes monitorCardDataChange {
  0%   {background-color:rgba(226,185,79,.27)}
  42%  {background-color:rgba(226,185,79,.14)}
  100% {background-color:transparent}
}
.metrics .metric.monitor-just-updated {
  animation:monitorCardDataChange 1.25s ease-out 1;
}
@keyframes monitorRowNew {
  from {opacity:.42;transform:translateY(7px);background-color:rgba(226,185,79,.17)}
  to   {opacity:1;transform:translateY(0);background-color:transparent}
}
@keyframes monitorRowUpdated {
  0% {background-color:rgba(226,185,79,.3)}
  100% {background-color:transparent}
}
.treasury-table tbody tr.monitor-row-new {animation:monitorRowNew .72s cubic-bezier(.22,.7,.28,1) both}
.treasury-table tbody tr.monitor-row-updated {animation:monitorRowUpdated 1.15s ease-out}
@keyframes monitorStatusPulse {
  0% {box-shadow:0 0 0 0 rgba(69,122,90,.33)}
  100% {box-shadow:0 0 0 9px rgba(69,122,90,0)}
}
.network-head-actions .api-updated.monitor-refresh-pulse::before {
  animation:monitorStatusPulse 1.05s ease-out 1;
}
@media(prefers-reduced-motion:reduce) {
  .metrics .metric.monitor-just-updated,
  .treasury-table tbody tr.monitor-row-new,
  .treasury-table tbody tr.monitor-row-updated,
  .network-head-actions .api-updated.monitor-refresh-pulse::before {animation:none!important}
}