/* status.xrpl.to: xrpl.to's look (black canvas, flat, 1.5px hairlines, Inter, the brand's state
   colours). Light theme follows the visitor's system setting. */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #fff;
  --fg2: rgba(255, 255, 255, 0.68);
  --fg3: rgba(255, 255, 255, 0.5);
  --line: rgba(255, 255, 255, 0.1);
  --line2: rgba(255, 255, 255, 0.06);
  --up: #10b981;
  --degraded: #f6af01;
  --down: #ef4444;
  --nodata: rgba(255, 255, 255, 0.13);
  --up-text: #10b981;
  --degraded-text: #f6af01;
  --down-text: #f05252;
  --accent: #137dfe;
  --tip-bg: #fff;
  --tip-fg: #000;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #fff;
    --fg: #000;
    --fg2: rgba(0, 0, 0, 0.68);
    --fg3: rgba(0, 0, 0, 0.6);
    --line: rgba(0, 0, 0, 0.1);
    --line2: rgba(0, 0, 0, 0.06);
    --nodata: rgba(0, 0, 0, 0.1);
    --up-text: #047857;
    --degraded-text: #a06d05;
    --down-text: #b91c1c;
    --accent: #0c4da9;
    --tip-bg: #000;
    --tip-fg: #fff;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* Header */
.top { display: flex; align-items: center; gap: 12px; height: 64px; border-bottom: 1.5px solid var(--line); }
.brand { display: flex; align-items: center; }
.logo { height: 24px; width: auto; display: block; }
.logo-light { display: none; }
@media (prefers-color-scheme: light) {
  .logo-dark { display: none; }
  .logo-light { display: block; }
}
.brand-sub { color: var(--fg2); text-decoration: none; font-weight: 500; padding-left: 12px; border-left: 1.5px solid var(--line); line-height: 20px; }
.top-links { margin-left: auto; display: flex; gap: 18px; font-size: 13px; color: var(--fg2); }
.top-links a, .panel-head a, .foot a { text-decoration: none; }
.top-links a:hover, .panel-head a:hover, .foot a:hover, .brand-sub:hover { color: var(--fg); }

/* The one-line verdict */
.hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 24px; padding: 40px 0 32px; }
.hero-small { display: block; padding-bottom: 24px; }
.hero-line { display: flex; align-items: center; gap: 12px; }
.hero-figs { display: flex; flex-wrap: wrap; gap: 14px 40px; }
.hero-ledger, .hero-uptime { text-align: right; }
.hl-label { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: 13px; color: var(--fg3); }
.hl-label .ldot { margin-left: 0; vertical-align: 0; }
.hero-ledger .ledger, .hero-uptime .ledger { display: block; margin-top: 2px; font-size: 24px; line-height: 1.2; letter-spacing: -0.012em; }
.hero h1 { font-size: 24px; line-height: 1.25; font-weight: 600; letter-spacing: -0.012em; }
.sdot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--nodata); }
.hero.s-up .sdot { background: var(--up); }
.hero.s-degraded .sdot { background: var(--degraded); }
.hero.s-down .sdot { background: var(--down); }
.hero.s-degraded .sdot, .hero.s-down .sdot { animation: beat 2s ease-in-out infinite; }
.hero-sub { margin-top: 10px; padding-left: 24px; color: var(--fg2); font-size: 13px; }
.hero-small .hero-sub { padding-left: 0; }
.hero-sub a.back { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.ledger { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.late { color: var(--degraded-text); }
.ldot { display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-radius: 50%; background: var(--up); vertical-align: 2px; opacity: 0.45; }
.ldot.stale { background: var(--fg3); }
.ldot.tick { animation: tick 1.4s ease-out; }
@keyframes tick {
  0% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  100% { opacity: 0.45; box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
}
@keyframes beat { 50% { opacity: 0.45; } }

/* Open incidents */
.active { margin-bottom: 28px; }
.incident { border: 1.5px solid var(--line); border-left: 3px solid var(--degraded); border-radius: 2px; padding: 16px; }
.incident + .incident { margin-top: 12px; }
.incident.i-major { border-left-color: var(--down); }
.inc-head { display: flex; align-items: baseline; gap: 12px; }
.inc-head h2 { font-size: 16px; font-weight: 600; }
.inc-status { margin-left: auto; font-size: 13px; font-weight: 500; color: var(--degraded-text); white-space: nowrap; }
.i-major .inc-status { color: var(--down-text); }
.inc-meta { margin-top: 2px; font-size: 13px; color: var(--fg3); }

.upds { list-style: none; margin: 12px 0 0; padding: 0; }
.upds li { position: relative; padding: 0 0 12px 16px; }
.upds li:last-child { padding-bottom: 0; }
.upds li::before { content: ""; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--fg3); }
.upds li::after { content: ""; position: absolute; left: 2px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.upds li:last-child::after { display: none; }
.upds p { font-size: 13px; color: var(--fg2); line-height: 1.55; }
.upds b { color: var(--fg); font-weight: 600; margin-right: 4px; }
.upds time { display: block; margin-top: 2px; font-size: 11px; color: var(--fg3); }

/* Panels */
.panel { border: 1.5px solid var(--line); border-radius: 2px; margin-bottom: 28px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1.5px solid var(--line); font-size: 13px; color: var(--fg3); }
.panel-head h2 { font-size: 13px; font-weight: 600; color: var(--fg); }
.panel-head a { color: var(--fg2); }
.empty { padding: 16px; font-size: 13px; color: var(--fg3); }

/* Systems */
.row { padding: 16px 16px 12px; }
.row + .row { border-top: 1.5px solid var(--line2); }
.row-head { display: flex; align-items: baseline; gap: 12px; }
.row-name { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.name { font-weight: 600; white-space: nowrap; }
.sub { font-size: 13px; color: var(--fg3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-right { margin-left: auto; display: flex; align-items: baseline; gap: 14px; flex: none; }
.figure { font-size: 13px; color: var(--fg2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; white-space: nowrap; color: var(--fg3); }
.state i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.state.s-up { color: var(--up-text); }
.state.s-degraded { color: var(--degraded-text); }
.state.s-down { color: var(--down-text); }
.state.s-degraded i, .state.s-down i { animation: beat 2s ease-in-out infinite; }

.bars { display: flex; gap: 2px; height: 30px; margin-top: 12px; }
.bar { flex: 1 1 0; min-width: 0; border-radius: 1px; background: var(--nodata); transition: opacity 0.12s; }
.bar.s-up { background: var(--up); }
.bar.s-degraded { background: var(--degraded); }
.bar.s-down { background: var(--down); }
.bars:hover .bar { opacity: 0.55; }
.bars .bar:hover, .bar.on { opacity: 1; }
.bars-legend { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--fg3); font-variant-numeric: tabular-nums; }
.l30 { display: none; }

/* Response time */
.charts { display: grid; grid-template-columns: 1fr 1fr; }
.chart { padding: 14px 16px 12px; min-width: 0; }
.chart + .chart { border-left: 1.5px solid var(--line2); }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.chart-plot { position: relative; margin-top: 10px; }
.chart-max { position: absolute; top: -2px; left: 0; font-size: 11px; color: var(--fg3); font-variant-numeric: tabular-nums; }
.chart-svg { display: block; width: 100%; height: 76px; }
.chart-svg .line { fill: none; stroke: var(--fg2); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-svg .area { fill: var(--line2); }
.chart-svg .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.chart-empty { height: 76px; margin-top: 10px; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--fg3); border: 1.5px dashed var(--line); border-radius: 2px; }
.chart-axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11px; color: var(--fg3); }

/* Past incidents */
.past { list-style: none; margin: 0; padding: 0; }
.past-item + .past-item { border-top: 1.5px solid var(--line2); }
.past-item summary { display: flex; align-items: baseline; gap: 10px; padding: 12px 16px; cursor: pointer; list-style: none; }
.past-item summary::-webkit-details-marker { display: none; }
.past-item summary:hover .pname { text-decoration: underline; text-underline-offset: 3px; }
.pdot { width: 7px; height: 7px; border-radius: 50%; flex: none; align-self: center; background: var(--degraded); }
.past-item.i-major .pdot { background: var(--down); }
.past-item.i-open .pdot { background: var(--fg3); }
.pname { font-weight: 500; }
.pmeta { margin-left: auto; font-size: 13px; color: var(--fg3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.past-item .upds { margin: 0; padding: 0 16px 14px 33px; }

/* Footer */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding: 18px 0 40px; border-top: 1.5px solid var(--line); font-size: 13px; color: var(--fg3); }
.foot-links { display: flex; gap: 18px; }
.foot a { color: var(--fg2); }

/* Day tooltip on the bars */
.tip { position: absolute; z-index: 10; padding: 6px 10px; border-radius: 2px; background: var(--tip-bg); color: var(--tip-fg); font-size: 12px; font-weight: 500; line-height: 1.35; white-space: nowrap; pointer-events: none; }
.tip[hidden] { display: none; }

/* Phones: thirty bars, one chart per line */
@media (max-width: 600px) {
  .hero { padding: 28px 0 24px; }
  .hero h1 { font-size: 20px; }
  .hero-figs { padding-left: 24px; gap: 14px 32px; }
  .hero-ledger, .hero-uptime { text-align: left; }
  .hl-label { justify-content: flex-start; }
  .hero-ledger .ledger, .hero-uptime .ledger { font-size: 20px; }
  .sub { display: none; }
  .bar:nth-child(-n+60) { display: none; }
  .l90 { display: none; }
  .l30 { display: inline; }
  .charts { grid-template-columns: 1fr; }
  .chart + .chart { border-left: 0; border-top: 1.5px solid var(--line2); }
  .past-item summary { flex-wrap: wrap; row-gap: 2px; }
  .pmeta { flex-basis: 100%; margin-left: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .ldot.tick, .hero.s-degraded .sdot, .hero.s-down .sdot, .state i { animation: none !important; }
  .bar { transition: none; }
}
