@charset "utf-8";

/* ==========================================================================
   QtScrcpy 中文站 — 全站样式
   配色依据：项目官方图标（Android 绿 #A4C639 + 深灰圆底）
   主色 #4F7A18 / 深色 #3E6112 / CTA #A4C639（配深色文字）
   --------------------------------------------------------------------------
   1.  Design tokens
   2.  Reset & base
   3.  Layout primitives
   4.  Header / navigation
   5.  Buttons & pills
   6.  Hero
   7.  Sections & cards
   8.  Tables & lists
   9.  Steps / timeline
   10. Callout (note / warning / source)
   11. Download & modal / QR slots
   12. Footer
   13. Utilities
   14. Responsive
   ========================================================================== */

/* 1. Design tokens
   ========================================================================== */
:root {
  /* Brand — 取自 QtScrcpy 客户端主题与图标主色 */
  --brand: #4F7A18;
  --brand-hover: #629126;
  --brand-strong: #3E6112;
  --brand-soft: #F3F8E5;
  --brand-line: #D8E5B2;
  --brand-glow: #C6DE6E;

  /* CTA：与官方图标同色的亮绿，配深色文字保证对比度 */
  --cta: #a4c639;
  --cta-hover: #b6d64e;
  --cta-active: #8fb22e;
  --cta-ink: #131a08;

  /* Ink & surface */
  --ink: #111713;
  --ink-2: #2F3B33;
  --muted: #5C6E62;
  --muted-2: #64756A;
  --bg: #ffffff;
  --bg-alt: #F6F9F2;
  --bg-sunken: #EEF3E7;
  --line: #E3E9DC;
  --line-strong: #D0D9C6;

  /* Dark surface (footer) */
  --deep: #151814;
  --deep-2: #1D211B;
  --deep-line: #2C3128;
  --deep-text: #D3DACD;
  --deep-muted: #99A292;

  /* Status */
  --ok: #107c41;
  --ok-soft: #e6f4ec;
  --warn: #9a5b00;
  --warn-soft: #fdf3e2;
  --warn-line: #f0d9ae;

  /* Metrics */
  --maxw: 1160px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(14, 27, 38, 0.05);
  --shadow: 0 12px 32px -18px rgba(14, 27, 38, 0.35);
  --ring: 0 0 0 3px rgba(79, 122, 24, 0.35);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC",
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono",
    Menlo, monospace;
}

/* 2. Reset & base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  color: var(--ink);
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  letter-spacing: -0.022em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.42rem, 2.6vw, 2rem);
  letter-spacing: -0.016em;
}

h3 {
  font-size: 1.14rem;
}

h4 {
  font-size: 1rem;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--brand-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

img,
svg {
  max-width: 100%;
}

img {
  height: auto;
  border: 0;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

li {
  margin-bottom: 0.4em;
}

li:last-child {
  margin-bottom: 0;
}

strong {
  color: var(--ink);
  font-weight: 600;
}

code,
kbd,
samp {
  font-family: var(--mono);
  font-size: 0.88em;
}

code {
  padding: 0.12em 0.4em;
  border-radius: 5px;
  background: var(--bg-sunken);
  color: var(--brand-strong);
  border: 1px solid var(--line);
}

kbd {
  display: inline-block;
  padding: 0.1em 0.45em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font-size: 0.82em;
  white-space: nowrap;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

::selection {
  background: rgba(164, 198, 57, 0.35);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 3. Layout primitives
   ========================================================================== */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 10px 0;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
  color: #fff;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* 4. Header / navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  flex: 0 0 auto;
}

.brand:hover {
  color: var(--ink);
}

.brand__mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: block;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.16;
}

.brand__name {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand__sub {
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--muted-2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-nav {
  margin-left: auto;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__list li {
  margin: 0;
}

.site-nav__link {
  position: relative;
  display: block;
  padding: 8px 13px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.site-nav__link:hover {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.site-nav__link[aria-current="page"] {
  color: var(--brand-strong);
  font-weight: 600;
}

.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
  position: relative;
}

.nav-toggle__bars::before {
  position: absolute;
  top: -6px;
  left: 0;
}

.nav-toggle__bars::after {
  position: absolute;
  top: 6px;
  left: 0;
}

/* Mobile drawer */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 10px 0 18px;
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav__list li {
  margin: 0;
}

.mobile-nav__link {
  display: block;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.mobile-nav__link[aria-current="page"] {
  color: var(--brand-strong);
  font-weight: 600;
}

.mobile-nav__cta {
  margin-top: 16px;
}

.mobile-nav__cta .btn {
  width: 100%;
  justify-content: center;
}

/* 5. Buttons & pills
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease,
    color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.btn--primary {
  background: var(--cta);
  color: var(--cta-ink);
  box-shadow: 0 8px 18px -12px rgba(79, 122, 24, 0.9);
}

.btn--primary:hover {
  background: var(--cta-hover);
  color: var(--cta-ink);
}

.btn--primary:active {
  background: var(--cta-active);
  color: var(--cta-ink);
}

.btn--ghost {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--brand);
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.btn--quiet {
  background: transparent;
  border-color: transparent;
  color: var(--brand-strong);
  padding-inline: 10px;
}

.btn--quiet:hover {
  background: var(--brand-soft);
}

.btn--sm {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.92rem;
  border-radius: 9px;
}

.btn--block {
  width: 100%;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.pill--muted {
  background: var(--bg-alt);
  border-color: var(--line);
  color: var(--muted);
  font-weight: 500;
}

.pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  flex: 0 0 auto;
}

/* 6. Hero
   ========================================================================== */
.hero {
  position: relative;
  padding: 66px 0 58px;
  background:
    radial-gradient(900px 420px at 78% -8%, rgba(79, 122, 24, 0.10), transparent 62%),
    linear-gradient(180deg, var(--bg-alt) 0%, #ffffff 82%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: center;
}

.hero__eyebrow {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero h1 {
  margin-bottom: 20px;
}

.hero h1 .accent {
  color: var(--brand);
}

.hero__lead {
  max-width: 56ch;
  font-size: clamp(1rem, 1.35vw, 1.1rem);
  color: var(--muted);
  line-height: 1.82;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 24px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.86rem;
  color: var(--muted);
}

.hero__meta li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 4px 12px 4px 10px;
  border-left: 2px solid var(--brand-line);
  background: transparent;
}

.hero__meta svg {
  width: 15px;
  height: 15px;
  color: var(--brand);
  flex: 0 0 auto;
}

/* 主视觉：官方界面截图 */
.hero__media {
  margin: 0;
  width: 100%;
  max-width: 620px;
  justify-self: end;
}

.hero__shot {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--bg-sunken);
  box-shadow: 0 34px 64px -34px rgba(14, 27, 38, 0.42),
    0 2px 8px rgba(14, 27, 38, 0.06);
}

.hero__shot img {
  display: block;
  width: 100%;
  height: auto;
}

.hero__caption {
  margin-top: 12px;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--muted-2);
  text-align: right;
}

.hero__caption a {
  color: var(--muted);
}

/* 截图加载失败时的兜底，避免出现破图 */
.hero__media-fallback {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 240px;
  padding: 28px;
  border: 1px dashed var(--brand-line);
  border-radius: 14px;
  background: var(--bg-alt);
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
}

.hero__media-fallback p {
  margin: 0;
}

.hero__media.is-media-failed .hero__shot,
.hero__media.is-media-failed .hero__caption {
  display: none;
}

.hero__media.is-media-failed .hero__media-fallback {
  display: flex;
}

/* 7. Sections & cards
   ========================================================================== */
.section {
  padding: 76px 0;
}

.section--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.section--tight {
  padding: 56px 0;
}

.section__head {
  max-width: 720px;
  margin-bottom: 40px;
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.section__kicker {
  display: block;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}

.section__lead {
  font-size: 1.02rem;
  color: var(--muted);
  line-height: 1.8;
}

.grid {
  display: grid;
  gap: 20px;
}

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

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

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

/* 防止长内容（超长文件名、长链接、图片）把栅格撑破导致横向溢出 */
.grid > *,
.hero__grid > *,
.platform-list > *,
.split > *,
.stats > *,
.steps > *,
.footer__grid > * {
  min-width: 0;
}

.card {
  position: relative;
  padding: 26px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease,
    transform 0.18s ease;
}

.card:hover {
  border-color: var(--brand-line);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.card p {
  font-size: 0.94rem;
  color: var(--muted);
  line-height: 1.78;
}

.card--flat:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid var(--brand-line);
}

.card__icon svg {
  width: 22px;
  height: 22px;
}

.card__index {
  display: inline-block;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.08em;
}

/* Stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.stats li {
  margin: 0;
  padding: 22px 20px;
  background: #fff;
  text-align: center;
}

.stats__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.stats__label {
  display: block;
  margin-top: 3px;
  font-size: 0.8rem;
  color: var(--muted);
}

.stats__note {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--muted-2);
  text-align: center;
}

/* Platform cards */
.platform-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.platform {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.platform__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.platform__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--bg-sunken);
  color: var(--ink-2);
  flex: 0 0 auto;
}

.platform__icon svg {
  width: 20px;
  height: 20px;
}

.platform h3 {
  margin: 0;
  font-size: 1rem;
}

.platform__req {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.platform__files {
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  color: var(--muted);
}

.platform__files li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 10px;
  margin: 0;
  padding: 7px 0;
  border-top: 1px dashed var(--line);
}

.platform__files code {
  font-size: 0.76rem;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.platform__size {
  color: var(--muted-2);
  white-space: nowrap;
  margin-left: auto;
}

.platform .btn {
  margin-top: auto;
}

/* Download banner */
.dl-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 34px 36px;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(700px 300px at 92% 0%, rgba(79, 122, 24, 0.09), transparent 68%),
    #fff;
  box-shadow: var(--shadow-sm);
}

.dl-banner h2 {
  margin-bottom: 8px;
  font-size: clamp(1.3rem, 2.2vw, 1.62rem);
}

.dl-banner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 62ch;
}

.dl-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* 8. Tables & lists
   ========================================================================== */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 560px;
}

caption {
  caption-side: top;
  padding: 14px 18px 0;
  text-align: left;
  font-size: 0.84rem;
  color: var(--muted);
}

th,
td {
  padding: 12px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

thead th {
  background: var(--bg-alt);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.86rem;
  white-space: nowrap;
  border-bottom-color: var(--line-strong);
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:nth-child(even) {
  background: #fbfdff;
}

td code {
  font-size: 0.84rem;
  white-space: nowrap;
}

.table-note {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted-2);
}

/* Check lists */
.list-check {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-check li {
  position: relative;
  margin: 0 0 11px;
  padding-left: 30px;
  color: var(--ink-2);
  font-size: 0.95rem;
}

.list-check li:last-child {
  margin-bottom: 0;
}

.list-check svg {
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 18px;
  height: 18px;
  color: var(--ok);
}

.list-clear {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-clear li {
  margin: 0 0 10px;
  padding-left: 18px;
  position: relative;
}

.list-clear li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.66em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
}

/* 9. Steps / timeline
   ========================================================================== */
.steps {
  counter-reset: step;
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.step {
  position: relative;
  margin: 0;
  padding: 24px 24px 24px 74px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 22px;
  top: 24px;
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.02em;
}

.step h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.step p {
  font-size: 0.92rem;
  color: var(--muted);
}

/* 10. Callout
   ========================================================================== */
.callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}

.callout__icon {
  color: var(--brand);
  padding-top: 2px;
}

.callout__icon svg {
  width: 20px;
  height: 20px;
}

.callout h3,
.callout h4 {
  margin-bottom: 6px;
  font-size: 0.98rem;
}

.callout p,
.callout li {
  font-size: 0.92rem;
  color: var(--muted);
}

.callout p:last-child,
.callout ul:last-child {
  margin-bottom: 0;
}

.callout--warn {
  border-left-color: var(--warn);
  background: var(--warn-soft);
  border-color: var(--warn-line);
}

.callout--warn .callout__icon {
  color: var(--warn);
}

.callout--warn p,
.callout--warn li {
  color: #6d4a12;
}

.callout--warn strong {
  color: #563a0b;
}

.callout--ok {
  border-left-color: var(--ok);
  background: var(--ok-soft);
  border-color: #c9e6d5;
}

.callout--ok .callout__icon {
  color: var(--ok);
}

/* 11. Download & modal / QR slots
   ========================================================================== */
.version-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding: 18px 22px;
  margin-bottom: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--muted);
}

.version-bar strong {
  color: var(--ink);
}

.version-bar__sep {
  width: 1px;
  height: 16px;
  background: var(--line-strong);
}

.hash {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.hash code {
  display: block;
  padding: 9px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink-2);
  font-size: 0.76rem;
  line-height: 1.6;
  word-break: break-all;
}

.copy-btn {
  align-self: start;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.copy-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

.copy-btn.is-done {
  border-color: var(--ok);
  color: var(--ok);
}

.checksum-card {
  padding: 22px 24px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.checksum-card h3 {
  font-size: 1rem;
}

.checksum-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checksum-list li {
  margin: 0;
}

.checksum-list__name {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  word-break: break-all;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 22, 14, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fade-in 0.18s ease both;
}

.modal__dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  padding: 32px 32px 26px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 70px -25px rgba(18, 22, 14, 0.55);
  animation: dialog-in 0.22s cubic-bezier(0.22, 0.8, 0.34, 1) both;
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease,
    background-color 0.15s ease;
}

.modal__close:hover {
  color: var(--brand);
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.modal__close svg {
  width: 18px;
  height: 18px;
}

.modal__title {
  margin: 0 32px 8px 0;
  font-size: 1.32rem;
}

.modal__desc {
  margin-bottom: 22px;
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.75;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.qr-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
  text-align: center;
}

/* 二维码：直接替换 assets/img/qr-quark.png 与 qr-baidu.png 即可更新 */
.qr-slot__box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 176px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.qr-slot__box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-slot figcaption {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
}

.modal__note {
  margin: 0 0 6px;
  font-size: 0.8rem;
  color: var(--muted-2);
  line-height: 1.7;
}

.modal__alt {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--muted);
}

body.is-locked {
  overflow: hidden;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 12. Footer
   ========================================================================== */
.site-footer {
  padding: 56px 0 0;
  background: var(--deep);
  color: var(--deep-text);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--deep-text);
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) repeat(4, minmax(0, 1fr));
  gap: 28px;
  padding-bottom: 40px;
}

.footer__brand .brand {
  color: #fff;
  margin-bottom: 14px;
}

/* 官方图标为深灰圆底，深色页脚上补一圈细描边以拉开对比 */
.footer__brand .brand__mark {
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.footer__brand .brand__sub {
  color: var(--deep-muted);
}

.footer__brand p {
  max-width: 38ch;
  color: var(--deep-muted);
  font-size: 0.87rem;
  line-height: 1.8;
}

.footer__col h2,
.footer__col h3 {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #fff;
}

.footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__list li {
  margin: 0 0 9px;
}

.footer__list a {
  font-size: 0.88rem;
  color: var(--deep-muted);
}

.footer__list a:hover {
  color: #fff;
}

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 0.8rem;
  color: var(--deep-muted);
}

.footer__bottom {
  padding: 20px 0 26px;
  border-top: 1px solid var(--deep-line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--deep-muted);
  line-height: 1.75;
}

.footer__bottom p {
  margin: 0;
  max-width: 78ch;
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  white-space: nowrap;
}

/* 13. Utilities
   ========================================================================== */
.mt-0 {
  margin-top: 0;
}
.mt-1 {
  margin-top: 8px;
}
.mt-2 {
  margin-top: 16px;
}
.mt-3 {
  margin-top: 26px;
}
.mt-4 {
  margin-top: 38px;
}
.mb-0 {
  margin-bottom: 0;
}
.mb-2 {
  margin-bottom: 16px;
}
.mb-3 {
  margin-bottom: 26px;
}
.mb-4 {
  margin-bottom: 38px;
}
.text-center {
  text-align: center;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.84rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.split--wide-left {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
}

.anchor-offset {
  scroll-margin-top: 90px;
}

/* Breadcrumb */
.breadcrumb {
  padding: 16px 0 0;
  font-size: 0.82rem;
  color: var(--muted-2);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--line-strong);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

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

/* Page header (inner pages) */
.page-head {
  padding: 28px 0 46px;
  background:
    radial-gradient(760px 320px at 82% -30%, rgba(79, 122, 24, 0.09), transparent 65%),
    linear-gradient(180deg, var(--bg-alt), #fff);
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  max-width: 22ch;
  margin-bottom: 16px;
}

.page-head__lead {
  max-width: 62ch;
  font-size: 1.02rem;
  color: var(--muted);
  line-height: 1.82;
}

.page-head__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

/* Prose article */
.prose {
  max-width: none;
}

.prose .code-block,
.prose .note-line {
  max-width: 78ch;
}

.prose h2 {
  margin-top: 2.1em;
  padding-top: 0.2em;
}

.prose h2:first-child,
.prose h3:first-child,
.prose > :first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 1.7em;
}

.prose ul,
.prose ol {
  color: var(--ink-2);
}

/* FAQ accordion */
.faq {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.faq__item {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.faq__item[open] {
  border-color: var(--brand-line);
  box-shadow: var(--shadow-sm);
}

.faq__q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq__q::-webkit-details-marker {
  display: none;
}

.faq__q:hover {
  color: var(--brand-strong);
}

.faq__q::after {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-right: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.faq__item[open] .faq__q::after {
  transform: rotate(-135deg);
  margin-top: 11px;
}

.faq__a {
  padding: 0 22px 20px;
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.8;
}

.faq__a p:last-child {
  margin-bottom: 0;
}

.faq__a code {
  font-size: 0.85em;
}

/* Source / reference list */
.sources {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.sources li {
  margin: 0;
  padding-left: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

.sources .src-title {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.sources .src-url {
  font-family: var(--mono);
  font-size: 0.78rem;
  word-break: break-all;
  color: var(--muted-2);
}

/* 14. Responsive
   ========================================================================== */
@media (max-width: 1020px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .hero__media {
    max-width: 640px;
    margin-inline: auto;
    justify-self: center;
  }

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

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

  .platform-list {
    grid-template-columns: 1fr;
  }

  .split,
  .split--wide-left {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .steps--inline {
    grid-template-columns: 1fr;
  }

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

  .dl-banner {
    grid-template-columns: 1fr;
    padding: 28px;
  }
}

@media (max-width: 860px) {
  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  /* 主导航隐藏后，操作区需要自己靠右 */
  .header-actions {
    margin-left: auto;
  }

  .header-actions .btn--primary {
    display: none;
  }

  .site-header__inner {
    gap: 12px;
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 76px;
  }

  body {
    font-size: 15.5px;
  }

  .hero {
    padding: 44px 0 44px;
  }

  .hero__caption {
    margin-top: 10px;
    text-align: left;
  }

  .section {
    padding: 54px 0;
  }

  .section--tight {
    padding: 42px 0;
  }

  .section__head {
    margin-bottom: 28px;
  }

  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }

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

  .page-head {
    padding: 20px 0 34px;
  }

  .page-head h1 {
    max-width: none;
  }

  .hero__cta .btn {
    flex: 1 1 100%;
  }

  .qr-grid {
    gap: 12px;
  }

  .modal {
    padding: 12px;
    align-items: flex-end;
  }

  .modal__dialog {
    padding: 26px 20px 22px;
    max-height: calc(100vh - 24px);
    border-radius: 16px;
  }

  .qr-slot {
    padding: 10px 8px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

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

  .stats li {
    padding: 18px 14px;
  }

  .stats__value {
    font-size: 1.3rem;
  }
}

@media (max-width: 420px) {
  .wrap {
    padding-inline: 16px;
  }

  .brand__sub {
    display: none;
  }

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

  .qr-slot__box {
    max-width: 148px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Long-form guide components
   ========================================================================== */
.toc {
  margin: 0 0 34px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.toc__title {
  margin: 0 0 12px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.toc ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 28px;
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.92rem;
}

.toc li {
  margin: 0;
  color: var(--muted);
}

.toc a {
  color: var(--ink-2);
  text-decoration: none;
}

.toc a:hover {
  color: var(--brand-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.code-block {
  margin: 0 0 18px;
  padding: 18px 20px;
  overflow-x: auto;
  background: #f7faf3;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand-line);
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--ink-2);
  -webkit-overflow-scrolling: touch;
}

.code-block code {
  display: block;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  font-size: 1em;
  white-space: pre;
}

.prose p,
.prose ul,
.prose ol:not(.steps) {
  max-width: 68ch;
}

.prose .steps {
  max-width: none;
}

.prose h3 {
  margin-top: 30px;
}

.note-line {
  margin: 0 0 18px;
  padding: 12px 16px;
  background: var(--brand-soft);
  border-left: 3px solid var(--brand);
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.note-line strong {
  color: var(--brand-strong);
}

@media (max-width: 720px) {
  .toc ol {
    grid-template-columns: 1fr;
  }
}

/* Print */
@media print {
  .site-header,
  .site-footer,
  .modal,
  .hero__media,
  .btn {
    display: none !important;
  }

  body {
    color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
