:root {
  --paper: #f4f1eb;
  --paper-strong: #ebe5dc;
  --ink: #17201d;
  --muted: #5e6762;
  --line: rgba(23, 32, 29, 0.14);
  --line-strong: rgba(23, 32, 29, 0.28);
  --accent: #cf3f36;
  --accent-dark: #a82c27;
  --green: #265e52;
  --cream: #fffdf8;
  --shadow: 0 20px 60px rgba(31, 37, 33, 0.12);
  --radius: 18px;
  --shell: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(23, 32, 29, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 29, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

code {
  padding: 0.16em 0.42em;
  border: 1px solid rgba(23, 32, 29, 0.13);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--accent-dark);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.shell {
  width: min(calc(100% - 40px), var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  transform: translateY(-160%);
}

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

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 235, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 700;
}

.brand-copy {
  display: grid;
  line-height: 1.25;
}

.brand-copy strong {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
}

.header-nav {
  display: flex;
  gap: 26px;
  color: var(--muted);
  font-size: 14px;
}

.header-nav a,
.footer-links a {
  transition: color 180ms ease;
}

.header-nav a:hover,
.footer-links a:hover {
  color: var(--accent);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  font-size: 14px;
  font-weight: 700;
}

.header-cta svg {
  width: 16px;
  height: 16px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 92px;
}

.hero::before {
  position: absolute;
  top: 0;
  right: -160px;
  width: 480px;
  height: 480px;
  border: 1px solid rgba(207, 63, 54, 0.18);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.hero-grid {
  display: grid;
  align-items: center;
  gap: 70px;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.78fr);
}

.eyebrow,
.kicker {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border: 1px solid rgba(38, 94, 82, 0.22);
  border-radius: 999px;
  background: rgba(38, 94, 82, 0.06);
  letter-spacing: 0.04em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2e8b69;
  box-shadow: 0 0 0 4px rgba(46, 139, 105, 0.12);
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: clamp(40px, 5.2vw, 72px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.hero-lead {
  max-width: 680px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:focus-visible,
.filter-button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(207, 63, 54, 0.28);
  outline-offset: 3px;
}

.button-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 28px rgba(207, 63, 54, 0.22);
}

.button-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 16px 34px rgba(207, 63, 54, 0.28);
}

.button-secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.52);
}

.hero-facts {
  display: flex;
  gap: 0;
  margin: 42px 0 0;
  padding: 0;
  list-style: none;
}

.hero-facts li {
  display: grid;
  min-width: 112px;
  padding-right: 28px;
}

.hero-facts li + li {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.hero-facts strong {
  font-family: Georgia, serif;
  font-size: 28px;
  line-height: 1.1;
}

.hero-facts span {
  color: var(--muted);
  font-size: 13px;
}

.hero-preview {
  position: relative;
  min-height: 500px;
}

.preview-main {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
  transform: rotate(-2deg);
}

.preview-main img {
  width: 100%;
  height: auto;
}

.preview-side img {
  width: 100%;
  height: auto;
}

.preview-side {
  position: absolute;
  right: 0;
  bottom: 12px;
  width: 207px;
  overflow: hidden;
  border: 6px solid var(--paper);
  border-radius: 20px;
  background: white;
  box-shadow: 0 22px 44px rgba(31, 37, 33, 0.18);
  transform: rotate(4deg);
}

.preview-note {
  position: absolute;
  bottom: 0;
  left: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 14px 32px rgba(31, 37, 33, 0.11);
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.preview-note svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.download-band,
.email-band,
.usage-band,
.skills-band,
.faq-band {
  padding: 84px 0;
}

.download-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.72);
}

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

.section-heading h2,
.email-copy h2,
.faq-layout h2 {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.16;
}

.section-heading > p {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
}

.download-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.download-card {
  display: flex;
  min-height: 430px;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
  box-shadow: 0 14px 34px rgba(31, 37, 33, 0.07);
}

.download-card.featured {
  border-color: rgba(207, 63, 54, 0.42);
  box-shadow: 0 20px 44px rgba(207, 63, 54, 0.11);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.recommended,
.tag {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.recommended {
  background: var(--accent);
  color: white;
}

.tag {
  background: rgba(38, 94, 82, 0.09);
  color: var(--green);
}

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

.card-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  margin-top: 28px;
  border-radius: 14px;
  background: var(--paper-strong);
  color: var(--accent);
}

.card-icon svg {
  width: 25px;
  height: 25px;
}

.download-card h3 {
  margin: 20px 0 10px;
  font-size: 23px;
  line-height: 1.25;
}

.download-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.card-list {
  display: grid;
  gap: 8px;
  margin: 22px 0 28px;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  list-style: none;
}

.card-list li {
  position: relative;
  padding-left: 19px;
}

.card-list li::before {
  position: absolute;
  top: 0.74em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  content: "";
  transform: translateY(-50%);
}

.button-download {
  width: 100%;
  margin-top: auto;
  border-color: var(--line-strong);
  background: transparent;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.featured .button-download,
.button-download:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.unlock-status {
  min-height: 1.7em;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.unlock-status.success {
  color: var(--green);
  font-weight: 800;
}

.unlock-status.pending {
  color: #8b5b16;
}

.unlock-status.error {
  color: var(--accent-dark);
}

.email-band {
  background: var(--green);
  color: white;
}

.email-layout {
  display: grid;
  align-items: center;
  gap: 80px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
}

.email-band .kicker {
  color: #d4e6df;
}

.email-copy > p:not(.kicker) {
  max-width: 620px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.mail-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: #d4e6df;
  font-size: 14px;
}

.email-form {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
}

.form-row {
  display: grid;
  gap: 9px;
}

.form-row label,
.consent {
  font-size: 14px;
  font-weight: 700;
}

.form-row input {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
}

.consent input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 4px;
  accent-color: var(--accent);
}

.form-submit {
  width: 100%;
  margin-top: 18px;
}

.form-status {
  min-height: 1.5em;
  margin: 14px 0 0;
  color: #f4d5d0;
  font-size: 13px;
}

.form-status.success {
  color: #d9f3e4;
}

.form-submit:disabled {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.usage-band {
  background: rgba(235, 229, 220, 0.58);
}

.usage-steps {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.usage-steps article {
  padding: 30px;
  background: var(--cream);
}

.step-number {
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 800;
}

.usage-steps h3 {
  margin: 18px 0 9px;
  font-size: 20px;
}

.usage-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.command-demo {
  display: grid;
  align-items: center;
  gap: 28px;
  margin-top: 28px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
  grid-template-columns: 0.55fr auto 1.45fr;
}

.command-demo > div {
  display: grid;
  gap: 5px;
}

.command-demo p,
.command-demo span {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.command-demo > svg {
  color: var(--accent);
}

.command-demo code {
  width: fit-content;
  font-size: 16px;
  font-weight: 800;
}

.skills-band {
  border-top: 1px solid var(--line);
}

.section-heading.compact {
  margin-bottom: 28px;
}

.skill-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.filter-button {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--muted);
  cursor: pointer;
}

.filter-button.active,
.filter-button:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.skill-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.skill-item {
  min-height: 108px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.74);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.skill-item:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--cream);
}

.skill-item code {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
}

.skill-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.skill-empty {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

.faq-band {
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.55);
}

.faq-layout {
  display: grid;
  gap: 80px;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
}

.faq-layout > div:first-child p:last-child {
  color: var(--muted);
}

.faq-list {
  border-top: 1px solid var(--line-strong);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  color: var(--accent);
  content: "+";
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list p {
  max-width: 700px;
  margin: -4px 0 22px;
  color: var(--muted);
}

.site-footer {
  padding: 44px 0;
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: white;
}

.footer-grid {
  display: grid;
  align-items: start;
  gap: 28px;
  grid-template-columns: 1fr auto;
}

.footer-grid strong {
  font-size: 16px;
}

.footer-grid p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.footer-note {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

body.modal-open {
  overflow: hidden;
}

.pay-modal[hidden] {
  display: none;
}

.pay-modal {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
}

.pay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 17, 15, 0.68);
  backdrop-filter: blur(5px);
}

.pay-dialog {
  position: relative;
  width: min(100%, 520px);
  max-height: min(90vh, 760px);
  overflow: auto;
  padding: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--cream);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.3);
}

.pay-dialog h2 {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 30px;
  line-height: 1.2;
}

.pay-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  cursor: pointer;
}

.pay-intro {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.pay-qr {
  display: grid;
  width: 260px;
  min-height: 260px;
  place-items: center;
  margin: 24px auto 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--muted);
  text-align: center;
}

.pay-qr img {
  width: 100%;
  max-width: 240px;
}

.pay-state {
  min-height: 1.6em;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.pay-state.pending {
  color: #8b5b16;
}

.pay-state.success {
  color: var(--green);
  font-weight: 800;
}

.pay-state.error {
  color: var(--accent-dark);
}

.pay-actions,
.pay-download-grid {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.pay-actions .button,
.pay-download-grid .button {
  width: 100%;
}

.pay-downloads {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.pay-downloads > p {
  margin: 0;
  font-weight: 800;
}

.pay-email-tip {
  margin-top: 14px !important;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400 !important;
}

@media (max-width: 980px) {
  .hero-grid,
  .email-layout,
  .faq-layout {
    gap: 46px;
    grid-template-columns: 1fr;
  }

  .hero-preview {
    min-height: auto;
    max-width: 680px;
  }

  .preview-main {
    width: 82%;
  }

  .preview-side {
    width: 30%;
  }

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

@media (max-width: 720px) {
  .shell {
    width: min(calc(100% - 28px), var(--shell));
  }

  .header-inner {
    min-height: 64px;
    gap: 12px;
  }

  .brand-copy small,
  .header-nav {
    display: none;
  }

  .header-cta {
    padding: 8px 11px;
  }

  .hero {
    padding: 56px 0 66px;
  }

  .hero h1 {
    font-size: clamp(36px, 11vw, 54px);
  }

  .hero-lead {
    font-size: 16px;
  }

  .hero-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .hero-facts {
    margin-top: 32px;
  }

  .hero-facts li {
    min-width: 0;
    flex: 1;
    padding-right: 15px;
  }

  .hero-facts li + li {
    padding-left: 15px;
  }

  .hero-facts strong {
    font-size: 23px;
  }

  .hero-preview {
    min-height: 280px;
  }

  .preview-main {
    width: 90%;
  }

  .preview-side {
    width: 32%;
    border-width: 4px;
  }

  .preview-note {
    left: 0;
    padding: 10px 12px;
    font-size: 11px;
  }

  .download-band,
  .email-band,
  .usage-band,
  .skills-band,
  .faq-band {
    padding: 62px 0;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
  }

  .download-grid,
  .usage-steps,
  .skill-grid {
    grid-template-columns: 1fr;
  }

  .download-card:last-child {
    grid-column: auto;
  }

  .download-card {
    min-height: auto;
  }

  .email-form {
    padding: 22px;
  }

  .pay-modal {
    align-items: end;
    padding: 0;
  }

  .pay-dialog {
    width: 100%;
    max-height: 92vh;
    padding: 28px 20px;
    border-radius: 18px 18px 0 0;
  }

  .pay-qr {
    width: min(100%, 250px);
    min-height: 250px;
  }

  .command-demo {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .command-demo > svg {
    transform: rotate(90deg);
  }

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

  .footer-links {
    gap: 12px 18px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
