@font-face {
  font-family: Manrope;
  src: url("/assets/manrope.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}
:root {
  color-scheme: light;
  --bg: #f3f6f7;
  --surface: #fff;
  --surface-soft: #f7f9fa;
  --ink: #20343d;
  --muted: #596c75;
  --border: #dfe7ea;
  --rx: #087c86;
  --rx-soft: #e5f2f2;
  --tx: #9d671d;
  --tx-soft: #faf1df;
  --nav: #163d49;
  --nav-text: #3d525d;
  --shadow: 0 3px 12px #20343d04;
  --danger: #a83e35;
  --danger-soft: #fff1ef;
  --focus: #176b99;
  --sidebar-width: 218px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17242b;
  --surface: #1c2c34;
  --surface-soft: #21333c;
  --ink: #e8f0f3;
  --muted: #a6bac4;
  --border: #344952;
  --rx: #6ac6ca;
  --rx-soft: #223f47;
  --tx: #e4ba78;
  --tx-soft: #3e382c;
  --nav: #d4e8ed;
  --nav-text: #b8cdd5;
  --shadow: none;
  --danger: #ffa598;
  --danger-soft: #412b2b;
  --focus: #8acbff;
}
@media(prefers-color-scheme:dark) {
  html:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #17242b;
    --surface: #1c2c34;
    --surface-soft: #21333c;
    --ink: #e8f0f3;
    --muted: #a6bac4;
    --border: #344952;
    --rx: #6ac6ca;
    --rx-soft: #223f47;
    --tx: #e4ba78;
    --tx-soft: #3e382c;
    --nav: #d4e8ed;
    --nav-text: #b8cdd5;
    --shadow: none;
    --danger: #ffa598;
    --danger-soft: #412b2b;
    --focus: #8acbff;
  }
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Manrope,Arial,sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button,input,select {
  font: inherit;
}
button,a,select {
  -webkit-tap-highlight-color: transparent;
}
button,select {
  cursor: pointer;
}
button {
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  touch-action: manipulation;
}
button:disabled {
  cursor: default;
  opacity: .45;
}
button:not(:disabled):active {
  transform: translateY(1px);
}
button,select,a {
  transition: background-color .16s,color .16s,border-color .16s;
}
button:focus-visible,a:focus-visible,select:focus-visible,[tabindex="0"]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
h1,h2,h3,p {
  margin: 0;
}
svg {
  display: block;
  flex-shrink: 0;
}
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon.small {
  width: 16px;
  height: 16px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none!important;
}
.rx {
  color: var(--rx);
}
.tx {
  color: var(--tx);
}
.skip-link {
  position: fixed;
  left: 240px;
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--surface);
  padding: 12px 20px;
  border-radius: 8px;
}
.skip-link:focus {
  top: 12px;
}
.sidebar {
  width: var(--sidebar-width);
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 29px 16px 18px;
  z-index: 40;
  display: flex;
  flex-direction: column;
}
.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px;
  margin-bottom: 48px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -1.2px;
  line-height: 1.1;
}
.brand-mark {
  width: 42px;
  height: 44px;
  border-radius: 12px;
  background: #163d49;
  color: #fff;
  display: grid;
  place-items: center;
  letter-spacing: -1.2px;
  font-size: 20px;
}
.brand-mark .icon {
  width: 25px;
  height: 25px;
}
.brand-second {
  font-size: 13px;
  display: block;
  letter-spacing: 1px;
  font-weight: 600;
  margin-top: 3px;
}
.sidebar-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 0 14px;
  margin-bottom: 12px;
}
.primary-nav {
  display: grid;
  gap: 5px;
}
.nav-link {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px 12px;
  min-height: 47px;
  font-size: 13px;
  font-weight: 600;
  color: var(--nav-text);
  border-radius: 8px;
}
.nav-link:hover {
  background: var(--surface-soft);
}
.nav-link.active {
  background: var(--rx-soft);
  color: var(--rx);
}
.sidebar-bottom {
  margin-top: auto;
}
.documentation {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 8px;
  font-size: 11.5px;
  color: var(--muted);
}
.documentation>.small {
  margin-left: auto;
  width: 13px;
  height: 13px;
}
.documentation:hover {
  color: var(--rx);
}
.server-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid var(--border);
  padding: 20px 8px 0;
  font-size: 11px;
  color: var(--muted);
}
.server-identity strong {
  display: block;
  font-size: 12px;
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 3px;
}
.server-identity span {
  display: block;
}
.workspace {
  margin-left: var(--sidebar-width);
}
.topbar {
  height: 78px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-start,.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.breadcrumb {
  display: flex;
  gap: 13px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb strong {
  font-weight: 600;
  color: var(--ink);
}
.breadcrumb .icon {
  width: 12px;
  height: 12px;
}
.action-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 3px;
}
.button,.icon-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  padding: 9px 13px;
  white-space: nowrap;
}
.button:hover:not(:disabled),.icon-button:hover:not(:disabled) {
  background: var(--surface-soft);
  border-color: var(--muted);
}
.button .icon {
  width: 16px;
  height: 16px;
}
.icon-button {
  width: 42px;
  height: 42px;
  padding: 9px;
  flex-shrink: 0;
}
.icon-button .icon {
  width: 18px;
  height: 18px;
}
.button-primary {
  background: var(--nav);
  color: var(--surface);
  border-color: var(--nav);
}
.text-button {
  border: 0;
  background: transparent;
  font-weight: 700;
  color: inherit;
  min-height: 44px;
  padding: 8px;
}
.mobile-only {
  display: none;
}
main {
  max-width: 1540px;
  margin: auto;
  padding: 34px 36px 0;
  min-width: 0;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 26px;
}
.connection-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 11.5px;
  color: var(--rx);
  margin-bottom: 8px;
}
.connection-status.is-error {
  color: var(--danger);
}
.connection-status.is-paused {
  color: var(--muted);
}
h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1.35px;
  line-height: 1.2;
}
.heading-period {
  color: var(--rx);
}
.page-description {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.interface-picker {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--surface);
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--muted);
}
.interface-picker .icon {
  width: 18px;
  height: 18px;
}
.interface-picker select {
  height: 36px;
  max-width: 225px;
  background: transparent;
  color: var(--ink);
  border: 0;
  font-size: 12px;
  font-weight: 600;
  padding-right: 8px;
}
.error-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
  padding: 6px 14px;
  margin: 0 0 20px;
  border-radius: 8px;
  font-size: 12px;
}
.error-banner .text-button {
  margin-left: auto;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.summary-item {
  padding: 22px 23px;
  min-width: 0;
}
.summary-item+.summary-item {
  border-left: 1px solid var(--border);
}
.summary-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.summary-label .icon {
  width: 15px;
  height: 15px;
}
.summary-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.4;
  margin-top: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.summary-value .value-unit {
  font-size: 16px;
  letter-spacing: 0;
  font-weight: 600;
  margin-left: 4px;
  color: var(--muted);
}
.summary-detail {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.live-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 266px;
  gap: 22px;
  margin-bottom: 28px;
}
.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 21px 24px 0;
}
.panel-heading h2 {
  font-size: 15px;
  letter-spacing: -.3px;
  font-weight: 800;
}
.panel-heading p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.live-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}
.compact-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  min-height: 36px;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.live-actions>.icon-button {
  height: 36px;
  width: 36px;
  min-height: 36px;
}
.live-readings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin: 20px 24px 4px;
}
.live-readings>div {
  min-width: 0;
}
.series-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  padding: 3px 0;
  font-size: 11.5px;
  font-weight: 600;
  min-height: 30px;
}
.series-toggle[aria-pressed="false"] {
  opacity: .5;
  text-decoration: line-through;
}
.line-key {
  display: inline-block;
  width: 20px;
  border-top: 2px solid currentColor;
  margin-left: 2px;
}
.line-key.dashed {
  border-top-style: dashed;
}
.rate-number {
  font-size: 32px;
  letter-spacing: -1.2px;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.rate-unit {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
  margin-left: 7px;
}
.secondary-rate {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.live-chart {
  height: 210px;
  margin: 10px 12px 0;
  position: relative;
  border-radius: 6px;
}
.live-chart>svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chart-grid {
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}
.chart-label {
  fill: var(--muted);
  font-size: 11px;
  font-family: Manrope,Arial,sans-serif;
}
.chart-tooltip {
  position: absolute;
  z-index: 8;
  pointer-events: none;
  background: var(--ink);
  color: var(--surface);
  padding: 10px 13px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.8;
  box-shadow: 0 5px 20px #0002;
  min-width: 145px;
  white-space: pre-line;
}
.chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 20px;
  pointer-events: none;
}
.chart-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 24px 17px;
  color: var(--muted);
  font-size: 10.5px;
}
.distribution-panel {
  display: flex;
  flex-direction: column;
  padding: 23px 21px;
  background: var(--surface-soft);
}
.distribution-title {
  display: flex;
  align-items: center;
  gap: 9px;
}
.distribution-title h2 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.3px;
}
.small-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  background: var(--surface);
  color: var(--rx);
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-shrink: 0;
}
.small-icon .icon {
  width: 17px;
  height: 17px;
}
.distribution-intro {
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--muted);
  margin: 17px 0 22px;
}
.volume-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin: 7px 0;
  font-size: 12px;
}
.volume-row>span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.volume-row strong {
  font-size: 16px;
  letter-spacing: -.4px;
  font-variant-numeric: tabular-nums;
}
.distribution-track {
  height: 9px;
  display: flex;
  gap: 4px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--border);
  margin-top: 20px;
}
.distribution-track>span {
  height: 100%;
  transition: width .3s;
}
.distribution-track>span:first-child {
  background: var(--rx);
  width: 0;
}
.distribution-track>span:last-child {
  background: var(--tx);
  width: 0;
}
.distribution-caption {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 12px;
}
.collection-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: auto;
  padding-top: 27px;
  color: var(--rx);
}
.collection-note>.icon {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}
.collection-note strong {
  display: block;
  font-size: 11px;
  color: var(--ink);
  font-weight: 700;
}
.collection-note span {
  display: block;
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 3px;
}
.history-panel {
  scroll-margin-top: 25px;
  overflow: hidden;
}
.history-panel>.panel-heading {
  padding-bottom: 20px;
}
.history-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 24px 20px;
}
.period-tabs {
  display: inline-flex;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  padding: 3px;
  border-radius: 8px;
}
.period-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 11.5px;
  padding: 7px 15px;
  min-height: 34px;
  border-radius: 5px;
}
.period-tab[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
  box-shadow: 0 1px 3px #00000006;
}
.period-tab:hover {
  color: var(--rx);
}
.history-legend {
  display: flex;
  gap: 18px;
  font-size: 11px;
}
.history-legend>span {
  display: flex;
  gap: 5px;
  align-items: center;
}
.history-legend .icon {
  width: 13px;
  height: 13px;
}
.history-chart {
  height: 210px;
  margin: 0 20px 12px;
  position: relative;
}
.history-chart>svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.bar-hit {
  fill: transparent;
  cursor: crosshair;
  outline: none;
}
.bar-hit:focus {
  fill: var(--rx-soft);
  opacity: .7;
}
.table-container {
  width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}
th {
  text-align: left;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
td {
  padding: 13px 24px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.numeric {
  text-align: right;
}
.numeric strong {
  font-weight: 800;
}
th:first-child {
  width: 24%;
}
.share-column {
  width: 24%;
  text-align: right;
}
.table-period {
  font-weight: 700;
}
.table-period small {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 9px;
}
.table-row:hover {
  background: var(--surface-soft);
}
.table-share {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.table-share>span {
  font-size: 10.5px;
  min-width: 29px;
  color: var(--muted);
  text-align: right;
}
.share-track {
  height: 5px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  width: 95px;
}
.share-track>span {
  display: block;
  height: 100%;
  background: var(--rx);
  border-radius: 2px;
}
.empty-row {
  text-align: center;
  color: var(--muted);
  padding: 32px 20px;
  white-space: normal;
}
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 22px;
  gap: 10px;
}
.table-footer>p {
  font-size: 10.5px;
  color: var(--muted);
}
.pagination {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pagination .icon-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 6px;
}
.pagination>span {
  font-size: 10.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 25px 0;
  color: var(--muted);
  font-size: 10px;
}
footer>span:first-child {
  color: var(--ink);
  font-weight: 700;
}
.footer-copyright {
  color: var(--muted);
  font-weight: 400;
  margin-left: 5px;
}
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: #0e222a66;
  backdrop-filter: blur(2px);
  z-index: 35;
}
.is-refreshing #btn-refresh .icon {
  animation: spin .9s linear infinite;
}
.is-refreshing #btn-refresh {
  opacity: .7;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.noscript {
  position: fixed;
  bottom: 15px;
  left: 15px;
  right: 15px;
  padding: 18px;
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger);
  z-index: 90;
}
.error-page {
  display: grid;
  min-height: 100dvh;
  place-items: center;
}
.error-page main {
  width: min(600px,100%);
  padding: 40px 30px;
  margin: 0;
}
.error-page h1 {
  font-size: clamp(30px,5vw,48px);
  letter-spacing: -2px;
  margin-top: 12px;
}
.error-page main>p:not(.error-code) {
  max-width: 400px;
  color: var(--muted);
  margin: 20px 0 30px;
  font-size: 15px;
  line-height: 1.8;
}
.error-code {
  font-weight: 800;
  font-size: 14px;
  color: var(--rx);
  margin-top: 65px;
}
.error-page .button {
  min-height: 46px;
  font-size: 13px;
}
@media(min-width:1600px) {
  main {
    padding-top: 42px;
  }
  .live-chart {
    height: 245px;
  }
  .live-layout {
    grid-template-columns: minmax(0,1fr) 295px;
  }
  .history-chart {
    height: 235px;
  }
}
@media(max-width:1200px) {
  :root {
    --sidebar-width: 195px;
  }
  .sidebar {
    padding-left: 10px;
    padding-right: 10px;
  }
  .nav-link {
    font-size: 12px;
    gap: 9px;
  }
  .topbar {
    padding: 0 25px;
  }
  main {
    padding: 28px 25px 0;
  }
  .summary-item {
    padding: 19px 16px;
  }
  .summary-label {
    font-size: 10.5px;
  }
  .summary-label .icon {
    display: none;
  }
  .summary-value {
    font-size: 25px;
  }
  .summary-detail {
    font-size: 10px;
  }
  .live-layout {
    grid-template-columns: minmax(0,1fr) 230px;
    gap: 17px;
  }
  .panel-heading {
    padding: 19px 20px 0;
  }
  .distribution-panel {
    padding: 20px 17px;
  }
  .distribution-title h2 {
    font-size: 12px;
  }
  .small-icon {
    display: none;
  }
  .live-readings {
    margin-left: 20px;
    margin-right: 20px;
    gap: 14px;
  }
  .rate-number {
    font-size: 29px;
  }
  .rate-unit {
    font-size: 11px;
  }
  .history-toolbar {
    padding-left: 20px;
    padding-right: 20px;
  }
  td,th {
    padding-left: 20px;
    padding-right: 20px;
  }
  .share-track {
    width: 65px;
  }
}
@media(max-width:1000px) {
  .live-layout {
    grid-template-columns: minmax(0,1fr);
  }
  .distribution-panel {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    align-items: center;
    column-gap: 25px;
    row-gap: 10px;
    padding: 20px;
  }
  .distribution-title {
    grid-column: 1;
    grid-row: 1;
  }
  .distribution-intro {
    grid-column: 1;
    grid-row: 2/4;
    margin: 0;
    font-size: 11px;
  }
  .volume-row {
    margin: 0;
    grid-column: 2;
    grid-row: 1;
  }
  .volume-row+.volume-row {
    grid-row: 2;
  }
  .distribution-track {
    grid-column: 2;
    grid-row: 3;
    margin-top: 5px;
  }
  .distribution-caption {
    display: none;
  }
  .collection-note {
    grid-column: 3;
    grid-row: 1/4;
    padding: 0;
    margin: 0;
  }
  .summary-label {
    white-space: normal;
    min-height: 30px;
    align-items: flex-start;
  }
  .summary-value {
    margin-top: 5px;
  }
  .summary-detail {
    min-height: 30px;
  }
  .history-legend {
    gap: 10px;
  }
  .history-legend>span {
    font-size: 10px;
  }
  .period-tab {
    padding: 7px 12px;
  }
  .share-column {
    width: 20%;
  }
  th:first-child {
    width: 25%;
  }
}
@media(max-width:820px) {
  :root {
    --sidebar-width: 0px;
  }
  .sidebar {
    width: 245px;
    transform: translateX(-100%);
    transition: transform .2s;
  }
  .sidebar.is-open {
    transform: translateX(0);
  }
  .sidebar-top {
    padding-left: 7px;
  }
  .sidebar .mobile-only {
    display: inline-flex;
  }
  .mobile-only {
    display: inline-flex;
  }
  .workspace {
    margin-left: 0;
  }
  .topbar {
    height: 68px;
    padding: 0 22px;
  }
  .topbar-start {
    gap: 13px;
  }
  .topbar-start>.icon-button {
    border: 0;
    background: transparent;
    margin-left: -8px;
  }
  .topbar-actions {
    gap: 8px;
  }
  .topbar-start .breadcrumb {
    font-size: 12px;
  }
  main {
    padding: 26px 22px 0;
  }
  .summary-label {
    min-height: auto;
    white-space: nowrap;
  }
  .summary-detail {
    min-height: auto;
  }
  .summary-value {
    margin-top: 10px;
  }
  .live-layout {
    gap: 16px;
  }
  .skip-link {
    left: 15px;
  }
  .nav-open {
    overflow: hidden;
  }
  .history-legend {
    font-size: 11px;
  }
  .period-tab {
    padding: 7px 17px;
  }
}
@media(max-width:600px) {
  html {
    scroll-padding-top: 15px;
  }
  .topbar {
    height: 64px;
    padding: 0 18px;
  }
  .topbar-actions {
    gap: 7px;
  }
  .topbar .button {
    min-width: 42px;
    min-height: 42px;
    padding: 9px;
  }
  .topbar .button>span {
    display: none;
  }
  .action-divider {
    display: none;
  }
  .topbar-start .breadcrumb {
    gap: 8px;
    font-size: 11px;
  }
  .topbar-start>.icon-button {
    width: 36px;
  }
  .topbar-start {
    gap: 6px;
  }
  main {
    padding: 23px 16px 0;
  }
  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 17px;
    margin-bottom: 20px;
  }
  h1 {
    font-size: 30px;
    letter-spacing: -1.2px;
  }
  .connection-status {
    font-size: 10.5px;
    margin-bottom: 7px;
  }
  .page-description {
    font-size: 11px;
    margin-top: 6px;
  }
  .interface-picker {
    width: 100%;
    padding: 2px 11px;
  }
  .interface-picker select {
    width: 100%;
    max-width: none;
    font-size: 11.5px;
  }
  .summary-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    margin-bottom: 18px;
    border-radius: 10px;
  }
  .summary-item {
    padding: 16px;
  }
  .summary-item:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .summary-item:nth-child(4) {
    border-top: 1px solid var(--border);
  }
  .summary-label {
    font-size: 10px;
  }
  .summary-label .icon {
    display: block;
    width: 13px;
    height: 13px;
  }
  .summary-value {
    font-size: 25px;
    margin-top: 9px;
    letter-spacing: -.8px;
  }
  .summary-value .value-unit {
    font-size: 14px;
  }
  .summary-detail {
    font-size: 9.5px;
    line-height: 1.6;
    min-height: 15px;
    margin-top: 4px;
  }
  .live-layout {
    gap: 16px;
    margin-bottom: 21px;
  }
  .panel {
    border-radius: 10px;
  }
  .panel-heading {
    padding: 18px 17px 0;
    gap: 8px;
  }
  .panel-heading h2 {
    font-size: 14px;
  }
  .panel-heading p {
    font-size: 10px;
  }
  .live-actions {
    gap: 5px;
  }
  .compact-select {
    font-size: 10px;
    padding: 4px 5px;
    min-height: 36px;
  }
  .live-actions>.icon-button {
    width: 36px;
    height: 36px;
    min-height: 36px;
  }
  .live-readings {
    margin: 17px 17px 4px;
    gap: 15px;
  }
  .series-toggle {
    font-size: 10.5px;
    min-height: 30px;
  }
  .series-toggle .icon {
    width: 14px;
    height: 14px;
  }
  .line-key {
    width: 15px;
    margin-left: 0;
  }
  .rate-number {
    font-size: 28px;
    line-height: 1.4;
    letter-spacing: -.9px;
  }
  .rate-unit {
    font-size: 10px;
    margin-left: 5px;
  }
  .secondary-rate {
    font-size: 10px;
  }
  .live-chart {
    height: 185px;
    margin: 9px 6px 0;
  }
  .chart-label {
    font-size: 10px;
  }
  .chart-footer {
    padding: 8px 17px 14px;
    font-size: 9px;
  }
  .distribution-panel {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 18px;
  }
  .distribution-title {
    grid-column: 1/3;
    grid-row: 1;
  }
  .distribution-title h2 {
    font-size: 13px;
  }
  .distribution-intro {
    display: none;
  }
  .volume-row {
    grid-column: 1;
    grid-row: 2;
    display: block;
  }
  .volume-row+.volume-row {
    grid-column: 2;
    grid-row: 2;
  }
  .volume-row>span {
    font-size: 11px;
  }
  .volume-row>strong {
    display: block;
    margin-top: 5px;
    font-size: 20px;
  }
  .distribution-track {
    grid-column: 1/3;
    grid-row: 3;
    margin: 0;
    height: 7px;
  }
  .collection-note {
    grid-column: 1/3;
    grid-row: 4;
    border-top: 1px solid var(--border);
    padding-top: 12px;
  }
  .collection-note strong {
    font-size: 10px;
  }
  .collection-note span {
    font-size: 9.5px;
    margin-top: 1px;
  }
  .collection-note .icon {
    width: 17px;
    height: 17px;
  }
  .history-panel>.panel-heading {
    padding-bottom: 18px;
    align-items: flex-start;
  }
  .history-panel>.panel-heading .button {
    padding: 7px 9px;
    min-height: 36px;
    font-size: 10px;
    gap: 6px;
  }
  .history-panel>.panel-heading .button span {
    font-size: 0;
  }
  .history-panel>.panel-heading .button span:after {
    content: "CSV";
    font-size: 10px;
  }
  .history-toolbar {
    padding: 0 15px 15px;
    display: block;
  }
  .period-tabs {
    display: flex;
    width: 100%;
    padding: 3px;
    gap: 1px;
  }
  .period-tab {
    padding: 6px 10px;
    font-size: 10.5px;
    min-height: 37px;
    flex: 1;
  }
  .history-legend {
    margin-top: 14px;
    justify-content: flex-end;
    font-size: 10px;
    gap: 16px;
  }
  .history-chart {
    height: 185px;
    margin: 0 7px 8px;
  }
  .history-panel .panel-heading p {
    font-size: 10px;
    max-width: 230px;
  }
  .share-column {
    display: none;
  }
  th:first-child {
    width: 28%;
  }
  th {
    font-size: 9.5px;
    padding: 10px 9px;
  }
  td {
    font-size: 10.5px;
    padding: 12px 9px;
  }
  .table-period small {
    display: block;
    font-size: 9px;
    margin-left: 0;
    margin-top: 2px;
  }
  .table-footer {
    padding: 10px 12px;
    gap: 5px;
  }
  .table-footer>p {
    font-size: 9.5px;
  }
  .pagination {
    gap: 7px;
  }
  .pagination>.icon-button {
    width: 36px;
    height: 36px;
    min-height: 36px;
  }
  .pagination>span {
    font-size: 10px;
  }
  .error-banner {
    padding: 8px 10px;
    gap: 8px;
    font-size: 11px;
    align-items: flex-start;
  }
  .error-banner .icon {
    width: 17px;
    height: 17px;
    margin-top: 4px;
  }
  .error-banner .text-button {
    padding: 2px 0;
    min-height: 30px;
    font-size: 10px;
  }
  .error-banner>span {
    flex: 1;
  }
  footer {
    font-size: 9px;
    gap: 9px;
    padding: 22px 0;
    line-height: 1.6;
  }
  footer>span:first-child {
    width: 100%;
  }
  .chart-tooltip {
    font-size: 10px;
    min-width: 135px;
    padding: 8px 10px;
  }
  .skip-link {
    font-size: 12px;
  }
}
@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }
  *,*:before,*:after {
    animation: none!important;
    transition: none!important;
  }
}
#kpi-today-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}
#kpi-today-sub>span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
#kpi-today-sub .icon {
  width: 11px;
  height: 11px;
}
@media(max-width:600px) {
  td {
    font-size: 12px;
  }
  th {
    font-size: 10.5px;
  }
  .table-period small {
    font-size: 10px;
  }
  .summary-detail {
    font-size: 10.5px;
  }
  .chart-footer {
    font-size: 10px;
  }
  .history-panel .panel-heading p {
    font-size: 11px;
  }
}

@media (max-width: 600px) {
  .button, .icon-button, .period-tab, .compact-select, .series-toggle,
  .pagination .icon-button, .live-actions > .icon-button,
  .history-panel > .panel-heading .button {
    min-height: 44px;
  }
  .topbar-start > .icon-button, .live-actions > .icon-button, .pagination .icon-button {
    width: 44px;
    height: 44px;
  }
  .compact-select { font-size: 11px; }
}

.button-reset {
  color: var(--danger);
  border-color: var(--danger);
}
.button-reset:hover:not(:disabled) {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: var(--danger);
}
.reset-status {
  padding: 11px 14px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--rx);
  background: var(--rx-soft);
  font-size: 12px;
}
.reset-status[data-error="true"] {
  color: var(--danger);
  background: var(--danger-soft);
}

@media (max-width: 600px) {
  .breadcrumb > span, .breadcrumb > svg { display: none; }
  .topbar #btn-reset > span { display: inline; }
  .topbar #btn-reset { padding: 9px 8px; gap: 6px; font-size: 11px; }
}
