/* SPDX-License-Identifier: GPL-3.0-only */
/* Adapted from dariomarcelino.com (https://github.com/dmarcelino/dariomarcelino.com,
   static/style.css) by Dário Marcelino, via tabby-bell-indicator and tabby-drop-n-paste.
   Blog-only rules removed; long inline code may wrap and the nav may wrap so pages fit
   narrow screens; rules added for the landing page, the Compare menu and the comparison
   tables (see the end). No JavaScript. */

:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #5f5f5f;
  --rule: #111111;
  --accent: #111111;
  --hairline: #e4e4e4;
  --measure: 46rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101010;
    --fg: #ededed;
    --muted: #a0a0a0;
    --rule: #ededed;
    --accent: #ededed;
    --hairline: #2a2a2a;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* Keyboard users get a way past the nav; invisible until focused. */
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  background: var(--fg);
  color: var(--bg);
  border-radius: 4px;
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  padding: 2.25rem 0 1.5rem;
  border-bottom: 3px solid var(--rule);
}

.avatar-link {
  display: block;
  line-height: 0;
  border-radius: 50%;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--hairline);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 2rem;
}

.site-nav a,
.nav-menu summary {
  color: var(--fg);
  text-decoration: none;
  font-size: 1.0625rem;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.nav-menu summary:hover { border-bottom-color: var(--fg); }

.site-nav a[aria-current="page"],
.nav-menu summary.current { border-bottom-color: var(--fg); }

/* The Compare menu: a <details> element, so it needs no JavaScript. */
.nav-menu { position: relative; }
.nav-menu summary {
  cursor: pointer;
  list-style: none;
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary::after {
  content: "";
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  margin-left: 0.45em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.2em) rotate(45deg);
}
.nav-menu[open] summary::after { transform: translateY(0.05em) rotate(-135deg); }
.nav-menu ul {
  position: absolute;
  z-index: 5;
  top: calc(100% + 0.6rem);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 2rem);
  margin: 0;
  padding: 0.4rem 0;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.nav-menu li { margin: 0; }
.nav-menu ul a {
  display: block;
  padding: 0.3rem 1rem;
  border-bottom: 0;
  font-size: 1rem;
  line-height: 1.5;
}
.nav-menu ul a:hover,
.nav-menu ul a:focus-visible { background: var(--hairline); }
.nav-menu ul a[aria-current="page"] { font-weight: 600; }
.nav-menu ul a[aria-current="page"]::before { content: "› "; }

/* ---------- Content ---------- */

main { padding-top: 2.75rem; }

h1, h2, h3 {
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.75rem;
}

h1 { font-size: 1.9rem; margin-top: 0; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

p, ul, ol, blockquote, pre, table { margin: 0 0 1.25rem; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.35rem; }

blockquote {
  border-left: 3px solid var(--hairline);
  margin-left: 0;
  padding: 0.1rem 0 0.1rem 1.25rem;
  color: var(--muted);
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--hairline);
  padding: 0.15em 0.35em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

pre {
  background: var(--hairline);
  padding: 1rem 1.1rem;
  border-radius: 6px;
  overflow-x: auto;
  line-height: 1.55;
}
pre code { background: none; padding: 0; font-size: 0.875rem; }

img, video { max-width: 100%; height: auto; }

hr { border: 0; border-top: 1px solid var(--hairline); margin: 2.5rem 0; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--hairline); }

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

.site-footer {
  margin-top: 4.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }

@media (max-width: 30rem) {
  body { font-size: 1rem; }
  h1 { font-size: 1.6rem; }
  .site-nav { gap: 0.25rem 1.5rem; }
}

/* ---------- Landing page ---------- */

.lede { font-size: 1.2rem; line-height: 1.6; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin: 1.75rem 0 2.25rem;
}

.button {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  background: var(--fg);
  color: var(--bg);
  border: 2px solid var(--fg);
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--bg); color: var(--fg); }

.demo { margin: 0 0 2.5rem; }
.demo img {
  display: block;
  border: 1px solid var(--hairline);
  border-radius: 6px;
}
.demo figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.table-scroll { overflow-x: auto; margin: 0 0 1.25rem; }
.table-scroll table { margin: 0; }

.faq h3 { margin-top: 1.75rem; }

.note { color: var(--muted); }

/* ---------- Comparison pages ---------- */

.answer {
  border-left: 3px solid var(--rule);
  padding: 0.1rem 0 0.1rem 1.25rem;
  margin: 0 0 1.75rem;
}
.answer p:last-child { margin-bottom: 0; }

.compare th[scope="row"] { font-weight: 600; }
.compare td, .compare th { vertical-align: top; font-size: 0.95rem; line-height: 1.5; }
.compare thead th { border-bottom: 2px solid var(--rule); }
.compare code { white-space: nowrap; }
/* The hub's five-column table scrolls sideways on a phone instead of squeezing. */
.compare-wide { min-width: 44rem; }

.prose .compare-list { padding-left: 0; list-style: none; }
.prose .compare-list li { margin-bottom: 0.9rem; }
.compare-list a { font-weight: 600; }
