/* ============================================================
   ry.hk brand layer v1 · 2026-10-30
   只做“显示层”覆盖：品牌色令牌、深色模式、触摸热区。
   不改变任何 DOM 结构、文案与交互逻辑。
   品牌色 = LOGO 原色 #4D33DE（public/branding/ry_hk_logo.png）
   ============================================================ */

/* ---------- 1. 设计令牌（与后台 active_theme 同源） ---------- */
:root {
  --ds-brand:          #4D33DE;  /* 白字 7.38:1 AAA */
  --ds-brand-hover:    #3920C5;
  --ds-brand-press:    #321E9F;
  --ds-brand-50:       #EEEBFF;
  --ds-brand-100:      #DDD7FE;
  --ds-brand-200:      #C0B6FC;
  --ds-brand-300:      #9887F7;
  --ds-brand-500:      #4D33DE;
  --ds-brand-800:      #2A1C78;
  --ds-brand-900:      #221958;

  --ds-ink-900:        #16142B;
  --ds-ink-700:        #37344F;
  --ds-ink-500:        #6B6785;
  --ds-border:         #E7E4F2;
  --ds-surface:        #F2F0FA;
  --ds-canvas:         #F7F6FC;

  --ds-touch-min:      44px;
  --ds-fs-xs:          12px;   /* 全站字号下限 */

  /* 复写站点既有变量，统一到 LOGO 原色 */
  --site-button:       #4D33DE;
  --site-button-hover: #3920C5;
  --site-button-soft:  #EEEBFF;
  --site-button-line:  #C0B6FC;
  --dd-primary:        #4D33DE;
  --dd-primary-dark:   #3920C5;
  --dd-primary-deep:   #2A1C78;
  --dd-tint:           #EEEBFF;
  --dd-line:           #E7E4F2;
  --dd-ink:            #16142B;
  --dd-muted:          #6B6785;
  --hero-search-brand: #4D33DE;

  /* 首页渐变（浅色） */
  --site-hero-background: linear-gradient(135deg, #2A1C78 0%, #3A279F 55%, #4D33DE 100%);
}

/* ---------- 2. 深色模式：Hero / 导航不再沿用浅色渐变 ---------- */
[data-theme="dark"] {
  --theme-hero-bg-start: #150F2E;
  --theme-hero-bg-mid:   #241A5E;
  --theme-hero-bg-end:   #3A2A9E;
  --theme-nav-bg:        #12101C;
  --site-hero-background: linear-gradient(135deg, #150F2E 0%, #241A5E 55%, #3A2A9E 100%);
  --ds-brand:            #6B55EA;   /* 按钮底提亮，白字 5.11:1 */
  --ds-brand-hover:      #7E6BEF;
  --site-button:         #6B55EA;
  --site-button-hover:   #7E6BEF;
  --dd-primary:          #6B55EA;
  --dd-primary-dark:     #7E6BEF;
  --hero-search-brand:   #6B55EA;
}

/* ---------- 3. 触摸热区 >= 44px（移动端） ---------- */
@media (max-width: 860px) {
  html body .dd-icon-btn,
  html body .dd-hamburger,
  html body .dd-langsel-pill,
  html body .dd-login-btn {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  html body .dd-menu-item,
  html body .dd-mega a {
    min-height: 44px;
  }
  html body .dd-footer-news-form button {
    min-height: 44px;
  }
}

/* 桌面端图标按钮不低于 40px */
@media (min-width: 861px) {
  html body .dd-icon-btn {
    min-width: 40px;
    min-height: 40px;
  }
}

/* ---------- 4. 12px 下限兜底（覆盖历史内联小字） ---------- */
html body .dd-menu-head,
html body .dd-mega-head,
html body .dd-lang-code,
html body .dx-eyebrow,
html body .dx-label {
  font-size: 12px;
}

/* ---------- 5. 焦点可见性（键盘可达） ---------- */
html body .dd-header a:focus-visible,
html body .dd-header button:focus-visible {
  outline: 3px solid #9887F7;
  outline-offset: 2px;
  border-radius: 6px;
}
