:root {--primary-50:#faf5fd;--primary-100:#f3e9fa;--primary-200:#e8d5f4;--primary-300:#d9beea;--primary-400:#d2b1e3;--primary-500:#c8a6e0;--primary-600:#a87bd4;--primary-700:#9161c2;--primary-800:#7a4dab;--primary-900:#653f8e;--primary-950:#341f4e;}
:root {
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --gray-950: #030712;
  --paper: #ffffff;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: Comfortaa, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.08);
}

html[lang="zh-HK"] {
  --font: Inter, "Noto Sans HK", "PingFang HK", "Microsoft JhengHei", sans-serif;
  --display: Comfortaa, "Noto Sans HK", "PingFang HK", "Microsoft JhengHei", sans-serif;
}
html[lang="zh-CN"] {
  --font: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: Comfortaa, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html[lang="zh-TW"] {
  --font: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --display: Comfortaa, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}
html[lang^="zh-"] h1, html[lang^="zh-"] h2, html[lang^="zh-"] h3 { font-weight: 500; }

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--paper); color: var(--gray-900); font-family: var(--font); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
img { display: block; max-width: 100%; object-fit: contain; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.25; letter-spacing: -0.025em; }
p { color: var(--gray-500); }
[hidden] { display: none !important; }
.container { width: 100%; padding-inline: 16px; margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 12px; padding: 10px 16px; border-radius: 8px; transform: translateY(-160%); background: var(--gray-900); color: white; }
.skip-link:focus { transform: none; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--primary-700); outline-offset: 3px; }

.site-header { position: fixed; z-index: 50; inset: 0 0 auto; padding-block: 16px; background: rgba(255, 255, 255, .96); transition: padding 300ms ease, background 300ms ease, box-shadow 300ms ease; }
.header-home { background: transparent; }
.site-header.is-scrolled { padding-block: 8px; background: rgba(255, 255, 255, .95); backdrop-filter: blur(12px); box-shadow: var(--shadow-sm); }
.header-inner { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { flex: 0 0 auto; }
.brand img { width: auto; height: 32px; }
.desktop-nav { display: flex; align-items: center; gap: 24px; color: var(--gray-500); font-size: 14px; font-weight: 500; }
.desktop-nav a:hover, .login-link:hover { color: var(--gray-900); }
.desktop-nav .help-nav-link { color: var(--primary-800); }
.header-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.language-menu { position: relative; color: var(--gray-500); font-size: 14px; font-weight: 500; }
.language-menu summary { display: flex; min-height: 40px; align-items: center; gap: 6px; padding: 8px; list-style: none; }
.language-menu summary::-webkit-details-marker { display: none; }
.language-menu summary svg { flex: 0 0 auto; }
.language-menu > div { position: absolute; top: 44px; right: 0; width: 210px; padding-block: 4px; border: 1px solid var(--gray-100); border-radius: 6px; background: white; box-shadow: var(--shadow-md); }
.language-menu a { display: block; padding: 8px 12px; color: var(--gray-600); font-size: 13px; }
.language-menu a:hover { background: var(--gray-50); color: var(--gray-900); }
.language-menu a[aria-current] { color: var(--gray-900); font-weight: 600; }
.login-link { color: var(--gray-500); font-size: 14px; font-weight: 500; white-space: nowrap; }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 12px 28px; border: 0; border-radius: 12px; background: var(--primary-500); color: var(--gray-900); font-size: 16px; font-weight: 600; box-shadow: var(--shadow-sm); transition: background 200ms ease; }
.button:hover { background: var(--primary-600); }
.button-small { min-height: 40px; padding: 10px 20px; border-radius: 8px; font-size: 14px; white-space: nowrap; }
.nav-toggle { display: none; padding: 8px; border: 0; background: transparent; color: var(--gray-600); }
.mobile-nav { width: calc(100% - 32px); margin-top: 8px; padding: 12px; border: 1px solid var(--gray-200); border-radius: 12px; background: white; box-shadow: var(--shadow-md); }
.mobile-nav > a { display: block; padding: 10px 16px; border-radius: 8px; color: var(--gray-600); font-size: 14px; font-weight: 500; }
.mobile-nav > a:hover { background: var(--primary-50); }
.mobile-nav > .button { margin-top: 8px; text-align: center; background: var(--primary-500); color: var(--gray-900); }

.hero { position: relative; overflow: hidden; background: linear-gradient(to bottom right, var(--primary-100), white, var(--primary-200)); }
.hero::before, .hero::after { content: ""; position: absolute; pointer-events: none; border-radius: 50%; filter: blur(64px); }
.hero::before { width: 384px; height: 384px; top: 80px; right: 80px; background: var(--primary-300); opacity: .3; }
.hero::after { width: 288px; height: 288px; bottom: 40px; left: 40px; background: var(--primary-200); opacity: .4; }
.hero-inner { position: relative; z-index: 1; height: 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 80px; text-align: center; }
.hero h1 { font-size: 48px; line-height: 1.25; }
.hero-inner > p { max-width: 672px; margin-top: 24px; font-size: 20px; line-height: 1.625; }
.home-search { position: relative; z-index: 2; max-width: 896px; margin-top: -30px; }
.search-form { display: flex; width: min(100%, 720px); align-items: center; gap: 13px; padding: 7px 7px 7px 18px; border: 1px solid var(--gray-300); border-radius: 12px; background: white; box-shadow: 0 8px 24px rgba(145, 97, 194, 0.08); }
.search-form-large { min-height: 58px; margin: 0 auto; }
.search-form svg { flex: 0 0 auto; color: var(--gray-500); }
.search-form input { min-width: 0; flex: 1 1 auto; height: 42px; border: 0; outline: 0; background: transparent; color: var(--gray-900); }
.search-form input::placeholder { color: var(--gray-500); }
.search-form button { min-height: 42px; padding: 8px 20px; border: 0; border-radius: 8px; background: var(--primary-500); color: var(--gray-900); font-size: 14px; font-weight: 600; }
.search-form button:hover { background: var(--primary-600); }
.popular-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-top: 22px; color: var(--gray-500); font-size: 13px; }
.popular-links > span { font-weight: 600; color: var(--gray-600); }
.popular-links a { color: var(--primary-700); }
.popular-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

.home-main { padding-block: 96px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.section-heading h2 { font-size: 30px; }
.section-heading p { max-width: 620px; margin-top: 10px; font-size: 17px; }
.section-heading > span { color: var(--gray-500); font-size: 13px; white-space: nowrap; }
.topic-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.topic-row { display: flex; min-height: 162px; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 26px 28px; border: 1px solid var(--gray-200); border-radius: 12px; background: white; transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.topic-row:hover { transform: translateY(-1px); border-color: var(--primary-200); box-shadow: var(--shadow-md); }
.topic-copy strong { display: block; font-family: var(--display); font-size: 18px; font-weight: 600; line-height: 1.35; }
.topic-copy small { display: block; max-width: 480px; margin-top: 10px; color: var(--gray-500); font-size: 14px; line-height: 1.65; }
.topic-count { margin-top: 20px; color: var(--primary-700); font-size: 12px; font-weight: 600; }
.contact-band { position: relative; padding-block: 96px; background: linear-gradient(to bottom right, var(--primary-50), white, var(--primary-100)); text-align: center; }
.contact-band h2 { font-size: 30px; }
.contact-band p { max-width: 576px; margin: 16px auto 0; font-size: 18px; line-height: 1.625; }
.contact-band .button { margin-top: 32px; }

.interior { padding-block: 120px 96px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: var(--gray-500); font-size: 13px; }
.breadcrumbs a:hover { color: var(--primary-700); }
.page-intro { max-width: 760px; padding-block: 48px 42px; }
.page-intro h1 { font-size: clamp(32px, 4vw, 42px); }
.page-intro > p { margin-top: 14px; font-size: 17px; line-height: 1.7; }
.page-count { display: block; margin-top: 16px; color: var(--gray-500); font-size: 13px; }
.brand-kicker { color: var(--primary-700); font-size: 13px; font-weight: 600; }
.guide-list { border-top: 1px solid var(--gray-200); }
.guide-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 30px; padding: 23px 0; border-bottom: 1px solid var(--gray-200); }
.guide-link strong { display: block; font-family: var(--display); font-size: 17px; font-weight: 600; line-height: 1.45; }
.guide-link small { display: block; max-width: 760px; margin-top: 5px; color: var(--gray-500); font-size: 14px; line-height: 1.6; }
.guide-link-action { color: var(--primary-700); font-size: 13px; font-weight: 600; white-space: nowrap; }
.guide-link:hover strong { color: var(--primary-700); }

.reading-layout { display: grid; grid-template-columns: 205px minmax(0, 700px) 160px; align-items: start; gap: 46px; margin-top: 44px; }
.topic-sidebar, .toc { position: sticky; top: 106px; }
.topic-sidebar { display: flex; flex-direction: column; gap: 2px; }
.topic-sidebar a { padding: 7px 9px; border-radius: 8px; color: var(--gray-500); font-size: 13px; line-height: 1.45; }
.topic-sidebar a:hover { color: var(--primary-700); }
.topic-sidebar a[aria-current] { background: var(--primary-50); color: var(--primary-700); font-weight: 600; }
.topic-sidebar .sidebar-title { margin-bottom: 8px; padding: 0 9px 12px; border-bottom: 1px solid var(--gray-200); border-radius: 0; color: var(--gray-800); font-family: var(--display); font-size: 14px; font-weight: 600; }
.article header { padding-bottom: 28px; border-bottom: 1px solid var(--gray-200); }
.article h1 { max-width: 680px; font-size: clamp(32px, 4vw, 42px); }
.article-summary { max-width: 650px; margin-top: 15px; font-size: 17px; line-height: 1.7; }
.article-meta { margin-top: 14px; color: var(--gray-600); font-size: 12px; }
.article-prose section { scroll-margin-top: 104px; margin-top: 40px; }
.article-prose h2, .related h2 { margin-bottom: 14px; font-size: 22px; }
.article-prose p { color: var(--gray-600); font-size: 16px; line-height: 1.8; }
.steps { counter-reset: steps; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: steps; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--gray-200); }
.steps li::before { content: counter(steps) "."; padding-top: 1px; color: var(--primary-700); font-size: 14px; font-weight: 600; }
.steps p { color: var(--gray-700); }
.article-prose .screenshot-note { margin-bottom: 10px; color: var(--gray-500); font-size: 12px; line-height: 1.65; }
.step-screenshot { grid-column: 2; width: 100%; margin: 6px 0 14px; }
.step-screenshot a { display: block; width: fit-content; max-width: 100%; }
.step-screenshot img { width: auto; max-width: 100%; height: auto; border: 1px solid var(--gray-200); border-radius: 12px; background: var(--gray-50); }
.step-screenshot figcaption { max-width: 680px; margin-top: 10px; color: var(--gray-500); font-size: 12px; line-height: 1.65; }
.phone-screenshot { max-width: 330px; margin-inline: auto; }
.troubleshooting { padding: 22px 24px; border: 1px solid var(--primary-100); border-radius: 14px; background: var(--primary-50); }
.troubleshooting h2 { color: var(--gray-900); }
.plan-note { margin-top: 38px; padding-top: 18px; border-top: 1px solid var(--gray-200); color: var(--gray-600); font-size: 12px; }
.article-actions { display: flex; justify-content: space-between; gap: 20px; margin-top: 26px; }
.article-actions a, .article-actions button { padding: 0; border: 0; background: transparent; color: var(--primary-700); font-size: 13px; font-weight: 600; }
.related { margin-top: 58px; }
.toc { display: flex; flex-direction: column; gap: 8px; padding-left: 16px; border-left: 1px solid var(--gray-200); }
.toc strong { margin-bottom: 4px; color: var(--gray-700); font-size: 12px; }
.toc a { color: var(--gray-500); font-size: 12px; line-height: 1.45; }
.toc a:hover { color: var(--primary-700); }
.mobile-toc { display: none; }

.search-page-form { margin: 0 0 34px; }
.search-clear { background: transparent !important; color: var(--primary-700) !important; }
.search-section { min-height: 240px; }
.search-section > h2 { font-size: 20px; }
.search-section > p { margin-top: 8px; }
.search-results { margin-top: 18px; border-top: 1px solid var(--gray-200); }
.search-result { display: flex; flex-direction: column; gap: 5px; padding: 20px 0; border-bottom: 1px solid var(--gray-200); }
.search-result-topic { color: var(--primary-700); font-size: 12px; font-weight: 600; }
.search-result strong { font-family: var(--display); font-size: 17px; font-weight: 600; }
.search-result > span:last-child { color: var(--gray-500); font-size: 14px; }
.search-result:hover strong { color: var(--primary-700); }
.search-browse { margin-top: 64px; }
.search-browse > h2 { margin-bottom: 24px; font-size: 26px; }
.contact-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 20px; }
.contact-grid > section, .contact-grid > aside { padding: 30px; border: 1px solid var(--gray-200); border-radius: 16px; }
.contact-grid h2 { font-size: 22px; }
.contact-grid p { margin-top: 10px; }
.contact-grid .button { margin-top: 22px; }
.contact-grid aside { background: var(--gray-50); }
.contact-grid aside a { color: var(--primary-700); font-weight: 600; }
.not-found { padding-top: 112px; min-height: 70vh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.not-found h1 { max-width: 700px; margin-top: 8px; font-size: clamp(34px, 5vw, 48px); }
.not-found > p:not(.brand-kicker) { max-width: 620px; margin-top: 15px; }
.not-found .button { margin-top: 26px; }

.site-footer { background: var(--gray-950); color: white; }
.footer-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 48px; padding-block: 64px; }
.footer-brand { grid-column: span 4; }
.footer-brand img { width: auto; height: 36px; }
.footer-brand p { max-width: 320px; margin-top: 20px; color: var(--gray-400); font-size: 14px; line-height: 1.5; }
.footer-brand .footer-subtitle { margin-top: 6px; font-size: 12px; font-style: italic; }
.footer-social { display: flex; gap: 16px; margin-top: 24px; color: var(--gray-400); }
.footer-social a:hover { color: white; }
.footer-links { grid-column: span 2; }
.footer-links h2 { color: var(--gray-400); font-family: var(--font); font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.footer-links ul { display: grid; gap: 10px; padding: 0; margin: 16px 0 0; list-style: none; }
.footer-links a { color: var(--gray-400); font-size: 14px; line-height: 1.5; }
.footer-links a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(31, 41, 55, .5); }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-bottom a, .footer-bottom p { color: var(--gray-400); font-size: 12px; }
.footer-bottom a:hover { color: white; }

@media (min-width: 640px) { .container { max-width: 640px; padding-inline: 24px; } }
@media (min-width: 768px) { .container { max-width: 768px; } }
@media (min-width: 1024px) { .container { max-width: 1024px; padding-inline: 32px; } .desktop-nav { gap: 20px; } }
@media (min-width: 1280px) { .container { max-width: 1280px; } .desktop-nav { gap: 24px; } }
@media (min-width: 1536px) { .container { max-width: 1536px; } }
.home-search { max-width: 896px; }

@media (max-width: 1023px) {
  .desktop-nav, .login-link, .app-link { display: none; }
  .header-actions { gap: 4px; }
  .language-menu summary > span, .language-menu summary > svg:last-child { display: none; }
  .hero h1 { font-size: 36px; }
  .hero-inner > p { font-size: 18px; }
  .home-main, .contact-band { padding-block: 80px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; padding-block: 56px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-links { grid-column: span 1; }
  .footer-bottom-inner { align-items: flex-start; flex-direction: column; }
  .nav-toggle { display: grid; }
  .reading-layout { grid-template-columns: 185px minmax(0, 1fr); gap: 36px; }
  .toc { display: none; }
  .mobile-toc { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 24px; padding: 15px 17px; border-radius: 12px; background: var(--gray-50); }
  .mobile-toc strong { width: 100%; color: var(--gray-700); font-size: 12px; }
  .mobile-toc a { color: var(--primary-700); font-size: 12px; font-weight: 600; }
}

@media (max-width: 760px) {
  .hero h1 { font-size: 30px; }
  .hero-inner > p { font-size: 18px; }
  .search-form { display: grid; grid-template-columns: auto minmax(0, 1fr); padding: 9px 10px 10px 15px; }
  .search-form button { grid-column: 1 / -1; width: 100%; }
  .search-page-form .search-clear { grid-column: 1 / -1; }
  .popular-links { align-items: center; flex-direction: column; gap: 7px; }
  .home-main { padding-block: 80px; }
  .section-heading { align-items: flex-start; flex-direction: column; margin-bottom: 26px; }
  .section-heading h2 { font-size: 26px; }
  .section-heading p { font-size: 15px; }
  .topic-list { grid-template-columns: 1fr; gap: 12px; }
  .topic-row { min-height: 0; padding: 22px; }
  .contact-band { padding-block: 80px; }
  .contact-band h2 { font-size: 24px; }
  .interior { padding-block: 112px 72px; }
  .page-intro { padding-block: 38px 34px; }
  .page-intro h1 { font-size: 32px; }
  .page-intro > p { font-size: 16px; }
  .guide-link { grid-template-columns: 1fr; gap: 9px; padding-block: 19px; }
  .reading-layout { display: block; margin-top: 34px; }
  .topic-sidebar { display: none; }
  .article h1 { font-size: 32px; }
  .article-summary { font-size: 16px; }
  .article-prose section { margin-top: 34px; }
  .article-prose h2, .related h2 { font-size: 20px; }
  .step-screenshot { grid-column: 1 / -1; }
  .troubleshooting { padding: 20px; }
  .article-actions { align-items: flex-start; flex-direction: column; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-grid > section, .contact-grid > aside { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

@media print {
  .site-header, .site-footer, .topic-sidebar, .toc, .mobile-toc, .article-actions, .related { display: none !important; }
  .container { width: 100%; }
  .interior { padding: 0; }
  .reading-layout { display: block; margin: 0; }
  .article h1 { font-size: 32px; }
  .article-prose section { break-inside: avoid; }
  .steps li { break-inside: avoid; }
  .step-screenshot img { max-height: 200mm; object-fit: contain; }
  .troubleshooting { border: 1px solid var(--gray-300); background: white; }
}
