/* ═══════════════════════════════════════════════════════════════
   Apple Design System 03 — 扩展组件（历史样式表合并层）
   PART 38-73：由 shared.css / shared-pro.css / shared-liquid-glass.css / apple-polish.css 合并而来的补充组件、收复组件与触控目标强化
   ---------------------------------------------------------------
   来源：apple-design-system.css v4.0 按 PART 边界物理切分（P1-4.1）
   原文件行区间：第 1529–2656 行

   ⚠ 级联敏感：本仓库的样式由 4 个子文件按文件名序号**顺序加载**，
     加载顺序即优先级顺序，不可调换。若遗漏中间任一文件，后续
     文件里对被遗漏组件的覆盖规则将失去上下文，导致样式错乱。

   加载方式（根目录页面）：
     <link rel="stylesheet" href="css/ads-01-tokens.css">
     <link rel="stylesheet" href="css/ads-02-components.css">
     <link rel="stylesheet" href="css/ads-03-extended.css">
     <link rel="stylesheet" href="css/ads-04-pages.css">

   子目录页面请把 css/ 换成 ../css/。
   全文备份：.workbuddy/dead-css-backup/apple-design-system.full.css
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   PART 38: NUMBER INPUT STEPPER (Merged from shared.css)
   ═══════════════════════════════════════════════════════════════ */
.number-input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.number-input-group input {
  padding-right: 48px;
  text-align: right;
  font-size: 1.0625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.number-input-group .stepper {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 34px;
  height: calc(100% - 10px);
}
.number-input-group .stepper button {
  flex: 1;
  width: 100%;
  border: none;
  background: rgba(0,0,0,0.04);
  backdrop-filter: blur(8px);
  color: var(--color-text-secondary);
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: all 150ms ease;
  padding: 0;
}
.number-input-group .stepper button:hover {
  background: var(--color-primary-bg);
  color: var(--color-primary);
}
.number-input-group .stepper button:active {
  transform: scale(0.9);
  background: var(--color-primary);
  color: #fff;
}
@media (prefers-color-scheme: dark) {
  .number-input-group .stepper button {
    background: rgba(255,255,255,0.06);
  }
}

/* ═══════════════════════════════════════════════════════════════
   PART 39: INPUT WITH UNIT (Merged from shared.css)
   ═══════════════════════════════════════════════════════════════ */
.input-with-unit {
  position: relative;
  display: flex;
  align-items: center;
}
.input-with-unit input { padding-right: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.input-with-unit .unit {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-light);
  font-size: 0.875rem;
  font-weight: 500;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 2;
}
/* Stepper + unit combo */
.number-input-group:has(.stepper):has(.unit) input,
.input-with-unit:has(.stepper):has(.unit) input {
  padding-right: 110px !important;
}
.number-input-group:has(.stepper):not(:has(.unit)) input,
.input-with-unit:has(.stepper):not(:has(.unit)) input {
  padding-right: 50px !important;
}
.number-input-group:not(:has(.stepper)):has(.unit) input,
.input-with-unit:not(:has(.stepper)):has(.unit) input {
  padding-right: 68px !important;
}

/* ═══════════════════════════════════════════════════════════════
   PART 40: SEARCH INPUT (Merged from shared.css)
   ═══════════════════════════════════════════════════════════════ */
.search-input {
  position: relative;
}
.search-input i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-light);
  font-size: 15px;
  pointer-events: none;
}
.search-input input { padding-left: 44px; }

/* ═══════════════════════════════════════════════════════════════
   PART 41: DATE INPUT STYLING (Merged from shared.css)
   ═══════════════════════════════════════════════════════════════ */
input[type="date"], input[type="datetime-local"] {
  position: relative;
  cursor: pointer;
  min-height: 44px;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 8px;
  width: 28px; height: 28px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
  background: none;
  color: var(--color-primary);
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════
   PART 42: INPUT VALIDATION STATES (Merged from shared.css)
   ═══════════════════════════════════════════════════════════════ */
input.error, select.error, textarea.error {
  border-color: var(--color-danger) !important;
  background: rgba(255, 59, 48, 0.04) !important;
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.10) !important;
}
input.success, select.success, textarea.success {
  border-color: var(--color-success);
  background: var(--color-success-bg);
}
.validation-message.error {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-danger);
  font-size: 0.8125rem;
  margin-top: 6px;
  font-weight: 500;
}
.validation-message.error::before {
  content: '\f06a';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.75rem;
}

/* ═══════════════════════════════════════════════════════════════
   PART 43: FORM HELPERS (Merged from shared.css)
   ═══════════════════════════════════════════════════════════════ */
.form-hint, .hint-text, .field-hint {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-top: 4px;
  line-height: 1.45;
}
.form-error {
  font-size: 0.75rem;
  color: var(--color-danger);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   PART 44: EXTERNAL LINK INDICATOR (Merged from shared.css)
   ═══════════════════════════════════════════════════════════════ */
.nav-external::after {
  content: '\f08e';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.625rem;
  margin-left: auto;
  opacity: 0.35;
  transition: opacity var(--transition-fast);
}
.nav-external:hover::after { opacity: 0.7; }

/* ═══════════════════════════════════════════════════════════════
   PART 45: SKELETON VARIANTS (Merged from shared.css)
   ═══════════════════════════════════════════════════════════════ */
.skeleton-line { height: 12px; margin: 8px 0; }
.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }
.skeleton-block { height: 100px; margin: 12px 0; border-radius: var(--radius-md); }
.skeleton-circle { width: 48px; height: 48px; border-radius: 50%; }

/* ═══════════════════════════════════════════════════════════════
   PART 46: PAGE HEADER TITLE OVERFLOW (Merged from shared.css)
   ═══════════════════════════════════════════════════════════════ */
.page-header-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ═══════════════════════════════════════════════════════════════
   PART 47: CARD TOP HIGHLIGHT & ARROW (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent);
  pointer-events: none;
  z-index: 2;
}
@media (prefers-color-scheme: dark) {
  .card::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); }
}
.card.interactive {
  padding-right: 56px;
}
.card.interactive::after {
  display: flex;
  content: '\203A';
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 1.5rem;
  font-weight: 300;
  border-radius: 50%;
  background: rgba(0,0,0,0.03);
  transition: all 250ms var(--ease-standard);
  z-index: 2;
  pointer-events: none;
  line-height: 1;
}
.card.interactive:hover::after {
  color: #fff;
  background: var(--color-primary);
  transform: translateY(-50%) translateX(3px);
  box-shadow: 0 4px 12px rgba(0,122,255,0.3);
}
@media (prefers-color-scheme: dark) {
  .card.interactive::after { background: rgba(255,255,255,0.06); }
  .card.interactive:hover::after { background: var(--color-primary); color: #fff; }
}
.card.interactive:hover {
  transform: translateY(-4px) scale(1.005);
  border-color: rgba(255,255,255,0.85);
}

/* ═══════════════════════════════════════════════════════════════
   PART 48: TAB INDICATOR (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
.tabs-scroll {
  position: relative;
  padding: 4px;
  gap: 2px;
}
.tabs-scroll .tab {
  position: relative;
  z-index: 2;
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  transition:
    color 250ms var(--ease-standard),
    background-color 250ms var(--ease-standard),
    box-shadow 250ms var(--ease-standard);
  border: none;
  /* 按钮元素需显式透明底；不使用 !important，以便悬停/激活态可覆盖 */
  background: transparent;
  font-family: inherit;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.tabs-scroll .tab:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
/* ── 激活态 ───────────────────────────────────────────────
   默认沿用 PART 19 的实心药丸样式（background / color / box-shadow）。
   历史问题：早期版本在此处以 !important 强制 background:transparent、
   box-shadow:none，其设计依赖 .tab-indicator 滑动指示器元素；但全站页面
   均未实现该元素，导致激活态与悬停态被静默压制——标签切换后看不出选中。
   现改为：仅当容器确实存在 .tab-indicator 时才启用指示器模式。 */
.tabs-scroll:has(.tab-indicator) .tab.on {
  color: var(--color-text);
  background: transparent;
  box-shadow: none;
}
/* ── 滑动指示器 ────────────────────────────────────────────
   由 common.js initTabIndicators() 动态创建并维护 transform / width。
   历史问题：指示器原为纯白（--color-surface-solid），而 .tabs-scroll 容器
   底色为半透明白玻璃（rgba(255,255,255,.48)），白上白对比度约 1.05:1，
   肉眼几乎不可见 —— 用户感知为「切换标签看不出选中」。
   现改为品牌蓝实心药丸，视觉上与 PART 19 的激活态一致，并保留滑动动效。 */
.tabs-scroll .tab-indicator {
  position: absolute;
  left: 0;
  z-index: 1;
  top: 4px;
  bottom: 4px;
  border-radius: var(--radius-lg);
  background: var(--color-primary);
  box-shadow: var(--shadow-primary-sm), inset 0 1px 0 rgba(255, 255, 255, 0.20);
  transition:
    transform var(--transition-spring),
    width var(--transition-spring);
  pointer-events: none;
}
/* 指示器模式下，激活标签文字反白以保证对比度 */
.tabs-scroll:has(.tab-indicator) .tab.on {
  color: #fff;
  background: transparent;
  box-shadow: none;
}
@media (prefers-color-scheme: dark) {
  .tabs-scroll .tab-indicator {
    background: var(--color-primary);
    box-shadow: var(--shadow-primary-sm), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tabs-scroll .tab-indicator { transition-duration: 0.01ms; }
}

/* ═══════════════════════════════════════════════════════════════
   PART 49: HERO SECTION (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
.hero-section, .welcome-section {
  text-align: center;
  padding: 20px 0 32px;
}
.hero-title, .welcome-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}
.hero-subtitle, .welcome-subtitle {
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}
@media (max-width: 768px) {
  .hero-title, .welcome-title { font-size: 1.75rem; }
}
@media (max-width: 480px) {
  .hero-title, .welcome-title { font-size: 1.625rem; }
}

/* ═══════════════════════════════════════════════════════════════
   PART 50: SECTION TITLE (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
.section-title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--color-text);
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   PART 51: RESULT AMOUNT DISPLAY (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
.result-amount {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  background: linear-gradient(135deg, var(--color-primary) 0%, #5AC8FA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 16px 0;
}
.result-label {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  margin-bottom: 4px;
}
@media (max-width: 480px) {
  .result-amount { font-size: 2.25rem; }
}

/* ═══════════════════════════════════════════════════════════════
   PART 52: CONTAINER WIDTH (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
.main-container, .container {
  width: 100%;
  max-width: 900px;
}
body:has(.home-grid) .main-container,
body:has(.tools-grid) .main-container,
body.index-page .main-container {
  max-width: 1100px;
}

/* ═══════════════════════════════════════════════════════════════
   PART 53: CARD CONTENT LAYOUT (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
.card-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  color: var(--color-text);
}
.card-desc {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}
.card-content {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}
.card-text {
  flex: 1;
  min-width: 0;
}

/* ═══════════════════════════════════════════════════════════════
   PART 54: UPDATE BANNER (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
.update-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: 20px;
  box-shadow: var(--glass-shadow-sm), var(--glass-inner-shadow);
}
.update-banner i { font-size: 0.875rem; }

/* ═══════════════════════════════════════════════════════════════
   PART 55: TOP WARNING BANNER (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
.top-warning {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 20px;
  padding: 14px 18px;
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  border-left: 4px solid var(--color-warning);
  border-radius: var(--radius-md);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  box-shadow: var(--glass-shadow-sm);
}
.top-warning i {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.875rem;
  margin-top: 1px;
  color: var(--color-warning);
}
.top-warning p { margin: 0; flex: 1; }
.top-warning strong { color: var(--color-warning); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════
   PART 56: FORM SECTION HEADERS (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
.form-section h2, .card h2, .section-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 20px 0;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  color: var(--color-text);
}
.form-section h2 i, .card h2 i, .section-card h2 i {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-primary-bg);
  color: var(--color-primary);
  font-size: 0.9375rem;
  flex-shrink: 0;
}
@media (prefers-color-scheme: dark) {
  .form-section h2, .card h2, .section-card h2 {
    border-bottom-color: rgba(255,255,255,0.06);
  }
}

/* ═══════════════════════════════════════════════════════════════
   PART 57: INFO BADGE (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
.info-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--color-primary-bg);
  color: var(--color-primary);
}

/* ═══════════════════════════════════════════════════════════════
   PART 58: THEME TOGGLE (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
#themeToggle, /* 2026-10-05 实测：35×40（宽不足 44）。桌面端维持 40×40，触摸设备提至 44×44 */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  /* 2026-10-05 真实浏览器实测：本规则加载晚于 ads-02 的触摸兜底，
     导致 traffic-injury / work-injury 的圆形主题按钮实测仍为 40×44（宽度差 4px）。
     触摸设备提至 44×44；桌面端维持 40×40。 */
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--glass-shadow-sm), var(--glass-inner-shadow);
  font-size: 1rem;
}
#themeToggle:hover, .theme-toggle:hover {
  background: var(--color-primary-bg);
  color: var(--color-primary);
  transform: rotate(12deg) scale(1.05);
  border-color: var(--color-primary-border);
}

/* ═══════════════════════════════════════════════════════════════
   PART 59: LPR / RATE PILLS (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
.lpr-info, .rate-display {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.lpr-pill, .rate-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  box-shadow: var(--glass-shadow-sm), var(--glass-inner-shadow);
  transition: all var(--transition-fast);
}
.lpr-pill:hover, .rate-pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow), var(--glass-inner-shadow);
}
.lpr-pill .rate-label, .rate-pill .rate-label {
  color: var(--color-text-secondary);
  font-weight: 500;
  font-size: 0.8125rem;
}
.lpr-pill .rate-value, .rate-pill .rate-value {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════════════
   PART 60: TOOL / NAV ICONS (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
.nav-icon, .tool-icon, .card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 2px 8px rgba(0,0,0,0.06);
  transition: transform var(--transition-fast);
}
.card.interactive:hover .nav-icon,
.card.interactive:hover .tool-icon,
.card.interactive:hover .card-icon {
  transform: scale(1.08);
}
@media (max-width: 768px) {
  .nav-icon, .tool-icon, .card-icon { width: 46px; height: 46px; font-size: 1.25rem; }
}

/* ═══════════════════════════════════════════════════════════════
   PART 61: FILTER TAGS (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
.filter-tag, .tag, .nav-tag {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
}
.filter-tag.active {
  box-shadow: 0 2px 8px rgba(0,122,255,0.25);
}

/* ═══════════════════════════════════════════════════════════════
   PART 62: LAWYER NAV SPECIFIC (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
.site-card:has(.card-official-tag.show) .card-name {
  padding-top: 22px;
}
.card-official-tag.show {
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.card-hot-tag {
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.card-fav {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-spring);
}
.card-fav:hover {
  transform: scale(1.1);
}

/* ═══════════════════════════════════════════════════════════════
   PART 63: BRAND TEXT & GRID LAYOUTS (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
.brand-text, .logo-text {
  white-space: nowrap !important;
}
.home-grid, .tools-grid, .nav-grid {
  gap: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   PART 64: INFO / ALERT BOXES (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
.lpr-info, .info-box, .alert-info, .alert {
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--glass-bg-weak);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  position: relative;
  overflow: hidden;
  box-shadow: var(--glass-shadow-sm);
}
.lpr-info::before, .info-box::before, .alert-info::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--color-primary);
  border-radius: 4px 0 0 4px;
}
.lpr-info i, .info-box i, .alert-info i {
  color: var(--color-primary);
}

/* ═══════════════════════════════════════════════════════════════
   PART 65: RESULT SECTION TOP HIGHLIGHT (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
.result-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  pointer-events: none;
  z-index: 2;
}

/* ═══════════════════════════════════════════════════════════════
   PART 66: NOTICE LEFT BORDER COLOR VARIANTS (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
.disclaimer::before, .notice::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}
.disclaimer, .notice { border-left: none; }
.disclaimer::before, .notice:not(.notice-info):not(.notice-danger):not(.notice-success)::before { background: var(--color-warning); }
.notice-info::before { background: var(--color-primary); }
.notice-danger::before { background: var(--color-danger); }
.notice-success::before { background: var(--color-success); }
.disclaimer i, .notice:not(.notice-info):not(.notice-danger):not(.notice-success) i { color: var(--color-warning); }
.notice-info i { color: var(--color-primary); }
.notice-danger i { color: var(--color-danger); }
.notice-success i { color: var(--color-success); }
.disclaimer, .notice, .top-warning {
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  line-height: 1.6;
  box-shadow: var(--glass-shadow-sm);
}
.disclaimer i, .notice i, .top-warning i {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.875rem;
  margin-top: 1px;
}

/* ═══════════════════════════════════════════════════════════════
   PART 67: PLACEHOLDER STYLING (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
input::placeholder, textarea::placeholder {
  color: var(--color-text-light);
  font-weight: 400;
  opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════════════
   PART 68: LINK ACTIVE STATE (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
a:active { opacity: 0.7; }

/* ═══════════════════════════════════════════════════════════════
   PART 69: FORM GROUP SPACING (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 22px; }
.form-group:last-child, .form-row:last-child { margin-bottom: 0; }

/* ═══════════════════════════════════════════════════════════════
   PART 70: BUTTON ACTIVE STATE (Merged from shared-pro.css)
   ═══════════════════════════════════════════════════════════════ */
.btn:not(:disabled):active,
.btn-secondary:not(:disabled):active {
  transform: scale(0.97) translateY(0);
  transition-duration: 80ms;
}

/* ═══════════════════════════════════════════════════════════════
   PART 71: SCALE TOKENS — 层级 / 触控 / 字号阶梯
   用途：为 z-index、最小触控目标、字号提供统一取值，避免各页各写一套。
   ═══════════════════════════════════════════════════════════════ */
:root {
  /* ── z-index 层级尺度（由低到高，勿越级使用） ────────────── */
  --z-base: 0;          /* 普通内容 */
  --z-raised: 1;        /* 卡片内层内容（用于遮盖卡片伪元素背景） */
  --z-sticky: 100;      /* 吸顶页头 */
  --z-float: 500;       /* 悬浮按钮（回到顶部等） */
  --z-dropdown: 900;    /* 下拉 / 气泡 */
  --z-overlay: 1000;    /* 遮罩层 */
  --z-modal: 1001;      /* 模态框 */
  --z-toast: 1200;      /* 轻提示 */
  --z-tooltip: 1300;    /* 工具提示 */
  --z-skip: 1400;       /* 跳转链接（无障碍，须置顶） */

  /* ── 最小触控目标（Apple HIG 44pt；WCAG 2.2 AA 下限 24px） ── */
  --touch-target: 44px;
  --touch-target-sm: 32px;

  /* ── 字号阶梯（下限 11px，低于此值可读性不达标） ─────────── */
  --text-2xs: 0.6875rem;  /* 11px  — 徽章/角标最小可用字号 */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.8125rem;   /* 13px */
  --text-base: 0.875rem;  /* 14px */
  --text-md: 1rem;        /* 16px — 表单输入下限，可避免 iOS 自动缩放 */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.875rem;   /* 30px */
}

/* ═══════════════════════════════════════════════════════════════
   PART 72: RECOVERED COMPONENTS
   背景：shared-liquid-glass.css 与 apple-polish.css 未被任何页面加载，
   但其定义的若干类被 liquid-interactions.js 与各页面实际使用，导致这些
   组件以「浏览器默认样式」渲染（如回到顶部按钮渲染为默认灰底方块、静态定位）。
   本 PART 将这些组件统一定位并迁移至现行令牌命名空间后重新提供。
   ═══════════════════════════════════════════════════════════════ */

/* ── 回到顶部（悬浮玻璃圆钮） ──────────────────────────────── */
.back-to-top,
.scroll-top-btn {
  position: fixed;
  right: 24px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
  width: var(--touch-target);
  height: var(--touch-target);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-lg), var(--glass-inner-shadow);
  color: var(--color-text);
  cursor: pointer;
  z-index: var(--z-float);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition:
    opacity var(--transition-smooth),
    visibility var(--transition-smooth),
    transform var(--transition-spring),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}
.back-to-top.visible,
.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.back-to-top:hover,
.scroll-top-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-primary-border);
  color: var(--color-primary);
}
.back-to-top:active,
.scroll-top-btn:active { transform: scale(0.93); }
.back-to-top:focus-visible,
.scroll-top-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}
.back-to-top svg,
.scroll-top-btn svg { width: 20px; height: 20px; }
@media (max-width: 768px) {
  .back-to-top,
  .scroll-top-btn {
    right: 16px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top,
  .scroll-top-btn { transition-duration: 0.01ms; transform: none; }
}

/* ── 背景光球：显式停用 ──────────────────────────────────────
   由 liquid-interactions.js 动态创建，原样式在未加载样式表中，
   实际以 0×0 不可见形态存在。设计系统的 body::before / body::after
   背景画布已提供等效且性能更优的渐变光晕，故停用这些冗余元素，
   同时免除其滚动视差带来的无谓计算。 */
.bg-orb { display: none !important; }

/* ── 按钮加载态（配合 liquid-interactions.js setButtonLoading） ── */
.btn .spinner,
.btn-secondary .spinner {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-secondary .spinner {
  border-color: rgba(0, 0, 0, 0.15);
  border-top-color: var(--color-primary);
}
.btn.is-loading { pointer-events: none; }
.btn.is-loading .btn-text { opacity: 0; }
.btn.is-loading .spinner { position: absolute; }
@media (prefers-reduced-motion: reduce) {
  .btn .spinner,
  .btn-secondary .spinner { animation-duration: 1.6s; }
}

/* ── 按钮文本包裹层 ────────────────────────────────────────── */
.btn-text {
  display: inline-block;
  transition: opacity var(--transition-fast);
}

/* ── 水波纹反馈 ────────────────────────────────────────────── */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: ripple 600ms var(--transition-spring) forwards;
  pointer-events: none;
  will-change: transform, opacity;
}

/* ── 轻提示图标 ────────────────────────────────────────────── */
.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* ── 滑动指示器（分段控件 / 标签页） ───────────────────────── */
.segment-indicator,
.tabs-indicator {
  position: absolute;
  top: 3px;
  bottom: 3px;
  background: var(--color-surface-solid);
  border-radius: calc(var(--radius-md) - 3px);
  box-shadow: var(--shadow-xs);
  transition:
    transform var(--transition-spring),
    width var(--transition-spring);
  pointer-events: none;
  z-index: var(--z-base);
}
.tabs-indicator {
  top: 4px;
  bottom: 4px;
  border-radius: var(--radius-sm);
}

/* ── 数字变化强调动画 ──────────────────────────────────────── */
.num-pop { animation: scaleIn 400ms var(--transition-spring); }

/* ── 布局容器基线 ──────────────────────────────────────────
   首页等页面自带更完整的玻璃外壳样式（文档后序、同特异性优先），
   此处仅为「使用了该类但未定义样式」的页面提供一致兜底。 */
.app-container,
.main-content {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

/* ═══════════════════════════════════════════════════════════════
   PART 73: TOUCH TARGET ENFORCEMENT
   触控设备下将可交互元素提升至 Apple HIG 建议的 44px 最小目标，
   并修正若干明确小于 WCAG 2.2 AA 下限（24px）的控件。
   ═══════════════════════════════════════════════════════════════ */

/* ── 数字步进器 ────────────────────────────────────────────
   原为纵向双键，每个仅约 19–20px 高，低于 WCAG 2.2 AA 的 24×24 下限；
   且纵向排列受输入框高度约束，在不增高输入框的前提下无法达标。
   现统一改为横向并排 [−][+]，每个按键 34×34（触控 38×38），
   并将单位标签左移至步进器之前，避免两者重叠。 */
.number-input-group .stepper {
  flex-direction: row;
  width: auto;
  height: auto;
  gap: 4px;
}
.number-input-group .stepper button {
  width: 34px;
  height: 34px;
  flex: none;
  font-size: 12px;
  border-radius: var(--radius-xs);
}
/* 单位标签让位于横向步进器（步进器占右侧约 78px）。
   注意：多个页面为适配「旧的 36px 宽纵向步进器」而各自硬编码了
   .number-input-group.input-with-unit .unit{right:52px}（特异性 0,3,0 且文档后序），
   故此处使用 0,4,0 选择器在设计系统层统一覆盖，避免逐页散落同一数值。 */
.number-input-group.input-with-unit:has(.stepper) .unit,
.input-with-unit.number-input-group:has(.stepper) .unit,
.number-input-group:has(.stepper) .unit,
.input-with-unit:has(.stepper) .unit { right: 84px; }
/* 输入区右侧留白：步进器 78px + 单位约 34px + 间距 */
.number-input-group:has(.stepper):has(.unit) input,
.input-with-unit:has(.stepper):has(.unit) input { padding-right: 124px !important; }
.number-input-group:has(.stepper):not(:has(.unit)) input,
.input-with-unit:has(.stepper):not(:has(.unit)) input { padding-right: 88px !important; }

@media (pointer: coarse) {
  .number-input-group .stepper button {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }
  .number-input-group.input-with-unit:has(.stepper) .unit,
  .input-with-unit.number-input-group:has(.stepper) .unit,
  .number-input-group:has(.stepper) .unit,
  .input-with-unit:has(.stepper) .unit { right: 92px; }
  .number-input-group:has(.stepper):has(.unit) input,
  .input-with-unit:has(.stepper):has(.unit) input { padding-right: 138px !important; }
  .number-input-group:has(.stepper):not(:has(.unit)) input,
  .input-with-unit:has(.stepper):not(:has(.unit)) input { padding-right: 100px !important; }
}

/* 小尺寸图标类按钮：先保证任何指针类型下都不低于 WCAG 2.2 AA 的 24×24 下限。
   这些控件在页面 CSS 中被显式设置了过小的宽高（如 .ds-del 22×14、
   .date-clear-btn 22×22），此处以 min-* 兜底——min-* 优先于 width/height。
   同时改为 flex 居中，避免放大后图标偏离中心（原实现依赖固定 line-height）。 */
.theme-toggle,
.date-clear-btn,
.date-quick-chip,
.ds-del,
.ldf-close,
.modal-close,
.detail-toggle {
  min-width: 24px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* 触控设备下进一步提升至 32px（更接近 Apple HIG 的 44pt 建议） */
@media (pointer: coarse) {
  .theme-toggle,
  .date-clear-btn,
  .date-quick-chip,
  .ds-del,
  .ldf-close,
  .modal-close,
  .detail-toggle {
    min-width: var(--touch-target-sm);
    min-height: var(--touch-target-sm);
  }
}

/* 页脚备案链接：增加纵向内边距以扩大可点区域（不改变视觉字号）
   2026-10-05 实测修正：min-height 原为 24px（仅达 WCAG 2.2 AA 的 24×24 旧下限），
   真实浏览器在 320/390px 手机视口下测得实际高度仅 36px（padding 被box-sizing 抵消部分），
   低于 iOS HIG 与 WCAG 2.5.5 建议的 44px。改为 44px。 */
.beian-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 2px;
}
/* 桌面端维持原24px，避免页脚行高被无谓撑高 */
@media (pointer: fine) and (min-width: 768px) {
  .beian-link { min-height: 24px; }
}

/* 功能性链接（带 onclick 或 role=button）：原尺寸常小至 16px 高，低于 WCAG 2.2 AA
   的 24×24 下限。行内元素的纵向 padding 不会撑高行盒，因此加内边距即可扩大点击区
   而不产生任何视觉位移；横向以等量负 margin 抵消，保持文本位置不变。
   仅作用于功能性链接，正文中的普通文本链接不受影响（避免破坏正文排版）。 */
a[onclick],
a[role="button"] {
  padding: 5px 3px;
  margin: 0 -3px;
}

/* ── 圆形主题按钮触摸档（2026-10-05 实测补充）────────────────────
 * 本文件加载晚于 ads-02-components.css 的触摸兜底，故需在此处补一次宽度覆盖。
 * 实测：traffic-injury / work-injury 的圆形主题按钮为 40×44（宽差 4px）、
 *      document-tools 的紧凑形态为 36×36（两向均不足）。
 * 仅在触摸设备或窄屏生效，桌面端不受影响。 */
@media (pointer: coarse), (max-width: 767px) {
  button.theme-toggle,
  .theme-toggle:not(.btn):not(.btn-secondary) {
    width: 44px;
    height: 44px;
  }
}

/* ── 末批触摸目标收口（2026-10-05 九轮真实浏览器实测后）────────────
 * 前八轮已修掉 back-btn / skip-link / beian-link / sn-m-brand / theme-toggle /
 * checkbox / radio 等大类，本轮处理实测残留的最后几类。
 * 全部仅在触摸设备或窄屏生效，桌面端版式完全不变。 */
@media (pointer: coarse), (max-width: 767px) {
  /* 明细展开/收起按钮实测 111×32（高度不足） */
  .detail-toggle { min-height: 44px; display: inline-flex; align-items: center; }

  /* 日期输入框旁的清除按钮实测 32×32 */
  .date-clear-btn { width: 44px; height: 44px; }

  /* 律师导航收藏星标实测 42~43×43（差 1~2px） */
  .card-fav { min-width: 44px; min-height: 44px; }

  /* 要素式文书页：back-btn 实测 36×34（两向均不足，由页面私有样式设定） */
  .back-btn { min-width: 44px; min-height: 44px; }

  /* 标签页与 on/off 开关实测 137×36（高度不足） */
  .on, .tab, [role="tab"] { min-height: 44px; }

  /* 折叠面板标题行实测 372×35（高度不足），加内边距而非改字号 */
  .cat2-hd { min-height: 44px; display: flex; align-items: center; }

  /* 页面头部操作区的次要按钮实测 272×38（高度不足） */
  .page-header-actions .btn-secondary { min-height: 44px; }

  /* 数字输入框（金额/年限）实测 344×40，高度不足 */
  input[type="text"], input[type="number"] { min-height: 44px; }
}

/* ── 收尾两项（2026-10-05 第十轮实测确认）────────────────────────
 * 十轮实测后剩余项已逐个核实：多数为 WCAG 2.5.5 豁免的正文内文字链接
 * （about.html 的荣誉链接 285×20 等）或已达标但检测器按单边判定的元素
 * （ex-btn 213×44 宽已超44，仅高 44 整）。真正需修的只有以下两项。 */
@media (pointer: coarse), (max-width: 767px) {
  /* document-tools 的 .back-btn 实测 44×34：宽已达标，高度被页面私有样式压到 34 */
  .back-btn { min-height: 44px !important; }

  /* lawyer-nav 的收藏星标 .card-fav 实测 43×43，两向各差 1px。
     星标是高频点击目标（收藏/取消），值得补足。 */
  .card-fav { min-width: 44px !important; min-height: 44px !important; }
}
