:root {
  color-scheme: light;
  --page-bg: #f7f7f7;
  --ink: #090909;
  --accent: #f00000;
  --link: #0016cb;
  --rule: #9c9c9c;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}

a {
  color: inherit;
}

.download-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 64px;
}

.download-panel {
  width: min(calc(100% - 32px), 1000px);
  min-width: 0;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(21px, 2.2vw, 32px);
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h1 span {
  color: var(--accent);
  white-space: nowrap;
}

.remote-tools {
  width: 100%;
  margin-top: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

.tool-link {
  width: min(100%, 330px);
  height: 92px;
  display: grid;
  place-items: center;
  position: relative;
  text-decoration: none;
  border-radius: 12px;
  transition: transform 160ms ease, opacity 160ms ease;
}

.tool-link:hover,
.tool-link:focus-visible {
  transform: scale(1.035);
  outline: none;
}

.tool-link:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 22, 203, 0.25);
}

.tool-link img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 112px;
  object-fit: contain;
}

.remote-tools .tool-link:first-child img {
  width: 305px;
}

.asklink-logo {
  display: block;
  width: 300px;
  height: 100px;
  background-image: url("https://www.asklink.com/imgs/AskLink_logo.png");
  background-repeat: no-repeat;
  background-size: 276px 100px;
  background-position: center;
  filter: brightness(0.9) saturate(1.8) contrast(1.15);
}

.remote-row {
  width: 100%;
  min-width: 0;
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

.remote-row .tool-link {
  width: min(100%, 330px);
  height: 92px;
}

.remote-row .tool-link img {
  width: 305px;
  max-height: 112px;
}

.quick-links {
  width: min(100%, 1000px);
  margin-top: 36px;
  padding: 10px 16px;
  border-top: 1px solid var(--ink);
  display: flex;
  justify-content: center;
  gap: 30px;
  font-size: 15px;
  font-weight: 700;
}

.quick-links a {
  text-decoration: none;
}

.quick-links a:hover,
.quick-links a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.tool-fallback {
  display: none;
  font-size: 31px;
  font-weight: 700;
}

.tool-link img.is-missing + .tool-fallback {
  display: block;
}

.asklink-link .tool-fallback {
  position: absolute;
}

.site-footer {
  width: calc(100% - 16px);
  margin: 0 auto;
  padding: 10px 16px 27px;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: 16px;
  font-weight: 700;
}

.site-footer p {
  margin: 0 0 22px;
}

.site-footer a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 700px) {
  .download-page {
    padding-top: 32px;
  }

  .download-panel {
    width: min(calc(100% - 24px), 520px);
  }

  h1 {
    font-size: clamp(19px, 5.3vw, 26px);
  }

  h1 span {
    display: inline-block;
  }

  .remote-tools {
    margin-top: 42px;
    gap: 20px;
  }

  .tool-link {
    height: 86px;
  }

  .remote-tools .tool-link:first-child img {
    width: min(82vw, 290px);
    max-height: 84px;
  }

  .asklink-logo {
    width: min(82vw, 290px);
    height: 86px;
    background-size: 238px 86px;
  }

  .remote-row {
    width: 100%;
    margin-top: 20px;
    gap: 17px;
  }

  .remote-row .tool-link {
    width: min(100%, 330px);
    height: 86px;
    margin: 0 auto;
  }

  .remote-row .tool-link img {
    width: min(82vw, 290px);
    max-height: 84px;
  }

  .quick-links {
    margin-top: 28px;
    font-size: 14px;
  }

  .site-footer {
    width: calc(100% - 12px);
    margin-top: 30px;
    padding: 10px 8px 20px;
    font-size: 13px;
  }

  .site-footer p {
    margin-bottom: 14px;
  }
}
