/* ================= TuxGuitar 中文官网 =================
   品牌色取自 logo：金黄 #DEB000 / 黑 #1A1A1A / 深红 #8E0000
   扁平现代专业风 · 浅色主题 · 无 emoji（图标均为内联 SVG）
   ===================================================== */

:root {
  --gold: #DEB000;
  --gold-dark: #B89000;
  --gold-soft: #FBF3D9;
  --ink: #1A1A1A;
  --ink-2: #2B2A27;
  --paper: #FFFFFF;
  --bg-soft: #F7F5F0;
  --line: #E6E2D8;
  --muted: #5C5A54;
  --red: #8E0000;
  --radius: 10px;
  --radius-sm: 6px;
  --container: 1120px;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: 16px;
}

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

a { color: var(--gold-dark); text-decoration: none; }
a:hover { color: var(--ink); text-decoration: underline; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand img { width: 34px; height: 34px; }
.brand .brand-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  display: block;
  line-height: 1.2;
  letter-spacing: .5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
  text-decoration: none;
  border-bottom-color: var(--gold);
}

.nav-cta {
  background: var(--gold);
  color: var(--ink) !important;
  padding: 9px 20px !important;
  border-radius: var(--radius-sm);
  border-bottom: none !important;
  font-weight: 600;
}
.nav-cta:hover { background: var(--gold-dark); color: #fff !important; }

.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.burger svg { display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 30px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
  font-family: inherit;
  line-height: 1.4;
}
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--gold-dark); color: #fff; text-decoration: none; }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; text-decoration: none; }

.btn-lg { padding: 16px 40px; font-size: 17px; }

/* ---------- Hero ---------- */
.hero {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: 72px 0 64px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: 40px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}
.hero h1 .accent { color: var(--gold-dark); }
.hero p.lead {
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 30px;
  max-width: 560px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13.5px;
  color: var(--muted);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta svg { flex: none; color: var(--gold-dark); }
.hero-figure {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.hero-figure img { border-radius: 6px; width: 100%; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 10px;
}
.section-head h2 {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
}
.section-head p { color: var(--muted); font-size: 16px; }

/* ---------- Cards / Grid ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.card p { color: var(--muted); font-size: 14.5px; }

.icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--gold);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.icon-box svg { width: 24px; height: 24px; }
.card:hover { border-color: var(--gold); }
.card { transition: border-color .15s; }

/* ---------- Trust strip ---------- */
.trust-strip {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-right: 1px solid var(--line);
  font-size: 14px;
}
.trust-item:last-child { border-right: none; }
.trust-item svg { flex: none; color: var(--gold-dark); }
.trust-item strong { display: block; color: var(--ink); font-size: 15px; }
.trust-item span { color: var(--muted); font-size: 13px; }

/* ---------- Stats ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat .stat-num {
  font-size: 34px;
  font-weight: 800;
  color: var(--gold-dark);
  line-height: 1.2;
}
.stat .stat-label { color: var(--muted); font-size: 14px; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 640px; }
.tbl th, .tbl td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th {
  background: var(--bg-soft);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: .3px;
  color: var(--ink-2);
  white-space: nowrap;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl .os { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.tbl .os svg { color: var(--gold-dark); flex: none; }

/* ---------- Badges / notes ---------- */
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-dark);
  letter-spacing: .5px;
}
.badge-stable { background: #E8F3E4; color: #2E6B24; }

.note {
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 14.5px;
  color: var(--ink-2);
  margin: 24px 0;
}
.note strong { color: var(--ink); }
.note.warn { border-left-color: var(--red); }
.note p + p { margin-top: 8px; }

/* ---------- Accordion ---------- */
.acc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.acc + .acc { margin-top: 12px; }
.acc summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 15.5px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--gold-dark);
  border-bottom: 2px solid var(--gold-dark);
  transform: rotate(45deg);
  transition: transform .15s;
  flex: none;
}
.acc[open] summary::after { transform: rotate(225deg); }
.acc summary:hover { background: var(--bg-soft); }
.acc .acc-body { padding: 0 22px 20px; color: var(--muted); font-size: 14.5px; }
.acc .acc-body p + p { margin-top: 8px; }
.acc .acc-body ul, .acc .acc-body ol { padding-left: 20px; margin: 8px 0; }
.acc .acc-body li { margin: 4px 0; }
.acc .acc-body code {
  background: var(--bg-soft);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 13.5px;
}

/* ---------- Steps (教程) ---------- */
.steps { counter-reset: step; display: grid; gap: 16px; }
.step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--paper);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  width: 44px;
  height: 44px;
  background: var(--gold);
  color: var(--ink);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
}
.step h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.step p, .step ul { color: var(--muted); font-size: 14.5px; }
.step ul { padding-left: 20px; margin-top: 6px; }
.step li { margin: 3px 0; }

/* ---------- Download modal ---------- */
.modal {
  position: fixed;
  inset: 0;
    left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
button { outline: none } 
.modal[hidden] { display: none; }
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.55);
}
.modal-dialog {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius);
  width: 100%;
  max-width: 640px;
  padding: 36px 36px 32px;
  box-shadow: 0 20px 60px rgba(26, 26, 26, 0.25);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--muted);
}
.modal-close:hover { background: var(--bg-soft); color: var(--ink); }
.modal-dialog h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; padding-right: 40px; }
.modal-dialog .modal-sub { color: var(--muted); font-size: 14px; margin-bottom: 26px; }

.qr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.qr-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}
.qr-slot {
  width: 190px;
  height: 190px;
  margin: 0 auto 14px;
  border: 2px dashed var(--gold-dark);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #B9B2A0;
}
.qr-slot svg { width: 56px; height: 56px; }
.qr-card .qr-title { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.qr-card .qr-hint { color: var(--muted); font-size: 13px; }
.modal-foot {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  padding: 18px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--gold-dark); }

/* ---------- Page hero (子页头部) ---------- */
.page-hero {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: 44px 0 52px;
}
.page-hero h1 { font-size: 32px; font-weight: 800; margin-bottom: 10px; }
.page-hero p { color: var(--muted); max-width: 720px; font-size: 16px; }

/* ---------- Feature list (功能页) ---------- */
.feat-block { display: grid; grid-template-columns: 280px 1fr; gap: 40px; padding: 36px 0; border-bottom: 1px solid var(--line); }
.feat-block:last-child { border-bottom: none; }
.feat-block h2 { font-size: 21px; font-weight: 800; display: flex; align-items: center; gap: 12px; }
.feat-block h2 .icon-box { margin: 0; width: 40px; height: 40px; flex: none; }
.feat-block h2 .icon-box svg { width: 20px; height: 20px; }
.feat-block .feat-body p { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.feat-block ul.check-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.feat-block ul.check-list li { display: flex; gap: 8px; font-size: 14.5px; color: var(--ink-2); }
.feat-block ul.check-list li svg { flex: none; margin-top: 5px; color: var(--gold-dark); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: #fff;
  padding: 64px 0;
  text-align: center;
}
.cta-band h2 { font-size: 28px; font-weight: 800; margin-bottom: 10px; }
.cta-band p { color: #C9C6BE; margin-bottom: 28px; font-size: 16px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 56px 0 28px;
  color: var(--muted);
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-grid h3 { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 14px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin: 8px 0; }
.footer-grid a { color: var(--muted); }
.footer-grid a:hover { color: var(--gold-dark); }
.footer-brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.footer-brand img { width: 30px; height: 30px; }
.footer-desc { max-width: 320px; font-size: 13.5px; line-height: 1.7; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

/* ---------- Sidebar toc (长文) ---------- */
.content-split { display: grid; grid-template-columns: 1fr 260px; gap: 48px; align-items: start; }
.toc {
  position: sticky;
  top: 88px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  font-size: 13.5px;
}
.toc h2 { font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.toc ul { list-style: none; }
.toc li { margin: 8px 0; }
.toc a { color: var(--ink-2); }
.toc a:hover { color: var(--gold-dark); }

.prose h2 { font-size: 24px; font-weight: 800; margin: 48px 0 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.prose h3 { font-size: 18px; font-weight: 700; margin: 28px 0 10px; }
.prose p { color: var(--ink-2); margin-bottom: 14px; }
.prose ul, .prose ol { padding-left: 22px; margin: 10px 0 16px; color: var(--ink-2); }
.prose li { margin: 5px 0; }
.prose code { background: var(--bg-soft); padding: 2px 7px; border-radius: 4px; font-size: 14px; }
.prose table { min-width: 480px; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--gold);
  color: var(--ink);
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
  box-shadow: 0 4px 14px rgba(26, 26, 26, 0.18);
}
.to-top.show { display: flex; }
.to-top:hover { background: var(--gold-dark); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { max-width: 520px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-item:nth-child(2) { border-right: none; }
  .trust-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .feat-block { grid-template-columns: 1fr; gap: 16px; }
  .content-split { grid-template-columns: 1fr; }
  .toc { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 30px; }
  .page-hero h1 { font-size: 26px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-item { border-right: none; border-bottom: 1px solid var(--line); }
  .trust-item:last-child { border-bottom: none; }
  .feat-block ul.check-list { grid-template-columns: 1fr; }
  .qr-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }

  .burger { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a { display: block; padding: 14px 0; border-bottom: none !important; }
  .nav-cta { text-align: center; margin: 10px 0; }
}

/* 尊重系统减少动态偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
