/* Shared site navigation. Used unchanged by all product pages, including ReaderMode. */
.site-header {
  --ink: #0f172a;
  --muted: #64748b;
  --accent: #166534;
  --accent-light: rgba(22, 101, 52, 0.08);
  --line: rgba(0, 0, 0, 0.06);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
  line-height: 1.5;
  color: var(--ink);
  font-size: 13.5px;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
}
.site-header * { box-sizing: border-box; }
.site-header a { color: inherit; text-decoration: none; font-weight: 480; transition: color 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
.site-header a:hover { color: var(--ink); }
.site-header .wordmark {
  font-weight: 750;
  font-size: 22px;
  letter-spacing: -0.04em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  color: var(--ink);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.site-header .wordmark:active {
  transform: scale(0.97);
}
.brand-period {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(22, 101, 52, 0.35);
  display: inline-block;
  transform-origin: bottom center;
}
.site-header .wordmark:hover .brand-period {
  animation: period-bounce 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes period-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-4.5px) scale(1.35); }
  65% { transform: translateY(1px) scale(0.95); }
}
@media (prefers-reduced-motion: reduce) {
  .site-header .wordmark:hover .brand-period {
    animation: none !important;
  }
}
.site-header a:focus-visible, .site-header summary:focus-visible { outline: 2px solid #166534; outline-offset: 4px; border-radius: 6px; }
.site-header summary { cursor: pointer; }

.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 300;
  padding: 10px 20px;
  background: white;
  color: var(--ink);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  font-weight: 500;
}
.skip-link:focus { top: 12px; }

.site-header {
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 1280px;
  padding: 0 36px;
  margin: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.desktop-nav {
  position: relative;
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 13.5px;
}
.desktop-nav a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 9999px;
  color: #475569;
  transition: color 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-app-icon {
  width: 17px;
  height: 17px;
  border-radius: 4px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}
.desktop-nav a:hover,
.desktop-nav a:focus-visible {
  color: #0f172a;
}
.desktop-nav:not(.has-pill) a:hover {
  background: rgba(0, 0, 0, 0.04);
}
.desktop-nav:not(.has-pill) a[aria-current="page"] {
  background: rgba(15, 23, 42, 0.06);
}
.desktop-nav a[aria-current="page"] {
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
}
.desktop-nav.has-pill a {
  background: transparent !important;
}

/* Sliding pill indicator */
.nav-pill {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.065);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02), inset 0 0 0 1px rgba(15, 23, 42, 0.04);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transform: translate3d(0, 0, 0);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              width 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-pill.no-transition {
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .nav-pill {
    transition: none !important;
  }
}

.nav-tools {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}
.nav-support {
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 9999px;
  color: #475569;
}
.nav-support:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #0f172a;
}

.language-menu { position: relative; }
.language-menu summary {
  display: flex;
  gap: 7px;
  align-items: center;
  list-style: none;
  padding: 5px 13px;
  border-radius: 9999px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  background: rgba(255, 255, 255, 0.8);
  font-size: 12.5px;
  font-weight: 500;
  color: #475569;
  transition: background-color 150ms ease-out, color 150ms ease-out, transform 120ms ease-out;
  user-select: none;
}
.language-menu summary:hover {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.14);
  color: #0f172a;
}
.language-menu summary:active {
  transform: scale(0.97);
}
.language-menu summary .lang-flag {
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.language-menu summary i.ri-arrow-down-s-line {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 13px;
  opacity: 0.65;
}
.language-menu[open] summary i.ri-arrow-down-s-line {
  transform: rotate(180deg);
}
.language-menu summary::-webkit-details-marker, .mobile-menu summary::-webkit-details-marker { display: none; }

@keyframes menu-pop {
  0% { opacity: 0; transform: translateY(-3px); }
  100% { opacity: 1; transform: translateY(0); }
}

.language-list {
  position: absolute;
  right: 0;
  top: 38px;
  min-width: 176px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
  padding: 6px;
  border-radius: 12px;
  max-height: 70vh;
  overflow: auto;
  z-index: 101;
}
.language-menu[open] .language-list {
  animation: menu-pop 150ms ease-out;
  transform-origin: top right;
}
.language-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #334155;
  transition: background-color 0.15s ease, color 0.15s ease, padding-left 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.language-list a:hover {
  background: #f1f5f9;
  color: #0f172a;
  padding-left: 14px;
}
.language-list a .lang-item-content {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.language-list a .lang-flag {
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.language-list a[aria-current="true"] {
  background: rgba(22, 101, 52, 0.08);
  color: var(--accent);
  font-weight: 600;
}
.language-list i { font-size: 15px; color: var(--accent); }

.mobile-menu { display: none; }

@media (max-width: 1100px) {
  .nav-inner { padding: 0 24px; gap: 16px; }
  .subnav-inner { padding: 0 24px; }
  .desktop-nav { gap: 2px; }
  .desktop-nav a { padding: 6px 10px; font-size: 13px; }
  .nav-tools { gap: 8px; }
}

@media (max-width: 850px) {
  .site-header .desktop-nav, .site-header .nav-support { display: none; }
  .site-header { height: 60px; }
  .nav-inner { padding: 0 20px; }
  .wordmark { font-size: 21px; }
  .mobile-menu { display: block; }
  .mobile-menu summary {
    list-style: none;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.7);
  }
  .mobile-menu nav {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    padding: 16px 20px 24px;
    background: rgba(255, 255, 255, 0.98);

    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.08);
    gap: 4px;
  }
  .mobile-menu nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    color: #1e293b;
  }
  .mobile-menu .nav-app-icon {
    width: 20px;
    height: 20px;
    border-radius: 5px;
  }
  .mobile-menu nav a:hover {
    background: #f1f5f9;
    color: var(--accent);
  }
  .mobile-menu nav a[aria-current="page"] {
    background: rgba(22, 101, 52, 0.08);
    color: var(--accent);
    font-weight: 600;
  }
}

/* Product Subnav */
.product-subnav {
  position: sticky;
  top: 64px;
  z-index: 90;
  height: 52px;
  border-bottom: 1px solid var(--line);
  font: 480 13px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #475569;
  background: #ffffff;
}
.subnav-inner {
  max-width: 1280px;
  padding: 0 36px;
  margin: auto;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.subnav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 14px;
  color: #0f172a;
}
.subnav-brand img {
  border-radius: 7px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}
.subnav-links {
  position: relative;
  display: flex;
  gap: 4px;
}
.subnav-links a {
  position: relative;
  z-index: 1;
  text-decoration: none;
  color: #64748b;
  padding: 6px 14px;
  border-radius: 9999px;
  transition: color 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 12.5px;
}
.subnav-links a:hover,
.subnav-links a:focus-visible {
  color: #0f172a;
}
.subnav-links:not(.has-pill) a:hover {
  background: rgba(0, 0, 0, 0.04);
}
.subnav-links:not(.has-pill) a[aria-current="page"] {
  background: rgba(15, 23, 42, 0.06);
}
.subnav-links a[aria-current="page"] {
  color: #0f172a;
  font-weight: 600;
}
.subnav-links.has-pill a {
  background: transparent !important;
}
.product-subnav a:focus-visible { outline: 2px solid #166534; outline-offset: 4px; }

@media (max-width: 850px) {
  .product-subnav { top: 60px; }
  .subnav-inner { padding: 0 20px; }
}
@media (max-width: 600px) {
  .product-subnav { font-size: 12px; height: 46px; }
  .subnav-brand span { font-size: 13px; }
  .subnav-links { gap: 2px; }
  .subnav-links a { padding: 5px 10px; font-size: 12px; }
}

/* Global Footer */
.footer {
  padding: 60px max(30px, calc((100vw - 1160px) / 2)) 28px;
  background: #f2f5f1;
  border-top: 1px solid var(--line);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--ink, #0f172a);
  -webkit-font-smoothing: antialiased;
}
.footer * { box-sizing: border-box; }
.footer-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-brand .wordmark {
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  color: inherit;
  text-decoration: none;
}
.footer-brand p {
  font-size: 13px;
  color: #5d6d60;
  margin-top: 8px;
}
.footer .footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  font-size: 13.5px;
  font-weight: 500;
  color: #405244;
  flex-wrap: wrap;
}
.footer .footer-links a {
  text-decoration: none;
  color: #405244;
  transition: color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.footer .footer-links a:hover {
  color: var(--accent, #166534);
}
.footer-mail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #3b4c3e !important;
}
.footer-mail i {
  font-size: 16px;
  color: var(--accent, #166534);
}
.footer-bottom {
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  margin-top: 40px;
  padding-top: 22px;
  font-size: 11px;
  color: #728477;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
@media (max-width: 850px) {
  .footer { padding: 45px 20px 24px; }
  .footer-main { flex-direction: column; gap: 24px; }
  .footer .footer-links { flex-wrap: wrap; gap: 16px; }
  .footer-bottom { flex-direction: column; gap: 10px; align-items: flex-start; }
}


@media (prefers-reduced-motion: no-preference) {
  .mobile-menu[open] nav { animation: menu-pop 150ms ease-out; }
  .language-menu summary i.ri-arrow-down-s-line { transition: transform 150ms ease-out; }
  .language-list a, .mobile-menu nav a { transition: color 150ms ease-out, background-color 150ms ease-out; }
  .mobile-menu summary { transition: transform 120ms ease-out; }
  .mobile-menu summary:active { transform: scale(.97); }
}
