/* Modernist-inspired theme (local recreation). No CDN. */

:root {
  --bg-outer-top: #6c7989;
  --bg-outer-bottom: #434b55;
  --text: #555555;
  --text-strong: #222222;
  --muted: #61778b;
  --link: #006699;
  --header-top: #ddfbfc;
  --header-bottom: #c6eafa;
  --header-border: #b2d2e1;
  --btn-top: #77b9fb;
  --btn-bottom: #3782cd;
  --btn-border: #3a7cbe;
  --btn-shine: #8bbef3;
  --section-top: #fafafa;
  --section-bottom: #dedede;
  --wrapper-bg: #dedede;
  --up: #2a7a2a;
  --down: #a33;
  --degraded: #a67c00;
  --unknown: #666;
  --max-width: 1220px;
}

* { box-sizing: border-box; }

html {
  background: var(--bg-outer-top);
  background: linear-gradient(var(--bg-outer-top), var(--bg-outer-bottom)) fixed;
  min-height: 100%;
}

body {
  margin: 0;
  padding: 50px 0;
  font: 14px/1.5 Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text);
  font-weight: 300;
  min-height: calc(100% - 100px);
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
}

.brand { color: var(--link); }
.brand:hover { text-decoration: none; }

.wrapper {
  width: min(100% - 24px, var(--max-width));
  margin: 0 auto;
  background: var(--wrapper-bg);
  border-radius: 8px;
  box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px;
}

header {
  border-radius: 8px 8px 0 0;
  background: linear-gradient(var(--header-top), var(--header-bottom));
  position: relative;
  padding: 15px 20px;
  border-bottom: 1px solid var(--header-border);
  min-height: 78px;
}

header h1 {
  margin: 0;
  padding: 0;
  font-size: 24px;
  line-height: 1.2;
  color: var(--link);
  text-shadow: rgba(255, 255, 255, 0.9) 0 1px 0;
}

header > p {
  margin: 0;
  color: var(--muted);
  max-width: 42ch;
  font-size: 13px;
}

.lang-switch {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.lang-switch a { color: var(--muted); }
.lang-switch strong { color: var(--text-strong); }

.nav-seg {
  margin: 0;
  padding: 1px 0;
  list-style: none;
  position: absolute;
  z-index: 1;
  right: 20px;
  top: 20px;
  height: 38px;
  background: linear-gradient(var(--btn-top), var(--btn-bottom));
  border-radius: 5px;
  box-shadow: inset rgba(255, 255, 255, 0.45) 0 1px 0, inset rgba(0, 0, 0, 0.2) 0 -1px 0;
  display: flex;
}

.nav-seg li {
  border-right: 1px solid var(--btn-border);
}
.nav-seg li:last-child { border-right: none; }
.nav-seg li + li { border-left: 1px solid var(--btn-shine); }

.nav-seg a {
  line-height: 1;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  display: block;
  text-align: center;
  font-weight: 400;
  padding: 6px 12px 0;
  height: 38px;
  text-shadow: rgba(0, 0, 0, 0.4) 0 -1px 0;
  text-decoration: none;
  min-width: 72px;
}
.nav-seg a strong {
  font-size: 14px;
  display: block;
  color: #fff;
  font-weight: 700;
}
.nav-seg li.active a,
.nav-seg a:hover {
  background: rgba(0, 0, 0, 0.08);
}

section {
  padding: 15px 20px 24px;
  font-size: 15px;
  border-top: 1px solid #fff;
  background: linear-gradient(var(--section-top), var(--section-bottom) 700px);
  border-radius: 0 0 8px 8px;
}

h2, h3 { color: #393939; }
h2 { margin: 0 0 12px; }
h3 { margin: 20px 0 8px; }

.mono, code, pre, .list-out {
  font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
}

.muted { color: var(--muted); font-size: 0.9em; }

.stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 16px;
  padding: 8px 0;
  border-bottom: 1px solid #aaa;
  font-size: 13px;
}
.stats-strip strong { color: var(--text-strong); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: end;
  margin: 0 0 16px;
}
.filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.filters input,
.filters select {
  font: inherit;
  padding: 4px 6px;
  border: 1px solid #aaa;
  border-radius: 3px;
  background: #fff;
  color: var(--text-strong);
  min-width: 0;
}
.filters button,
button.copy-btn {
  font: inherit;
  padding: 6px 12px;
  border: 1px solid var(--btn-border);
  border-radius: 4px;
  color: #fff;
  background: linear-gradient(var(--btn-top), var(--btn-bottom));
  cursor: pointer;
  text-shadow: rgba(0, 0, 0, 0.35) 0 -1px 0;
}
button.linkish {
  background: none;
  border: none;
  color: var(--link);
  cursor: pointer;
  padding: 0 0 0 6px;
  font: inherit;
  font-size: 12px;
  text-shadow: none;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid #aaa;
  vertical-align: top;
}
th {
  color: var(--text-strong);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.45);
}

.status { white-space: nowrap; }
.status .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  background: var(--unknown);
  vertical-align: middle;
}
.status-up .dot { background: var(--up); }
.status-down .dot { background: var(--down); }
.status-degraded .dot { background: var(--degraded); }
.status-unsupported .dot { background: #888; }

.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border: 1px solid #aaa;
  border-radius: 3px;
  font-size: 11px;
  color: var(--muted);
}

.notice {
  background: rgba(0, 0, 0, 0.06);
  padding: 10px 12px;
  margin: 0 0 14px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px 12px;
  margin: 0 0 16px;
}

.sparkline {
  width: 100%;
  max-width: 480px;
  height: 48px;
  margin: 0 0 16px;
}
.sparkline circle { fill: var(--link); }
.sparkline line { stroke: var(--link); stroke-width: 1.5; }

.list-out, pre {
  background: #3a3c42;
  color: #f8f8f2;
  padding: 16px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 12px;
}

.pagination {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 12px;
}

footer {
  width: min(100% - 24px, var(--max-width));
  margin: 0 auto;
  padding: 20px 0 0;
  color: #ccc;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
}
footer a { color: #fff; font-weight: 700; }

@media (max-width: 900px) {
  body { padding: 0; }
  .wrapper {
    width: 100%;
    border-radius: 0;
    box-shadow: none;
  }
  header { border-radius: 0; padding-bottom: 60px; }
  .nav-seg {
    position: static;
    margin-top: 12px;
    flex-wrap: wrap;
    height: auto;
  }
  .nav-seg a { height: auto; padding: 8px 10px; }
  section { border-radius: 0; }
  footer { width: auto; padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
