/* Shared static website navigation. Legacy pages and English topics use one shell. */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-in { position: relative; display: flex; align-items: center; gap: 12px; min-height: 72px; }
.brand { display: inline-flex; flex: none; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; line-height: 1.2; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { flex: none; width: 30px; height: 30px; border-radius: 8px; }
.site-interactive-badge,.site-guide-badge { display:inline-flex; align-items:center; justify-content:center; flex:none; width:15px; height:15px; margin-left:5px; vertical-align:-3px; }
.site-interactive-badge > svg,.site-guide-badge > svg { display:block; width:15px; height:15px; flex:none; }
.site-interactive-badge { color:#168863; }
.site-guide-badge { color:var(--accent); }
:root[data-theme="dark"] .site-interactive-badge { color:#79d9b5; }
@media (prefers-color-scheme:dark) { :root:not([data-theme="light"]) .site-interactive-badge { color:#79d9b5; } }
.nav-links { min-width: 0; margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav-links a { color: var(--muted); font-size: 13px; font-weight: 550; padding: 9px 10px; border-radius: 9px; line-height: 1.4; }
.nav-links > a { white-space: nowrap; }
.nav-links a:hover { color: var(--text); background: var(--soft); text-decoration: none; }
.nav-links > a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 650; }
.nav-links a.btn-primary { flex: none; color: #fff; padding-inline: 13px; font-size: 13px; }
.nav-links a.btn-primary:hover { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.nav-links a.btn-ghost { color: var(--text); }
.lang { border: 1px solid var(--line); }

/* Native disclosure panels retain real links when scripts are unavailable. */
.site-menu { position: static; min-width: 0; }
.site-menu > summary { display: flex; align-items: center; gap: 6px; min-height: 42px; padding: 9px 10px; border-radius: 9px; color: var(--muted); font-size: 13px; font-weight: 550; line-height: 1.4; list-style: none; white-space: nowrap; cursor: pointer; }
.site-menu > summary::-webkit-details-marker { display: none; }
.site-menu > summary::marker { content: ""; }
.site-menu > summary svg { flex: none; width: 13px; height: 13px; transition: transform .16s ease; }
.site-menu[open] > summary, .site-menu[data-active="true"] > summary { color: var(--accent); background: var(--accent-soft); }
.site-menu[open] > summary svg { transform: rotate(180deg); }
.site-menu[data-menu-open="false"] > summary svg { transform: rotate(0deg); }
.site-menu-panel { box-sizing: border-box; min-height: 0; transform-origin: top center; position: absolute; top: calc(100% - 1px); left: 22px; right: 22px; z-index: 55; max-height: min(72vh, 620px); max-height: min(72dvh, 620px); overflow: auto; overscroll-behavior: contain; padding: 25px; border: 1px solid var(--line); border-radius: 0 0 16px 16px; background: var(--card); box-shadow: 0 20px 48px #0000001a; }
.nav-links .site-menu-overview { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; padding: 3px 8px 17px; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--accent); font-size: 14px; font-weight: 650; }
.site-menu-overview svg { flex: none; width: 18px; height: 18px; }
.site-menu-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 25px; }
.site-menu-group { min-width: 0; }
.site-menu-group h3 { margin: 0 8px 8px; color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.5; letter-spacing: .065em; text-transform: uppercase; }
.site-menu-group ul { margin: 0; padding: 0; list-style: none; }
.nav-links .site-menu-group a { display: block; padding: 8px; font-size: 13px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.nav-links .site-menu-group a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 650; }
.nav-links .site-menu-overview:hover { color: var(--text); background: transparent; }

/* The reference panel scrolls on desktop, while the outer navigation scrolls on mobile. */
:is(.site-menu-reference-panel, .nav-links:has(.site-menu[open] > .site-menu-reference-panel)) {
  --reference-scroll-track: color-mix(in srgb, var(--accent) 8%, var(--card));
  --reference-scroll-thumb: color-mix(in srgb, var(--accent) 70%, var(--muted));
}
:is(.site-menu-reference-panel, .nav-links:has(.site-menu[open] > .site-menu-reference-panel))::-webkit-scrollbar { width: 9px; }
:is(.site-menu-reference-panel, .nav-links:has(.site-menu[open] > .site-menu-reference-panel))::-webkit-scrollbar-track { margin-block: 8px; border-radius: 99px; background: var(--reference-scroll-track); }
:is(.site-menu-reference-panel, .nav-links:has(.site-menu[open] > .site-menu-reference-panel))::-webkit-scrollbar-thumb { border: 1px solid var(--reference-scroll-track); border-radius: 99px; background: var(--reference-scroll-thumb); }
:is(.site-menu-reference-panel, .nav-links:has(.site-menu[open] > .site-menu-reference-panel))::-webkit-scrollbar-thumb:hover { background: var(--accent); }
@supports not selector(::-webkit-scrollbar) {
  :is(.site-menu-reference-panel, .nav-links:has(.site-menu[open] > .site-menu-reference-panel)) {
    scrollbar-width: thin;
    scrollbar-color: var(--reference-scroll-thumb) var(--reference-scroll-track);
  }
}

/* Locale selection is available only for pages with actual translations. */
.lang-switch { position: relative; flex: none; }
.lang-btn { list-style:none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 8px; border-radius: 10px; cursor: pointer; background: var(--card); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 12px; font-weight: 600; }
.lang-btn:hover { background: var(--soft); }
.lang-flag { width: 21px; height: 15px; border-radius: 2px; display: block; box-shadow: inset 0 0 0 1px #00000014; }
.lang-short { letter-spacing: .02em; }
.lang-chev { width: 12px; height: 12px; opacity: .7; transition: transform .15s ease; }
.lang-switch[open] .lang-chev { transform: rotate(180deg); }
.lang-menu { transform-origin: top right; position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: 220px; padding: 6px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 16px 40px #00000024; display: none; flex-direction: column; gap: 2px; }
.lang-switch[open] > .lang-menu { display: flex; }
.lang-btn::-webkit-details-marker { display:none; }
.nav-links .lang-option { min-height:44px; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none; }
.lang-option:hover { background: var(--soft); text-decoration: none; }
.nav-links .lang-option.is-active { background: var(--accent-soft); color: var(--accent); }
.lang-name { white-space: nowrap; }

.burger { display: none; margin-left: 0; flex: none; width: 40px; height: 40px; padding: 9px; align-items: center; justify-content: center; background: var(--card); border: 1px solid var(--line); border-radius: 10px; color: var(--text); cursor: pointer; }
.burger:hover { background: var(--soft); }
.burger svg { width: 20px; height: 20px; }
.themebtn { flex: none; margin-left: 0; width: 38px; height: 38px; padding: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--card); border: 1px solid var(--line); border-radius: 10px; color: var(--text); cursor: pointer; }
.themebtn:hover { background: var(--soft); }
.themebtn svg { width: 18px; height: 18px; }
.themebtn .i-sun { display: none; }
.themebtn .i-moon { display: block; }
:root[data-theme="dark"] .themebtn .i-sun { display: block; }
:root[data-theme="dark"] .themebtn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .themebtn .i-sun { display: block; }
  :root:not([data-theme="light"]) .themebtn .i-moon { display: none; }
}
.nav :is(a, button, summary):focus-visible, .site-footer a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* The footer separates product, topics and support instead of treating Home as a keyword. */
.tp-breadcrumbs { margin-top: 30px; }
.tp-breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 0; margin: 0; padding: 0; list-style: none; }
.tp-breadcrumbs li { display: inline-flex; align-items: center; min-width: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.tp-breadcrumbs li + li::before { content: "/"; margin-inline: 10px; color: var(--muted); opacity: .65; }
.tp-breadcrumbs a { color: var(--muted); }
.tp-breadcrumbs a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.tp-breadcrumbs [aria-current="page"], .tp-breadcrumbs li:last-child span { color: var(--text); overflow-wrap: anywhere; }
.legacy-breadcrumbs { max-width: 900px; }
.legacy-breadcrumbs[data-page="privacy"] { max-width: 800px; }
.legacy-breadcrumbs .tp-breadcrumbs { margin-top: clamp(16px, 2vw, 26px); }
.legacy-breadcrumbs + .welcome, .legacy-breadcrumbs + section.block { padding-top: clamp(22px, 3vw, 40px); }
@media (max-width: 680px) {
  .tp-breadcrumbs { margin-top: 24px; }
}
@media (max-width: 480px) {
  .tp-breadcrumbs li { font-size: 12px; }
  .tp-breadcrumbs li + li::before { margin-inline: 7px; }
}

.container.tp-last-updated {
  margin-block: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.tp-last-updated time { white-space: nowrap; }
footer.site.site-footer { margin-top: 20px; padding: 42px 0 55px; background: var(--bg2); }
.site-footer .foot-brand { display: inline-flex; flex: none; gap: 10px; font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--text); white-space: nowrap; }
.site-footer .foot-brand:hover { text-decoration: none; }
.site-footer .foot-brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 28px; }
.site-footer-grid > section { min-width: 0; }
.site-footer-grid h3 { margin: 0 0 12px; color: var(--text); font-size: 14.5px; font-weight: 650; line-height: 1.5; }
.site-footer-grid ul { margin: 0; padding: 0; list-style: none; }
.site-footer-grid a { display: inline-block; padding-block: 5px; color: var(--muted); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.nav-links .site-menu-group .site-group-overview, .site-footer-grid .site-group-overview {
  display: inline-block; padding: 2px 0; color: inherit; font: inherit;
  text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: .25em;
}
.nav-links .site-menu-group .site-group-overview:is(:hover, :focus-visible, [aria-current="page"]),
.site-footer-grid .site-group-overview:is(:hover, :focus-visible, [aria-current="page"]) {
  color: var(--accent); text-decoration-color: currentColor;
}
.site-footer-grid a[aria-current="page"] { color: var(--accent); font-weight: 650; }
.site-footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px 24px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.6; }
.site-footer-bottom p { margin: 0; }
.site-footer-identity { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; }
.site-footer-identity p { font-size: 12px; white-space: nowrap; }
.site-footer-bottom nav { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; }
.site-footer-bottom a { color: var(--muted); }
/* Compact visual destinations retain full touch targets and accessible link names. */
.site-footer-bottom .site-socials { display: flex; align-items: center; flex-wrap: nowrap; gap: 8px; }
.site-socials a { --social-accent: var(--accent); display: inline-flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 7px; border: 0; border-radius: 12px; background: transparent; text-decoration: none; transition: transform .18s ease; }
.site-socials a[href^="https://chromewebstore.google.com/"] { --social-accent: #4285f4; }
.site-socials a[href^="https://telegram."] { --social-accent: #2aabee; }
.site-socials svg { display: block; flex: none; width: 30px; height: 30px; overflow: visible; filter: drop-shadow(0 2px 3px #00000012); transition: filter .18s ease; }

.site-footer .disclaimer { margin: 18px 0 0; font-size: 12.5px; line-height: 1.7; }
@media (hover: hover) {
  .site-menu > summary:hover { color: var(--text); background: var(--soft); }
  .nav-links .site-menu-group a:hover, .site-footer-grid a:hover, .site-footer-bottom a:hover { color: var(--accent); }
  .site-footer-grid a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .site-socials a:hover { transform: translateY(-2px); background: transparent; text-decoration: none; }
  .site-socials a:hover svg { filter: drop-shadow(0 3px 7px color-mix(in srgb, var(--social-accent) 28%, transparent)); }
}
@media (max-width: 1060px) {
  .nav-in { gap: 8px; min-height: 64px; flex-wrap: wrap; }
  .brand { margin-right: auto; }
  .themebtn { margin-left: auto; }
  .burger { display: inline-flex; }
  .nav-links { position: static; flex: 1 1 100%; order: 5; width: 100%; margin: 0; padding: 10px 0 13px; flex-direction: column; align-items: stretch; gap: 5px; border-top: 1px solid var(--line); }
  .nav[data-enhanced="true"] .nav-links { transform-origin: top center; display: none; position: absolute; top: calc(100% + 8px); right: 14px; left: 14px; width: auto; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); max-height: calc(100vh - 88px); max-height: calc(100dvh - 88px); overflow-y: auto; overscroll-behavior: contain; }
  .nav[data-enhanced="true"].open .nav-links { display: flex; }
  .nav-links > a { padding: 11px 13px; border-radius: 10px; font-size: 15px; color: var(--text); white-space: normal; overflow-wrap: anywhere; }
  .site-menu > summary { min-height: 46px; padding: 11px 13px; font-size: 15px; }
  .site-menu > summary svg { width: 15px; height: 15px; }
  .site-menu-panel { position: static; max-height: none; margin: 6px 0 9px; padding: 19px 12px; border-radius: 11px; box-shadow: none; }
  .site-menu-groups { grid-template-columns: minmax(0, 1fr); gap: 23px; }
  .site-menu-group h3 { margin-bottom: 5px; }
  .nav-links .site-menu-group a { padding-block: 10px; font-size: 14px; }
  .nav-links .site-menu-overview { font-size: 14px; }
  .nav-links .lang-switch { width: 100%; }
  .nav-links .lang-btn { width: 100%; justify-content: center; height: 44px; font-size: 13px; }
  .nav-links .lang-menu { position: static; margin-top: 6px; min-width: 0; width: 100%; box-shadow: none; }
  .nav-links .lang-option { padding: 10px 12px; }
  .nav-links a.btn-primary { width: 100%; justify-content: center; min-height: 44px; padding: 12px; margin-top: 2px; font-size: 14px; color: #fff; }
}
/* Match the initial mobile header to its enhanced height before nav.js arrives.
   With scripts disabled the full navigation is available in normal document flow.
   Focusing the header also exposes the links if the navigation script fails. */
@media (max-width: 1060px) and (scripting: enabled) {
  .nav[data-site-shell]:not([data-enhanced]):not(:focus-within) .nav-links { display: none; }
}
@media (max-width: 900px) {
  .site-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 28px; }
}
@media (max-width: 680px) {
  footer.site.site-footer { padding-top: 34px; padding-bottom: 80px; }
  .site-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 22px; }
  .site-footer-grid a { font-size: 14px; padding-block: 6px; }
  .site-footer-bottom { margin-top: 30px; }
  .site-footer-identity { display: grid; gap: 4px; }
  .site-footer-identity p { padding-left: 42px; }
}
@media (max-width: 380px) {
  .nav-in { gap: 7px; }
  .brand { gap: 8px; font-size: 15.5px; }
  .brand img { width: 28px; height: 28px; }
  .site-footer-grid { grid-template-columns: minmax(0, 1fr); gap: 25px; }
  .site-footer-bottom { justify-content: center; }
  .site-footer-identity { justify-items: center; }
  .site-footer-identity p { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .site-socials a:hover { transform: none; }
  .nav *, .nav *::before, .nav *::after, .site-footer *, .site-footer *::before, .site-footer *::after { scroll-behavior: auto !important; transition: none !important; }
}
