:root {
  --background: #fff;
  --header-background: rgba(255, 255, 255, .84);
  --header-border: #e8e8e8;
  --link: #0088cc;
  --title: #383a3b;
  --muted: #67696a;
  --divider: #777;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #17212b;
  --header-background: #17212b;
  --header-border: rgba(255, 255, 255, .08);
  --link: #5eb0f3;
  --title: #e9edf1;
  --muted: #828d99;
  --divider: #828d99;
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--title);
  line-height: 18px;
  -webkit-tap-highlight-color: transparent;
}

a, .link-label { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; }

.site-header {
  position: fixed;
  z-index: 1000;
  inset: 0 0 auto;
  background: var(--background);
  border-bottom: 1px solid var(--header-border);
}

@supports (backdrop-filter: blur(25px)) {
  .site-header {
    background: var(--header-background);
    backdrop-filter: blur(25px);
  }
}

[data-theme="dark"] .site-header { box-shadow: 0 1px var(--header-border); }

.navigation {
  display: flex;
  margin: 0 auto;
  padding: 0 44px 0 15px;
  font-size: 15px;
  font-weight: 500;
}

.nav-label {
  position: relative;
  display: block;
  padding: 15.5px 15px;
  line-height: 17px;
  color: var(--link);
  white-space: nowrap;
}

.nav-label::after {
  position: absolute;
  right: 4px;
  bottom: -1px;
  left: 4px;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scale(.3, 0);
  transform-origin: bottom;
  transition: opacity .2s ease-in-out, transform .2s ease-in-out;
}

.nav-label.active::after { opacity: 1; transform: scale(1); }

.language-button {
  margin-left: auto;
  border: 0;
  background: transparent;
  opacity: 1;
}

.language-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 4px;
  vertical-align: top;
  background: currentColor;
  mask: url("./assets/language.svg") center / contain no-repeat;
}

.language-caret {
  display: inline-block;
  margin-left: 2px;
  vertical-align: middle;
  border-top: 4px solid;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}

.x-icon {
  display: inline-block;
  width: 21px;
  height: 17px;
  vertical-align: text-top;
  background: currentColor;
  mask: url("./assets/x-logo.svg") left center / 15px 15px no-repeat;
}

.theme-toggle {
  position: fixed;
  z-index: 1001;
  inset: 0 0 auto auto;
  display: grid;
  place-items: center;
  width: 54px;
  height: 50px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: .7;
  transition: opacity .15s ease;
  view-transition-name: theme-toggle;
}

.theme-toggle:hover { opacity: 1; }
.theme-toggle::before {
  width: 22px;
  height: 22px;
  background: url("./assets/moon.webp") center / contain no-repeat;
  content: "";
}
[data-theme="dark"] .theme-toggle::before { background-image: url("./assets/sun.webp"); }

::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.reveal-dark::view-transition-new(root),
.reveal-light::view-transition-old(root) { z-index: 1; }
::view-transition-group(theme-toggle) { z-index: 2; }

@keyframes theme-icon-out { to { opacity: 0; transform: rotate(-90deg) scale(.5); } }
@keyframes theme-icon-in { from { opacity: 0; transform: rotate(90deg) scale(.5); } }
::view-transition-old(theme-toggle) { animation: 500ms cubic-bezier(.16, 1, .3, 1) both theme-icon-out; }
::view-transition-new(theme-toggle) { animation: 500ms cubic-bezier(.16, 1, .3, 1) both theme-icon-in; }

.desktop {
  display: flow-root;
  width: 420px;
  margin: 50px auto 0;
  font-size: 16px;
  text-align: center;
}

.screenshot {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 48px;
}

h1 {
  margin: 32px 0 14px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
}

h1 a { color: var(--title); }
h1 a:hover { text-decoration: none; }

.intro {
  margin: 14px 10px 24px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.48;
}

.mobile-message {
  display: none;
  margin: 24px 0 40px;
  padding: 13px 24px;
  border: 1px solid #179cde;
  border-radius: 10px;
  color: #0088cc;
  font-size: 17px;
  line-height: 1.48;
}

.download-row,
.download-spacer,
.show-platforms {
  position: relative;
  left: 50%;
  width: min(680px, 100vw);
  transform: translateX(-50%);
}

.download-spacer,
.show-platforms { margin-bottom: 10px; }
.download-row-more { margin-bottom: 30px; }

.platform {
  display: none;
  vertical-align: top;
}

:root:not([data-platform]) .platform[data-platform="windows"],
:root[data-platform="windows"] .platform[data-platform="windows"],
:root[data-platform="mac"] .platform[data-platform="mac"],
:root[data-platform="linux"] .platform[data-platform="linux"],
:root[data-platform="other"] .platform { display: inline-block; }

:root[data-platform="linux"] .download-row-more { margin-bottom: 0; }

.download-button {
  display: block;
  min-width: 266px;
  margin: 5px 10px;
  padding: 10px 14px;
  border-radius: 30px;
  background: #1d98dc;
  color: #fff;
  font-size: 15px;
  line-height: 2;
  white-space: nowrap;
}

.download-button:hover { background: #0e8ed4; text-decoration: none; }

.download-alternative {
  display: inline-block;
  min-width: 256px;
  margin: 5px 10px;
  padding: 0 15px 20px;
  border: 0;
  background: none;
  color: var(--link);
}

.platform .download-alternative { display: block; margin-top: 10px; }

.download-divider {
  margin: 0 4px;
  color: var(--divider);
  font-size: 9px;
  vertical-align: text-bottom;
}

:root:not([data-platform="linux"]):not([data-platform="other"]) .download-row-more,
:root[data-platform="linux"] .download-row:first-child,
:root[data-platform="linux"] .download-spacer,
:root[data-platform="other"] .show-platforms,
:root[data-platform="mobile"] .downloads,
:root[data-platform="mobile"] .license { display: none; }

:root[data-platform="mobile"] .mobile-message { display: block; }

.license {
  margin: 50px 0 30px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

@media (min-width: 768px) { .navigation { width: 750px; } }
@media (min-width: 992px) { .navigation { width: 970px; } }
@media (min-width: 1200px) { .navigation { width: 1170px; } }
@media (max-width: 767px) { .navigation .desktop-nav { display: none; } }

@media (max-width: 480px) {
  .navigation { padding-left: 0; }
  .desktop { width: auto; margin-inline: 20px; font-size: 14px; }
  .screenshot { margin-top: 26px; }
  h1 { margin: 21px 0 10px; font-size: 22px; }
  .intro { margin: 10px 15px 24px; font-size: 16px; }
  .download-row { width: min(320px, 100vw); }
  .show-platforms { width: min(280px, 100vw); }
  .license { font-size: 12px; }
}

@media (max-width: 320px) {
  .intro { font-size: 14px; }
  .mobile-message { padding: 13px 18px; font-size: 15px; }
}
