:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --paper-deep: #ece8de;
  --ink: #1a2421;
  --muted: #65716c;
  --line: #d9d4c8;
  --red: #c83b32;
  --red-dark: #9d2b25;
  --green: #1f7459;
  --blue: #315f9e;
  --white: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
}

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgb(26 36 33 / 10%);
  background: rgb(247 245 239 / 94%);
  backdrop-filter: blur(14px);
}

.header-inner,
.section-inner,
.intro-inner,
.footer-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
}

.brand img {
  border-radius: 9px;
}

nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 13px;
  font-weight: 600;
}

nav a {
  text-decoration: none;
}

nav a:hover {
  color: var(--red);
}

.nav-github {
  padding: 8px 13px;
  border: 1px solid var(--ink);
  border-radius: 6px;
}

.nav-github:hover {
  color: var(--white);
  background: var(--ink);
}

.intro {
  border-bottom: 1px solid var(--line);
}

.intro-inner {
  padding: 82px 0 58px;
  text-align: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  max-width: 780px;
  margin: 0 auto;
  column-gap: 0.14em;
  row-gap: 0.04em;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: clamp(44px, 7vw, 78px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
}

.title-chinese,
.title-latin {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.title-latin {
  min-height: 1em;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.96em;
  transform: translateY(0.04em);
}

.lead {
  max-width: 660px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.button.primary {
  color: var(--white);
  background: var(--red);
}

.button.primary:hover {
  background: var(--red-dark);
}

.button.secondary {
  border-color: var(--line);
  background: var(--white);
}

.button.secondary:hover {
  border-color: var(--ink);
}

.release-meta {
  display: flex;
  justify-content: center;
  gap: 52px;
  margin: 42px 0 0;
}

.release-meta div {
  display: grid;
  gap: 4px;
}

.release-meta dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.release-meta dd {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
}

.product-band {
  padding: 78px 0;
  background: var(--ink);
  color: var(--white);
}

.product-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.72fr);
  align-items: center;
  gap: clamp(48px, 9vw, 120px);
}

.product-copy h2,
.section-heading h2,
.install h2,
.source h2 {
  margin: 0;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.product-copy > p:not(.section-kicker) {
  max-width: 560px;
  margin: 22px 0 0;
  color: #c4cbc7;
  font-size: 15px;
  line-height: 1.9;
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 22px;
  color: #e9ecea;
  font-size: 13px;
}

.check-list li::before {
  position: absolute;
  top: 1px;
  left: 0;
  color: #f08a82;
  content: "✓";
  font-weight: 800;
}

.popup-preview {
  width: min(100%, 370px);
  margin-left: auto;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 10px;
  color: #182230;
  background: #f6f7f9;
  box-shadow: 0 24px 70px rgb(0 0 0 / 35%);
}

.preview-titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 32px;
  padding: 0 12px;
  border-bottom: 1px solid #e4e7ec;
  color: #667085;
  background: #fff;
  font-size: 10px;
}

.traffic-lights {
  display: flex;
  gap: 5px;
}

.traffic-lights i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d0d5dd;
}

.traffic-lights i:first-child {
  background: #e96860;
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 16px 13px;
  background: #fff;
}

.preview-header img {
  border-radius: 9px;
}

.preview-header div {
  display: grid;
  gap: 2px;
}

.preview-header strong {
  font-size: 14px;
}

.preview-header span {
  color: #1f7459;
  font-size: 10px;
}

.preview-controls {
  margin: 12px;
  overflow: hidden;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
}

.preview-controls div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 13px;
  font-size: 11px;
  font-weight: 650;
}

.preview-controls div + div {
  border-top: 1px solid #eef0f3;
}

.toggle {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #d0d5dd;
}

.toggle::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 25%);
  content: "";
}

.toggle.active {
  background: var(--red);
}

.toggle.active::after {
  transform: translateX(14px);
}

.preview-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 0 12px;
}

.preview-actions span {
  padding: 9px 4px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  color: #475467;
  background: #fff;
  text-align: center;
  font-size: 9px;
  font-weight: 650;
}

.preview-actions .danger {
  border-color: #fecaca;
  color: #b42318;
}

.preview-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 10px 12px;
  overflow: hidden;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #e4e7ec;
}

.preview-stats div {
  display: grid;
  gap: 2px;
  padding: 11px 12px;
  background: #fff;
}

.preview-stats strong {
  font-size: 20px;
}

.preview-stats span {
  color: #667085;
  font-size: 9px;
}

.preview-list-title {
  display: flex;
  justify-content: space-between;
  margin: 15px 13px 7px;
  font-size: 10px;
}

.preview-list-title span {
  color: #667085;
}

.preview-record {
  margin: 6px 12px;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
  background: #fff;
}

.preview-record div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 11px;
  font-size: 10px;
}

.preview-record span {
  color: #667085;
}

.features,
.install,
.source {
  padding: 78px 0;
  border-bottom: 1px solid var(--line);
}

.features {
  background: var(--paper);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 36px;
}

.section-heading h2 {
  max-width: 660px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.feature-grid article {
  min-height: 220px;
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature-grid article > span {
  color: var(--red);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
}

.feature-grid h3 {
  margin: 50px 0 10px;
  font-size: 18px;
}

.feature-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.install {
  background: var(--paper-deep);
}

.install-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1fr);
  gap: clamp(50px, 9vw, 120px);
}

.install .button {
  margin-top: 28px;
}

.checksum {
  margin-top: 18px;
  color: var(--muted);
  font-size: 11px;
}

.checksum summary {
  width: fit-content;
  cursor: pointer;
  font-weight: 650;
}

.checksum code {
  display: block;
  margin-top: 10px;
  padding: 10px;
  overflow-wrap: anywhere;
  border: 1px solid #cbc5b8;
  border-radius: 5px;
  color: #49534f;
  background: rgb(255 255 255 / 45%);
  font-size: 10px;
  line-height: 1.6;
}

.checksum a {
  display: inline-block;
  margin-top: 8px;
  color: var(--blue);
}

.install-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.install-steps li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid #cbc5b8;
}

.install-steps li:first-child {
  padding-top: 0;
}

.install-steps li > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.install-steps strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}

.install-steps p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.copy-button {
  margin-top: 9px;
  padding: 7px 10px;
  border: 1px solid #bdb6a8;
  border-radius: 5px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.copy-button:hover {
  border-color: var(--ink);
  background: rgb(255 255 255 / 45%);
}

.source {
  background: var(--paper);
}

.source-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.7fr);
  gap: clamp(50px, 9vw, 120px);
}

.source p {
  max-width: 600px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.source-links {
  display: grid;
  border-top: 1px solid var(--line);
}

.source-links a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.source-links span {
  color: var(--muted);
  font-size: 11px;
}

.source-links strong {
  font-size: 13px;
  text-align: right;
}

.source-links a:hover strong {
  color: var(--red);
}

footer {
  position: relative;
  color: #c8cfcb;
  background: var(--ink);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0;
  font-size: 11px;
}

.copy-status {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  padding: 9px 12px;
  border-radius: 5px;
  color: #fff;
  background: var(--green);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.copy-status.visible {
  opacity: 1;
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid rgb(49 95 158 / 40%);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .product-grid,
  .install-grid,
  .source-grid {
    grid-template-columns: 1fr;
  }

  .popup-preview {
    margin: 0 auto;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .section-inner,
  .intro-inner,
  .footer-inner {
    width: min(100% - 28px, 1180px);
  }

  .header-inner {
    min-height: 60px;
  }

  .brand span {
    display: none;
  }

  nav {
    gap: 17px;
  }

  nav a:nth-child(2),
  nav a:nth-child(3) {
    display: none;
  }

  .intro-inner {
    padding: 58px 0 44px;
  }

  h1 {
    font-size: clamp(40px, 14vw, 58px);
  }

  .lead {
    font-size: 15px;
  }

  .release-meta {
    gap: 20px;
  }

  .product-band,
  .features,
  .install,
  .source {
    padding: 56px 0;
  }

  .product-grid {
    gap: 42px;
  }

  .popup-preview {
    width: 100%;
  }

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

  .feature-grid article {
    min-height: 190px;
  }

  .feature-grid h3 {
    margin-top: 34px;
  }

  .install-grid,
  .source-grid {
    gap: 44px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .copy-status {
    transition: none;
  }
}
