/* Winseety article detail system — scoped to .codex-detail-page */
:root {
  --codex-brand: #1c5a82;
  --codex-brand-deep: #123f5b;
  --codex-ink: #0f172a;
  --codex-muted: #64748b;
  --codex-soft: #94a3b8;
  --codex-line: #e2e8f0;
  --codex-surface: #ffffff;
  --codex-surface-alt: #f6f8fb;
  --codex-focus: #2563eb;
  --codex-radius: 18px;
  --codex-shadow: 0 20px 55px rgba(15, 23, 42, .08);
  --codex-shadow-soft: 0 10px 30px rgba(15, 23, 42, .06);
  --codex-ease: cubic-bezier(.22, .61, .36, 1);
}

.codex-detail-page {
  background: var(--codex-surface-alt);
  color: var(--codex-ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "HarmonyOS Sans", Arial, sans-serif;
}

.codex-detail-page a:focus-visible,
.codex-detail-page button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .35);
  outline-offset: 3px;
}

.codex-reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100000;
  height: 3px;
  background: rgba(226, 232, 240, .65);
  pointer-events: none;
}

.codex-reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--codex-brand);
  transform-origin: left center;
  transition: width .08s linear;
}

/* Banner: keep the existing video and turn it into a restrained editorial cover. */
.codex-detail-page .th_ins_ban {
  height: clamp(280px, 32vw, 420px);
  margin-top: 105px;
  overflow: hidden;
  background: #0b1725;
}

.codex-detail-page .th_ins_ban::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 18, 31, .52);
  pointer-events: none;
}

.codex-detail-page .th_ins_ban video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  opacity: .82;
}

.codex-detail-page .th_ins_ban .th_con_txt {
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
}

.codex-detail-page .th_ins_ban .th_con_txt h1 {
  padding-top: 0;
  color: #fff;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 700;
  letter-spacing: .04em;
}

.codex-detail-page .th_ins_ban .th_con_txt h2 {
  padding-top: 14px;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
}

.codex-detail-page .th_main {
  max-width: 1240px;
  padding: 0 24px 96px;
}

.codex-detail-page .th_breadcrumb {
  max-width: 1160px;
  margin: 0 auto;
  padding: 22px 0 0;
}

.codex-detail-page .th_bread_left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--codex-soft);
  font-size: 13px;
  line-height: 1.5;
}

.codex-detail-page .th_bread_left a {
  color: var(--codex-muted);
  transition: color .24s var(--codex-ease);
}

.codex-detail-page .th_bread_left a:hover {
  color: var(--codex-brand);
}

.codex-detail-page .th_bread_left a:not(:last-child)::after {
  content: "/";
  display: inline-block;
  margin-left: 8px;
  color: #cbd5e1;
}

.codex-news-detail {
  max-width: 1160px;
  margin: 34px auto 0;
  padding: 0;
}

.codex-news-header {
  max-width: 900px;
  margin: 0 auto 50px;
  text-align: center;
}

.codex-header-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: var(--codex-brand);
  background: rgba(255, 255, 255, .78);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.codex-news-header h1.codex-news-title {
  margin: 22px 0 20px;
  color: var(--codex-ink);
  font-size: clamp(40px, 5vw, 48px);
  font-weight: 750;
  line-height: 1.16;
  letter-spacing: -.035em;
}

.codex-article-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 18px;
  color: var(--codex-muted);
  font-size: 13px;
  line-height: 1.6;
}

.codex-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.codex-meta-item::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #cbd5e1;
}

.codex-meta-item:first-child::before {
  display: none;
}

.codex-article-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.codex-article-tags:empty {
  display: none;
}

.codex-article-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid #dbe4ec;
  border-radius: 999px;
  color: var(--codex-brand-deep);
  background: #fff;
  font-size: 12px;
  line-height: 1;
}

.codex-share-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: auto !important;
  margin-top: 26px;
  text-align: center !important;
}

.codex-share-row::after {
  display: none !important;
}

.codex-share-label {
  color: var(--codex-soft);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.codex-share-row > span {
  display: inline-flex !important;
  position: static !important;
  z-index: auto !important;
  background: transparent !important;
}

.codex-share-row .bdsharebuttonbox {
  display: flex;
  gap: 8px;
}

.codex-share-row .bdsharebuttonbox a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 34px !important;
  height: 34px !important;
  margin: 0 !important;
  border: 1px solid #dbe4ec !important;
  border-radius: 50%;
  color: var(--codex-muted) !important;
  background: #fff !important;
  background-image: none !important;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  transition: color .24s var(--codex-ease), border-color .24s var(--codex-ease), background-color .24s var(--codex-ease), transform .24s var(--codex-ease);
}

.codex-share-row .bdsharebuttonbox a::before {
  content: "↗";
}

.codex-share-row .bdsharebuttonbox .th_sina::before { content: "S"; }
.codex-share-row .bdsharebuttonbox .th_weixin::before { content: "W"; }
.codex-share-row .bdsharebuttonbox .th_qq::before { content: "Q"; }

.codex-share-row .bdsharebuttonbox a:hover {
  color: #fff !important;
  border-color: var(--codex-brand) !important;
  background: var(--codex-brand) !important;
  transform: translateY(-2px);
}

.codex-detail-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 820px);
  justify-content: center;
  align-items: start;
  gap: 64px;
}

.codex-toc {
  position: sticky;
  top: 112px;
  min-width: 0;
}

.codex-toc-card {
  padding: 20px 18px;
  border: 1px solid var(--codex-line);
  border-radius: var(--codex-radius);
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--codex-shadow-soft);
}

.codex-toc-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.codex-toc-title {
  color: var(--codex-ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
}

.codex-toc-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--codex-line);
  border-radius: 9px;
  color: var(--codex-brand);
  background: #fff;
  cursor: pointer;
}

.codex-toc-nav {
  max-height: calc(100vh - 190px);
  overflow: auto;
  scrollbar-width: thin;
}

.codex-toc-nav a {
  display: block;
  padding: 7px 8px;
  border-left: 2px solid transparent;
  color: var(--codex-muted);
  font-size: 12px;
  line-height: 1.55;
  text-decoration: none;
  transition: color .22s var(--codex-ease), border-color .22s var(--codex-ease), background-color .22s var(--codex-ease);
}

.codex-toc-nav a.level-3 {
  padding-left: 20px;
  color: var(--codex-soft);
  font-size: 11px;
}

.codex-toc-nav a:hover,
.codex-toc-nav a[aria-current="true"] {
  border-left-color: var(--codex-brand);
  color: var(--codex-brand-deep);
  background: #f1f6fa;
}

.codex-reading-column {
  min-width: 0;
}

.codex-detail-page .th_news_info_cont {
  margin: 0;
  padding: 52px clamp(28px, 5vw, 64px) 60px;
  border: 1px solid #e7edf3;
  border-radius: 24px;
  color: #334155;
  background: var(--codex-surface);
  box-shadow: var(--codex-shadow);
  font-size: 18px;
  line-height: 1.95;
}

.codex-detail-page .th_news_info_cont > *:first-child {
  margin-top: 0;
}

.codex-detail-page .th_news_info_cont p {
  margin: 0 0 28px;
  color: #334155;
  font-size: 18px;
  line-height: 1.95;
}

.codex-detail-page .th_news_info_cont > p:first-child {
  color: #1e293b;
  font-size: 20px;
  line-height: 1.85;
}

.codex-detail-page .th_news_info_cont h2,
.codex-detail-page .th_news_info_cont h3,
.codex-detail-page .th_news_info_cont h4 {
  scroll-margin-top: 130px;
  color: var(--codex-ink);
  font-weight: 750;
}

.codex-detail-page .th_news_info_cont h2 {
  margin: 58px 0 22px;
  padding: 13px 18px 13px 22px;
  border: 0;
  border-left: 4px solid var(--codex-brand);
  border-radius: 0 12px 12px 0;
  background: #f3f7fa;
  font-size: 28px;
  line-height: 1.38;
}

.codex-detail-page .th_news_info_cont h3 {
  margin: 34px 0 12px;
  padding: 0;
  color: var(--codex-brand-deep);
  font-size: 20px;
  line-height: 1.5;
}

.codex-detail-page .th_news_info_cont h4 {
  margin: 28px 0 10px;
  font-size: 18px;
  line-height: 1.5;
}

.codex-detail-page .th_news_info_cont strong {
  color: var(--codex-ink);
  font-weight: 750;
}

.codex-detail-page .th_news_info_cont a {
  color: var(--codex-brand);
  text-decoration: underline;
  text-decoration-color: rgba(28, 90, 130, .3);
  text-underline-offset: 3px;
}

.codex-detail-page .th_news_info_cont a:hover {
  color: var(--codex-brand-deep);
  text-decoration-color: currentColor;
}

.codex-detail-page .th_news_info_cont ul,
.codex-detail-page .th_news_info_cont ol {
  margin: 0 0 30px;
  padding-left: 1.5em;
}

.codex-detail-page .th_news_info_cont li {
  margin: 10px 0;
  padding-left: 6px;
}

.codex-detail-page .th_news_info_cont li::marker {
  color: var(--codex-brand);
  font-weight: 700;
}

.codex-detail-page .th_news_info_cont blockquote {
  margin: 34px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--codex-brand);
  border-radius: 0 14px 14px 0;
  color: var(--codex-brand-deep);
  background: #f1f6fa;
}

.codex-detail-page .th_news_info_cont img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 48px auto;
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .12);
  cursor: zoom-in;
  transition: transform .35s var(--codex-ease), box-shadow .35s var(--codex-ease);
}

.codex-detail-page .th_news_info_cont img:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(15, 23, 42, .16);
}

.codex-detail-page .th_news_info_cont table {
  width: 100%;
  margin: 32px 0;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--codex-line);
  border-radius: 12px;
}

.codex-detail-page .th_news_info_cont th,
.codex-detail-page .th_news_info_cont td {
  padding: 12px 14px;
  border: 1px solid var(--codex-line);
  text-align: left;
}

.codex-detail-page .th_news_info_cont th {
  color: var(--codex-ink);
  background: #f8fafc;
}

.codex-article-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 28px;
  padding: 30px 32px;
  border-radius: 22px;
  color: #fff;
  background: var(--codex-brand-deep);
  box-shadow: 0 18px 44px rgba(18, 63, 91, .2);
}

.codex-cta-eyebrow {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, .64);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.codex-article-cta-title {
  margin: 0 0 8px;
  color: #fff;
  font-size: 24px;
  line-height: 1.35;
}

.codex-article-cta p {
  max-width: 530px;
  margin: 0;
  color: rgba(255, 255, 255, .76);
  font-size: 14px;
  line-height: 1.75;
}

.codex-cta-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
}

.codex-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none !important;
  transition: transform .24s var(--codex-ease), background-color .24s var(--codex-ease), border-color .24s var(--codex-ease), color .24s var(--codex-ease);
}

.codex-button-primary {
  color: var(--codex-brand-deep) !important;
  background: #fff;
}

.codex-button-primary:hover {
  color: var(--codex-brand-deep) !important;
  background: #e8f1f6;
  transform: translateY(-2px);
}

.codex-button-ghost {
  border-color: rgba(255, 255, 255, .32);
  color: #fff !important;
  background: transparent;
}

.codex-button-ghost:hover {
  border-color: rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .1);
  transform: translateY(-2px);
}

.codex-related {
  margin-top: 42px;
}

.codex-related.is-empty {
  display: none;
}

.codex-related-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.codex-related-heading-title {
  margin: 0;
  color: var(--codex-ink);
  font-size: 22px;
  line-height: 1.4;
}

.codex-related-heading a {
  color: var(--codex-brand);
  font-size: 13px;
  text-decoration: none;
}

.codex-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.codex-related-card {
  display: flex;
  align-items: stretch;
  min-height: 126px;
  overflow: hidden;
  border: 1px solid var(--codex-line);
  border-radius: 16px;
  color: var(--codex-ink);
  background: #fff;
  box-shadow: var(--codex-shadow-soft);
  text-decoration: none !important;
  transition: transform .28s var(--codex-ease), box-shadow .28s var(--codex-ease), border-color .28s var(--codex-ease);
}

.codex-related-card:hover {
  border-color: #bfd3e0;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .1);
  transform: translateY(-4px);
}

.codex-related-media {
  display: flex;
  flex: 0 0 92px;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .82);
  background: var(--codex-brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.codex-related-copy {
  min-width: 0;
  padding: 17px 16px;
}

.codex-related-type {
  display: block;
  margin-bottom: 8px;
  color: var(--codex-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.codex-related-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--codex-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.codex-related-arrow {
  display: block;
  margin-top: 8px;
  color: var(--codex-brand);
  font-size: 12px;
}

.codex-detail-page .th_page_n {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding: 20px 0 0;
  border-top: 1px solid var(--codex-line);
}

.codex-detail-page .th_page_n > div {
  float: none;
  min-width: 0;
  flex: 1 1 0;
}

.codex-detail-page .th_page_n .f-fr {
  text-align: right;
}

.codex-detail-page .th_page_n a {
  color: var(--codex-muted);
  text-decoration: none;
}

.codex-detail-page .th_page_n a:hover {
  color: var(--codex-brand);
}

.codex-back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--codex-line);
  border-radius: 50%;
  color: var(--codex-brand);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--codex-shadow-soft);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .24s var(--codex-ease), transform .24s var(--codex-ease), background-color .24s var(--codex-ease);
}

.codex-back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.codex-back-top:hover {
  background: #f1f6fa;
  transform: translateY(-2px);
}

.codex-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(2, 8, 23, .86);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s var(--codex-ease);
}

.codex-image-viewer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.codex-image-viewer img {
  max-width: min(1200px, 94vw);
  max-height: 88vh;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .34);
  object-fit: contain;
}

.codex-image-viewer button {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  font-size: 24px;
  cursor: pointer;
}

.codex-enhanced .codex-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .6s var(--codex-ease), transform .6s var(--codex-ease);
}

.codex-enhanced .codex-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1080px) {
  .codex-detail-layout {
    grid-template-columns: 190px minmax(0, 820px);
    gap: 34px;
  }

  .codex-detail-page .th_main {
    padding-right: 18px;
    padding-left: 18px;
  }
}

@media (max-width: 860px) {
  .codex-detail-page .th_ins_ban {
    height: 300px;
  }

  .codex-detail-layout {
    display: block;
  }

  .codex-toc {
    position: static;
    margin-bottom: 18px;
  }

  .codex-toc-card {
    padding: 14px 16px;
  }

  .codex-toc-title-row {
    margin-bottom: 0;
  }

  .codex-toc-toggle {
    display: inline-flex;
  }

  .codex-toc-nav {
    display: none;
    max-height: 280px;
    margin-top: 12px;
  }

  .codex-toc.is-open .codex-toc-nav {
    display: block;
  }

  .codex-article-cta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .codex-detail-page .th_ins_ban {
    height: 240px;
    margin-top: 74px;
  }

  .codex-detail-page .th_ins_ban .th_con_txt h1 {
    font-size: 32px;
  }

  .codex-detail-page .th_main {
    padding: 0 14px 64px;
  }

  .codex-detail-page .th_breadcrumb {
    padding-top: 16px;
  }

  .codex-news-detail {
    margin-top: 24px;
  }

  .codex-news-header {
    margin-bottom: 30px;
  }

  .codex-news-header h1.codex-news-title {
    margin-top: 16px;
    font-size: clamp(32px, 9vw, 40px);
    line-height: 1.2;
  }

  .codex-article-meta {
    gap: 5px 12px;
    font-size: 12px;
  }

  .codex-detail-page .th_news_info_cont {
    padding: 32px 20px 40px;
    border-radius: 18px;
    font-size: 17px;
    line-height: 1.88;
  }

  .codex-detail-page .th_news_info_cont p,
  .codex-detail-page .th_news_info_cont > p:first-child {
    font-size: 17px;
    line-height: 1.88;
  }

  .codex-detail-page .th_news_info_cont > p:first-child {
    font-size: 18px;
  }

  .codex-detail-page .th_news_info_cont h2 {
    margin-top: 42px;
    padding: 10px 12px 10px 16px;
    border-left-width: 3px;
    font-size: 23px;
  }

  .codex-detail-page .th_news_info_cont h3 {
    margin-top: 28px;
    font-size: 18px;
  }

  .codex-detail-page .th_news_info_cont img {
    margin: 34px auto;
    border-radius: 12px;
  }

  .codex-article-cta {
    padding: 24px 20px;
    border-radius: 18px;
  }

  .codex-article-cta-title {
    font-size: 21px;
  }

  .codex-cta-actions,
  .codex-cta-actions .codex-button {
    width: 100%;
  }

  .codex-related-grid {
    grid-template-columns: 1fr;
  }

  .codex-detail-page .th_page_n {
    display: block;
  }

  .codex-detail-page .th_page_n > div,
  .codex-detail-page .th_page_n .f-fr {
    text-align: left;
  }

  .codex-detail-page .th_page_n .f-fr {
    margin-top: 14px;
  }

  .codex-back-top {
    right: 16px;
    bottom: 16px;
  }
}

/* Keep the legacy consultation trigger clear of the reading column on phones. */
@media (max-width: 640px) {
  .codex-detail-page .embed-icon {
    top: auto !important;
    right: 10px !important;
    bottom: calc(20px + env(safe-area-inset-bottom)) !important;
    left: auto !important;
    transform: scale(.82) !important;
    transform-origin: bottom right;
  }
}
@media (prefers-reduced-motion: reduce) {
  .codex-detail-page *,
  .codex-detail-page *::before,
  .codex-detail-page *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }

  .codex-enhanced .codex-reveal {
    opacity: 1;
    transform: none;
  }
}


