:root {
  color-scheme: dark;
  font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  background: #13141d;
  color: #f7f7fb;
  --accent: #ff654e;
  --accent-hover: #ff826e;
  --muted: #d2d4e0;
  --divider: #343743;
}

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

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: inherit; }

button {
  color: inherit;
  font: inherit;
  cursor: pointer;
}

:focus-visible { outline: 3px solid #ffbdac; outline-offset: 5px; }

.shell { width: min(90%, 92rem); margin-inline: auto; }

.skip-link {
  position: fixed;
  z-index: 1;
  inset: 0 auto auto 1rem;
  padding: .75rem 1rem;
  background: #252633;
  transform: translateY(-130%);
}

.skip-link:focus { transform: translateY(0); }

.topbar-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar-inner { min-height: 5rem; }
.topbar-inner > nav { margin-inline-start: auto; }

.qq-contact {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: .6rem;
  padding: .4rem .78rem .4rem .45rem;
  border: 1px solid #805143;
  border-radius: .7rem;
  background: #29202a;
  color: #e9d2d9;
  font-size: .875rem;
  line-height: 1.2;
}

.qq-contact img {
  width: 2.2rem;
  height: 2.2rem;
  object-fit: contain;
  border-radius: .45rem;
}

.qq-contact span { display: grid; gap: .12rem; }
.qq-contact strong { color: #f7f7fb; font-size: 1.12rem; font-weight: 750; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -.045em;
}

.brand-mark {
  width: 1.9rem;
  height: 2.3rem;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 50%, 0 100%, 9% 70%, 47% 50%, 9% 30%);
}

nav { display: flex; align-items: center; gap: clamp(1rem, 4vw, 3.25rem); }

.nav-button {
  border: 0;
  background: transparent;
  padding: .55rem 0;
  font-size: 1rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.nav-button:hover, .nav-button[aria-current="page"] { color: #ffad9e; }

.hero {
  background:
    linear-gradient(90deg, #0d1020a6 0%, #12132442 42%, transparent 70%),
    #101323 url("./assets/coastal-road.png") center 56% / cover no-repeat;
  border-block-end: 1px solid var(--divider);
}

.hero-inner {
  width: min(86.5%, 88.5rem);
  min-height: clamp(29rem, 36.6vw, 39rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-block: 4rem;
}

h1, h2, h3, p, dl, dd { margin: 0; }

h1 {
  font-size: clamp(3.1rem, 5.8vw, 6.4rem);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: .025em;
}

.hero p {
  max-width: 34rem;
  margin-block-start: 1rem;
  color: #f1f0f5;
  font-size: clamp(1rem, 1.65vw, 1.65rem);
  line-height: 1.65;
}

.hero .hero-version { font-size: .95rem; color: var(--muted); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .9rem;
  margin-block-start: clamp(1.5rem, 3vw, 3rem);
}

.button {
  min-height: clamp(3.25rem, 4.7vw, 4.75rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  border: 2px solid transparent;
  border-radius: .7rem;
  padding: .65rem clamp(1.05rem, 2.8vw, 2.75rem);
  font-size: clamp(1rem, 1.55vw, 1.55rem);
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}

.button-primary { background: var(--accent); color: #17141b; }
.button-primary:hover { background: var(--accent-hover); }
.button-secondary { border-color: #d7d8e1; background: #11152147; }
.button-secondary:hover { background: #ffffff25; }

.icon-download {
  position: relative;
  width: 1.1em;
  height: 1.15em;
  border-block-end: 2px solid currentColor;
}

.icon-download::before {
  content: "";
  position: absolute;
  inset: .02em auto .25em 50%;
  border-inline-start: 2px solid currentColor;
  transform: translateX(-50%);
}

.icon-download::after {
  content: "";
  position: absolute;
  inset: auto auto .19em 50%;
  width: .49em;
  height: .49em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateX(-50%) rotate(45deg);
}

.installation { background: #151720; }

.installation-inner, .core-link-inner {
  width: min(89%, 91rem);
  padding-block: clamp(2.6rem, 4.1vw, 4.25rem);
}

.installation-inner {
  display: grid;
  grid-template-columns: 1.13fr 1fr;
  align-items: start;
  gap: clamp(2rem, 5vw, 6rem);
}

.installation h2, .core-link h2 { font-size: clamp(1.85rem, 3.15vw, 3.1rem); line-height: 1.18; }

.installation p {
  margin-block-start: .8rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.6rem);
  line-height: 1.65;
}

.core-link { border-block-start: 1px solid var(--divider); }
.core-link p { margin-block-start: .65rem; color: var(--muted); }

.detail {
  min-height: 3.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  font-size: clamp(1rem, 1.43vw, 1.4rem);
}

.detail + .detail { border-block-start: 1px solid var(--divider); }

.detail dt {
  display: inline-flex;
  align-items: center;
  gap: clamp(.55rem, 1.8vw, 1.6rem);
  font-weight: 700;
}

.detail dd { text-align: end; color: var(--muted); }

.icon-monitor {
  position: relative;
  width: 1.4em;
  height: .94em;
  border: 2px solid currentColor;
  border-radius: .15em;
  margin-block-end: .2em;
}

.icon-monitor::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: .55em;
  height: .24em;
  border-bottom: 2px solid currentColor;
  transform: translateX(-50%);
}

.icon-key {
  width: 1.4em;
  height: 1.2em;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: .19em;
  font: 650 .82em/1 "Segoe UI", sans-serif;
  padding: .04em;
  min-width: 1.72em;
}

.updates-banner {
  border-block-end: 1px solid var(--divider);
  background:
    linear-gradient(90deg, #111320 15%, #111320d9 45%, #11132059 100%),
    #111320 url("./assets/coastal-road.png") center 58% / cover no-repeat;
}

.updates-banner-inner {
  width: min(89%, 74rem);
  padding-block: clamp(2.65rem, 5.5vw, 5rem);
}

.updates-banner h1 { font-size: clamp(2rem, 4.8vw, 4.35rem); letter-spacing: -.015em; }
.updates-banner p { margin-block-start: .85rem; color: var(--muted); font-size: 1.12rem; }

.updates-layout {
  width: min(89%, 74rem);
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: 1.65rem clamp(2rem, 6vw, 5rem);
  align-items: start;
  padding-block: clamp(2rem, 5vw, 4.25rem);
}

.update-index {
  position: sticky;
  top: 1.25rem;
  display: block;
  padding-inline-end: 1.25rem;
  border-inline-end: 1px solid var(--divider);
}

.update-index h2 { font-size: 1rem; }
.update-index ul { list-style: none; margin: .6rem 0 0; padding: 0; }
.update-index a { display: block; padding-block: .42rem; color: var(--muted); text-decoration: none; }
.update-index a:hover { color: #ffad9e; }

.release-note { max-width: 51rem; scroll-margin-block-start: 1.35rem; line-height: 1.75; }
.release-note + .release-note { margin-block-start: 2.7rem; }
.release-note h2 { font-size: clamp(1.75rem, 3.1vw, 2.65rem); line-height: 1.2; }
.release-note h3 { font-size: 1.3rem; line-height: 1.4; }
.release-note p { margin-block-start: .65rem; }
.release-note p, .release-note li { color: var(--muted); }
.release-note strong { color: #f7f7fb; }
.release-note code { background: #222433; padding: .08em .22em; border-radius: .22rem; }
.release-note ul { margin-block: .6rem 0; padding-inline-start: 1.35rem; }
.release-note li + li { margin-block-start: .5rem; }
.release-note > h3 { margin-block-start: .75rem; }
.release-note p.muted { font-size: .9rem; }

.release-section {
  margin-block-start: 1.7rem;
  padding-block-start: 1.35rem;
  border-block-start: 1px solid var(--divider);
  scroll-margin-block-start: 1.35rem;
}

.release-note .release-meta, .package-release .release-meta {
  display: flex;
  gap: .3rem .9rem;
  flex-wrap: wrap;
  margin-block: 0 .6rem;
  font-size: .9rem;
}

.release-meta strong { color: #ffad9e; }

.source-link {
  display: inline-block;
  margin-block-start: .75rem;
  color: #ffad9e;
  text-underline-offset: .25em;
}

.source-link:hover { color: #ffd4ca; }

.footer { border-block-start: 1px solid var(--divider); }
.footer-inner { min-height: 4.5rem; flex-wrap: wrap; gap: .3rem 1rem; padding-block: .65rem; color: var(--muted); }

dialog {
  width: min(40rem, calc(100% - 2rem));
  max-height: calc(100svh - 2rem);
  overflow: auto;
  padding: clamp(1.25rem, 4vw, 2rem);
  color: #f7f7fb;
  background: #191b26;
  border: 1px solid #474b5c;
  border-radius: 1rem;
}

dialog::backdrop { background: #090a12c9; }

.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-block-end: .9rem;
  margin-block-end: 1.2rem;
  border-block-end: 1px solid var(--divider);
}

.dialog-heading h2 { font-size: 1.55rem; }

.close-button {
  width: 2.5rem;
  height: 2.5rem;
  background: #292c3b;
  border: 1px solid var(--divider);
  border-radius: .5rem;
  font-size: 1.5rem;
  line-height: 1;
}

.close-button:hover { background: #353949; }

dialog p, .instructions { color: var(--muted); line-height: 1.7; }
dialog p { margin-block-start: .65rem; }
.instructions { margin-block: .65rem 1.25rem; padding-inline-start: 1.4rem; }
.instructions li + li { margin-block-start: .5rem; }
code { overflow-wrap: anywhere; color: inherit; }

.package-log { width: min(45rem, calc(100% - 2rem)); }
.package-release h3 { font-size: 1.28rem; line-height: 1.4; }
.package-release .instructions { margin-block-end: 0; }
.package-release li strong { color: #f7f7fb; }
.package-release + .package-release {
  margin-block-start: 1.25rem;
  padding-block-start: 1.2rem;
  border-block-start: 1px solid var(--divider);
}

@media (max-width: 44rem) {
  .topbar-inner { min-height: 4rem; flex-wrap: wrap; gap: .15rem 1rem; padding-block: .55rem; }
  .topbar-inner > nav { order: 1; flex-basis: 100%; margin-inline-start: 0; }
  .brand-mark { width: 1.4rem; height: 1.7rem; }
  .nav-button { font-size: .9rem; }
  .hero {
    background:
      linear-gradient(90deg, #0e1022c9 0%, #10132465 80%),
      #101323 url("./assets/coastal-road.png") 69% center / cover no-repeat;
  }
  .hero-inner { width: 90%; min-height: 27rem; }
  .hero-actions { width: 100%; gap: .75rem; }
  .installation-inner { grid-template-columns: 1fr; gap: 1.35rem; }
  .updates-layout { grid-template-columns: minmax(0, 1fr); }
  .update-index { position: static; border-inline-end: 0; border-block-end: 1px solid var(--divider); padding: 0 0 .95rem; }
  .update-index ul { display: flex; flex-wrap: wrap; column-gap: 1rem; }
  .footer-inner { min-height: 3.5rem; font-size: .9rem; }
}

@media (max-width: 23rem) {
  .topbar-inner { gap: .5rem; }
  nav { gap: .65rem; }
  .brand { gap: .35rem; }
  .qq-contact { gap: .42rem; padding: .33rem .5rem; }
  .qq-contact img { width: 1.75rem; height: 1.75rem; }
  .qq-contact strong { font-size: 1rem; }
}
