:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffffec;
  --well: #f2f6fa;
  --ink: #141e32;
  --muted: #6d7e96;
  --line: #e5ecf3;
  --blue: #1681fa;
  --blue-soft: #e3f1ff;
  --green: #14a76a;
  --red: #cf5263;
  --shadow: 0 8px 36px #32558106;
  --ring: #e8edf4;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1623;
  --surface: #182435f5;
  --well: #1e2e42;
  --ink: #eef5ff;
  --muted: #a2b3c9;
  --line: #2a3c51;
  --blue: #65b1ff;
  --blue-soft: #203e5c;
  --green: #65dca5;
  --red: #ff96a6;
  --shadow: none;
  --ring: #2b3c50;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 280px;
  min-height: 100svh;
  background:
    radial-gradient(ellipse at 15% 100%, #a5d8ff70, transparent 60%),
    radial-gradient(ellipse at 90% 5%, #e4f2ff, transparent 50%), var(--bg);
  color: var(--ink);
  font:
    400 14px/1.45 Lato,
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
html[data-theme="dark"] body {
  background:
    radial-gradient(ellipse at 0% 100%, #173c6060, transparent 65%), var(--bg);
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
h1,
h2,
h3,
p {
  margin: 0;
}
.shell {
  max-width: 1740px;
  margin: auto;
  padding: 32px clamp(18px, 3vw, 56px) 16px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.identity {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}
h1 {
  font-size: clamp(18px, 1.8vw, 27px);
  letter-spacing: -0.6px;
  line-height: 1.2;
  white-space: nowrap;
}
.summary {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  display: flex;
  gap: 12px;
  align-items: center;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: none;
}
.clock {
  display: grid;
  text-align: right;
  margin-right: 8px;
  min-width: 80px;
}
.clock time {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.clock > span {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--well);
  display: grid;
  place-items: center;
  flex: none;
}
.circle svg {
  width: 21px;
  height: 21px;
}
.circle:hover {
  background: var(--blue-soft);
  color: var(--blue);
}
.navigation {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.navigation a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 66px;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: 25px;
  transition:
    background 0.15s,
    transform 0.15s;
}
.navigation a:hover {
  background: var(--blue-soft);
  transform: translateY(-2px);
}
.icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  color: var(--blue);
  background: var(--blue-soft);
}
.icon svg {
  width: 24px;
  height: 24px;
}
.navigation .icon {
  width: 38px;
  height: 38px;
}
.navigation .icon svg {
  width: 21px;
  height: 21px;
}
.nav-label {
  font-size: 13px;
  font-weight: 700;
}
.nav-state {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  margin-right: 6px;
  vertical-align: middle;
}
.is-online .status-dot {
  background: var(--green);
}
.is-unreachable .status-dot {
  background: var(--red);
}
.dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.card {
  background: var(--surface);
  border-radius: 32px;
  padding: 24px;
  min-width: 0;
  box-shadow: var(--shadow);
  position: relative;
}
.card[data-profile="storage"] {
  grid-row: span 2;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.card-title {
  min-width: 0;
  flex: 1;
}
.card-title h2 {
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.35px;
  overflow-wrap: anywhere;
}
.subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.card-status {
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}
.card-status small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.rings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0 6px;
}
.metric {
  text-align: center;
  min-width: 0;
}
.ring {
  width: min(100%, 100px);
  aspect-ratio: 1;
  position: relative;
  margin: auto;
  display: grid;
  place-items: center;
}
.ring > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  stroke-width: 4;
}
.track {
  stroke: var(--ring);
}
.arc {
  stroke: var(--blue);
  stroke-dasharray: 0 100;
  transition: stroke-dasharray 0.3s;
}
.ring strong {
  font-size: 21px;
  letter-spacing: -0.5px;
  font-weight: 700;
  z-index: 1;
  font-variant-numeric: tabular-nums;
}
.ring strong small {
  font-size: 11px;
  letter-spacing: 0;
  font-weight: 400;
}
.ring.no-value strong {
  font-size: 17px;
  color: var(--muted);
}
.metric-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
}
.section {
  margin-top: 27px;
}
.section-head {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
  min-width: 0;
}
.section-head h3 {
  font-size: 13px;
  font-weight: 700;
}
.section-head span {
  font-size: 11px;
  color: var(--muted);
}
.rates {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  white-space: nowrap;
}
.rates b {
  font-weight: 600;
  color: var(--ink);
}
.rates .up {
  color: var(--blue);
}
.chart {
  height: 98px;
  position: relative;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 31px,
    var(--line) 32px
  );
}
.chart svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.8;
}
.chart .download {
  stroke: var(--blue);
}
.chart .upload {
  stroke: var(--green);
  stroke-dasharray: 3 3;
}
.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
}
.chart-legend {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  margin-top: 7px;
}
.volume {
  margin-top: 14px;
}
.volume-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  min-width: 0;
}
.volume-line > span:first-child {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.volume-line > span:last-child {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.volume-line small {
  font-size: 10px;
  color: var(--muted);
  margin-left: 7px;
}
.bar {
  height: 5px;
  background: var(--ring);
  border-radius: 10px;
  margin-top: 7px;
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--blue);
  border-radius: inherit;
}
.drives {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  gap: 6px;
}
.drive {
  padding: 9px 4px;
  border-radius: 14px;
  background: var(--well);
  text-align: center;
  min-width: 0;
}
.drive span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drive b {
  display: block;
  font-size: 12px;
  margin-top: 4px;
  font-weight: 600;
}
.drive.bad {
  color: var(--red);
}
.endpoints {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}
.endpoint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 19px;
  background: var(--well);
}
.endpoint b {
  font-size: 12px;
  font-weight: 600;
}
.endpoint small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}
.endpoint .delay {
  text-align: right;
}
.delay b {
  font-size: 15px;
}
.delay small {
  margin: 0 0 2px;
}
.relay-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}
.text-button {
  border: 0;
  background: transparent;
  padding: 6px;
  color: var(--blue);
  font-size: 11px;
  min-height: 32px;
  border-radius: 12px;
}
.mobile-details {
  display: none;
}
.empty {
  color: var(--muted);
  font-size: 12px;
  padding: 12px 0;
}
.health-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.health-chip {
  font-size: 11px;
  background: var(--well);
  padding: 7px 10px;
  border-radius: 12px;
  color: var(--muted);
}
.health-chip.bad {
  color: var(--red);
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 15px 6px 0;
  font-size: 11px;
  color: var(--muted);
}
.freshness::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 6px;
}
.freshness[data-stale="true"]::before {
  background: var(--red);
}
.footer-dot {
  padding: 0 6px;
}
.loading {
  color: var(--muted);
  padding: 50px 0;
}
.skip {
  position: fixed;
  left: 20px;
  top: -100px;
  z-index: 20;
  padding: 12px 18px;
  border-radius: 20px;
  background: var(--surface);
}
.skip:focus {
  top: 12px;
}
dialog {
  width: min(620px, calc(100% - 32px));
  max-height: 85svh;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 24px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 24px 90px #0003;
}
dialog::backdrop {
  background: #0c1c3850;
  backdrop-filter: blur(5px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.dialog-head h2 {
  font-size: 23px;
}
.eyebrow {
  color: var(--muted);
  font-size: 11px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.detail-stat {
  padding: 12px;
  border-radius: 16px;
  background: var(--well);
}
.detail-stat span {
  font-size: 11px;
  color: var(--muted);
  display: block;
}
.detail-stat b {
  display: block;
  font-size: 17px;
  margin-top: 4px;
}
.detail-time {
  margin-top: 16px;
  font-size: 11px;
  color: var(--muted);
}
.card[data-profile="network"] .chart,
.card[data-profile="network"] .chart-legend {
  display: none;
}
.card[data-profile="network"] .section {
  margin-top: 18px;
}
.card[data-profile="network"] .section-head {
  margin-bottom: 0;
}
@media (min-width: 901px) and (max-height: 1000px) {
  .shell {
    padding-top: 22px;
  }
  .topbar {
    padding: 15px 24px;
  }
  .navigation {
    margin: 12px 0;
  }
  .navigation a {
    min-height: 58px;
  }
  .card {
    padding: 20px;
  }
  .rings {
    margin-top: 19px;
  }
  .ring {
    max-width: 90px;
  }
  .section {
    margin-top: 20px;
  }
  .section-head {
    margin-bottom: 10px;
  }
  .chart {
    height: 70px;
  }
  .volume {
    margin-top: 10px;
  }
  .volume-line {
    font-size: 11px;
  }
  .drives {
    gap: 5px;
  }
  .drive {
    padding: 7px 3px;
  }
  .health-chip {
    font-size: 10px;
    padding: 5px 8px;
  }
  .relay-footer {
    margin-top: 13px;
    padding-top: 10px;
  }
  .endpoint {
    padding: 11px 13px;
  }
}
@media (min-width: 1600px) {
  .card {
    padding: 28px;
  }
  .ring {
    width: 112px;
  }
  .section {
    margin-top: 34px;
  }
  .chart {
    height: 116px;
  }
  .endpoint {
    padding: 16px;
  }
  .rings {
    margin-top: 30px;
  }
}
@media (max-width: 1250px) {
  .shell {
    padding: 22px 22px 14px;
  }
  .identity {
    display: block;
  }
  .summary {
    margin-top: 8px;
  }
  .navigation {
    gap: 8px;
  }
  .navigation a {
    padding: 10px;
    gap: 7px;
  }
  .navigation .icon {
    width: 32px;
    height: 32px;
  }
  .card {
    padding: 19px;
    border-radius: 28px;
  }
  .card-title h2 {
    font-size: 18px;
  }
  .icon {
    width: 40px;
    height: 40px;
  }
  .card-status {
    font-size: 10px;
  }
  .rings {
    gap: 9px;
  }
  .ring strong {
    font-size: 18px;
  }
  .volume-line small {
    display: block;
    text-align: right;
    margin: 0;
  }
  .section-head {
    flex-wrap: wrap;
  }
  .rates {
    font-size: 11px;
  }
}
@media (max-width: 900px) {
  .shell {
    padding: 16px;
  }
  .topbar {
    border-radius: 26px;
    padding: 17px 18px;
  }
  .navigation .nav-state {
    font-size: 10px;
  }
  .navigation .icon {
    display: none;
  }
  .card {
    padding: 17px;
  }
  .card-head {
    gap: 8px;
  }
  .card-title h2 {
    font-size: 16px;
  }
  .card-head > .icon {
    width: 34px;
    height: 34px;
  }
  .card-status {
    font-size: 10px;
  }
  .rings {
    gap: 4px;
    margin-top: 20px;
  }
  .ring strong {
    font-size: 16px;
  }
  .ring strong small {
    font-size: 9px;
  }
  .card .subtitle {
    font-size: 10px;
  }
  .metric-label {
    font-size: 10px;
  }
  .dashboard {
    gap: 12px;
  }
  .column {
    gap: 12px;
  }
  .endpoint {
    padding: 11px 10px;
  }
  .endpoint b {
    font-size: 11px;
  }
  .endpoint small {
    font-size: 10px;
  }
}
@media (max-width: 640px) {
  .shell {
    padding: 14px 14px max(16px, env(safe-area-inset-bottom));
  }
  .topbar {
    padding: 5px 4px 10px;
    background: transparent;
    box-shadow: none;
    gap: 8px;
    align-items: flex-start;
    border-radius: 0;
  }
  .identity {
    flex: 1;
    padding-top: 3px;
  }
  .identity h1 {
    font-size: 18px;
    letter-spacing: -0.45px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .summary {
    font-size: 10px;
    gap: 7px;
    margin-top: 6px;
  }
  .toolbar {
    gap: 7px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .clock {
    display: none;
  }
  .circle {
    width: 39px;
    height: 39px;
  }
  .circle svg {
    width: 18px;
    height: 18px;
  }
  .navigation {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 7px 0 12px;
  }
  .navigation a {
    min-height: 51px;
    border-radius: 20px;
    padding: 8px 11px;
    gap: 9px;
  }
  .navigation .icon {
    display: grid;
    width: 33px;
    height: 33px;
  }
  .nav-label {
    font-size: 12px;
  }
  .navigation .nav-state {
    font-size: 10px;
  }
  .dashboard {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .column {
    display: contents;
  }
  .card {
    padding: 17px 18px;
    border-radius: 26px;
  }
  .card-head > .icon {
    width: 39px;
    height: 39px;
  }
  .card-title h2 {
    font-size: 18px;
  }
  .card .subtitle {
    font-size: 11px;
  }
  .card-status {
    font-size: 11px;
  }
  .rings {
    gap: 18px;
    margin: 17px 0 2px;
  }
  .ring {
    width: 82px;
  }
  .ring strong {
    font-size: 20px;
  }
  .ring strong small {
    font-size: 10px;
  }
  .metric-label {
    font-size: 11px;
    margin-top: 3px;
  }
  .desktop-details {
    display: none;
  }
  .mobile-details {
    display: block;
    position: absolute;
    right: 13px;
    bottom: 8px;
    font-size: 10px;
  }
  .card[data-profile="storage"] > .rings {
    padding-bottom: 16px;
  }
  .endpoints {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 16px;
  }
  .endpoint {
    display: block;
    padding: 10px 8px;
    border-radius: 17px;
    min-width: 0;
  }
  .endpoint b {
    font-size: 11px;
  }
  .endpoint .delay {
    text-align: left;
    margin-top: 9px;
  }
  .delay b {
    font-size: 14px;
  }
  .relay-footer {
    margin-top: 13px;
    padding-top: 11px;
  }
  .relay-footer .text-button {
    padding: 0 2px;
  }
  .card[data-profile="network"] .section {
    margin-top: 14px;
  }
  .card[data-profile="network"] .chart,
  .card[data-profile="network"] .chart-legend {
    display: none;
  }
  .card[data-profile="network"] .section-head {
    margin: 0;
  }
  .card[data-profile="network"] .section-head h3 {
    font-size: 11px;
    color: var(--muted);
    font-weight: 400;
  }
  footer {
    font-size: 10px;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 13px;
  }
  dialog {
    padding: 20px;
    border-radius: 26px;
  }
}
@media (max-width: 350px) {
  .shell {
    padding: 12px;
  }
  .identity h1 {
    font-size: 15px;
  }
  .toolbar {
    gap: 4px;
  }
  .circle {
    width: 34px;
    height: 34px;
  }
  .summary {
    font-size: 9px;
    gap: 5px;
  }
  .rings {
    gap: 9px;
  }
  .navigation a {
    padding: 8px;
    gap: 6px;
  }
  .navigation .icon {
    width: 29px;
    height: 29px;
  }
  .card {
    padding: 15px;
  }
  .ring {
    width: 73px;
  }
  .endpoint {
    padding: 9px 6px;
  }
  .endpoint b {
    font-size: 10px;
  }
  .nav-state {
    max-width: 46px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
@media (orientation: landscape) and (max-height: 600px) and (min-width: 641px) {
  .shell {
    padding: 12px 18px;
  }
  .topbar {
    padding: 12px 18px;
  }
  .topbar h1 {
    font-size: 19px;
  }
  .summary {
    margin-top: 4px;
  }
  .navigation {
    margin: 10px 0;
  }
  .navigation a {
    min-height: 46px;
    border-radius: 20px;
  }
  .card {
    padding: 15px;
  }
  .rings {
    margin-top: 13px;
  }
  .ring {
    max-width: 72px;
  }
  .section {
    margin-top: 19px;
  }
  .card-status small {
    display: none;
  }
  .card-head > .icon {
    display: none;
  }
  .endpoints {
    gap: 6px;
    margin-top: 12px;
  }
  .endpoint {
    padding: 8px 10px;
  }
  .relay-footer {
    margin-top: 10px;
    padding-top: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
@media (prefers-contrast: more) {
  :root {
    --muted: #46566f;
    --line: #a5b4c6;
  }
  :root[data-theme="dark"] {
    --muted: #c5d3e5;
    --line: #7e91a7;
  }
  .card,
  .topbar,
  .navigation a {
    border: 1px solid var(--line);
  }
}
