:root {
  --bg: #f3efe6;
  --card: #fffdf8;
  --ink: #1c2421;
  --muted: #5d6b66;
  --line: #d7d0c3;
  --brand: #176b70;
  --brand-ink: #ffffff;
  --shadow: 0 10px 30px rgba(28, 36, 33, 0.06);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(23, 107, 112, 0.1), transparent 42%),
    linear-gradient(180deg, #f7f3eb 0%, var(--bg) 280px);
}

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

h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 16px;
}

h3 {
  font-size: 16px;
  font-weight: 600;
}

p,
li {
  font-size: 15px;
  line-height: 1.6;
}

a {
  color: inherit;
}

.note {
  color: var(--muted);
  font-size: 14px;
}

.top,
main,
footer {
  width: min(1040px, calc(100% - 40px));
  margin-inline: auto;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.en {
  color: var(--muted);
  font-size: 12px;
}

.mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--brand);
  color: var(--brand-ink);
  text-decoration: none;
  font-size: 14px;
  padding: 10px 16px;
  white-space: nowrap;
}

.btn:hover {
  background: #0e4549;
}

.btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.primary {
  padding: 12px 18px;
  font-size: 15px;
}

main {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 28px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 220px;
  gap: 32px;
  align-items: center;
}

.entries {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.hero-copy > p:not(.note) {
  max-width: 38em;
  color: var(--muted);
}

.code {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  text-align: center;
}

.code-box {
  width: 96px;
  height: 96px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.code figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.downloads {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.downloads > p {
  font-size: 14px;
  font-weight: 600;
}

.store {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
}

ul {
  margin: 0;
  padding-left: 18px;
}

ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

ol li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
}

ol li span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--brand-ink);
  display: grid;
  place-items: center;
  font-size: 13px;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 22px 0 32px;
}

address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 14px;
}

address a {
  text-decoration: none;
}

address a:hover {
  color: var(--brand);
}

@media (max-width: 800px) {
  .top,
  main,
  footer {
    width: min(1040px, calc(100% - 32px));
  }

  .hero,
  .cols,
  ol {
    grid-template-columns: 1fr;
  }

  .code {
    min-height: 0;
  }

  .entries {
    width: 100%;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
