:root {
  --tao-color-brand: #771d18;
  --tao-color-brand-dark: #56100e;
  --tao-color-brand-deep: #4e0e0c;
  --tao-color-brand-soft: #f3e6df;
  --tao-color-cream: #fbf8f4;
  --tao-color-sand: #f3ebe4;
  --tao-color-sand-strong: #fff3eb;
  --tao-color-ink: #2b211f;
  --tao-color-muted: #6f625c;
  --tao-color-line: rgba(119, 29, 24, 0.13);
  --tao-color-line-strong: rgba(119, 29, 24, 0.24);
  --tao-color-highlight: #f7eeda;
  --tao-color-paper: #fffefc;
  --tao-color-success: #35634a;
  --tao-color-error: #9a2e27;

  --tao-font-display: "Cormorant Garamond", Georgia, serif;
  --tao-font-body: Inter, "Segoe UI", sans-serif;
  --tao-font-numeric: Inter, "Segoe UI", sans-serif;

  --tao-container: 77.5rem;
  --tao-reading: 50rem;
  /* 二级页内容宽度：壳层 / 长文 / 指南 */
  --tao-content-shell: min(73.75rem, calc(100% - 3rem));
  --tao-content-reading: min(53.75rem, calc(100% - 3rem));
  --tao-content-guide-shell: min(58.125rem, calc(100% - 3rem));
  --tao-content-guide: min(47.5rem, calc(100% - 3rem));
  --tao-space-1: 0.5rem;
  --tao-space-2: 1rem;
  --tao-space-3: 1.5rem;
  --tao-space-4: 2.5rem;
  --tao-space-5: 5rem;
  --tao-space-section: clamp(4.75rem, 7.5vw, 6.5rem);
  --tao-radius-control: 0.875rem;
  --tao-radius-card: 1.375rem;
  --tao-radius-media: 1.5rem;
  --tao-radius-pill: 999px;
  --tao-shadow-soft: 0 1rem 2.125rem rgba(61, 34, 28, 0.05);
  --tao-shadow-lift: 0 1.5rem 3.75rem rgba(72, 42, 34, 0.11);
  --tao-focus: 0 0 0 3px rgba(122, 32, 26, 0.28);
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--tao-color-ink);
  background: var(--tao-color-paper);
  font-family: var(--tao-font-body);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--tao-color-brand);
  outline-offset: 3px;
  box-shadow: var(--tao-focus);
}

::selection {
  color: var(--tao-color-paper);
  background: var(--tao-color-brand);
}

/* Elementor Kit 常注入 Roboto / 冷灰；主题强制回设计系统 */
body,
button,
input,
select,
textarea,
.elementor-widget-text-editor,
.elementor-widget-text-editor p,
.elementor-widget-text-editor li,
.elementor-button-text {
  font-family: var(--tao-font-body) !important;
}

.elementor-heading-title {
  font-family: var(--tao-font-display) !important;
}

.elementor-widget-text-editor,
.elementor-widget-text-editor p {
  color: var(--tao-color-muted);
}

/* 深色表面上的正文保持浅色 */
.th-hero .elementor-widget-text-editor,
.th-hero .elementor-widget-text-editor p,
.th-footer .elementor-widget-text-editor,
.th-footer .elementor-widget-text-editor p,
.th-tao-meaning .elementor-widget-text-editor,
.th-tao-meaning .elementor-widget-text-editor p {
  color: inherit;
}

:where(a, button, input, select, textarea, .elementor-button, .elementor-button-link):focus-visible {
  outline: 2px solid var(--tao-color-brand) !important;
  outline-offset: 3px !important;
  box-shadow: var(--tao-focus) !important;
}

/* Elementor 常写 outline:none；提高优先级保证键盘可见焦点 */
a.elementor-button:focus-visible,
.elementor-button:focus-visible,
.elementor-button-link:focus-visible,
.th-nav-cta .elementor-button:focus-visible,
.th-hero-actions .elementor-button:focus-visible,
.th-menu a:focus-visible,
.th-blog-more .elementor-button:focus-visible {
  outline: 2px solid var(--tao-color-brand) !important;
  outline-offset: 3px !important;
  box-shadow: var(--tao-focus) !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .tao-js .th-reveal,
  .tao-js .tao-reveal,
  .elementor-invisible,
  .elementor-motion-effects-element,
  .elementor-element.elementor-invisible {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  html.e-motion-reduce .elementor-element,
  html.tao-reduced-motion .elementor-element {
    animation: none !important;
    transition: none !important;
  }
}
