/* =========================================================
   Apple-style Inquiry Form — scoped under .apf-root
   不与站点其它模块冲突：无全局元素选择器，全部命名空间化
   ========================================================= */
.apf-root {
  /* 变量：改这里即可换主题 */
  --apf-text: #1d1d1f;
  --apf-text-2: #6e6e73;
  --apf-bg: #f5f5f7;
  --apf-surface: #ffffff;
  --apf-border: #d2d2d7;
  --apf-blue: #0071e3;
  --apf-blue-hover: #0077ed;
  --apf-red: #d92c20;
  --apf-radius: 12px;
  --apf-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
              "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;

  all: initial;                 /* 切断外部继承，彻底隔离 */
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--apf-font);
  color: var(--apf-text);
  font-size: 17px;
  line-height: 1.47059;
  -webkit-font-smoothing: antialiased;
  text-align: left;
}
.apf-root *, .apf-root *::before, .apf-root *::after { box-sizing: border-box; }

/* 零特异性重置：仅作用于本容器内元素，外部不受影响 */
.apf-root :where(input, select, textarea, button, a, label, p, h1, h2, h3, span, div, svg) {
  margin: 0; padding: 0; border: 0; background: none;
  font: inherit; color: inherit; letter-spacing: inherit; line-height: inherit;
  text-transform: none; box-shadow: none; outline: none;
}
.apf-root :where(p, h2, span, div, label) { display: block; }

/* ---------------- Hero ---------------- */
.apf-hero { padding: 8px 0 28px; }
.apf-hero-title {
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: var(--apf-text);
}
.apf-hero-sub {
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--apf-text-2);
  max-width: 62ch;
}
.apf-download {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 20px; padding: 10px 18px 10px 14px;
  border-radius: 980px;
  background: var(--apf-bg);
  color: var(--apf-blue);
  font-size: 15px; font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.apf-download:hover { background: #e8e8ed; color: var(--apf-blue-hover); }
.apf-download-ico { display: inline-flex; }
.apf-hero-note { margin-top: 14px; font-size: 13px; line-height: 1.6; color: var(--apf-text-2); }

/* ---------------- Card ---------------- */
.apf-card {
  background: var(--apf-surface);
  border: 1px solid #ebebed;
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.apf-form { display: block; }
.apf-honeypot { position: absolute !important; left: -9999px !important; height: 0 !important; overflow: hidden !important; }

/* ---------------- Grid & Field ---------------- */
.apf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 20px; }
.apf-field { min-width: 0; margin-bottom: 20px; }
.apf-field-block { margin-bottom: 24px; }
.apf-grid .apf-field { margin-bottom: 0; }

.apf-label { font-size: 14px; font-weight: 500; color: var(--apf-text); margin-bottom: 8px; }
.apf-req { color: var(--apf-red); margin-left: 2px; }

/* ---------------- Inputs ---------------- */
.apf-root .apf-input {
  display: block; width: 100%;
  padding: 13px 16px;
  font-size: 17px; line-height: 1.4;
  color: var(--apf-text);
  background: #fff;
  border: 1px solid var(--apf-border);
  border-radius: var(--apf-radius);
  transition: border-color .18s ease, box-shadow .18s ease;
  appearance: none; -webkit-appearance: none;
}
.apf-root .apf-input::placeholder { color: #a1a1a6; }
.apf-root .apf-input:hover { border-color: #a1a1a6; }
.apf-root .apf-input:focus {
  border-color: var(--apf-blue);
  box-shadow: 0 0 0 4px rgba(0,113,227,.15);
}
.apf-root .apf-textarea { resize: vertical; min-height: 120px; }

/* Select */
.apf-root .apf-select {
  padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236e6e73' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 11px;
}

/* Error state */
.apf-root .apf-field.is-error .apf-input { border-color: var(--apf-red); }
.apf-root .apf-field.is-error .apf-input:focus { box-shadow: 0 0 0 4px rgba(217,44,32,.15); }
.apf-err { display: none; margin-top: 7px; font-size: 13px; color: var(--apf-red); }

/* ---------------- Checkbox ---------------- */
.apf-checks { display: grid; gap: 10px; }
.apf-check {
  display: flex !important; align-items: center; gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--apf-border);
  border-radius: var(--apf-radius);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.apf-check:hover { border-color: #a1a1a6; }
.apf-root .apf-check input {
  position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none;
}
.apf-root .apf-check-box {
  flex: 0 0 auto; width: 20px; height: 20px;
  border: 1px solid #a1a1a6; border-radius: 6px;
  background: #fff; transition: background .15s ease, border-color .15s ease;
}
.apf-root .apf-check input:checked + .apf-check-box {
  background: var(--apf-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round' d='M4.5 10.4l3.6 3.6L15.6 6.5'/%3E%3C/svg%3E") center/16px no-repeat;
  border-color: var(--apf-blue);
}
.apf-root .apf-check:has(input:checked) { border-color: var(--apf-blue); background: #f0f7ff; }
.apf-check-text { font-size: 15px; color: var(--apf-text); }

/* ---------------- Upload ---------------- */
.apf-root .apf-drop {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px;
  border: 1px dashed var(--apf-border);
  border-radius: var(--apf-radius);
  background: #fbfbfd;
  color: var(--apf-text-2);
  font-size: 15px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.apf-root .apf-drop:hover, .apf-root .apf-drop.is-over { border-color: var(--apf-blue); background: #f0f7ff; }
.apf-drop-ico { display: inline-flex; color: var(--apf-blue); }
.apf-drop-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apf-root .apf-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.apf-help { margin-top: 8px; font-size: 12px; line-height: 1.5; color: var(--apf-text-2); }
.apf-root .apf-field.is-error .apf-drop { border-color: var(--apf-red); background: #fff5f4; }

/* ---------------- Submit ---------------- */
.apf-root .apf-submit {
  display: block; width: 100%;
  margin-top: 4px; padding: 15px 24px;
  border-radius: 980px;
  background: var(--apf-blue);
  color: #fff;
  font-size: 17px; font-weight: 500; text-align: center;
  cursor: pointer;
  transition: background .2s ease, transform .12s ease;
}
.apf-root .apf-submit:hover { background: var(--apf-blue-hover); }
.apf-root .apf-submit:active { transform: scale(.985); }

/* ---------------- Trust ---------------- */
.apf-trust {
  margin-top: 22px; padding: 18px 20px;
  background: var(--apf-bg);
  border-radius: var(--apf-radius);
}
.apf-trust-title {
  display: flex !important; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 600; color: var(--apf-text);
}
.apf-lock { display: inline-flex; color: #34a853; }
.apf-trust-text { margin-top: 8px !important; font-size: 13px; line-height: 1.65; color: var(--apf-text-2); }

/* ---------------- Responsive ---------------- */
@media (max-width: 768px) {
  .apf-card { padding: 24px 18px; border-radius: 14px; }
  .apf-grid { grid-template-columns: 1fr; gap: 18px; }
  .apf-hero { padding-bottom: 22px; }
  .apf-root .apf-submit { font-size: 16px; }
}

/* ---------------- Dark Mode (可选) ---------------- */
@media (prefers-color-scheme: dark) {
  .apf-root {
    --apf-text: #f5f5f7;
    --apf-text-2: #a1a1a6;
    --apf-bg: #1d1d1f;
    --apf-surface: #1d1d1f;
    --apf-border: #424245;
  }
  .apf-card { background: #1d1d1f; border-color: #2d2d2f; box-shadow: none; }
  .apf-root .apf-input { background: #232325; color: #f5f5f7; }
  .apf-root .apf-input::placeholder { color: #6e6e73; }
  .apf-root .apf-drop { background: #232325; }
  .apf-root .apf-drop:hover, .apf-root .apf-drop.is-over { background: #10243b; }
  .apf-download { background: #2d2d2f; color: #2997ff; }
  .apf-root .apf-check:has(input:checked) { background: #10243b; }
}