:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --text: #132238;
  --muted: #61718a;
  --muted-2: #8a98aa;
  --line: rgba(31, 50, 78, 0.11);
  --primary: #246bfe;
  --primary-2: #0fc6a6;
  --primary-3: #7c3aed;
  --warning: #f59e0b;
  --shadow: 0 24px 70px rgba(33, 49, 83, 0.12);
  --shadow-soft: 0 14px 35px rgba(30, 52, 89, 0.10);
  --radius-lg: 30px;
  --header-height: 64px;
  --max-width: 1220px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(circle at top left, rgba(36, 107, 254, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(15, 198, 166, 0.18), transparent 30rem),
    linear-gradient(180deg, #f9fbff 0%, var(--bg) 46%, #eef4ff 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(25, 47, 83, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 47, 83, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent 76%);
  z-index: -1;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(246, 248, 251, 0.76);
  backdrop-filter: blur(20px) saturate(170%);
}

.nav {
  position: relative;
  width: min(var(--max-width), calc(100% - 24px));
  height: var(--header-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  transition: height 260ms ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand__logo {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 14px 26px rgba(36, 107, 254, 0.28);
  transition: width 260ms ease, height 260ms ease, border-radius 260ms ease, box-shadow 260ms ease;
}

body.is-article-page {
  --header-height: 56px;
}

body.is-article-page .brand__logo {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  box-shadow: 0 10px 20px rgba(36, 107, 254, 0.22);
}

.brand__name,
.brand__tagline {
  display: block;
  line-height: 1.15;
}

.brand__name {
  font-weight: 850;
  letter-spacing: -0.02em;
  font-size: 18px;
}

.brand__tagline {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.nav__toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-solid);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
}

.search {
  position: relative;
  width: 150px;
  flex: 0 0 150px;
}

.search input {
  width: 100%;
  height: 38px;
  padding: 0 11px 0 34px;
  border: 1px solid rgba(31, 50, 78, 0.12);
  border-radius: 999px;
  outline: none;
  color: var(--text);
  background:
    linear-gradient(transparent, transparent),
    rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(30, 52, 89, 0.06);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.search::before {
  content: "⌕";
  position: absolute;
  left: 13px;
  top: 50%;
  z-index: 1;
  color: var(--muted-2);
  font-size: 18px;
  line-height: 1;
  transform: translateY(-52%);
}

.search input:focus {
  border-color: rgba(36, 107, 254, 0.34);
  box-shadow: 0 0 0 4px rgba(36, 107, 254, 0.08);
}

.search-results {
  position: absolute;
  z-index: 6;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 28px));
  display: none;
  padding: 8px;
  border: 1px solid rgba(31, 50, 78, 0.10);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-soft);
}

.search-results.is-open {
  display: grid;
  gap: 4px;
}

.search-result {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 13px;
  transition: background 0.18s ease;
}

.search-result:hover {
  background: rgba(31, 50, 78, 0.07);
}

.search-result__title {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.search-result__path,
.search-result--empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.nav__item {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav__item.is-active {
  color: var(--primary);
  background: rgba(36, 107, 254, 0.08);
}

.nav__item:hover:not(.is-active) {
  color: #263b57;
  background: rgba(31, 50, 78, 0.07);
  transform: translateY(-1px);
}

.nav__dropdown {
  position: relative;
  padding: 10px 0;
}

.dropdown-panel {
  position: absolute;
  z-index: 5;
  top: calc(100% - 4px);
  left: 50%;
  width: 188px;
  padding: 9px;
  border: 1px solid rgba(31, 50, 78, 0.10);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.nav__dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0) scale(1);
}

.dropdown-panel::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: -10px;
  height: 10px;
}

.dropdown-panel a {
  display: block;
  padding: 10px 11px;
  border-radius: 13px;
  color: var(--text);
  font-weight: 750;
  font-size: 14px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.dropdown-panel a:hover {
  color: #263b57;
  background: rgba(31, 50, 78, 0.07);
  transform: translateX(3px);
}

.dropdown-list--mobile {
  display: none;
}

.dropdown-list--mobile a {
  display: grid;
  gap: 4px;
}

.dropdown-list--mobile small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

main {
  width: min(var(--max-width), calc(100% - 24px));
  margin: 0 auto;
}

.home {
  padding: 28px 0 48px;
}

.home-heading {
  max-width: 820px;
  margin: 0 auto 24px;
  text-align: center;
}

.home-heading h1 {
  margin: 0;
  font-size: clamp(46px, 8vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.08em;
}

.home-heading h1 span {
  color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
}

.home-heading__subtitle {
  margin: 16px 0 0;
  color: #2a3d57;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 850;
  letter-spacing: -0.03em;
}

.home-heading__desc {
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  display: grid;
  place-items: center;
  padding: clamp(44px, 8vw, 86px) clamp(22px, 5vw, 76px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.93), rgba(255, 255, 255, 0.68)),
    radial-gradient(circle at 20% 10%, rgba(36, 107, 254, 0.20), transparent 28rem),
    radial-gradient(circle at 85% 20%, rgba(15, 198, 166, 0.22), transparent 24rem);
  box-shadow: var(--shadow);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.76;
}

.hero::before {
  width: 230px;
  height: 230px;
  right: -80px;
  bottom: -80px;
  background: linear-gradient(135deg, rgba(36, 107, 254, 0.20), rgba(124, 58, 237, 0.16));
}

.hero::after {
  width: 150px;
  height: 150px;
  left: -54px;
  top: 40px;
  background: linear-gradient(135deg, rgba(15, 198, 166, 0.20), rgba(36, 107, 254, 0.13));
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 820px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 13px;
  border: 1px solid rgba(36, 107, 254, 0.16);
  border-radius: 999px;
  color: var(--primary);
  background: rgba(36, 107, 254, 0.08);
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  font-size: clamp(46px, 9vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero h1 span {
  color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero__subtitle {
  margin: 22px auto 0;
  color: #2a3d57;
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 850;
  letter-spacing: -0.03em;
}

.hero__desc {
  max-width: 680px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn--primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #1651db);
  box-shadow: 0 18px 32px rgba(36, 107, 254, 0.25);
}

.btn--ghost {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 54px 0 22px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: -0.05em;
}

.section-title p {
  max-width: 520px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.home-card {
  position: relative;
  overflow: hidden;
  min-height: 268px;
  display: flex;
  flex-direction: column;
  padding: 23px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
  animation: card-up-in 0.42s ease backwards;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.home-card:nth-child(2) {
  animation-delay: 0.04s;
}

.home-card:nth-child(3) {
  animation-delay: 0.08s;
}

@keyframes card-up-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-card::before {
  content: "";
  position: absolute;
  inset: auto -28% -35% auto;
  width: 230px;
  height: 230px;
  border-radius: 999px;
  background: var(--card-glow, rgba(36, 107, 254, 0.16));
  transition: transform 0.38s ease, opacity 0.28s ease;
  opacity: 0.75;
}

.home-card:hover {
  transform: translateY(-10px) scale(1.01);
  box-shadow: 0 30px 70px rgba(26, 44, 80, 0.16);
  border-color: rgba(36, 107, 254, 0.22);
}

.home-card:hover::before {
  transform: scale(1.35) translate(-8%, -8%);
  opacity: 1;
}

.home-card__icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #ffffff;
  font-size: 26px;
  background: var(--card-gradient, linear-gradient(135deg, var(--primary), var(--primary-2)));
  box-shadow: 0 16px 30px rgba(36, 107, 254, 0.18);
}

.home-card h3 {
  position: relative;
  margin: 20px 0 9px;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.home-card p {
  position: relative;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.home-card__list {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding: 0;
  list-style: none;
}

.home-card__list li {
  padding: 7px 10px;
  border-radius: 999px;
  color: #30506f;
  background: rgba(36, 107, 254, 0.07);
  font-size: 13px;
  font-weight: 750;
}

.home-card__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 20px;
  color: var(--primary);
  font-weight: 850;
}

.article-shell {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 160px;
  gap: 14px;
  align-items: start;
  padding: 16px 0 60px;
}

.toc {
  position: sticky;
  top: calc(var(--header-height) + 14px);
  max-height: calc(100vh - var(--header-height) - 28px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(77, 101, 134, 0.52) transparent;
  background: transparent;
}

.sidebar {
  position: sticky;
  top: 0;
  max-height: 100vh;
  margin-top: calc(0px - var(--header-height) - 16px);
  overflow: hidden;
  background: transparent;
  transition: margin-top 260ms ease;
}

.sidebar__scroller {
  height: 100vh;
  padding-top: calc(var(--header-height) + 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  transition: padding-top 260ms ease;
}

.sidebar__scroller::-webkit-scrollbar {
  display: none;
}

.sidebar__scrollbar {
  position: absolute;
  top: calc(var(--header-height) + 20px);
  right: 2px;
  bottom: 12px;
  width: 7px;
  padding: 1px;
  border-radius: 999px;
  background: rgba(31, 50, 78, 0.08);
  box-shadow: inset 0 0 0 1px rgba(31, 50, 78, 0.05);
  transition: top 260ms ease;
}

.sidebar__scrollbar-thumb {
  display: block;
  width: 100%;
  min-height: 36px;
  border-radius: 999px;
  background: rgba(77, 101, 134, 0.58);
  cursor: grab;
  touch-action: none;
}

.sidebar__scrollbar-thumb.is-dragging {
  background: rgba(36, 107, 254, 0.78);
  cursor: grabbing;
}

.toc::-webkit-scrollbar {
  width: 7px;
}

.toc::-webkit-scrollbar-track {
  background: transparent;
}

.toc::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(77, 101, 134, 0.52);
}

.toc::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.sidebar__inner,
.toc__inner,
.article-card {
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(155%);
}

.sidebar__inner,
.toc__inner {
  padding: 12px;
  border-radius: 18px;
}

.sidebar__head,
.toc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.sidebar__head h2,
.toc__head h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.sidebar__head span,
.toc__head span {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 750;
}

.menu {
  display: grid;
  gap: 14px;
}

.menu__group {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(31, 50, 78, 0.08);
}

.menu__group:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.menu__parent,
.menu__leaf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 14px;
  font-weight: 850;
  font-size: 15px;
  line-height: 1.35;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.menu__parent {
  color: #263b57;
  background: rgba(36, 107, 254, 0.06);
}

.menu__parent.is-current {
  color: var(--primary);
  background: rgba(36, 107, 254, 0.11);
}

.menu__parent:hover:not(.is-current),
.menu__leaf:hover:not(.is-active) {
  color: #263b57;
  background: rgba(31, 50, 78, 0.07);
  transform: translateX(2px);
}

.menu__parent small,
.menu__leaf small {
  flex: 0 0 auto;
  color: var(--muted-2);
  font-size: 11px;
}

.menu__children {
  display: grid;
  gap: 4px;
  margin-top: 7px;
  padding-left: 8px;
}

.menu__child {
  display: block;
  padding: 8px 10px 8px 17px;
  border-left: 2px solid rgba(36, 107, 254, 0.12);
  border-radius: 0 12px 12px 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.menu__child.is-active,
.menu__leaf.is-active {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(36, 107, 254, 0.08);
}

.menu__child:hover:not(.is-active) {
  color: #263b57;
  border-color: rgba(31, 50, 78, 0.18);
  background: rgba(31, 50, 78, 0.07);
}

.article-card {
  overflow: hidden;
  border-radius: 30px;
}

.article-hero {
  padding: clamp(16px, 2.5vw, 24px) clamp(24px, 4vw, 38px);
  border-bottom: 1px solid rgba(31, 50, 78, 0.08);
  background:
    radial-gradient(circle at top right, rgba(36, 107, 254, 0.13), transparent 22rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(246, 249, 255, 0.86));
}

.sidebar__inner,
.toc__inner {
  overflow: hidden;
  background-clip: padding-box;
  isolation: isolate;
}

.article-hero h1 {
  margin: 0;
  font-size: clamp(28px, 4.5vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 999px;
  color: #36536f;
  background: rgba(36, 107, 254, 0.08);
  font-size: 13px;
  font-weight: 800;
}

.article-body {
  padding: clamp(18px, 2.5vw, 26px) clamp(24px, 4vw, 40px) clamp(26px, 4vw, 40px);
}

.article-body h2,
.article-body h3,
.article-body h4 {
  letter-spacing: -0.035em;
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.article-body h2 {
  margin: 34px 0 14px;
  padding-top: 4px;
  font-size: 28px;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  margin: 24px 0 10px;
  font-size: 21px;
}

.article-body h4 {
  margin: 20px 0 8px;
  color: #17283f;
  font-size: 18px;
}

.article-body p,
.article-body li {
  color: #33465e;
  font-size: 16px;
  line-height: 1.9;
}

.article-body .article-subsection-spaced {
  margin-top: 38px;
}

.article-toc-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.article-body a[href^="http://"],
.article-body a[href^="https://"],
.article-body a[href^="#"] {
  color: #155fd4;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(21, 95, 212, 0.45);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.article-body a[href^="http://"]:hover,
.article-body a[href^="https://"]:hover,
.article-body a[href^="#"]:hover {
  color: #0b46a3;
  text-decoration-color: currentColor;
}

.article-body a[href^="http://"]::after,
.article-body a[href^="https://"]::after {
  content: " ↗";
  font-size: 0.85em;
}

.article-body p {
  margin: 0 0 16px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 20px;
  padding-left: 1.35em;
}

.article-body strong {
  color: #17283f;
}

.article-body code {
  padding: 0.18em 0.42em;
  border-radius: 8px;
  color: #1d4ed8;
  background: rgba(36, 107, 254, 0.08);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.article-body img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(30, 52, 89, 0.12);
}

.article-body figure {
  margin: 24px 0;
}

.article-body .article-image-row {
  display: grid;
  gap: 16px;
  align-items: end;
  margin: 24px 0;
}

.article-body .article-image-row figure {
  min-width: 0;
  margin: 0;
}

.article-body .article-image-row img {
  width: 100%;
}

.article-body .article-figure {
  margin-inline: auto;
}

.article-body .article-figure img {
  width: 100%;
}

.article-body .article-figure--medium {
  width: min(58%, 520px);
}

.article-body .article-figure--portrait {
  width: min(30%, 260px);
}

.article-body .article-figure--qr {
  width: min(34%, 230px);
}

.article-body .article-figure--app-qr {
  width: min(24%, 150px);
}

.article-body .article-figure--hsbc-status {
  width: min(28%, 220px);
}

.article-body .text-danger {
  color: #dc2626;
  font-weight: 800;
}

.article-body .article-image-row--route {
  width: min(65%, 440px);
  grid-template-columns: 0.58fr 1fr;
  gap: 24px;
  align-items: start;
  margin-inline: auto;
}

.article-body .article-image-row--route figure {
  align-self: start;
}

.article-body .article-image-row--route img {
  height: clamp(58px, 7vw, 86px);
  object-fit: cover;
}

.article-body .article-image-row--landmark-route {
  width: min(72%, 580px);
  grid-template-columns: 1.37fr 1fr;
  margin-inline: auto;
}

.article-body .article-image-row--equal {
  grid-template-columns: repeat(2, minmax(0, 340px));
  justify-content: center;
  justify-items: center;
}

.article-body figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 640px) {
  .article-body .article-image-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .article-body .article-figure--medium {
    width: 80%;
  }

  .article-body .article-figure--portrait {
    width: min(58%, 260px);
  }

  .article-body .article-image-row--route {
    width: min(92%, 440px);
    grid-template-columns: 0.58fr 1fr;
  }

  .article-body .article-figure--qr {
    width: min(43%, 230px);
  }

  .article-body .article-figure--app-qr {
    width: min(45%, 150px);
  }

  .article-body .article-figure--hsbc-status {
    width: min(58%, 220px);
  }
}

.article-loading {
  padding: 22px;
  border-radius: 18px;
  color: var(--muted);
  background: rgba(31, 50, 78, 0.06);
  font-weight: 750;
}

.note,
.warn,
.checklist {
  margin: 22px 0;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(36, 107, 254, 0.14);
  background: rgba(36, 107, 254, 0.06);
}

.warn {
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(245, 158, 11, 0.08);
}

.note p,
.warn p {
  margin: 0;
}

.checklist {
  display: grid;
  gap: 10px;
  padding-left: 20px;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 28px;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  font-size: 12px;
  font-weight: 900;
}

.article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid rgba(31, 50, 78, 0.09);
}

.article-nav--single {
  grid-template-columns: 1fr;
}

.article-nav__link {
  display: flex;
  min-height: 92px;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  border: 1px solid rgba(31, 50, 78, 0.09);
  border-radius: 20px;
  background: rgba(248, 251, 255, 0.78);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.article-nav__link:hover {
  transform: translateY(-3px);
  border-color: rgba(36, 107, 254, 0.2);
  box-shadow: 0 14px 32px rgba(33, 49, 83, 0.10);
}

.article-nav__label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.article-nav__title {
  margin-top: 6px;
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
}

.toc__list {
  position: relative;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 2px 0 2px 14px;
  list-style: none;
}

.toc__list::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 6px;
  width: 1px;
  background: linear-gradient(180deg, rgba(36, 107, 254, 0.22), rgba(31, 50, 78, 0.10));
}

.toc__list a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 9px 10px 9px 13px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.toc__list a::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border: 2px solid rgba(138, 152, 170, 0.85);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
}

.toc__list a.is-current {
  color: var(--primary);
  border-color: rgba(36, 107, 254, 0.16);
  background: linear-gradient(135deg, rgba(36, 107, 254, 0.13), rgba(36, 107, 254, 0.045));
  box-shadow: 0 10px 22px rgba(36, 107, 254, 0.10);
}

.toc__list a.is-current::before {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(36, 107, 254, 0.14);
}

.toc__list a:hover:not(.is-current) {
  color: #263b57;
  border-color: rgba(31, 50, 78, 0.08);
  background: rgba(31, 50, 78, 0.07);
}

.toc__list a.toc__sub {
  margin-left: 0;
  padding-left: 13px;
  font-size: 13px;
}

.toc__list a.toc__sub::before {
  left: -12px;
  width: 9px;
  height: 9px;
}

.toc__empty {
  padding: 8px 10px;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 750;
}

.mobile-section-jump {
  display: none;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
}

.mobile-section-jump label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.mobile-section-jump select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: #ffffff;
  font: inherit;
  font-weight: 750;
}

.empty-state {
  min-height: 45vh;
  display: grid;
  place-items: center;
  padding: 80px 0;
  text-align: center;
}

.empty-state__box {
  max-width: 560px;
  padding: 38px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.empty-state h1 {
  margin: 0 0 12px;
  font-size: 34px;
}

.empty-state p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer {
  width: min(var(--max-width), calc(100% - 24px));
  margin: 0 auto;
  padding: 22px 0 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--muted);
  border-top: 1px solid rgba(31, 50, 78, 0.09);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--primary);
  font-weight: 850;
}

@media (max-width: 980px) {
  .article-shell {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .toc {
    display: none;
  }
}

@media (max-width: 860px) {
  body {
    --header-height: 56px;
  }

  body.is-article-page {
    --header-height: 52px;
  }

  .brand__tagline {
    display: none;
  }

  .nav,
  main,
  .site-footer {
    width: min(100% - 24px, var(--max-width));
  }

  .nav__toggle {
    display: inline-grid;
    place-items: center;
    order: 3;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    flex: 0 0 auto;
  }

  .nav__menu {
    display: flex;
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
  }

  .nav__links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 2px;
    min-width: 0;
  }

  .nav__item {
    min-height: 36px;
    width: auto;
    justify-content: center;
    padding: 0 9px;
    border-radius: 13px;
    font-size: 14px;
    white-space: nowrap;
  }

  .nav__dropdown {
    position: static;
    padding: 0;
  }

  .dropdown-panel {
    position: fixed;
    top: calc(var(--header-height) + 8px);
    left: 50vw;
    right: auto;
    width: min(360px, calc(100vw - 24px));
    display: none;
    opacity: 1;
    visibility: hidden;
    transform: translateX(-50%);
    max-height: calc(100dvh - var(--header-height) - 22px);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(31, 50, 78, 0.10);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    background: rgba(255, 255, 255, 0.98);
    opacity: 0;
    transition: opacity 0.16s ease, visibility 0.16s ease;
  }

  .nav__dropdown:not(.is-open) .dropdown-panel,
  .nav__dropdown:hover:not(.is-open) .dropdown-panel {
    display: none;
    visibility: hidden;
    opacity: 0;
  }

  .nav__dropdown.is-open .dropdown-panel {
    display: block;
    left: 50vw;
    right: auto;
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%);
  }

  .nav__dropdown.is-open:hover .dropdown-panel {
    left: 50vw;
    right: auto;
    transform: translateX(-50%);
  }

  .dropdown-list--desktop {
    display: none;
  }

  .dropdown-list--mobile {
    display: grid;
    gap: 4px;
  }

  .dropdown-list--mobile a {
    color: var(--text);
    background: rgba(248, 251, 255, 0.82);
  }

  .dropdown-list--mobile a span {
    color: var(--text);
    font-weight: 850;
  }

  .dropdown-list--mobile a small {
    color: var(--muted);
  }

  .search {
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 8px);
    display: none;
    width: auto;
    flex: none;
    padding: 10px;
    border: 1px solid rgba(31, 50, 78, 0.10);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-soft);
  }

  .search.is-open {
    display: block;
  }

  .search-results {
    position: static;
    width: 100%;
    max-height: 42vh;
    overflow-y: auto;
    margin-top: 8px;
    box-shadow: none;
  }

  .dropdown-panel a {
    padding: 10px 11px;
    font-size: 14px;
  }

  .home {
    padding-top: 24px;
  }

  .hero {
    min-height: auto;
  }

  .section-title {
    display: block;
  }

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

  .home-card {
    min-height: 250px;
  }

  .article-shell {
    display: block;
    padding-top: 22px;
  }

  .sidebar {
    position: static;
    max-height: none;
    margin-top: 0;
    margin-bottom: 16px;
    padding-top: 0;
    overflow: visible;
  }

  .sidebar__scroller {
    height: auto;
    padding-top: 0;
    overflow: visible;
  }

  .sidebar__scrollbar {
    display: none;
  }

  .sidebar__inner {
    display: none;
  }

  .mobile-section-jump {
    display: block;
  }

  .article-card {
    border-radius: 24px;
  }

  .article-nav {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .brand__name {
    display: none;
  }

  .brand__logo {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  body.is-article-page .brand__logo {
    width: 36px;
    height: 36px;
  }

  .hero,
  .home-card,
  .article-card {
    border-radius: 22px;
  }

  .hero__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .article-hero {
    padding: 14px 20px;
  }

  .article-body {
    padding: 18px 20px 24px;
  }

  .site-footer {
    align-items: center;
    flex-direction: column;
    text-align: center;
  }
}
