@font-face {
  font-family: "Fira Sans";
  src: local("Fira Sans Regular"),
    local("FiraSans-Regular"),
    url("fonts/FiraSans-Regular.subset.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Fira Sans";
  src: local("Fira Sans Bold"),
    local("FiraSans-Bold"),
    url("fonts/FiraSans-Bold.subset.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
}

@font-face {
  font-family: "Fira Mono";
  src: local("Fira Mono Regular"),
    local("FiraMono-Regular"),
    url("fonts/FiraMono-Regular.subset.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Fira Mono";
  src: local("Fira Mono Bold"),
    local("FiraMono-Bold"),
    url("fonts/FiraMono-Bold.subset.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
}

:root {
  font: 12px/1.5 Fira Sans, Helvetica, Arial, sans-serif;
  color: #222;
  color: var(--text-color);
  --bg-color: beige;
  --text-color: #222;
  --link-color: #3873ad;
  --code-bg: #f5f5f5;
  --disclaimer-bg: #222;
  --disclaimer-text: #fff;
  --warning-bg: #ffe6e6;
  --warning-border: #ffaaaa;
  --warning-text: #c40000;
  --table-border: #ccc;
  --table-header-bg: #f2f2f2;
  --ok-color: #2ecc71;
  --no-color: #e74c3c;
  --maybe-color: #f1c40f;
}

body {
  font-size: 1.8rem;
  margin: 1.5em 3em;
  background: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.25s ease, color 0.25s ease;
}

body.dark {
  --bg-color: #0b1021;
  --text-color: #e5e7eb;
  --link-color: #8fceff;
  --code-bg: #111827;
  --disclaimer-bg: #111827;
  --disclaimer-text: #f8fafc;
  --warning-bg: #3a1212;
  --warning-border: #f87171;
  --warning-text: #ffb4b4;
  --table-border: #334155;
  --table-header-bg: #1f2937;
  --ok-color: #4ade80;
  --no-color: #fb7185;
  --maybe-color: #facc15;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
}

h1 {
  font-size: 5.5rem;
}

h2 {
  font-size: 4.2rem;
}

h3 {
  font-size: 2.5rem;
}

strong.extra {
  font-size: 4rem;
}

a {
  color: #3873ad;
  color: var(--link-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  padding: 0 0.1em;
  border-radius: .5rem;
  font-family: Fira Mono;
  background-color: #f5f5f5;
  background-color: var(--code-bg);
}

.unresolved {
  font-weight: bold;
  color: red;
}

.not-stabilized {
  font-weight: bold;
  color: darkred;
}

.stabilized,
.stable {
  color: darkgreen;
}

.beta {
  color: gold;
}

.nightly {
  color: purple;
}

.stable,
.beta,
.nightly {
  font-weight: bold;
}

.issues {
  font-size: 16px;
  margin-bottom: .5em;
}

.issues>summary {
  cursor: pointer;
}

.label {
  border-radius: 2px;
  font-size: 12px;
  height: 20px;
  line-height: 20px;
  display: inline-block;
  padding: .15em 4px;
  vertical-align: top;
}

.deps {
  font-size: 1.5rem;
  margin-bottom: .5em;
}

.closed {
  text-decoration: line-through;
}

footer {
  font-size: 60%;
  color: #ccc;
}

.github-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  border: 0;
  color: transparent;
  width: 130px;
  height: 130px;
  overflow: hidden;
  border-bottom-left-radius: 100%;
  border-radius: 0 65% 0 100%;
}

.github-ribbon::before {
  content: "Fork me on GitHub";
  position: absolute;
  top: 0;
  right: 0;
  text-align: center;
  width: 200px;
  height: 28px;
  font-size: 14px;
  line-height: 28px;
  color: white;
  transform-origin: 100% 0;
  transform: translate(27px, 115px) rotate(45deg);
  background-image: linear-gradient(to bottom,
      black 0, black 1px,
      white 1px, white 2px,
      black 2px, black 26px,
      white 26px, white 27px,
      black);
}

.legend {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  display: flex;
  gap: 2rem;
}

.legend-item {
  font-weight: bold;
}

.legend-item.ok {
  color: #2ecc71;
  color: var(--ok-color);
  /* green */
}

.legend-item.no {
  color: #e74c3c;
  color: var(--no-color);
  /* red */
}

.legend-item.maybe {
  color: #f1c40f;
  color: var(--maybe-color);
  /* yellow */
}




/* Table tick styling */
td.ok::before {
  content: "✓";
  color: #2ecc71;
  color: var(--ok-color);
  font-weight: bold;
}

td.no::before {
  content: "✗";
  color: #e74c3c;
  color: var(--no-color);
  font-weight: bold;
}

td.maybe::before {
  content: "？";
  color: #f1c40f;
  color: var(--maybe-color);
  font-weight: bold;
}

.disclaimer {
  position: fixed;
  top: 0;
  left: 0;
  writing-mode: vertical-rl;
  /* vertical text, top-to-bottom */
  text-orientation: mixed;
  background: #222;
  color: #fff;
  background: var(--disclaimer-bg);
  color: var(--disclaimer-text);
  padding: 10px 6px;
  font-size: 18px;
  border-radius: 0 0 4px 0;
  opacity: 0.9;
  z-index: 9999;
}

.disclaimer:hover {
  opacity: 1;
}

.warning-box {
  background: #ffe6e6;
  border: 1px solid #ffaaaa;
  color: #7a0000;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warning-text);
  font-size: 1.5rem;
}

.warning-box::before {
  content: "⚠ ";
}

.features-table {
  width: 75%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-bottom: 24px;
  /* adjust gap */
}


.features-table th,
.features-table td {
  border: none;
  padding: 8px;
}

.features-table th {
  background: var(--table-header-bg);
  text-align: left;
  font-weight: 600;
}

.features-table td:first-child,
.features-table th:first-child {
  width: 36%;
}

.features-table td:nth-child(2),
.features-table th:nth-child(2),
.features-table td:nth-child(3),
.features-table th:nth-child(3) {
  width: 12%;
  text-align: center;
}

.features-table td:last-child,
.features-table th:last-child {
  width: 40%;
}



.resources-table {
  width: 60%;
  border-collapse: collapse;
  margin-top: 12px;
  margin-bottom: 24px;
}

.resources-table th,
.resources-table td {
  border: none;
  padding: 8px;
}

.resources-table th {
  background: #f2f2f2;
  background: var(--table-header-bg);
  text-align: left;
  font-weight: 600;
  width: 75%;
}

@media (max-width: 400px) {

  .features-table,
  .resources-table {
    width: 100%;
  }
}


.theme-toggle {
  position: fixed;
  top: 14px;
  right: 125px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--table-border);
  background: var(--bg-color);
  color: var(--text-color);
  cursor: pointer;
  font-size: 1.6rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  z-index: 10000;
}

.theme-toggle:hover {
  border-color: var(--link-color);
}

.theme-toggle .icon {
  font-size: 1.8rem;
  line-height: 1;
}

.theme-toggle .label {
  font-size: 1.5rem;
}

body.dark .theme-toggle {
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
}


.anchor-link {
  margin-left: 6px;
  text-decoration: none;
  opacity: 0.4;
  font-size: 0.85em;
}

.anchor-link:hover {
  opacity: 1;
}

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 80px;
}