/*
 * OpenTH: styles on top of Quark 2.
 * Loaded last, so these rules win over theme.css.
 */

/* ---------- Fonts: Rubik for headings, Inter for text (Latin and Cyrillic) ---------- */

@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('../fonts/rubik/rubik-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;
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('../fonts/rubik/rubik-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('../fonts/rubik/rubik-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('../fonts/rubik/rubik-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter/inter-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* ---------- Tokens ---------- */

:root,
:root[data-theme="light"],
:root[data-theme="dark"] {
  --pico-font-family-display: "Rubik", "Inter", -apple-system, "Segoe UI", sans-serif;
  --gh-teal: #0b7a62;
  --gh-teal-deep: #06382e;
  --gh-gold: #e3a21a;
  --gh-up: #1f9d55;
  --gh-down: #b4443a;
}
:root,
:root[data-theme="light"] {
  --gh-band-bg: #eaf4f1;
  --gh-section-alt: #f3f6f5;
  --gh-gold-text: #8a5a00;
}
:root[data-theme="dark"] {
  --gh-band-bg: #0d211c;
  --gh-section-alt: #0e1012;
  --gh-gold-text: #f0c25a;
  --gh-up: #3ccf7e;
  --gh-down: #e8776c;
}

h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
}
h2 {
  color: var(--q2-text-strong);
}
h3 {
  font-weight: 600;
}

/* ---------- Brand ---------- */

.gh-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}
.navbar-brand svg.gh-mark,
.navbar-brand img.gh-mark {
  width: 34px;
  height: 34px;
  flex: none;
}
/* Quark 2 paints every path in the brand link with the text colour. */
.navbar-brand svg.gh-mark .gh-mark-bg {
  fill: var(--gh-teal);
}
.navbar-brand svg.gh-mark .gh-mark-cross {
  fill: #ffffff;
}
.navbar-brand svg.gh-mark .gh-mark-crown {
  fill: var(--gh-gold);
  stroke: var(--q2-bg);
}
.gh-wordmark {
  font-family: var(--pico-font-family-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--q2-text-strong);
  white-space: nowrap;
}
.gh-wordmark span {
  color: var(--q2-accent);
}

/* ---------- Language switch (next to the light/dark toggle) ---------- */

.gh-lang {
  display: inline-flex;
  flex-wrap: wrap; /* ten codes do not fit a phone's width in one row */
  align-items: center;
  gap: 0.15rem;
  margin-right: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
}
.gh-lang-item {
  padding: 0.25rem 0.45rem;
  border-radius: var(--q2-radius-sm);
  color: var(--q2-text-muted);
  text-decoration: none;
}
a.gh-lang-item:hover {
  color: var(--q2-text-strong);
  background: var(--q2-bg-muted);
}
.gh-lang-item.is-active {
  color: var(--q2-text-strong);
  box-shadow: var(--q2-shadow-card);
  background: var(--q2-bg-elev);
}
/* The header's language menu (a <details>; Pico styles those as accordions). */
details.gh-lang-menu {
  position: relative;
  margin: 0 0.5rem 0 0;
  padding: 0;
  border: 0;
  font-size: 0.8125rem;
  font-weight: 600;
}
details.gh-lang-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0.25rem 0.45rem;
  line-height: 1.4;
  border-radius: var(--q2-radius-sm);
  color: var(--q2-text-strong);
  box-shadow: var(--q2-shadow-card);
  background: var(--q2-bg-elev);
  list-style: none;
  cursor: pointer;
}
details.gh-lang-menu > summary::-webkit-details-marker {
  display: none;
}
details.gh-lang-menu > summary::after {
  float: none;
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  margin: 0;
  background-size: 0.75rem auto;
  transform: rotate(0);
}
details.gh-lang-menu[open] > summary {
  margin-bottom: 0;
}
details.gh-lang-menu[open] > summary::after {
  transform: rotate(180deg);
}
details.gh-lang-menu > ul {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 60;
  /* (The header's menu styles lay out every list in it as a row.) */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-width: 9.5rem;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border-radius: var(--q2-radius-md);
  background: var(--q2-bg-elev);
  box-shadow: var(--q2-shadow-raised);
}
details.gh-lang-menu li {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
}
details.gh-lang-menu a {
  display: block;
  padding: 0.4rem 0.65rem;
  border-radius: var(--q2-radius-sm);
  color: var(--q2-text);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
details.gh-lang-menu a:hover {
  color: var(--q2-text-strong);
  background: var(--q2-bg-muted);
}
details.gh-lang-menu a[aria-current] {
  color: var(--q2-text-strong);
  font-weight: 700;
}

/* ---------- Hero ---------- */

/* The hero picture is saved as JPEG without colour subsampling (4:4:4):
   ordinary JPEG settings smear the game's pixels into coloured blocks. */
.gh-hero {
  position: relative;
  overflow: hidden;
  min-height: min(78vh, 720px);
  display: flex;
  align-items: center;
  padding-block: 4rem 5rem;
  background: var(--gh-teal-deep);
  color: #fff;
}
.gh-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  /* Right-aligned: the busy hospitals are on the right of the picture, and
     its emptier middle then sits under the dark overlay behind the text. */
  background-position: right center;
}
.gh-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 30, 25, 0.92) 0%, rgba(4, 30, 25, 0.78) 45%, rgba(4, 30, 25, 0.35) 100%),
    linear-gradient(0deg, rgba(4, 30, 25, 0.6) 0%, rgba(4, 30, 25, 0) 40%);
}
.gh-hero-inner {
  position: relative;
  z-index: 1;
}
.gh-hero h1 {
  color: #fff;
  max-width: 24ch; /* the title breaks itself with <br>: wide enough for "Управляйте больницей" */
  font-size: clamp(2.5rem, 5vw + 1rem, 4.25rem);
  margin-bottom: 1.25rem;
}
.gh-hero h1 em {
  font-style: normal;
  color: var(--gh-gold);
}
.gh-eyebrow {
  display: inline-block;
  margin-bottom: 1.25rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--q2-radius-pill);
  background: rgba(227, 162, 26, 0.16);
  color: #f6cf72;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.gh-lead {
  max-width: 52ch;
  font-size: clamp(1.05rem, 0.6vw + 0.95rem, 1.25rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 2rem;
}
.gh-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
/* Liberapay's own yellow and black, as on its donate button. */
.btn.btn-donate {
  background: #f6c915;
  border-color: #f6c915;
  color: #1a171b;
}
.btn.btn-donate:hover,
.btn.btn-donate:focus-visible {
  background: #fbce1a;
  border-color: #fbce1a;
  color: #1a171b;
}
.btn-donate .gh-lp-mark {
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
  margin-right: 0.15em;
}
/* Download page: the newest releases, one per line. */
.gh-releases {
  max-width: 50rem;
  margin-top: 2.5rem;
}
.gh-release-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.gh-release-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.6rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--q2-divider);
}
.gh-release-date {
  min-width: 6.5rem;
  font-size: 0.875rem;
}
.gh-release-theme {
  color: var(--q2-text-muted);
}
/* Donations page: the donate button with Liberapay's numbers beside it. */
.gh-donate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  max-width: 50rem;
  margin: 0.5rem 0 2.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--q2-radius-md);
  background: var(--q2-bg-elev);
  box-shadow: var(--q2-shadow-card);
}
.gh-donate-status {
  flex: 1 1 16rem;
}
.gh-donate-status p {
  margin: 0 0 0.25rem;
}
.gh-donate-bar {
  height: 0.5rem;
  margin: 0.5rem 0 0.35rem;
  border-radius: var(--q2-radius-pill);
  background: var(--q2-bg-muted);
  overflow: hidden;
}
.gh-donate-bar > span {
  display: block;
  height: 100%;
  background: #f6c915;
}
/* Discord's own colour, so the button reads as Discord at a glance. */
.btn.btn-discord {
  background: #5865f2;
  border-color: #5865f2;
  color: #fff;
}
.btn.btn-discord:hover,
.btn.btn-discord:focus-visible {
  background: #4752c4;
  border-color: #4752c4;
  color: #fff;
}
.gh-hero .btn.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.gh-hero .btn.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}
.gh-note {
  margin-top: 1.75rem;
  max-width: 60ch;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Live strip under the hero ---------- */

.gh-live {
  position: relative;
  z-index: 2;
  margin-top: -2.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.9rem 1.25rem;
  border-radius: var(--q2-radius-md);
  background: var(--q2-bg-elev);
  box-shadow: var(--q2-shadow-raised);
}
.gh-live-servers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.gh-live-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--q2-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.25rem;
}
.gh-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--q2-radius-pill);
  background: var(--q2-bg-muted);
  color: var(--q2-text-strong);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
a.gh-chip:hover {
  color: var(--q2-text-strong);
  box-shadow: inset 0 0 0 1px var(--q2-border-strong);
}
.gh-chip-place {
  font-weight: 400;
}
.gh-chip-count {
  font-weight: 400;
  color: var(--q2-text-muted);
}
.gh-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--gh-down);
}
.gh-chip.is-up .gh-dot {
  background: var(--gh-up);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--gh-up) 25%, transparent);
}
.gh-live-release {
  font-size: 0.9375rem;
  color: var(--q2-text);
}
.gh-muted {
  color: var(--q2-text-muted);
}
.gh-small {
  font-size: 0.8125rem;
}

/* ---------- Sections ---------- */

.gh-section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}
.gh-section-alt {
  background: var(--gh-section-alt);
}
.gh-section-head {
  max-width: 46rem;
  margin-bottom: 2.5rem;
}
.gh-section-head p {
  font-size: 1.0625rem;
  color: var(--q2-text-muted);
}

/* Feature cards */
.gh-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 1rem;
}
.gh-card {
  padding: 1.4rem 1.4rem 1.2rem;
  border-radius: var(--q2-radius-md);
  background: var(--q2-bg-elev);
  box-shadow: var(--q2-shadow-card);
  margin: 0;
}
.gh-card h3 {
  font-size: 1.125rem;
  margin: 0.9rem 0 0.4rem;
}
.gh-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--q2-text-muted);
}
.gh-card-icon {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--q2-radius);
  background: color-mix(in oklab, var(--q2-accent) 14%, transparent);
  color: var(--q2-accent);
  font-size: 1.1rem;
}

/* Screenshots */
.gh-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.gh-shot {
  margin: 0;
}
.gh-shot.is-wide {
  grid-column: 1 / -1;
}
.gh-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--q2-radius-md);
  box-shadow: var(--q2-shadow-raised);
}
.gh-shot.is-wide img {
  aspect-ratio: 21 / 9;
}
.gh-shot figcaption {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--q2-text-muted);
}

/* Three steps */
.gh-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.5rem;
  counter-reset: none;
}
.gh-steps li {
  list-style: none;
  margin: 0;
}
.gh-step-n {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--gh-gold);
  color: #2a1a00;
  font-family: var(--pico-font-family-display);
  font-weight: 700;
}
.gh-steps h3 {
  font-size: 1.125rem;
  margin: 0.75rem 0 0.35rem;
}
.gh-steps p {
  margin: 0;
  color: var(--q2-text-muted);
}

/* Community band */
.gh-band {
  padding-block: clamp(3.5rem, 8vw, 5.5rem);
  background: var(--gh-band-bg);
  text-align: center;
}
.gh-band h2 {
  margin-bottom: 0.5rem;
}
.gh-band p {
  max-width: 46rem;
  margin: 0 auto 1.75rem;
  color: var(--q2-text-muted);
}
.gh-band .gh-cta {
  justify-content: center;
}
.btn.is-soon {
  cursor: default;
  opacity: 0.7;
}
.btn small {
  font-weight: 500;
  color: var(--q2-text-muted);
}

/* ---------- Inner pages ---------- */

.gh-page h1 {
  margin-bottom: 0.5rem;
}
.gh-page-lead {
  font-size: 1.125rem;
  color: var(--q2-text-muted);
  max-width: 50rem;
  margin-bottom: 2rem;
}
.gh-prose {
  max-width: 50rem;
}
.gh-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  margin-right: 0.35rem;
  border-radius: var(--q2-radius-pill);
  background: color-mix(in oklab, var(--q2-accent) 14%, transparent);
  color: var(--q2-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 0.1em;
}
.gh-badge-test {
  background: color-mix(in oklab, var(--gh-gold) 18%, transparent);
  color: var(--gh-gold-text);
}
.gh-version {
  margin-bottom: 1.5rem;
}

/* Download cards */
.gh-platforms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}
.gh-platform {
  padding: 1.5rem;
  border-radius: var(--q2-radius-md);
  background: var(--q2-bg-elev);
  box-shadow: var(--q2-shadow-card);
}
/* Side by side, the cards share their rows (icon, title, requirements,
   button, steps), so the download buttons line up however long each
   card's text is. Without subgrid the cards simply stack their parts. */
@supports (grid-template-rows: subgrid) {
  .gh-platform {
    display: grid;
    grid-row: span 5;
    grid-template-rows: subgrid;
    row-gap: 0;
    align-content: start;
  }
  .gh-platform > * {
    align-self: start;
  }
  .gh-platform .gh-req {
    min-height: 0;
  }
}
.gh-platform h2 {
  font-size: 1.375rem;
  margin: 0.75rem 0 0.25rem;
}
.gh-platform-icon {
  font-size: 1.75rem;
  color: var(--q2-accent);
}
.gh-req {
  font-size: 0.875rem;
  color: var(--q2-text-muted);
  min-height: 2.6em;
}
.gh-dl {
  width: 100%;
  margin: 0.5rem 0 1.25rem;
}
.gh-size {
  font-weight: 400;
  opacity: 0.8;
}
.gh-install {
  padding-left: 1.2rem;
  margin: 0;
  font-size: 0.9rem;
}
.gh-install li {
  margin-bottom: 0.4rem;
}
.gh-install code,
.gh-prose code {
  font-size: 0.85em;
  word-break: break-word;
}
.gh-testbuild {
  max-width: 50rem;
  margin-top: 2rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--q2-radius-md);
  background: color-mix(in oklab, var(--gh-gold) 9%, var(--q2-bg-elev));
  box-shadow: var(--q2-shadow-card);
}
.gh-testbuild p {
  margin: 0.5rem 0 0;
}

/* Server table */
.gh-servers {
  margin-bottom: 2.5rem;
}
.gh-servers h2 {
  font-size: 1.375rem;
}
.gh-table-wrap {
  overflow-x: auto;
  border-radius: var(--q2-radius-md);
  box-shadow: var(--q2-shadow-card);
  background: var(--q2-bg-elev);
}
.gh-servers table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.gh-servers th,
.gh-servers td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--q2-divider);
  background: transparent;
  white-space: nowrap;
}
.gh-servers tbody tr:last-child td {
  border-bottom: 0;
}
.gh-servers th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--q2-text-muted);
}
.gh-servers .num {
  text-align: right;
}
/* Narrow enough for every site language at ~640 px without sideways scrolling:
   tighter inner padding, long place names ("Нью-Джерсі, Північна Америка") wrap,
   slimmer headers, status pills and addresses. */
.gh-servers th,
.gh-servers td {
  padding-left: 0.55rem;
  padding-right: 0.55rem;
}
.gh-servers th:first-child,
.gh-servers td:first-child {
  padding-left: 0.9rem;
}
.gh-servers th:last-child,
.gh-servers td:last-child {
  padding-right: 0.9rem;
}
.gh-servers td:first-child {
  white-space: normal;
  min-width: 7rem;
}
.gh-servers th {
  letter-spacing: 0.02em;
  font-size: 0.71875rem;
}
.gh-servers .gh-chip {
  padding: 0.25rem 0.6rem;
}
.gh-servers td code {
  font-size: 0.8125rem;
}

/* Uptime box under the server table (Uptime Kuma, status.openth.org) */
.gh-uptime {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem 0.4rem;
  border-radius: var(--q2-radius-md);
  box-shadow: var(--q2-shadow-card);
  background: var(--q2-bg-elev);
}
.gh-uptime-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}
.gh-uptime-head h3 {
  margin: 0;
  font-size: 1.0625rem;
}
.gh-uptime-head h3 .gh-small {
  font-weight: 400;
  margin-left: 0.35rem;
}
.gh-uptime-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.gh-uptime-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, max-content) 4.2rem;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--q2-divider);
  font-size: 0.9375rem;
  list-style: none;
}
.gh-uptime-row:last-child {
  border-bottom: 0;
}
.gh-uptime-row.is-up .gh-dot {
  background: var(--gh-up);
}
.gh-uptime-row.is-pending .gh-dot {
  background: var(--gh-gold);
}
.gh-uptime-label {
  min-width: 0;
}
.gh-uptime-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* How busy a game server is: CPU, RAM, disk meters under its name */
.gh-load {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.9rem;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--q2-text-muted);
}
.gh-load-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}
.gh-meter {
  position: relative;
  width: 2.6rem;
  height: 0.4rem;
  border-radius: 0.2rem;
  background: var(--q2-divider);
  overflow: hidden;
}
.gh-meter > span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 0.2rem;
  background: var(--gh-up);
}
.gh-meter.is-mid > span { background: var(--gh-gold); }
.gh-meter.is-high > span { background: var(--gh-down); }
.gh-load-name {
  min-width: 2.3em;
}
.gh-load-val {
  font-variant-numeric: tabular-nums;
}
/* Latest checks, newest on the right; on narrow screens the oldest are cut off */
.gh-uptime-ticks {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
  height: 1.05rem;
  overflow: hidden;
}
.gh-uptime-ticks i {
  flex: none;
  width: 4px;
  border-radius: 2px;
  background: var(--q2-divider);
}
.gh-uptime-ticks i.t1 { background: var(--gh-up); }
.gh-uptime-ticks i.t0 { background: var(--gh-down); }
.gh-uptime-ticks i.t2 { background: var(--gh-gold); }
.gh-uptime-ticks i.t3 { background: #8590a2; }
.gh-uptime-pct {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--q2-text-muted);
  font-size: 0.875rem;
  white-space: nowrap;
}
.gh-uptime-more {
  margin: 0.4rem 0 0.6rem;
}
/* Phones: names first; the dot and the percentage tell enough without the bars */
@media (max-width: 560px) {
  .gh-uptime-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.5rem;
  }
  .gh-uptime-ticks {
    display: none;
  }
}

/* Comparison table on the About page (plain Markdown tables) */
.gh-prose table {
  width: 100%;
  font-size: 0.9375rem;
}
.gh-prose th,
.gh-prose td {
  vertical-align: top;
}

/* Markdown tables on any page: never wider than the screen. On a phone a
   table keeps readable columns and scrolls sideways inside itself instead
   of widening the whole page. */
.content-item > table th,
.content-item > table td {
  vertical-align: top;
}
@media (max-width: 640px) {
  .content-item > table,
  .gh-prose table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .content-item > table th,
  .content-item > table td,
  .gh-prose table th,
  .gh-prose table td {
    min-width: 11rem;
  }
  .content-item > table th:first-child,
  .content-item > table td:first-child,
  .gh-prose table th:first-child,
  .gh-prose table td:first-child {
    min-width: 5.5rem;
  }
}

/* ---------- Footer ---------- */

#footer.gh-footer {
  text-align: left;
}
.gh-footer h2::before,
.gh-band h2::before,
.gh-platform h2::before,
.gh-servers h2::before {
  display: none;
}
.gh-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.gh-footer-brand p {
  margin-top: 0.75rem;
  max-width: 32ch;
}
.gh-footer-links {
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Pico spreads a <nav> out */
  align-items: flex-start;
  gap: 0.4rem;
}
.gh-footer-links h2 {
  font-family: var(--pico-font-family-sans-serif);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--q2-text-muted);
  margin-bottom: 0.35rem;
}
.gh-footer-links a {
  text-decoration: none;
}
.gh-legal {
  padding-top: 1.25rem;
  border-top: 1px solid var(--q2-divider);
  font-size: 0.8125rem;
  max-width: 80ch;
}

/* ---------- Roadmap board ---------- */

.gh-roadmap {
  margin-top: 2.5rem;
}
.gh-roadmap-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
/* "Our Roadmap" is the page's first section: a heading like the others. */
.gh-roadmap-head h2 {
  margin: 0;
}
.gh-roadmap-intro {
  margin: 0 0 1.25rem;
  max-width: 70ch;
}
.gh-roadmap-lists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  align-items: start;
}
.gh-roadmap-list {
  padding: 1rem;
  border-radius: var(--q2-radius-md);
  background: var(--gh-section-alt);
  box-shadow: inset 0 0 0 1px var(--q2-divider);
}
.gh-roadmap-list h3 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--q2-text-muted);
  margin: 0 0 0.75rem;
}
.gh-roadmap-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.8rem 0.9rem;
  margin-bottom: 0.6rem;
  border-radius: var(--q2-radius);
  background: var(--q2-bg-elev);
  box-shadow: var(--q2-shadow-card);
  color: var(--q2-text);
  text-decoration: none;
}
.gh-roadmap-card:last-child {
  margin-bottom: 0;
}
a.gh-roadmap-card:hover {
  color: var(--q2-text);
  box-shadow: var(--q2-shadow-card), inset 0 0 0 1px var(--q2-border-strong);
}
.gh-roadmap-card strong {
  color: var(--q2-text-strong);
  font-weight: 600;
  line-height: 1.35;
}
.gh-roadmap-text {
  font-size: 0.875rem;
  color: var(--q2-text-muted);
  line-height: 1.45;
}
.gh-roadmap-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.gh-label {
  --gh-label: #8590a2;
  padding: 0.05rem 0.5rem;
  border-radius: var(--q2-radius-pill);
  background: color-mix(in oklab, var(--gh-label) 22%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--gh-label) 55%, transparent);
  color: var(--q2-text-strong);
  font-size: 0.75rem;
  font-weight: 600;
}
.gh-label[data-color^="green"] { --gh-label: #1f845a; }
.gh-label[data-color^="yellow"] { --gh-label: #cf9f02; }
.gh-label[data-color^="orange"] { --gh-label: #e56910; }
.gh-label[data-color^="red"] { --gh-label: #c9372c; }
.gh-label[data-color^="purple"] { --gh-label: #8f7ee7; }
.gh-label[data-color^="blue"] { --gh-label: #0c66e4; }
.gh-label[data-color^="sky"] { --gh-label: #227d9b; }
.gh-label[data-color^="lime"] { --gh-label: #5b7f24; }
.gh-label[data-color^="pink"] { --gh-label: #ae4787; }
.gh-label[data-color^="black"] { --gh-label: #626f86; }
.gh-roadmap-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--q2-text-muted);
}
.gh-roadmap-meta .is-done {
  color: var(--gh-up);
}
.gh-roadmap-after {
  margin-top: 2.5rem;
}
.gh-roadmap-empty {
  margin: 0;
  font-size: 0.875rem;
  color: var(--q2-text-muted);
}

/* ---------- Small screens ---------- */

@media (max-width: 760px) {
  .gh-gallery {
    grid-template-columns: 1fr;
  }
  .gh-shot.is-wide img {
    aspect-ratio: 16 / 10;
  }
  .gh-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .gh-footer-brand {
    grid-column: 1 / -1;
  }
  .gh-live {
    margin-top: -1.5rem;
  }
  .gh-hero {
    min-height: 0;
  }
  .gh-hero-bg {
    background-size: cover;
  }
  .gh-hero::after {
    background: linear-gradient(0deg, rgba(4, 30, 25, 0.9) 0%, rgba(4, 30, 25, 0.75) 100%);
  }
  .gh-wordmark {
    font-size: 1.1rem;
  }
  .gh-eyebrow {
    border-radius: var(--q2-radius);
  }
}
