:root {
  /* Official Teams Fluent brand (light theme) */
  --brand: #6264a7;
  --brand-hover: #585a96;
  --brand-press: #464775;
  --brand-soft: #a6a7dc;
  --brand-tint: #f4f4fc;
  --brand-line: #e2e2f6;
  --ink: #242424;
  --ink-2: #323130;
  --muted: #605e5c;
  --line: #edebe9;
  --paper: #ffffff;
  --canvas: #faf9f8;
  --canvas-2: #f3f2f1;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(98, 100, 167, 0.14);
  --radius: 4px;
  --radius-lg: 8px;
  --font: "Segoe UI Variable", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--brand);
  text-underline-offset: 0.15em;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--brand-press);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 52px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: 0;
}
.brand-logo {
  width: 28px;
  height: 30px;
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand-text small {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
}
.brand-text strong {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink-2);
}

.nav {
  display: none;
  gap: 1.1rem;
  align-items: center;
}
.nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 550;
}
.nav a:hover {
  color: var(--brand);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink-2);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.menu-toggle svg {
  width: 20px;
  height: 20px;
}
.menu-toggle[aria-expanded="true"] {
  border-color: var(--brand-soft);
  background: var(--brand-tint);
  color: var(--brand);
}

.nav-mobile {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 0.5rem 0 0.85rem;
}
.nav-mobile.is-open {
  display: block;
}
.nav-mobile[hidden] {
  display: none !important;
}
.nav-mobile a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 0;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.nav-mobile a:last-child {
  border-bottom: 0;
}
.nav-mobile a:active,
.nav-mobile a:hover {
  color: var(--brand);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.header-actions .btn-ghost {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-hover);
  color: #fff;
}
.btn-secondary {
  background: var(--paper);
  color: var(--ink-2);
  border-color: var(--line);
}
.btn-secondary:hover {
  border-color: var(--brand-soft);
  color: var(--brand);
}
.btn-ghost {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand-line);
  min-height: 36px;
  padding: 0.4rem 0.85rem;
  font-size: 0.88rem;
}
.btn-ghost:hover {
  background: var(--brand-tint);
}
.btn-icon {
  width: 18px;
  height: 18px;
}

/* Hero — mobile first, full-bleed */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 80% -10%, rgba(166, 167, 220, 0.45), transparent 55%),
    linear-gradient(180deg, var(--brand-tint) 0%, var(--paper) 72%);
  padding: 1.25rem 0 0;
  min-height: min(100svh, 920px);
  display: flex;
  flex-direction: column;
}
.hero-copy {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 1.25rem;
}
.hero .brand-signal {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
  font-weight: 650;
  color: var(--ink-2);
  letter-spacing: -0.02em;
}
.hero .brand-signal img {
  width: 36px;
  height: 38px;
}
.hero h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.75rem, 6.2vw, 2.55rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--ink);
}
.hero .lead {
  margin: 0 auto 1.25rem;
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 28rem;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}
.cta-row .btn {
  width: 100%;
  max-width: 360px;
}
.cta-row .btn-primary {
  min-width: min(100%, 240px);
}
.hero-visual {
  margin-top: auto;
  display: flex;
  justify-content: center;
  padding: 0.5rem 0 0;
}
.hero-visual img,
.hero-visual svg {
  width: min(100%, 360px);
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(70, 71, 117, 0.22));
  animation: float-in 0.9s ease both;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  padding: 3.2rem 0;
}
.section-alt {
  background: var(--canvas);
}
.section h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  letter-spacing: -0.02em;
}
.section .sub {
  margin: 0 0 1.5rem;
  color: var(--muted);
  max-width: 36rem;
}

.channel-list {
  display: grid;
  gap: 0.85rem;
}
.channel {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.channel:last-child {
  border-bottom: 0;
}
.channel img {
  width: 40px;
  height: 40px;
}
.channel h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}
.channel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.channel .go {
  color: var(--brand);
  font-weight: 650;
  font-size: 0.9rem;
  white-space: nowrap;
}

.steps {
  display: grid;
  gap: 1rem;
  counter-reset: step;
}
.step {
  position: relative;
  padding-left: 3rem;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.step h3 {
  margin: 0.15rem 0 0.35rem;
  font-size: 1.05rem;
}
.step p {
  margin: 0;
  color: var(--muted);
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 0.95rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq details p {
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.page-hero {
  background: linear-gradient(180deg, var(--brand-tint), var(--paper));
  padding: 2rem 0 1.25rem;
}
.page-hero h1 {
  margin: 0.35rem 0 0.5rem;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  letter-spacing: -0.02em;
}
.page-hero .brand-signal {
  margin: 0;
  font-weight: 650;
  color: var(--ink-2);
}

.site-footer {
  background: var(--canvas-2);
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
}
.footer-inner {
  display: grid;
  gap: 1rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.fineprint {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
}
.site-footer nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.9rem;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (min-width: 860px) {
  .menu-toggle,
  .nav-mobile {
    display: none !important;
  }
  .header-actions .btn-ghost {
    display: inline-flex;
  }
  .nav {
    display: flex;
  }
  .header-inner {
    min-height: 56px;
    gap: 0.75rem;
  }
  .cta-row .btn {
    width: auto;
    max-width: none;
  }
  .hero {
    min-height: auto;
    padding: 2.5rem 0 0;
  }
  .hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2rem;
    align-items: end;
  }
  .hero-copy {
    text-align: left;
    margin: 0 0 2.5rem;
    padding-bottom: 2rem;
  }
  .cta-row {
    justify-content: flex-start;
  }
  .hero-visual {
    justify-content: flex-end;
    padding: 0;
  }
  .hero-visual img,
  .hero-visual svg {
    width: min(100%, 420px);
  }
  .channel-list {
    grid-template-columns: 1fr;
  }
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  .step {
    padding-left: 0;
    padding-top: 3rem;
  }
  .step::before {
    top: 0;
  }
}

@media (max-width: 380px) {
  .brand-text small {
    display: none;
  }
  .lang-switch {
    padding: 0.3rem 0.45rem;
    font-size: 0.8rem;
  }
}

/* Blog / article */
.post-list { display: grid; gap: 1.25rem; }
.post-card {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
.post-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.post-card h2 a {
  color: var(--ink);
  text-decoration: none;
}
.post-card h2 a:hover { color: var(--brand); }
.article-meta {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.article-body h2 {
  margin: 1.6rem 0 0.55rem;
  font-size: 1.2rem;
}
.article-body ul, .article-body ol { padding-left: 1.2rem; color: var(--muted); }
.article-body li { margin: 0.35rem 0; }
.wrap.narrow { width: min(100% - 2rem, 720px); margin-inline: auto; }

.lang-switch {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 650;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.lang-switch:hover {
  border-color: var(--brand-soft);
  color: var(--brand);
  background: var(--brand-tint);
}

/* mobile-nav v5 */


/* i18n: system language auto zh/en */
body.lang-en .zh{display:none !important}
body.lang-zh .en{display:none !important}
body:not(.lang-en):not(.lang-zh) .en{display:none !important}
.channel-static{cursor:default;pointer-events:none}
.channel-static .go{display:none}
details summary.zh,details summary.en{display:list-item}
body.lang-en details summary.zh,
body.lang-zh details summary.en{display:none !important}

/* teamapk-ab extras */
.hero-points{margin:1.25rem 0 0;padding-left:1.15rem;color:var(--muted);font-size:.95rem}
.hero-points li{margin:.35rem 0}
.steps{margin:0;padding-left:1.2rem;max-width:40rem;color:var(--ink-2)}
.steps li{margin:.75rem 0;line-height:1.55}
.compare-grid,.tip-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem;margin-top:1.25rem}
.compare-card,.tip{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius-lg);padding:1.15rem 1.2rem;box-shadow:var(--shadow)}
.compare-card img{margin-bottom:.75rem}
.compare-card h3,.tip h3{margin:0 0 .4rem;font-size:1.05rem}
.compare-card p,.tip p{margin:0;color:var(--muted);font-size:.95rem}
.tip-grid{grid-template-columns:repeat(4,1fr)}
.section-cta{padding:2rem 0 3rem}
.cta-banner{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1rem;background:linear-gradient(135deg,#6264a7,#464775);color:#fff;border-radius:12px;padding:1.5rem 1.6rem}
.cta-banner h2{margin:0 0 .35rem;font-size:1.35rem;color:#fff}
.cta-banner p{margin:0;opacity:.92}
.cta-banner .btn-primary{background:#fff;color:#464775}
.cta-banner .btn-primary:hover{background:#f4f4fc}
.fine{display:block;font-size:.8rem;color:var(--muted);font-weight:400}
@media (max-width:900px){
  .compare-grid,.tip-grid{grid-template-columns:1fr}
}
