/* Keep all desktop navigation links visible. Locale thresholds reflect the
   measured native labels, including the localized App Store action. */
html{--site-header-height:88px;scroll-padding-top:calc(var(--site-header-height) + 20px)}
.site-header .desktop-nav{min-width:0;gap:16px}
.site-header .desktop-nav a{white-space:nowrap;flex-shrink:0}
.site-header nav a:focus-visible{outline:3px solid #216ad4;outline-offset:4px;border-radius:4px}
.site-header nav a[aria-current=page]{color:#1257bf}
.site-header .mobile-menu nav a{overflow-wrap:anywhere}
.page-article .reading-progress{inset-block-start:calc(var(--site-header-height) - 1px)}

/* Every language gets the same label column, checkmark slot and row height.
   Bidirectional names stay isolated inside a consistently aligned grid. */
.site-header .language-panel{width:400px;padding:20px;max-height:calc(100dvh - var(--site-header-height) - 24px)}
.site-header .language-panel ul{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:56px;gap:4px 8px}
.site-header .language-panel li{min-width:0}
.site-header .language-panel a{display:grid;grid-template-columns:minmax(0,1fr) 16px;align-items:center;gap:8px;height:100%;padding:8px 10px;font-size:14px;line-height:1.4;text-align:start}
.site-header .language-name{min-width:0;justify-self:stretch;text-align:left}
html[dir=rtl] .site-header .language-name{text-align:right}
.site-header .language-check{width:16px;text-align:center}

@media(min-width:761px){
  html{--site-header-height:128px}
  .site-header .header-inner{width:min(1440px,calc(100% - 48px));display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"brand . controls" "nav nav nav";grid-template-rows:72px 56px;min-height:var(--site-header-height);column-gap:20px;row-gap:0}
  .site-header .brand{grid-area:brand;font-size:25px;gap:8px}
  .site-header .brand img{width:48px;height:48px}
  .site-header .header-controls{grid-area:controls;gap:12px;flex-shrink:0}
  .site-header .header-download{display:flex;font-size:14px;padding-inline:18px}
  .site-header .desktop-nav{grid-area:nav;display:flex;justify-self:center;align-self:center}
  .site-header .desktop-nav a{font-size:14px}
  .site-header .mobile-menu{display:none}
}
@media(min-width:1070px){
  html[lang="en"]{--site-header-height:88px}
  html[lang="en"] .site-header .header-inner{grid-template-areas:"brand nav controls";grid-template-rows:88px}
}
@media(min-width:960px){
  html[lang="zh-Hans"]{--site-header-height:88px}
  html[lang="zh-Hans"] .site-header .header-inner{grid-template-areas:"brand nav controls";grid-template-rows:88px}
}
@media(min-width:1030px){
  html[lang="zh-Hant"]{--site-header-height:88px}
  html[lang="zh-Hant"] .site-header .header-inner{grid-template-areas:"brand nav controls";grid-template-rows:88px}
}
@media(min-width:1290px){
  html[lang="es"]{--site-header-height:88px}
  html[lang="es"] .site-header .header-inner{grid-template-areas:"brand nav controls";grid-template-rows:88px}
}
@media(min-width:1390px){
  html[lang="fr"]{--site-header-height:88px}
  html[lang="fr"] .site-header .header-inner{grid-template-areas:"brand nav controls";grid-template-rows:88px}
}
@media(min-width:1390px){
  html[lang="de"]{--site-header-height:88px}
  html[lang="de"] .site-header .header-inner{grid-template-areas:"brand nav controls";grid-template-rows:88px}
}
@media(min-width:1360px){
  html[lang="pt-BR"]{--site-header-height:88px}
  html[lang="pt-BR"] .site-header .header-inner{grid-template-areas:"brand nav controls";grid-template-rows:88px}
}
@media(min-width:1190px){
  html[lang="ja"]{--site-header-height:88px}
  html[lang="ja"] .site-header .header-inner{grid-template-areas:"brand nav controls";grid-template-rows:88px}
}
@media(min-width:1000px){
  html[lang="ko"]{--site-header-height:88px}
  html[lang="ko"] .site-header .header-inner{grid-template-areas:"brand nav controls";grid-template-rows:88px}
}
@media(min-width:1250px){
  html[lang="it"]{--site-header-height:88px}
  html[lang="it"] .site-header .header-inner{grid-template-areas:"brand nav controls";grid-template-rows:88px}
}
@media(min-width:1030px){
  html[lang="ar"]{--site-header-height:88px}
  html[lang="ar"] .site-header .header-inner{grid-template-areas:"brand nav controls";grid-template-rows:88px}
}
/* Long French/German labels still fit the full tablet navigation row. */
@media(min-width:761px) and (max-width:830px){
  html[lang=de] .site-header .desktop-nav{gap:6px}
  html[lang=fr] .site-header .desktop-nav{gap:10px}
}
@media(max-width:760px){
  html{--site-header-height:72px}
  .site-header .desktop-nav{display:none}
  .site-header .mobile-menu{display:block}
  .site-header .language-panel{position:fixed;inset-inline:12px;top:calc(var(--site-header-height) + 8px);width:auto;max-width:none;padding:16px}
}
@media(max-width:400px){.site-header .header-inner{gap:8px}.site-header .header-controls{gap:4px}}

/* A quiet, single-row desktop consent bar. The status stays available to
   assistive technology without forcing a second visual row. */
.analytics-choice{bottom:18px;width:min(1240px,calc(100% - 32px));grid-template-columns:minmax(0,1fr) auto;gap:18px;padding:11px 12px 11px 18px;border-color:#c6dbef;border-radius:16px;box-shadow:0 14px 44px #18365224,0 2px 8px #18365212;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.analytics-choice>div:first-child{display:flex;align-items:baseline;gap:12px;min-width:0}
.analytics-choice h2{flex:0 0 auto;font-size:.94rem;line-height:1.35;margin:0;white-space:nowrap}
.analytics-choice p{min-width:0;font-size:.78rem;line-height:1.45;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.analytics-choice p a{font-weight:650}
.consent-buttons{flex-wrap:nowrap;gap:8px}
.consent-buttons button{min-height:36px;padding:7px 13px;border-radius:9px;font-size:.78rem;font-weight:650;white-space:nowrap;transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.consent-buttons button[data-consent=granted]{border-color:#0870d6;background:#0870d6;color:#fff;box-shadow:0 5px 14px #0870d62c}
.consent-buttons button[data-consent=granted]:hover{background:#0063c4;border-color:#0063c4;transform:translateY(-1px)}
.consent-buttons button[data-consent=denied]{border-color:#bfd4e8;background:#f7fbff;color:#315573}
.consent-buttons button[data-consent=denied]:hover{background:#eaf4fd;border-color:#9fc3e1;transform:translateY(-1px)}
.analytics-choice>[data-consent-status]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(max-width:760px){.analytics-choice{bottom:10px;width:calc(100% - 24px);grid-template-columns:1fr;gap:12px;padding:14px;border-radius:17px}.analytics-choice>div:first-child{display:block}.analytics-choice h2{font-size:.95rem;margin-bottom:4px}.analytics-choice p{font-size:.78rem;line-height:1.5;white-space:normal;overflow:visible}.consent-buttons{display:grid;grid-template-columns:1fr 1fr}.consent-buttons button{min-height:40px}}
