@font-face {
  font-family: "Adwaita Sans";
  src: url("fonts/AdwaitaSans.woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* Colors and metrics follow libadwaita's stylesheet. */
:root {
  --window-bg: #fafafb;
  --window-fg: rgb(0 0 6 / 80%);
  --dim-fg: rgb(0 0 6 / 55%);
  --card-bg: #ffffff;
  --banner-bg: #91b3c3;
  --separator: color-mix(in srgb, currentColor 15%, transparent);
  --hover: color-mix(in srgb, currentColor 4%, transparent);
  --active: color-mix(in srgb, currentColor 8%, transparent);
}

@media (prefers-color-scheme: dark) {
  :root {
    --window-bg: #222226;
    --window-fg: #ffffff;
    --dim-fg: rgb(255 255 255 / 55%);
    --card-bg: rgb(255 255 255 / 8%);
    --banner-bg: #071f2b;
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--window-bg);
  color: var(--window-fg);
  font-family: "Adwaita Sans", Cantarell, system-ui, sans-serif;
  line-height: 1.5;
  text-wrap: pretty;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid color-mix(in srgb, #3584e4 50%, transparent);
  outline-offset: 2px;
}

header :focus-visible {
  outline-color: currentColor;
}

code {
  font-family: ui-monospace, "Adwaita Mono", monospace;
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--active);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.content,
.wide {
  margin-inline: auto;
  padding-inline: 16px;
}

.content {
  max-width: 720px;
}

.wide {
  max-width: 1032px;
}

/* Header */

header {
  background: var(--banner-bg);
  padding-bottom: 40px;
}

nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-height: 48px;
}

nav a {
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 9px;
  font-weight: 600;
}

nav a:hover {
  background: var(--hover);
}
nav a:active {
  background: var(--active);
}

nav a:last-child {
  margin-inline-end: -10px;
}

.hero {
  text-align: center;
  padding-top: 24px;
}

.hero > img {
  margin-inline: auto;
}

h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 12px 0 4px;
}

.hero p {
  font-size: 1.25rem;
  margin: 0;
}

.install-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 20px;
  margin-block: 24px 8px;
  font-weight: 600;
}

header .wide {
  max-width: 1200px;
}

header .showcase {
  margin-top: 24px;
}

/* Sections */

main {
  padding-block: 16px 32px;
}

main > * {
  margin-block: 56px;
}

h2 {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 12px;
}

.section-intro {
  color: var(--dim-fg);
  margin: 0 0 12px;
}

dl,
dd {
  margin: 0;
}

dt {
  font-weight: 700;
}

dd + dt {
  margin-top: 12px;
}

.showcase {
  display: grid;
  align-items: center;
  gap: 24px 40px;
}

.panel {
  padding-inline: clamp(12px, 3vw, 24px);
  border-radius: 20px;
  background: color-mix(in srgb, var(--banner-bg) 40%, var(--window-bg));
}

.columns {
  display: grid;
  align-items: start;
  gap: 40px;
}

@media (min-width: 860px) {
  .showcase {
    grid-template-columns: 2fr 1fr;
  }

  .reverse {
    grid-template-columns: 1fr 2fr;
  }

  .reverse > :first-child {
    order: 1;
  }

  .columns {
    grid-template-columns: 1fr 1fr;
  }
}

/* Boxed lists */

.boxed-list,
.boxed-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.boxed-list {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgb(0 0 6 / 3%),
    0 1px 3px 1px rgb(0 0 6 / 7%),
    0 2px 6px 2px rgb(0 0 6 / 3%);
  overflow: hidden;
}

.boxed-list li + li,
.boxed-list ul {
  border-top: 1px solid var(--separator);
}

.boxed-list :is(a, summary) {
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  align-items: center;
  column-gap: 12px;
  min-height: 50px;
  padding: 10px 16px;
  text-decoration: none;
  cursor: pointer;
}

.boxed-list :is(a, summary):hover {
  background: var(--hover);
}
.boxed-list :is(a, summary):active {
  background: var(--active);
}

.boxed-list :is(a, summary):focus-visible {
  outline-offset: -2px;
}

.boxed-list :is(a, summary)::after {
  grid-area: 1 / 2 / span 2;
  width: 20px;
  color: var(--dim-fg);
}

/* Lucide's external-link icon, as used on Flathub (license in LICENSE-lucide.txt) */
.boxed-list a::after {
  content: "";
  height: 20px;
  background: currentColor;
  mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h6v6M10 14 21 3M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/></svg>');
}

.boxed-list small {
  color: var(--dim-fg);
  font-size: 0.875rem;
}

.boxed-list ul a {
  padding-inline-start: 32px;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "\203A";
  font-size: 1.5rem;
  line-height: 1;
  text-align: center;
}

details[open] > summary::after {
  transform: rotate(90deg);
}

/* Screenshot viewer */

.zoom {
  cursor: zoom-in;
}

#viewer {
  padding: 0;
  border: none;
  background: none;
  max-width: none;
  max-height: none;
  overflow: visible;
}

#viewer::backdrop {
  background: rgb(0 0 6 / 80%);
}

#viewer img {
  max-width: 96vw;
  max-height: 96dvh;
  cursor: zoom-out;
}

#viewer .close {
  position: absolute;
  top: calc(100% * 55 / 893);
  right: calc(100% * 61 / 1299);
  transform: translate(50%, -50%);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #3f3f46;
  color: #fafafb;
  box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
  cursor: pointer;
  transition: background-color 100ms;
}

#viewer .close:hover {
  background: #505059;
}

#viewer .close:active {
  background: #5e5e69;
}

html:has(#viewer[open]) {
  overflow: hidden;
}

/* Footer */

footer {
  color: var(--dim-fg);
  font-size: 0.875rem;
  text-align: center;
  padding-block: 24px 40px;
}

footer p {
  margin: 4px 0;
}
