:root {
  --primary: #1A2B48;
  --primary-dark: #101B2F;
  --accent: #7BA3C2;
  --secondary: #C8D2E0;
  --paper: #F5F3EE;
  --surface: #FFFFFF;
  --text: #1D2433;
  --muted: #5F6470;
  --line: #D8D2C8;
  --shadow: 0 18px 42px rgba(29, 36, 51, .10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html.home-snap {
  scroll-snap-type: y mandatory;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 34px;
}

/* Header */
.site-header {
  z-index: 1000;
  color: var(--primary);
  transition: background .28s ease, color .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.home-page .site-header {
  position: fixed;
  inset: 0 0 auto 0;
  color: #fff;
  background: linear-gradient(
    180deg,
    rgba(7, 12, 22, .50) 0%,
    rgba(16, 27, 47, .22) 58%,
    rgba(16, 27, 47, 0) 100%
  );
  border-bottom: 0;
  box-shadow: none;
}

.home-page .site-header.is-scrolled {
  background: rgba(245, 243, 238, .96);
  color: var(--primary);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(29,36,51,.06);
  backdrop-filter: blur(10px);
}

.sub-page .site-header,
.utility-page .site-header {
  position: sticky;
  top: 0;
  color: var(--primary);
  background: rgba(245, 243, 238, .96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(29,36,51,.04);
  backdrop-filter: blur(10px);
}

.topbar {
  height: 30px;
  line-height: 30px;
  font-size: 13px;
  color: inherit;
}

.topbar-inner {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
}

.topbar a,
.topbar span {
  white-space: nowrap;
  color: inherit;
  opacity: .92;
}

.home-page .site-header:not(.is-scrolled) .topbar a,
.home-page .site-header:not(.is-scrolled) .topbar span {
  text-shadow: 0 2px 10px rgba(0,0,0,.58);
}

.topbar a:hover { color: var(--accent); }

.mainnav {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
}

.home-page .site-header:not(.is-scrolled) .brand-mark {
  background: rgba(16,27,47,.58);
  border-color: rgba(255,255,255,.28);
}

.brand-title {
  color: inherit;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: .02em;
}

.brand-subtitle {
  margin-top: 3px;
  color: inherit;
  opacity: .72;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.home-page .site-header:not(.is-scrolled) .brand-title,
.home-page .site-header:not(.is-scrolled) .brand-subtitle,
.home-page .site-header:not(.is-scrolled) .nav-links a {
  text-shadow: 0 2px 12px rgba(0,0,0,.58);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  color: inherit;
  font-size: 15px;
  font-weight: 680;
  opacity: .95;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

/* Home */
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--primary-dark);
  scroll-snap-align: start;
}

.hero-carousel {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.hero-carousel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 1200ms ease, transform 7200ms ease;
}

.hero-carousel img.active {
  opacity: 1;
  transform: scale(1.06);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 106px;
}

.hero-copy {
  max-width: 840px;
  color: #fff;
}

.eyebrow {
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .32em;
  text-transform: uppercase;
  text-shadow: 0 3px 18px rgba(0,0,0,.68);
}

.hero h1 {
  margin: 22px 0 0;
  color: #fff;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(44px, 6.4vw, 86px);
  line-height: 1.06;
  text-shadow: 0 3px 18px rgba(0,0,0,.68);
}

.hero h1 span {
  display: block;
  margin-top: 12px;
  font-size: clamp(28px, 3.8vw, 52px);
}

.hero p {
  max-width: 780px;
  margin: 28px 0 0;
  color: rgba(255,255,255,.94);
  font-size: 18px;
  line-height: 1.9;
  text-shadow: 0 3px 18px rgba(0,0,0,.68);
}

.buttons {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 750;
  transition: .2s ease;
}

.button:hover { transform: translateY(-2px); }

.button-primary {
  background: var(--accent);
  color: var(--primary-dark);
  box-shadow: 0 16px 35px rgba(0,0,0,.22);
}

.button-secondary {
  border: 1px solid rgba(255,255,255,.45);
  color: #fff;
  background: rgba(16,27,47,.12);
}

.home-bottom {
  min-height: 100vh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.overview-section {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 86px 0 72px;
}

/* Common content */
.section {
  padding: 72px 0;
}

.section-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 30px;
}

.label {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .26em;
  text-transform: uppercase;
}

h1, h2, h3 {
  color: var(--primary);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
}

h2 {
  margin: 10px 0 0;
  font-size: 42px;
  line-height: 1.2;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 32px;
  min-height: 230px;
  box-shadow: 0 8px 24px rgba(29,36,51,.05);
  transition: .2s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0;
  font-size: 25px;
}

.card p {
  color: var(--muted);
  line-height: 1.8;
  margin: 16px 0 0;
}

/* Sub pages */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 88px 0;
}

.page-hero .label {
  color: var(--accent);
}

.page-hero h1 {
  margin: 14px 0 0;
  color: #fff;
  font-size: clamp(42px, 6vw, 70px);
}

.page-hero p {
  max-width: 780px;
  color: #E7EEF6;
  line-height: 1.9;
  font-size: 17px;
}

.page-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 42px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 124px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 8px 22px rgba(29,36,51,.04);
}

.sidebar-title {
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 12px;
}

.sidebar a {
  display: block;
  padding: 11px 12px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 14px;
}

.sidebar a:hover {
  background: #E7EEF6;
  color: var(--primary);
}

.content-block,
.item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 34px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(29,36,51,.04);
}

.content-block h2,
.item h2 {
  font-size: 34px;
}

.content-block p,
.content-block li,
.item p {
  color: var(--muted);
  line-height: 1.9;
}

.item-tag {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* Footer */
.footer {
  background: var(--primary);
  color: #fff;
  padding: 42px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.footer-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 700;
}

.footer-subtitle,
.copyright,
.beian {
  margin-top: 8px;
  color: #E7EEF6;
  font-size: 13px;
}

.beian a:hover {
  color: var(--accent);
  text-decoration: underline;
}

@media (max-width: 960px) {
  html.home-snap {
    scroll-snap-type: none;
  }

  .container {
    padding: 0 20px;
  }

  .topbar {
    display: none;
  }

  .mainnav {
    height: 76px;
  }

  .nav-links {
    display: none;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .brand-title {
    font-size: 20px;
  }

  .brand-subtitle {
    font-size: 11px;
  }

  .hero-inner {
    padding-top: 76px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .page-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .footer-inner {
    flex-direction: column;
  }
}

/* ===== Language dropdown in topbar ===== */
.language-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.language-menu summary {
  list-style: none;
  cursor: pointer;
  color: inherit;
  opacity: .94;
  user-select: none;
  white-space: nowrap;
}

.language-menu summary::-webkit-details-marker {
  display: none;
}

.language-menu summary::after {
  content: "⌄";
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  transform: translateY(-1px);
  opacity: .82;
}

.language-menu[open] summary::after {
  transform: translateY(-1px) rotate(180deg);
}

.language-options {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 2000;
  min-width: 150px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(245, 243, 238, .98);
  border: 1px solid var(--line, #D8D2C8);
  box-shadow: 0 16px 36px rgba(16, 27, 47, .16);
  display: grid;
  gap: 3px;
}

.language-options a {
  display: block;
  padding: 9px 11px;
  border-radius: 12px;
  color: var(--primary, #1A2B48) !important;
  opacity: 1 !important;
  text-shadow: none !important;
  line-height: 1.2;
}

.language-options a:hover {
  background: #E7EEF6;
  color: var(--primary, #1A2B48) !important;
}

.topbar-search {
  white-space: nowrap;
}

/* ===== Shared language dropdown ===== */
.language-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.language-menu summary {
  list-style: none;
  cursor: pointer;
  color: inherit;
  user-select: none;
  white-space: nowrap;
}

.language-menu summary::-webkit-details-marker {
  display: none;
}

.language-menu summary::after {
  content: "⌄";
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
}

.language-options {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 2000;
  min-width: 150px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(245, 243, 238, .98);
  border: 1px solid var(--line, #D8D2C8);
  box-shadow: 0 16px 36px rgba(16, 27, 47, .16);
  display: grid;
  gap: 3px;
}

.language-options a {
  display: block;
  padding: 9px 11px;
  border-radius: 12px;
  color: var(--primary, #1A2B48) !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

.language-options a:hover {
  background: #E7EEF6;
}

/* === MOBILE PORTAL REFINEMENT V4 START === */

.mobile-actions,
.mobile-drawer {
  display: none;
}

@media (max-width: 760px) {
  :root {
    --mobile-theme: #1c315b;
    --mobile-page-bg: #f2f0eb;
    --mobile-card-bg: #fcfcfc;
    --mobile-border: rgba(28, 49, 91, .14);
    --mobile-text: #1c315b;
    --mobile-muted: #616978;
    --mobile-soft-blue: #eaf0f7;
  }

  html {
    scroll-padding-top: 74px;
  }

  body {
    overflow-x: hidden;
    background: var(--mobile-page-bg) !important;
    color: var(--mobile-text);
  }

  .topbar,
  .utilitybar,
  .utility-bar,
  .site-tools,
  .header-tools,
  .language-tools,
  .tool-row,
  .toolbar,
  .subheader,
  .sub-head,
  .site-header > .container:not(.mainnav),
  .site-header > .wrap:not(.mainnav),
  .site-header > div:not(.mainnav):not(.mobile-actions):not(.mobile-drawer) {
    display: none !important;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    color: #fff;
    background: var(--mobile-theme) !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .16);
  }

  .site-header .container.mainnav,
  .site-header .mainnav {
    width: 100%;
    max-width: none;
    min-height: 74px;
    height: 74px;
    margin: 0;
    padding: 0 18px;
    box-sizing: border-box;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--mobile-theme) !important;
    overflow: visible !important;
  }

  .brand {
    min-width: 0;
    display: flex !important;
    align-items: center;
    gap: 12px;
    color: #fff !important;
    text-decoration: none;
    flex: 1 1 auto;
  }

  .brand-mark {
    flex: 0 0 auto;
    width: 52px !important;
    height: 52px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255, 255, 255, .95) !important;
    background: rgba(255, 255, 255, .06) !important;
    color: #fff !important;
    display: grid !important;
    place-items: center !important;
    font-size: 25px !important;
    line-height: 1 !important;
  }

  .brand > div:not(.brand-mark) {
    min-width: 0;
  }

  .brand-title,
  .brand-name,
  .site-title {
    color: #fff !important;
    font-size: 19px !important;
    line-height: 1.06 !important;
    white-space: nowrap;
  }

  .brand-subtitle,
  .brand-kicker,
  .site-subtitle,
  .brand small {
    display: block;
    margin-top: 5px;
    color: rgba(255, 255, 255, .72) !important;
    font-size: 9px !important;
    line-height: 1.1 !important;
    letter-spacing: .15em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .mainnav nav,
  .mainnav .nav-links,
  .mainnav .site-nav,
  .mainnav .main-links,
  .mainnav .desktop-nav,
  .mainnav > a:not(.brand),
  .mainnav > button:not(.mobile-menu-button),
  .mainnav .search-link,
  .mainnav .header-search,
  .mobile-search-link {
    display: none !important;
  }

  .mobile-actions {
    margin-left: auto;
    display: flex !important;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
  }

  .mobile-lang-switch {
    position: relative;
    display: block;
  }

  .mobile-lang-switch summary {
    list-style: none;
    cursor: pointer;
    padding: 9px 2px;
    color: #fff;
    font-size: 14px;
    letter-spacing: .01em;
    user-select: none;
    white-space: nowrap;
  }

  .mobile-lang-switch summary::-webkit-details-marker {
    display: none;
  }

  .mobile-lang-switch summary::after {
    content: "⌄";
    margin-left: 3px;
    font-size: 12px;
    opacity: .78;
  }

  .mobile-lang-switch[open] summary::after {
    content: "⌃";
  }

  .mobile-lang-menu {
    position: absolute;
    top: 42px;
    right: 0;
    z-index: 2200;
    min-width: 148px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(252, 252, 252, .98);
    border: 1px solid rgba(28, 49, 91, .12);
    box-shadow: 0 16px 36px rgba(0, 0, 0, .18);
  }

  .mobile-lang-menu a {
    display: block;
    padding: 11px 12px;
    color: var(--mobile-theme);
    text-decoration: none;
    font-size: 15px;
    border-radius: 10px;
  }

  .mobile-menu-button {
    position: relative;
    width: 42px;
    height: 42px;
    border: 0;
    padding: 0;
    margin: 0;
    color: #fff;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
  }

  .mobile-menu-button span {
    position: absolute;
    left: 4px;
    right: 4px;
    height: 3px;
    border-radius: 3px;
    background: currentColor;
  }

  .mobile-menu-button span:nth-child(1) { top: 10px; }
  .mobile-menu-button span:nth-child(2) { top: 20px; }
  .mobile-menu-button span:nth-child(3) { top: 30px; }

  .mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    min-height: 100svh;
    overflow-y: auto;
    background: #f7f7f5;
    color: #222;
  }

  body.mobile-menu-open {
    overflow: hidden;
  }

  body.mobile-menu-open .mobile-drawer {
    display: block;
  }

  .mobile-drawer-head {
    min-height: 74px;
    padding: 12px 18px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-bottom: 1px solid rgba(28, 49, 91, .12);
  }

  .mobile-drawer-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--mobile-theme);
    text-decoration: none;
  }

  .mobile-drawer-mark {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--mobile-theme);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 22px;
  }

  .mobile-drawer-brand strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 18px;
    line-height: 1.1;
  }

  .mobile-drawer-brand small {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(28, 49, 91, .68);
    font-size: 9px;
    letter-spacing: .12em;
  }

  .drawer-lang-switch {
    position: relative;
    display: block;
  }

  .drawer-lang-switch summary {
    list-style: none;
    cursor: pointer;
    color: #222;
    font-size: 16px;
    white-space: nowrap;
  }

  .drawer-lang-switch summary::-webkit-details-marker {
    display: none;
  }

  .drawer-lang-switch summary::after {
    content: "⌄";
    margin-left: 3px;
    font-size: 12px;
  }

  .drawer-lang-switch[open] summary::after {
    content: "⌃";
  }

  .drawer-lang-menu {
    position: absolute;
    top: 34px;
    right: 0;
    z-index: 3200;
    min-width: 148px;
    padding: 8px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(28, 49, 91, .12);
    box-shadow: 0 16px 36px rgba(0, 0, 0, .16);
  }

  .drawer-lang-menu a {
    display: block;
    padding: 11px 12px;
    color: var(--mobile-theme);
    text-decoration: none;
    font-size: 15px;
    border-radius: 10px;
  }

  .mobile-drawer-close {
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    color: #222;
    font-size: 38px;
    line-height: 1;
    appearance: none;
    -webkit-appearance: none;
  }

  .mobile-drawer-list {
    background: #f7f7f5;
  }

  .mobile-drawer-list a {
    display: block;
    padding: 20px 24px;
    color: #222;
    text-decoration: none;
    font-size: 18px;
    line-height: 1.2;
    border-bottom: 1px solid rgba(0, 0, 0, .10);
  }

  .mobile-drawer-foot {
    display: flex;
    justify-content: center;
    background: var(--mobile-theme);
  }

  .mobile-drawer-foot a {
    padding: 15px 24px;
    color: rgba(255,255,255,.95);
    text-decoration: none;
    font-size: 15px;
  }

  .container {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding-left: 20px;
    padding-right: 20px;
  }

  body.home-page main > section:first-child,
  body.mobile-home-page main > section:first-child,
  body.home-page .hero,
  body.mobile-home-page .hero,
  body.home-page .home-hero,
  body.mobile-home-page .home-hero,
  body.home-page .landing-hero,
  body.mobile-home-page .landing-hero,
  body.home-page .site-hero,
  body.mobile-home-page .site-hero {
    min-height: 390px !important;
    height: 390px !important;
    max-height: 390px !important;
    padding: 54px 20px 28px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: flex-end !important;
    background-size: cover !important;
    background-position: center !important;
    overflow: hidden !important;
  }

  body.home-page h1,
  body.mobile-home-page h1,
  body.home-page .hero-title,
  body.mobile-home-page .hero-title {
    font-size: clamp(27px, 8.5vw, 40px) !important;
    line-height: 1.08 !important;
    margin: 0 0 10px !important;
  }

  body.home-page .hero p,
  body.mobile-home-page .hero p,
  body.home-page .home-hero p,
  body.mobile-home-page .home-hero p,
  body.home-page .hero-subtitle,
  body.mobile-home-page .hero-subtitle {
    font-size: 14px !important;
    line-height: 1.6 !important;
    max-width: 24em;
    margin-bottom: 0 !important;
  }

  body.home-page .hero .actions,
  body.mobile-home-page .hero .actions,
  body.home-page .hero-actions,
  body.mobile-home-page .hero-actions,
  body.home-page .home-hero .actions,
  body.mobile-home-page .home-hero .actions,
  body.home-page .hero .btn,
  body.mobile-home-page .hero .btn {
    display: none !important;
  }

  body:not(.home-page):not(.mobile-home-page) main > section:first-child,
  body:not(.home-page):not(.mobile-home-page) .page-hero,
  body:not(.home-page):not(.mobile-home-page) .subpage-hero,
  body:not(.home-page):not(.mobile-home-page) .hero,
  body:not(.home-page):not(.mobile-home-page) .page-banner,
  body:not(.home-page):not(.mobile-home-page) .hero-banner,
  body:not(.home-page):not(.mobile-home-page) .intro-hero {
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 24px 20px 16px !important;
    background: var(--mobile-page-bg) !important;
    box-sizing: border-box !important;
  }

  body:not(.home-page):not(.mobile-home-page) main {
    background: var(--mobile-page-bg) !important;
  }

  body:not(.home-page):not(.mobile-home-page) .eyebrow,
  body:not(.home-page):not(.mobile-home-page) .section-kicker,
  body:not(.home-page):not(.mobile-home-page) .page-kicker {
    color: #7c9dc3 !important;
    font-size: 13px !important;
    letter-spacing: .18em;
  }

  body:not(.home-page):not(.mobile-home-page) h1,
  body:not(.home-page):not(.mobile-home-page) .hero-title,
  body:not(.home-page):not(.mobile-home-page) .page-hero h1 {
    font-size: clamp(30px, 10vw, 44px) !important;
    line-height: 1.12 !important;
    color: var(--mobile-text) !important;
    opacity: 1 !important;
    margin-bottom: 12px !important;
  }

  body:not(.home-page):not(.mobile-home-page) .page-hero p,
  body:not(.home-page):not(.mobile-home-page) .hero p,
  body:not(.home-page):not(.mobile-home-page) .hero-subtitle,
  body:not(.home-page):not(.mobile-home-page) .page-intro,
  body:not(.home-page):not(.mobile-home-page) .intro-text {
    color: var(--mobile-muted) !important;
    font-size: 15px !important;
    line-height: 1.72 !important;
    opacity: 1 !important;
    margin-bottom: 0 !important;
  }

  .section,
  .page-section,
  main > section {
    padding-top: 28px !important;
    padding-bottom: 28px !important;
  }

  .section-title,
  .block-title,
  .page-title {
    font-size: clamp(24px, 8vw, 40px) !important;
    line-height: 1.14 !important;
    margin-bottom: 18px !important;
    color: var(--mobile-text) !important;
  }

  .page-layout,
  .content-layout,
  .subpage-layout,
  .two-column,
  .layout-with-sidebar {
    display: block !important;
  }

  .sidebar,
  .side-nav,
  .page-sidebar,
  .toc,
  .quick-nav {
    position: static !important;
    z-index: auto;
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    overflow-x: visible;
    margin: 8px 20px 18px !important;
    padding: 14px !important;
    background: rgba(255, 255, 255, .70) !important;
    border: 1px solid var(--mobile-border) !important;
    border-radius: 22px !important;
    box-shadow: 0 10px 22px rgba(21, 31, 25, .05) !important;
  }

  .sidebar > :not(a),
  .side-nav > :not(a),
  .page-sidebar > :not(a),
  .toc > :not(a),
  .quick-nav > :not(a) {
    flex: 1 0 100%;
    writing-mode: horizontal-tb !important;
    transform: none !important;
    white-space: normal !important;
    color: var(--mobile-text) !important;
    font-weight: 700;
    margin: 0 0 2px !important;
  }

  .sidebar a,
  .side-nav a,
  .page-sidebar a,
  .toc a,
  .quick-nav a {
    flex: 0 0 auto;
    max-width: 100%;
    white-space: nowrap;
    padding: 10px 16px !important;
    min-height: 0 !important;
    height: auto !important;
    color: var(--mobile-theme) !important;
    text-decoration: none;
    background: #f7f9fc !important;
    border: 1px solid rgba(28, 49, 91, .18) !important;
    border-radius: 999px !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
    writing-mode: horizontal-tb !important;
    transform: none !important;
  }

  .sidebar a.active,
  .side-nav a.active,
  .page-sidebar a.active,
  .toc a.active,
  .quick-nav a.active {
    color: #fff !important;
    background: var(--mobile-theme) !important;
    border-color: var(--mobile-theme) !important;
  }

  .overview-grid,
  .feature-grid,
  .cards-grid,
  .project-grid,
  .article-grid,
  .contact-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .card,
  .overview-card,
  .feature-card,
  .project-card,
  .article-card,
  .profile-card,
  .contact-card,
  .content-card,
  .panel {
    width: 100%;
    box-sizing: border-box;
    padding: 26px 20px !important;
    border: 1px solid rgba(28, 49, 91, .10) !important;
    border-radius: 26px !important;
    background: var(--mobile-card-bg) !important;
    box-shadow: 0 12px 34px rgba(21, 31, 25, .06) !important;
  }

  .card h2,
  .card h3,
  .project-card h2,
  .article-card h2,
  .profile-card h2,
  .contact-card h2,
  .content-card h2 {
    color: var(--mobile-text) !important;
    font-size: clamp(24px, 8vw, 34px) !important;
    line-height: 1.18 !important;
  }

  .card p,
  .project-card p,
  .article-card p,
  .profile-card p,
  .contact-card p,
  .content-card p,
  .panel p {
    color: var(--mobile-muted) !important;
    font-size: 15px !important;
    line-height: 1.78 !important;
  }

  footer,
  .site-footer {
    margin-top: 28px;
    background: var(--mobile-theme) !important;
    color: rgba(255, 255, 255, .92) !important;
  }

  footer a,
  .site-footer a {
    color: rgba(255, 255, 255, .92) !important;
  }

  img,
  video {
    max-width: 100%;
    height: auto;
  }
}

/* === MOBILE PORTAL REFINEMENT V4 END === */

/* === MOBILE PORTAL REFINEMENT V7 START === */

/*
  V7 is a surgical homepage correction:
  - remove the forced white topbar by HTML cleanup
  - make the homepage carousel behave like a compact portal banner
  - hide only the overlay copy/buttons, not the carousel images
  - show the mobile brand heading under the banner
*/

.mobile-home-brand-title {
  display: none;
}

@media (max-width: 760px) {
  .site-header .topbar,
  .topbar,
  .utilitybar,
  .utility-bar,
  .site-tools,
  .header-tools,
  .language-tools,
  .tool-row,
  .toolbar,
  .subheader,
  .sub-head {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.home-page .hero,
  body.mobile-home-page .hero {
    position: relative !important;
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #f2f0eb !important;
  }

  body.home-page .hero-carousel,
  body.mobile-home-page .hero-carousel {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    max-height: 260px !important;
    overflow: hidden !important;
    background: #f2f0eb !important;
  }

  body.home-page .hero-carousel img,
  body.mobile-home-page .hero-carousel img {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    opacity: 0 !important;
    visibility: visible !important;
  }

  body.home-page .hero-carousel img.active,
  body.mobile-home-page .hero-carousel img.active,
  body.home-page .hero-carousel img:first-child,
  body.mobile-home-page .hero-carousel img:first-child {
    opacity: 1 !important;
  }

  body.home-page .hero-inner,
  body.mobile-home-page .hero-inner,
  body.home-page .hero-copy,
  body.mobile-home-page .hero-copy,
  body.home-page .hero .buttons,
  body.mobile-home-page .hero .buttons,
  body.home-page .hero .button,
  body.mobile-home-page .hero .button,
  body.home-page .hero .hero-actions,
  body.mobile-home-page .hero .hero-actions {
    display: none !important;
  }

  body.home-page .overview-section .section-head > .label,
  body.mobile-home-page .overview-section .section-head > .label,
  body.home-page .overview-section .section-head > h2,
  body.mobile-home-page .overview-section .section-head > h2 {
    display: none !important;
  }

  body.home-page .mobile-home-brand-title,
  body.mobile-home-page .mobile-home-brand-title {
    display: block !important;
  }

  body.home-page .mobile-home-brand-title .label,
  body.mobile-home-page .mobile-home-brand-title .label {
    display: block !important;
    color: #7c9dc3 !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    letter-spacing: .18em !important;
    text-transform: uppercase !important;
    margin-bottom: 14px !important;
  }

  body.home-page .mobile-home-brand-title h2,
  body.mobile-home-page .mobile-home-brand-title h2 {
    color: #1c315b !important;
    font-size: clamp(34px, 10vw, 48px) !important;
    line-height: 1.04 !important;
    letter-spacing: 0 !important;
    margin: 0 !important;
  }

  body.home-page .mobile-home-brand-title p,
  body.mobile-home-page .mobile-home-brand-title p {
    display: block !important;
    color: #616978 !important;
    font-size: 16px !important;
    line-height: 1.45 !important;
    margin: 2px 0 18px !important;
  }

  body.home-page .overview-section,
  body.mobile-home-page .overview-section {
    padding-top: 52px !important;
  }
}

/* === MOBILE PORTAL REFINEMENT V7 END === */

/* === MOBILE PORTAL REFINEMENT V8 START === */

/*
  V8 fixes the oversized "border" around the homepage banner.
  Cause: the original carousel/container spacing plus V7's aspect-ratio created
  a boxed image with large empty margins. This forces the mobile homepage banner
  to be a full-width strip directly below the blue header.
*/

@media (max-width: 760px) {
  body.home-page .hero,
  body.mobile-home-page .hero {
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: #f2f0eb !important;
    overflow: hidden !important;
  }

  body.home-page .hero-carousel,
  body.mobile-home-page .hero-carousel {
    position: relative !important;
    inset: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: block !important;

    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;

    height: 210px !important;
    min-height: 210px !important;
    max-height: 210px !important;
    aspect-ratio: auto !important;

    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: hidden !important;
  }

  body.home-page .hero-carousel::before,
  body.home-page .hero-carousel::after,
  body.mobile-home-page .hero-carousel::before,
  body.mobile-home-page .hero-carousel::after {
    display: none !important;
    content: none !important;
  }

  body.home-page .hero-carousel img,
  body.mobile-home-page .hero-carousel img {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;

    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;

    object-fit: cover !important;
    object-position: center center !important;

    opacity: 0 !important;
    visibility: visible !important;
  }

  body.home-page .hero-carousel img.active,
  body.mobile-home-page .hero-carousel img.active {
    opacity: 1 !important;
  }

  body.home-page .hero-inner,
  body.mobile-home-page .hero-inner,
  body.home-page .hero-copy,
  body.mobile-home-page .hero-copy,
  body.home-page .hero .buttons,
  body.mobile-home-page .hero .buttons,
  body.home-page .hero .button,
  body.mobile-home-page .hero .button,
  body.home-page .hero .hero-actions,
  body.mobile-home-page .hero .hero-actions {
    display: none !important;
  }

  body.home-page .overview-section,
  body.mobile-home-page .overview-section {
    padding-top: 42px !important;
  }

  body.home-page .overview-section .container,
  body.mobile-home-page .overview-section .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* === MOBILE PORTAL REFINEMENT V8 END === */

/* === MOBILE PORTAL REFINEMENT V9 START === */

/*
  V9 removes the vertical blank bands around the mobile homepage banner.
  The blank bands came from older high-specificity rules targeting
  main > section:first-child with height/padding. This block overrides those
  exact selectors, not only .hero.
*/

@media (max-width: 760px) {
  body.home-page main > section:first-child,
  body.mobile-home-page main > section:first-child,
  body.home-page main > section.hero:first-child,
  body.mobile-home-page main > section.hero:first-child,
  body.home-page .hero,
  body.mobile-home-page .hero {
    position: relative !important;
    display: block !important;

    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;

    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;

    background: transparent !important;
    overflow: hidden !important;
  }

  body.home-page main > section:first-child .hero-carousel,
  body.mobile-home-page main > section:first-child .hero-carousel,
  body.home-page main > section.hero:first-child .hero-carousel,
  body.mobile-home-page main > section.hero:first-child .hero-carousel,
  body.home-page .hero-carousel,
  body.mobile-home-page .hero-carousel {
    position: relative !important;
    inset: auto !important;
    left: 0 !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;

    display: block !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;

    height: 210px !important;
    min-height: 210px !important;
    max-height: 210px !important;
    aspect-ratio: auto !important;

    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: hidden !important;
  }

  body.home-page main > section:first-child .hero-carousel img,
  body.mobile-home-page main > section:first-child .hero-carousel img,
  body.home-page main > section.hero:first-child .hero-carousel img,
  body.mobile-home-page main > section.hero:first-child .hero-carousel img,
  body.home-page .hero-carousel img,
  body.mobile-home-page .hero-carousel img {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;

    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;

    object-fit: cover !important;
    object-position: center center !important;

    opacity: 0 !important;
    visibility: visible !important;
  }

  body.home-page main > section:first-child .hero-carousel img.active,
  body.mobile-home-page main > section:first-child .hero-carousel img.active,
  body.home-page main > section.hero:first-child .hero-carousel img.active,
  body.mobile-home-page main > section.hero:first-child .hero-carousel img.active,
  body.home-page .hero-carousel img.active,
  body.mobile-home-page .hero-carousel img.active {
    opacity: 1 !important;
  }

  body.home-page main > section:first-child .hero-inner,
  body.mobile-home-page main > section:first-child .hero-inner,
  body.home-page main > section:first-child .hero-copy,
  body.mobile-home-page main > section:first-child .hero-copy,
  body.home-page main > section:first-child .buttons,
  body.mobile-home-page main > section:first-child .buttons,
  body.home-page main > section:first-child .button,
  body.mobile-home-page main > section:first-child .button,
  body.home-page .hero-inner,
  body.mobile-home-page .hero-inner,
  body.home-page .hero-copy,
  body.mobile-home-page .hero-copy,
  body.home-page .hero .buttons,
  body.mobile-home-page .hero .buttons,
  body.home-page .hero .button,
  body.mobile-home-page .hero .button {
    display: none !important;
  }

  body.home-page .overview-section,
  body.mobile-home-page .overview-section {
    margin-top: 0 !important;
    padding-top: 38px !important;
  }

  body.home-page .home-bottom,
  body.mobile-home-page .home-bottom {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}

/* === MOBILE PORTAL REFINEMENT V9 END === */

/* === MOBILE PORTAL REFINEMENT V10 START === */

/*
  V10: give the homepage banner a small breathing space below the blue header.
  V9 removed too much top spacing; this restores a controlled 12px gap without
  bringing back the old large blank bands.
*/

@media (max-width: 760px) {
  body.home-page main > section:first-child,
  body.mobile-home-page main > section:first-child,
  body.home-page main > section.hero:first-child,
  body.mobile-home-page main > section.hero:first-child,
  body.home-page .hero,
  body.mobile-home-page .hero {
    padding-top: 12px !important;
    background: #f2f0eb !important;
    box-sizing: border-box !important;
  }

  body.home-page main > section:first-child .hero-carousel,
  body.mobile-home-page main > section:first-child .hero-carousel,
  body.home-page main > section.hero:first-child .hero-carousel,
  body.mobile-home-page main > section.hero:first-child .hero-carousel,
  body.home-page .hero-carousel,
  body.mobile-home-page .hero-carousel {
    margin-top: 0 !important;
  }

  body.home-page .hero-carousel img,
  body.mobile-home-page .hero-carousel img {
    object-position: center center !important;
  }
}

/* === MOBILE PORTAL REFINEMENT V10 END === */

/* === MOBILE PORTAL REFINEMENT V11 START === */

/*
  V11: the header is not truly covering the image; V9 made the banner start too
  tightly under the blue header, and object-fit: cover crops the banner.
  This adds a visible top breathing gap and slightly lowers the image crop.
*/

@media (max-width: 760px) {
  body.home-page main > section:first-child,
  body.mobile-home-page main > section:first-child,
  body.home-page main > section.hero:first-child,
  body.mobile-home-page main > section.hero:first-child,
  body.home-page .hero,
  body.mobile-home-page .hero {
    padding-top: 22px !important;
    background: #f2f0eb !important;
    box-sizing: border-box !important;
  }

  body.home-page main > section:first-child .hero-carousel,
  body.mobile-home-page main > section:first-child .hero-carousel,
  body.home-page main > section.hero:first-child .hero-carousel,
  body.mobile-home-page main > section.hero:first-child .hero-carousel,
  body.home-page .hero-carousel,
  body.mobile-home-page .hero-carousel {
    margin-top: 0 !important;
    height: 216px !important;
    min-height: 216px !important;
    max-height: 216px !important;
  }

  body.home-page main > section:first-child .hero-carousel img,
  body.mobile-home-page main > section:first-child .hero-carousel img,
  body.home-page main > section.hero:first-child .hero-carousel img,
  body.mobile-home-page main > section.hero:first-child .hero-carousel img,
  body.home-page .hero-carousel img,
  body.mobile-home-page .hero-carousel img {
    object-position: center 56% !important;
  }

  body.home-page .overview-section,
  body.mobile-home-page .overview-section {
    padding-top: 38px !important;
  }
}

/* === MOBILE PORTAL REFINEMENT V11 END === */

/* === MOBILE PORTAL REFINEMENT V12 START === */

/*
  V12: fine-tune homepage banner rhythm.
  - Move the image a little lower from the blue header.
  - Pull the title block closer to the image.
  - Tighten the title block internal spacing.
*/

@media (max-width: 760px) {
  body.home-page main > section:first-child,
  body.mobile-home-page main > section:first-child,
  body.home-page main > section.hero:first-child,
  body.mobile-home-page main > section.hero:first-child,
  body.home-page .hero,
  body.mobile-home-page .hero {
    padding-top: 40px !important;
  }

  body.home-page .overview-section,
  body.mobile-home-page .overview-section {
    padding-top: 16px !important;
  }

  body.home-page .mobile-home-brand-title .label,
  body.mobile-home-page .mobile-home-brand-title .label {
    margin-bottom: 9px !important;
  }

  body.home-page .mobile-home-brand-title h2,
  body.mobile-home-page .mobile-home-brand-title h2 {
    margin-bottom: 2px !important;
    line-height: 1.02 !important;
  }

  body.home-page .mobile-home-brand-title p,
  body.mobile-home-page .mobile-home-brand-title p {
    margin-top: 0 !important;
    margin-bottom: 16px !important;
    line-height: 1.35 !important;
  }

  body.home-page .overview-section .section-head,
  body.mobile-home-page .overview-section .section-head {
    margin-bottom: 18px !important;
  }
}

/* === MOBILE PORTAL REFINEMENT V12 END === */

/* === MOBILE PORTAL REFINEMENT V13 START === */

/*
  V13: simplify the homepage mobile title block.
  Below the hero image, keep only:
  "Kintigher · 个人学术与项目主页"
  This avoids repeating the main header logo/title.
*/

@media (max-width: 760px) {
  body.home-page .mobile-home-brand-title .label,
  body.mobile-home-page .mobile-home-brand-title .label,
  body.home-page .mobile-home-brand-title h2,
  body.mobile-home-page .mobile-home-brand-title h2 {
    display: none !important;
  }

  body.home-page .mobile-home-brand-title,
  body.mobile-home-page .mobile-home-brand-title {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.home-page .mobile-home-brand-title p,
  body.mobile-home-page .mobile-home-brand-title p {
    display: block !important;
    margin: 0 0 18px !important;
    color: #1c315b !important;
    font-size: clamp(22px, 5.8vw, 28px) !important;
    line-height: 1.25 !important;
    font-weight: 650 !important;
    letter-spacing: .01em !important;
  }

  body.home-page .overview-section,
  body.mobile-home-page .overview-section {
    padding-top: 18px !important;
  }

  body.home-page .overview-section .section-head,
  body.mobile-home-page .overview-section .section-head {
    margin-bottom: 14px !important;
  }
}

/* === MOBILE PORTAL REFINEMENT V13 END === */

/* === MOBILE PORTAL REFINEMENT V14 START === */

/*
  V14: On mobile, remove the directory title text for About / Articles / Contact:
  - 简介目录
  - 文章目录
  - 联系目录
  Keep the actual directory buttons.
*/

@media (max-width: 760px) {
  body.mobile-hide-directory-title .sidebar > :not(a),
  body.mobile-hide-directory-title .side-nav > :not(a),
  body.mobile-hide-directory-title .page-sidebar > :not(a),
  body.mobile-hide-directory-title .toc > :not(a),
  body.mobile-hide-directory-title .quick-nav > :not(a) {
    display: none !important;
  }

  body.mobile-hide-directory-title .sidebar,
  body.mobile-hide-directory-title .side-nav,
  body.mobile-hide-directory-title .page-sidebar,
  body.mobile-hide-directory-title .toc,
  body.mobile-hide-directory-title .quick-nav {
    padding: 12px 14px !important;
    gap: 10px !important;
  }
}

/* === MOBILE PORTAL REFINEMENT V14 END === */

/* === MOBILE PORTAL REFINEMENT V15 START === */

/*
  V15:
  1. Mobile /about, /articles, /contact:
     remove the whole directory navigation box, not only its title.
  2. Mobile /projects:
     keep the project directory, but normalize its scaling and wrapping.
  3. Mobile /about and /contact:
     restore spacing between adjacent content cards.
*/

@media (max-width: 760px) {
  /* Remove directory boxes completely on About / Articles / Contact. */
  body.mobile-remove-directory-nav .sidebar,
  body.mobile-remove-directory-nav .side-nav,
  body.mobile-remove-directory-nav .page-sidebar,
  body.mobile-remove-directory-nav .toc,
  body.mobile-remove-directory-nav .quick-nav {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    box-shadow: none !important;
  }

  /* Close the vertical gap left by the removed directory box. */
  body.mobile-remove-directory-nav .page-layout,
  body.mobile-remove-directory-nav .content-layout,
  body.mobile-remove-directory-nav .subpage-layout,
  body.mobile-remove-directory-nav .two-column,
  body.mobile-remove-directory-nav .layout-with-sidebar {
    gap: 0 !important;
    row-gap: 0 !important;
  }

  /*
    Normalize /projects directory. Do NOT remove this one:
    it is still useful because projects can grow.
  */
  body.mobile-project-page .sidebar,
  body.mobile-project-page .side-nav,
  body.mobile-project-page .page-sidebar,
  body.mobile-project-page .toc,
  body.mobile-project-page .quick-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 10px 12px !important;

    width: auto !important;
    max-width: calc(100vw - 40px) !important;
    min-width: 0 !important;

    margin: 8px 20px 22px !important;
    padding: 16px !important;

    box-sizing: border-box !important;
    transform: none !important;
    zoom: 1 !important;

    overflow: visible !important;
    border-radius: 22px !important;
  }

  body.mobile-project-page .sidebar > :not(a),
  body.mobile-project-page .side-nav > :not(a),
  body.mobile-project-page .page-sidebar > :not(a),
  body.mobile-project-page .toc > :not(a),
  body.mobile-project-page .quick-nav > :not(a) {
    display: block !important;
    flex: 1 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;

    margin: 0 0 4px !important;
    padding: 0 !important;

    color: #1c315b !important;
    font-size: 17px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    writing-mode: horizontal-tb !important;
    transform: none !important;
    white-space: normal !important;
  }

  body.mobile-project-page .sidebar a,
  body.mobile-project-page .side-nav a,
  body.mobile-project-page .page-sidebar a,
  body.mobile-project-page .toc a,
  body.mobile-project-page .quick-nav a {
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;

    padding: 10px 16px !important;
    box-sizing: border-box !important;

    color: #1c315b !important;
    background: #f7f9fc !important;
    border: 1px solid rgba(28, 49, 91, .18) !important;
    border-radius: 999px !important;

    font-size: 14px !important;
    line-height: 1.25 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    writing-mode: horizontal-tb !important;
    transform: none !important;
  }

  /* If a project label is too long, avoid blowing up the whole box. */
  body.mobile-project-page .sidebar a,
  body.mobile-project-page .side-nav a,
  body.mobile-project-page .page-sidebar a,
  body.mobile-project-page .toc a,
  body.mobile-project-page .quick-nav a {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /*
    Restore card rhythm on About / Contact.
    Earlier mobile card overrides made some neighboring cards visually touch.
  */
  body.mobile-restore-card-gap .card + .card,
  body.mobile-restore-card-gap .overview-card + .overview-card,
  body.mobile-restore-card-gap .feature-card + .feature-card,
  body.mobile-restore-card-gap .profile-card + .profile-card,
  body.mobile-restore-card-gap .contact-card + .contact-card,
  body.mobile-restore-card-gap .content-card + .content-card,
  body.mobile-restore-card-gap .panel + .panel {
    margin-top: 22px !important;
  }

  body.mobile-restore-card-gap .cards-grid,
  body.mobile-restore-card-gap .overview-grid,
  body.mobile-restore-card-gap .feature-grid,
  body.mobile-restore-card-gap .contact-grid {
    gap: 22px !important;
    row-gap: 22px !important;
  }

  /*
    Some pages use section anchors as cards rather than .card classes.
    This prevents first/second content blocks from visually merging.
  */
  body.mobile-restore-card-gap main > section:not(:first-child) + section:not(:first-child) {
    margin-top: 22px !important;
  }

  /* But do not create artificial gap right after the removed directory nav. */
  body.mobile-remove-directory-nav main > section:first-child + section,
  body.mobile-remove-directory-nav .page-hero + section,
  body.mobile-remove-directory-nav .subpage-hero + section {
    margin-top: 0 !important;
  }
}

/* === MOBILE PORTAL REFINEMENT V15 END === */

/* === BEIAN FOOTER START === */

.footer-police-beian-row {
  margin: 12px 0 0;
}

.footer-police-beian {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  line-height: 1.4;
}

.footer-police-beian .beianlogo {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex: 0 0 auto;
  object-fit: contain;
  vertical-align: middle;
}

.footer-police-beian a {
  color: inherit;
  text-decoration: none;
}

.footer-police-beian a:hover {
  text-decoration: underline;
}

@media (max-width: 760px) {
  .footer-police-beian-row {
    margin-top: 12px !important;
  }

  .footer-police-beian {
    font-size: 14px;
  }

  .footer-police-beian .beianlogo {
    width: 17px;
    height: 17px;
  }
}

/* === BEIAN FOOTER END === */

/* === CONTACT SOCIAL PAGE START === */

.contact-social-page {
  background: var(--paper, #f2f0eb);
}

.contact-social-hero {
  padding: 92px 0 76px;
  background:
    radial-gradient(circle at 22% 18%, rgba(124, 157, 195, .16), transparent 34%),
    linear-gradient(135deg, #0f1d35 0%, #1c315b 100%);
  color: #fff;
}

.contact-social-hero .label {
  color: #8fb0d4;
  letter-spacing: .22em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.contact-social-hero h1 {
  margin: 0 0 22px;
  color: #fff;
  font-size: clamp(52px, 6vw, 86px);
  line-height: 1.05;
}

.contact-social-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, .78);
  line-height: 1.8;
  font-size: 17px;
}

.contact-social-section {
  padding: 34px 0 120px;
}

.contact-social-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.contact-social-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 30px 28px;
  border: 1px solid rgba(28, 49, 91, .12);
  border-radius: 28px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 18px 46px rgba(21, 31, 25, .06);
  color: #1c315b;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.contact-social-card:hover {
  transform: translateY(-3px);
  border-color: rgba(28, 49, 91, .24);
  box-shadow: 0 24px 58px rgba(21, 31, 25, .10);
}

.contact-social-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #f7f9fc;
  border: 1px solid rgba(28, 49, 91, .10);
  overflow: hidden;
}

.contact-social-icon img {
  width: 38px;
  height: 38px;
  display: block;
  object-fit: contain;
}

.contact-social-text {
  min-width: 0;
  display: block;
}

.contact-social-text strong {
  display: block;
  font-size: 26px;
  line-height: 1.15;
  color: #1c315b;
}

.contact-social-text small {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: #616978;
  word-break: break-all;
}

.contact-social-arrow {
  color: #7c9dc3;
  font-size: 24px;
  line-height: 1;
}

.footer-police-beian-row {
  margin: 12px 0 0;
}

.footer-police-beian {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  line-height: 1.4;
}

.footer-police-beian .beianlogo {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex: 0 0 auto;
  object-fit: contain;
  vertical-align: middle;
}

.footer-police-beian a {
  color: inherit;
  text-decoration: none;
}

.footer-police-beian a:hover {
  text-decoration: underline;
}

@media (max-width: 1020px) {
  .contact-social-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .contact-social-hero {
    padding: 34px 20px 22px !important;
  }

  .contact-social-hero h1 {
    font-size: clamp(34px, 11vw, 48px) !important;
    line-height: 1.08 !important;
    margin-bottom: 14px !important;
  }

  .contact-social-hero p {
    font-size: 15px !important;
    line-height: 1.72 !important;
  }

  .contact-social-section {
    padding: 18px 20px 72px !important;
  }

  .contact-social-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .contact-social-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    padding: 24px 20px !important;
    border-radius: 24px !important;
  }

  .contact-social-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }

  .contact-social-icon img {
    width: 34px;
    height: 34px;
  }

  .contact-social-text strong {
    font-size: 24px;
  }

  .contact-social-text small {
    font-size: 14px;
  }

  .contact-social-arrow {
    font-size: 22px;
  }

  .footer-police-beian-row {
    margin-top: 12px !important;
  }

  .footer-police-beian {
    font-size: 14px;
  }

  .footer-police-beian .beianlogo {
    width: 17px;
    height: 17px;
  }
}

/* === CONTACT SOCIAL PAGE END === */

/* === UTILITY TOOLBAR SMALL RESET START === */

/*
  Restore the small desktop utility toolbar style:
  语言 / Language   搜索   图书馆
  Do not touch the main navigation row.
*/

.utility-library-link {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  margin-left: 0;
  font: inherit;
  letter-spacing: inherit;
}

.utility-library-link:hover {
  text-decoration: none;
  opacity: .86;
}

@media (min-width: 761px) {
  .utility-toolbar-small,
  .utility-toolbar-small a,
  .utility-toolbar-small button,
  .utility-toolbar-small summary,
  .utility-toolbar-small .utility-library-link {
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    color: inherit !important;
  }

  .utility-toolbar-small {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 18px !important;
  }

  .mainnav .library-nav-link,
  .site-header .mainnav .library-nav-link,
  header .mainnav .library-nav-link {
    display: none !important;
  }
}

@media (max-width: 760px) {
  .utility-library-link {
    display: none !important;
  }
}

/* === UTILITY TOOLBAR SMALL RESET END === */

/* === HOME LANGUAGE DROPDOWN FIX START === */

/*
  Fix homepage language dropdown:
  homepage header uses white text over hero image, but dropdown items should stay dark.
*/

body.k-home-lang-fix .k-lang-popover-fixed,
body.k-home-lang-fix .k-lang-popover-fixed *,
body.home-page .k-lang-popover-fixed,
body.home-page .k-lang-popover-fixed * {
  color: #1c315b !important;
  text-shadow: none !important;
}

body.k-home-lang-fix .k-lang-popover-fixed,
body.home-page .k-lang-popover-fixed {
  background: rgba(242, 240, 235, .96) !important;
  border: 1px solid rgba(28, 49, 91, .12) !important;
  border-radius: 18px !important;
  box-shadow: 0 18px 42px rgba(15, 29, 53, .16) !important;
  backdrop-filter: blur(12px);
}

body.k-home-lang-fix .k-lang-option-fixed,
body.home-page .k-lang-option-fixed {
  color: #1c315b !important;
  opacity: 1 !important;
  font-family: inherit !important;
  font-weight: 600 !important;
}

body.k-home-lang-fix .k-lang-option-fixed:hover,
body.home-page .k-lang-option-fixed:hover {
  background: rgba(124, 157, 195, .14) !important;
  color: #1c315b !important;
}

/* Avoid forcing the top toolbar trigger itself to dark. */
body.k-home-lang-fix .utility-toolbar-small > .k-lang-popover-fixed,
body.home-page .utility-toolbar-small > .k-lang-popover-fixed {
  color: inherit !important;
}

/* === HOME LANGUAGE DROPDOWN FIX END === */
