/*
Theme Name: 慧田法律评论
Theme URI: https://blog.tienquant.cn/
Author: 慧田法律
Description: 慧田法律评论本地预发布主题，聚焦资本市场监管与高净值人群财富管理。
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: tienquant-journal
*/

:root {
  --ht-blue: #3046C5;
  --ht-red: #C9162A;
  --ht-white: #FFFFFF;
  --ht-neutral: #F4F6F8;
  --ht-ink: #111514;
  --ht-muted: #606979;
  --ht-line: #D9DFEA;
  --ht-serif: "Songti SC", STSong, SimSun, serif;
  --ht-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --ht-display: Georgia, "Times New Roman", serif;
}

html {
  scroll-behavior: smooth;
  background: var(--ht-white);
}

body {
  background: var(--ht-white);
  color: var(--ht-ink);
  font-family: var(--ht-sans);
  text-rendering: optimizeLegibility;
}

a {
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

:focus-visible {
  outline: 3px solid var(--ht-red);
  outline-offset: 4px;
}

.wp-site-blocks {
  min-height: 100vh;
  overflow-x: clip;
}

.ht-site-header {
  position: relative;
  z-index: 20;
  background: var(--ht-white);
  border-bottom: 1px solid var(--ht-line);
}

.ht-header-inner {
  min-height: 86px;
}

.ht-brand-lockup {
  position: relative;
  min-height: 52px;
  padding-left: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px !important;
}

.ht-brand-lockup::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 52px;
  height: 52px;
  background: url("assets/huitian-symbol-v121.svg") center / contain no-repeat;
}

.ht-brand-lockup .wp-block-site-title {
  margin: 0;
  font-family: var(--ht-serif);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
}

.ht-brand-lockup .wp-block-site-title a {
  color: var(--ht-ink);
  text-decoration: none;
}

.ht-brand-en {
  margin: 0;
  color: var(--ht-blue);
  font-family: var(--ht-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.27em;
  line-height: 1.3;
}

.ht-site-header .wp-block-navigation {
  font-size: 14px;
  letter-spacing: 0.08em;
}

.ht-site-header .wp-block-navigation a {
  color: var(--ht-ink);
  text-decoration: none;
}

.ht-site-header .wp-block-navigation a:hover {
  color: var(--ht-blue);
}

.ht-hero {
  position: relative;
  isolation: isolate;
  min-height: 590px;
  display: flex;
  align-items: center;
  background: var(--ht-blue);
  color: var(--ht-white);
  overflow: hidden;
}

.ht-hero::before,
.ht-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.ht-hero::before {
  width: 420px;
  height: 420px;
  right: -74px;
  top: -168px;
}

.ht-hero::after {
  width: 260px;
  height: 260px;
  right: 74px;
  top: -66px;
}

.ht-hero-inner {
  width: 100%;
}

.ht-hero-brand {
  margin: 0 0 48px;
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--ht-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.32em;
}

.ht-hero-brand::before {
  content: "";
  display: inline-block;
  width: 48px;
  height: 4px;
  margin-right: 18px;
  vertical-align: middle;
  background: var(--ht-red);
}

.ht-hero h1 {
  max-width: 790px;
  margin: 0;
  color: var(--ht-white);
  font-family: var(--ht-serif);
  font-size: clamp(44px, 5.2vw, 76px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.22;
}

.ht-hero-copy {
  max-width: 720px;
  margin: 34px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.8;
}

.ht-hero-link {
  margin-top: 42px;
}

.ht-hero-link a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  color: var(--ht-white);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.ht-hero-link a:hover {
  background: var(--ht-white);
  color: var(--ht-blue);
}

.ht-focus {
  background: var(--ht-white);
  border-bottom: 1px solid var(--ht-line);
}

.ht-section-label {
  margin: 0 0 20px;
  color: var(--ht-blue);
  font-family: var(--ht-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.26em;
}

.ht-section-label::before {
  content: "";
  display: inline-block;
  width: 38px;
  height: 3px;
  margin-right: 14px;
  vertical-align: middle;
  background: var(--ht-red);
}

.ht-focus h2,
.ht-latest h2 {
  margin-top: 0;
  font-family: var(--ht-serif);
  font-size: clamp(34px, 3.8vw, 52px);
  line-height: 1.25;
}

.ht-focus-columns {
  gap: 0 !important;
  border-top: 1px solid var(--ht-line);
}

.ht-focus-item {
  min-height: 260px;
  padding: 42px 48px 42px 0;
}

.ht-focus-item + .ht-focus-item {
  padding-left: 48px;
  border-left: 1px solid var(--ht-line);
}

.ht-focus-number {
  margin: 0 0 24px;
  color: var(--ht-red);
  font-family: var(--ht-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.ht-focus-item h3 {
  margin: 0 0 18px;
  color: var(--ht-blue);
  font-family: var(--ht-serif);
  font-size: 30px;
  line-height: 1.3;
}

.ht-focus-item p:last-child {
  margin-bottom: 0;
  color: var(--ht-muted);
  font-size: 17px;
  line-height: 1.85;
}

.ht-latest {
  background: var(--ht-white);
}

.ht-post-row {
  position: relative;
  padding: 34px 0 40px !important;
  border-top: 1px solid var(--ht-line);
}

.ht-post-row .wp-block-post-title {
  max-width: 820px;
  margin: 10px 0 18px;
  font-family: var(--ht-serif);
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.35;
}

.ht-post-row .wp-block-post-title a {
  color: var(--ht-ink);
  text-decoration: none;
}

.ht-post-row .wp-block-post-title a:hover {
  color: var(--ht-blue);
}

.ht-post-row .wp-block-post-date,
.ht-article-meta {
  color: var(--ht-blue);
  font-family: var(--ht-display);
  font-size: 13px;
  letter-spacing: 0.09em;
}

.ht-post-row .wp-block-post-excerpt {
  max-width: 820px;
  color: var(--ht-muted);
  font-size: 16px;
  line-height: 1.8;
}

.ht-post-row .wp-block-post-excerpt__more-link {
  color: var(--ht-blue);
  font-size: 14px;
  font-weight: 600;
}

.ht-article-shell {
  background: var(--ht-white);
}

.ht-article-shell > .wp-block-post-title {
  max-width: 880px;
  margin-bottom: 24px;
  font-family: var(--ht-serif);
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.2;
}

.ht-article-shell .wp-block-post-content {
  color: #232827;
  font-family: var(--ht-serif);
  font-size: 18px;
  line-height: 2;
}

.ht-article-shell .wp-block-post-content h2,
.ht-article-shell .wp-block-post-content h3 {
  color: var(--ht-ink);
  font-family: var(--ht-serif);
}

.ht-article-shell .wp-block-post-content h2 {
  margin: 2.4em 0 0.9em;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.4;
}

.ht-article-shell .wp-block-post-content h3 {
  margin: 2em 0 0.7em;
  font-size: clamp(23px, 2.4vw, 29px);
  line-height: 1.5;
}

.ht-article-shell .wp-block-post-content p,
.ht-article-shell .wp-block-post-content ul,
.ht-article-shell .wp-block-post-content ol {
  margin-top: 0;
  margin-bottom: 1.45em;
}

.ht-article-shell .wp-block-post-content ul,
.ht-article-shell .wp-block-post-content ol {
  padding-left: 1.5em;
}

.ht-article-shell .wp-block-post-content li + li {
  margin-top: 0.55em;
}

.ht-article-shell .wp-block-post-content a {
  color: var(--ht-blue);
  overflow-wrap: anywhere;
  text-decoration-color: rgba(48, 70, 197, 0.46);
}

.ht-article-shell .wp-block-post-content a:hover {
  color: var(--ht-red);
  text-decoration-color: currentColor;
}

.ht-article-shell .wp-block-post-content img {
  max-width: 100%;
  height: auto;
}

.ht-table-scroll {
  max-width: 100%;
  margin: 2.2em 0;
  overflow-x: auto;
  border: 1px solid var(--ht-line);
  background: var(--ht-white);
  -webkit-overflow-scrolling: touch;
}

.ht-article-shell .wp-block-post-content table {
  width: 100%;
  min-width: 820px;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  font-family: var(--ht-sans);
  font-size: 14px;
  line-height: 1.65;
}

.ht-article-shell .wp-block-post-content th,
.ht-article-shell .wp-block-post-content td {
  padding: 15px 17px;
  border-right: 1px solid var(--ht-line);
  border-bottom: 1px solid var(--ht-line);
  text-align: left;
  vertical-align: top;
}

.ht-article-shell .wp-block-post-content th:last-child,
.ht-article-shell .wp-block-post-content td:last-child {
  border-right: 0;
}

.ht-article-shell .wp-block-post-content tbody tr:last-child td {
  border-bottom: 0;
}

.ht-article-shell .wp-block-post-content th {
  background: var(--ht-blue);
  color: var(--ht-white);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.ht-article-shell .wp-block-post-content tbody tr:nth-child(even) {
  background: var(--ht-neutral);
}

.ht-article-shell .wp-block-post-content code {
  padding: 0.12em 0.36em;
  border-radius: 2px;
  background: var(--ht-neutral);
  color: var(--ht-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
}

.ht-article-shell .wp-block-post-content pre {
  max-width: 100%;
  padding: 22px 24px;
  overflow-x: auto;
  border: 1px solid var(--ht-line);
  background: var(--ht-neutral);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre;
}

.ht-article-shell .wp-block-post-content pre.mermaid {
  margin: 2.4em 0;
  padding: 28px;
  border-top: 4px solid var(--ht-blue);
  background: var(--ht-white);
  color: var(--ht-ink);
  font-family: var(--ht-sans);
  text-align: center;
  white-space: pre-wrap;
}

.ht-article-shell .wp-block-post-content .mermaid[data-mermaid-fallback="readable"]::before {
  content: "流程图文本预览";
  display: block;
  margin-bottom: 12px;
  color: var(--ht-blue);
  font-family: var(--ht-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.ht-article-shell .wp-block-post-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.ht-article-shell .wp-block-post-content .mermaid svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.ht-article-shell .wp-block-post-content blockquote {
  margin-left: 0;
  padding: 22px 28px;
  border-left: 4px solid var(--ht-red);
  background: var(--ht-neutral);
  color: var(--ht-blue);
}

.ht-site-footer {
  background: var(--ht-blue);
  color: var(--ht-white);
}

.ht-footer-title {
  margin: 0 0 10px;
  color: var(--ht-white);
  font-family: var(--ht-serif);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.ht-footer-title::before {
  content: "";
  display: inline-block;
  width: 42px;
  height: 4px;
  margin-right: 16px;
  vertical-align: middle;
  background: var(--ht-red);
}

.ht-footer-copy,
.ht-footer-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.ht-footer-note {
  font-size: 13px;
}

@media (max-width: 781px) {
  .ht-site-header {
    padding-right: 18px !important;
    padding-left: 18px !important;
  }

  .ht-header-inner {
    min-height: 76px;
  }

  .ht-brand-lockup {
    min-height: 44px;
    padding-left: 56px;
  }

  .ht-brand-lockup::before {
    width: 44px;
    height: 44px;
  }

  .ht-brand-lockup .wp-block-site-title {
    font-size: 18px;
  }

  .ht-brand-en {
    display: none;
  }

  .ht-hero {
    min-height: 610px;
  }

  .ht-hero-brand {
    margin-bottom: 38px;
    font-size: 11px;
    letter-spacing: 0.2em;
  }

  .ht-hero-brand::before {
    width: 34px;
    margin-right: 12px;
  }

  .ht-hero h1 {
    font-size: clamp(42px, 12vw, 58px);
  }

  .ht-hero-copy {
    font-size: 18px;
    line-height: 1.75;
  }

  .ht-focus-item,
  .ht-focus-item + .ht-focus-item {
    min-height: auto;
    padding: 34px 0;
    border-left: 0;
    border-top: 1px solid var(--ht-line);
  }

  .ht-focus-columns {
    border-top: 0;
  }

  .ht-article-shell .wp-block-post-content {
    font-size: 17px;
  }

  .ht-article-shell .wp-block-post-content h2 {
    font-size: 28px;
  }

  .ht-article-shell .wp-block-post-content h3 {
    font-size: 23px;
  }

  .ht-table-scroll {
    margin-right: -18px;
    margin-left: -18px;
    border-right: 0;
    border-left: 0;
  }

  .ht-article-shell .wp-block-post-content table {
    min-width: 760px;
    font-size: 13px;
  }

  .ht-article-shell .wp-block-post-content th,
  .ht-article-shell .wp-block-post-content td {
    padding: 12px 14px;
  }

  .ht-article-shell .wp-block-post-content pre.mermaid {
    padding: 20px 14px;
    text-align: left;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
