@font-face {
  font-family: "Inter";
  src: url("/inter.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #0b0f19;
  --header: #131826;
  --surface: #131826;
  --surface-deep: #0e1320;
  --border: #2f374d;
  --border-soft: rgba(159, 165, 181, 0.18);
  --text: #ffffff;
  --text-secondary: #9fa5b5;
  --text-tertiary: #8790aa;
  --accent: #1bdfff;
  --success: #18ebb8;
  --warning: #d4c060;
  --danger: #eb555a;
  --orange: #f59e0b;
  --violet: #a78bfa;
  --chart-grid: rgba(159, 165, 181, 0.17);
}

* { box-sizing: border-box; }

html { background: var(--background); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font: 14px/1.5 "Inter", Arial, sans-serif;
  letter-spacing: 0;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd { margin: 0; }

.topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 30px;
  border-bottom: 1px solid var(--border);
  background: var(--header);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}

.brand img {
  width: 202px;
  height: 42px;
  object-fit: contain;
  object-position: left center;
}

.brand-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
}

.topbar-actions,
.reference-links,
.chart-legend,
.filters,
footer {
  display: flex;
  align-items: center;
}

.topbar-actions { gap: 10px; }

.network-chip,
.status,
.data-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-deep);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.network-chip { gap: 8px; padding: 7px 11px; }
.network-chip img { width: 17px; height: 15px; filter: invert(1); }
.status { min-width: 112px; padding: 7px 12px; }
.status.good { color: var(--success); border-color: rgba(24, 235, 184, 0.45); }
.status.bad { color: var(--danger); border-color: rgba(235, 85, 90, 0.5); }

main {
  width: min(1500px, calc(100% - 44px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 2px 2px 24px;
}

.eyebrow,
.section-label {
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
}

.page-heading h1 {
  margin-top: 4px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 720;
}

#subtitle {
  max-width: 820px;
  margin-top: 6px;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.reference-links { gap: 9px; flex-wrap: wrap; justify-content: flex-end; }

.reference-links a {
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 650;
}

.reference-links a:hover,
.reference-links a:focus-visible { border-color: var(--accent); color: var(--accent); }

.dial-rack {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.dial-rack-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.dial-rack-head h2 {
  margin-top: 2px;
  font-size: 17px;
  line-height: 1.25;
}

.dial-rack-head time {
  color: var(--text-secondary);
  font-size: 12px;
  text-align: right;
}

.dial-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border-soft);
}

.dial-item {
  display: grid;
  justify-items: center;
  min-width: 0;
  padding: 18px 16px 5px;
  border-left: 1px solid var(--border-soft);
  text-align: center;
}

.dial-item:first-child { border-left: 0; }

.dial-face {
  --dial-angle: 0deg;
  --dial-color: var(--accent);
  --dial-track: rgba(27, 223, 255, 0.1);
  --dial-glow: rgba(27, 223, 255, 0.38);
  position: relative;
  width: 158px;
  height: 158px;
  border-radius: 50%;
  background: conic-gradient(
    from 225deg,
    var(--dial-color) 0deg var(--dial-angle),
    var(--dial-track) var(--dial-angle) 270deg,
    transparent 270deg 360deg
  );
  filter: drop-shadow(0 0 10px var(--dial-glow));
  transition: background 300ms ease;
}

.dial-face::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 15px;
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  background: var(--surface-deep);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.45);
}

.dial-face::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 5px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 225deg,
    rgba(255, 255, 255, 0.48) 0deg 1deg,
    transparent 1deg 13.5deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 0);
  opacity: 0.52;
  pointer-events: none;
}

.dial-cyan {
  --dial-color: var(--accent);
  --dial-track: rgba(27, 223, 255, 0.1);
  --dial-glow: rgba(27, 223, 255, 0.38);
}

.dial-orange {
  --dial-color: var(--orange);
  --dial-track: rgba(245, 158, 11, 0.1);
  --dial-glow: rgba(245, 158, 11, 0.4);
}

.dial-violet {
  --dial-color: var(--violet);
  --dial-track: rgba(167, 139, 250, 0.1);
  --dial-glow: rgba(167, 139, 250, 0.4);
}

.dial-green {
  --dial-color: var(--success);
  --dial-track: rgba(24, 235, 184, 0.1);
  --dial-glow: rgba(24, 235, 184, 0.38);
}

.dial-hub {
  position: absolute;
  z-index: 2;
  inset: 30px;
  display: grid;
  place-content: center;
  border-radius: 50%;
}

.dial-hub strong {
  color: var(--text);
  font-size: 28px;
  line-height: 1.05;
  font-weight: 720;
}

.dial-hub span,
.dial-min,
.dial-max {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
}

.dial-hub span { margin-top: 4px; }

.dial-min,
.dial-max {
  position: absolute;
  z-index: 2;
  bottom: 13px;
}

.dial-min { left: 21px; }
.dial-max { right: 16px; }

.dial-item h3 {
  margin-top: 7px;
  font-size: 14px;
  font-weight: 700;
}

.dial-item > p {
  min-height: 19px;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.host-facts {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 10px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-secondary);
  font-size: 11px;
}

.host-facts strong {
  margin-left: 5px;
  color: var(--text);
  font-size: 12px;
}

.grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.primary-grid { grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.65fr); }
.secondary-grid { grid-template-columns: minmax(350px, 0.72fr) minmax(0, 1.28fr); }

.tile {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.tile.full { margin-bottom: 16px; }

.tile-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.tile-head h2 {
  margin-top: 2px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.25;
  font-weight: 700;
}

.tile-head time,
.tile-head > span { font-size: 12px; text-align: right; }

.xrp-mark {
  width: 39px;
  height: 34px;
  filter: invert(1);
}

.stat-strip {
  display: grid;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.five-columns { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.four-columns { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat-strip > div {
  min-width: 0;
  padding: 14px 12px;
  border-left: 1px solid var(--border-soft);
}

.stat-strip > div:first-child { border-left: 0; padding-left: 0; }
.stat-strip > div:last-child { padding-right: 0; }

.stat-strip span,
.detail-list dt {
  display: block;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
}

.stat-strip strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-strip.compact strong { font-size: 19px; }

.chart-region { margin-top: 17px; }

.chart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.chart-heading h3 {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
}

.chart-legend { gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.chart-legend span { color: var(--text-secondary); font-size: 11px; white-space: nowrap; }

.chart-legend i {
  display: inline-block;
  width: 14px;
  height: 3px;
  margin: 0 6px 2px 0;
  border-radius: 2px;
}

.legend-cyan { background: var(--accent); }
.legend-orange { background: var(--orange); }
.legend-violet { background: var(--violet); }
.legend-green { background: var(--success); }

canvas {
  display: block;
  width: 100%;
  height: 250px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: var(--surface-deep);
}

.compact-chart canvas { height: 220px; }

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border-soft);
}

.detail-list > div {
  min-width: 0;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-soft);
}

.detail-list > div:nth-child(odd):not(.wide) {
  padding-right: 14px;
  border-right: 1px solid var(--border-soft);
}

.detail-list > div:nth-child(even) { padding-left: 14px; }
.detail-list .wide { grid-column: 1 / -1; }

.detail-list dd {
  margin-top: 3px;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.detail-list dd.good { color: var(--success); }
.detail-list dd.bad { color: var(--danger); }

.hash {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color: var(--text-secondary);
}

.data-source {
  min-height: 28px;
  padding: 5px 9px;
  color: var(--accent);
}

.data-source.bad { color: var(--danger); border-color: rgba(235, 85, 90, 0.5); }
.agreement-list { border-top: 1px solid var(--border-soft); }

.agreement-row {
  display: grid;
  grid-template-columns: 126px minmax(120px, 1fr) 142px;
  align-items: center;
  gap: 14px;
  min-height: 66px;
  border-bottom: 1px solid var(--border-soft);
}

.agreement-row > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.agreement-row span,
.agreement-row small { color: var(--text-secondary); font-size: 11px; }
.agreement-row strong { color: var(--text); font-size: 14px; }
.agreement-row small { text-align: right; }

.progress {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface-deep);
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--success);
  transition: width 240ms ease;
}

.table-wrap { width: 100%; overflow: auto; }

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th, td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 680;
}

td { color: #f5f5f5; font-size: 13px; }
td:nth-last-child(-n+3), th:nth-last-child(-n+3) { white-space: nowrap; }

.amendment-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 650;
  text-decoration-color: rgba(27, 223, 255, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.amendment-link span { color: var(--accent); font-size: 11px; }
.amendment-link:hover,
.amendment-link:focus-visible { color: var(--accent); outline: none; }

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 650;
}

.badge.good { color: var(--success); border-color: rgba(24, 235, 184, 0.4); }
.badge.warn { color: var(--warning); border-color: rgba(212, 192, 96, 0.4); }
.badge.bad { color: var(--danger); border-color: rgba(235, 85, 90, 0.45); }

button {
  min-height: 34px;
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-deep);
  color: var(--text);
  padding: 7px 11px;
  font: 600 12px/1.2 "Inter", Arial, sans-serif;
  cursor: pointer;
}

button:hover:not(:disabled),
button:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
button:disabled { cursor: not-allowed; opacity: 0.42; }
button.active { border-color: var(--accent); background: rgba(27, 223, 255, 0.08); color: var(--accent); }
button.danger { color: var(--danger); border-color: rgba(235, 85, 90, 0.42); }
button.support { color: var(--success); border-color: rgba(24, 235, 184, 0.4); }
button.primary-action { border-color: var(--accent); background: var(--accent); color: #08121a; }

.filters { gap: 7px; }
.amendments table { min-width: 1020px; }

pre {
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 13px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: var(--surface-deep);
  color: var(--text-secondary);
  font: 12px/1.65 "SFMono-Regular", Consolas, monospace;
  white-space: pre-wrap;
}

footer {
  justify-content: center;
  gap: 10px;
  min-height: 68px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-tertiary);
  font-size: 12px;
}

footer img { width: 24px; height: 21px; filter: invert(1); opacity: 0.8; }
.footer-separator { width: 1px; height: 18px; background: var(--border); }

dialog {
  width: min(520px, calc(100% - 32px));
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

dialog::backdrop { background: rgba(0, 0, 0, 0.75); }
dialog form { display: grid; gap: 15px; }
dialog h2 { font-size: 20px; }
dialog p:not(.section-label), dialog label { color: var(--text-secondary); }
dialog label { display: grid; gap: 7px; font-size: 12px; font-weight: 600; }

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 10px;
  background: var(--surface-deep);
  color: var(--text);
  font: 14px "SFMono-Regular", Consolas, monospace;
}

input:focus { border-color: var(--accent); outline: none; }

menu {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0;
  margin: 0;
}

@media (max-width: 1120px) {
  .primary-grid,
  .secondary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .dial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dial-item:nth-child(3) { border-left: 0; }
  .dial-item:nth-child(n+3) { border-top: 1px solid var(--border-soft); }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  .topbar-actions { width: 100%; justify-content: space-between; }
  .brand img { width: 174px; height: 36px; }

  main { width: min(100% - 24px, 1500px); padding-top: 20px; }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 18px;
  }

  .page-heading h1 { font-size: 25px; }
  .reference-links { justify-content: flex-start; }
  .dial-rack { padding: 15px; }
  .dial-rack-head { align-items: flex-start; flex-direction: column; }
  .dial-rack-head time { text-align: left; }
  .dial-item { padding: 15px 8px 7px; }
  .dial-face { width: 134px; height: 134px; }
  .dial-face::before { inset: 13px; }
  .dial-hub { inset: 27px; }
  .dial-hub strong { font-size: 23px; }
  .dial-min, .dial-max { bottom: 10px; }
  .dial-min { left: 18px; }
  .dial-max { right: 13px; }
  .tile { padding: 15px; }
  .five-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .five-columns > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .five-columns > div:nth-child(even) { padding-left: 12px; }
  .five-columns > div:last-child { grid-column: 1 / -1; border-top: 1px solid var(--border-soft); }
  .four-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .four-columns > div:nth-child(3) { border-left: 0; padding-left: 0; border-top: 1px solid var(--border-soft); }
  .four-columns > div:nth-child(4) { border-top: 1px solid var(--border-soft); }
  .chart-heading { align-items: flex-start; flex-direction: column; }
  .chart-legend { justify-content: flex-start; }
  .agreement-row { grid-template-columns: 104px minmax(90px, 1fr); gap: 10px; padding: 9px 0; }
  .agreement-row small { grid-column: 1 / -1; text-align: left; }
  .amendments-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 460px) {
  .brand-divider, .brand > span:last-child { display: none; }
  .network-chip { white-space: normal; }
  .dial-item > p { max-width: 140px; }
  .host-facts { align-items: flex-start; flex-direction: column; gap: 5px; }
  .status { min-width: 100px; }
  .detail-list { grid-template-columns: 1fr; }
  .detail-list > div { padding: 12px 0 !important; border-right: 0 !important; }
  .detail-list .wide { grid-column: auto; }
  .filters { width: 100%; }
  .filters button { flex: 1; }
  footer { align-items: flex-start; flex-wrap: wrap; }
}

[hidden] { display: none !important; }
.member-banner { margin-bottom: 24px; display: grid; gap: 12px; }
.member-banner a, .member-feedback-link { color: var(--accent); text-underline-offset: 3px; }
.member-banner button { justify-self: start; }
.feedback-explanation { max-width: 85ch; color: var(--text-secondary); margin: 16px 0; }
#feedbackMessage { min-height: 24px; color: var(--accent); }
.recommendations { display: flex; gap: 8px; }
.recommendation { min-width: 58px; min-height: 44px; font-size: 16px; white-space: nowrap; }
.recommendation[aria-pressed="true"] { border: 2px solid var(--accent); background: #193d4d; color: white; }
.recommendation:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.member-feedback-link { display: block; max-width: 180px; margin-top: 8px; }
.access-page { max-width: 720px; margin: 8vh auto; padding: 20px; }
.access-page .tile { margin-top: 32px; display: grid; gap: 22px; }
.access-button { display: inline-block; padding: 14px 22px; background: #214f91; color: #fff; border-radius: 28px; }
@media(max-width: 640px) { .amendments { max-width: 100%; } .member-banner { overflow-wrap: anywhere; } }
@media(max-width: 640px) {
  .amendments table, .amendments tbody { display: block; min-width: 0; width: 100%; }
  .amendments thead { display: none; }
  .amendments tr { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--border); }
  .amendments td { display: block; min-width: 0; border: 0; padding: 8px 0; white-space: normal; overflow-wrap: anywhere; }
  .amendments td:first-child { grid-column: 1 / -1; order: -2; font-size: 17px; }
  .amendments td:nth-child(6) { grid-column: 1 / -1; order: -1; }
  .amendments td:nth-child(3)::before { content: 'Network votes'; display: block; color: var(--text-secondary); }
  .amendments td:nth-child(4)::before { content: 'Validator position'; display: block; color: var(--text-secondary); }
  .amendments td:nth-child(5) { grid-column: 1 / -1; }
  .amendments td:nth-child(7) { grid-column: 1 / -1; }
}
