/* Physical header positions are independent of the Arabic reading direction. */
body:not(.is-welcome) .topbar .topbar-inner {
  display: grid;
  direction: ltr;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: clamp(12px, 1.8vw, 28px);
}
body:not(.is-welcome) .topbar .topnav {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  margin: 0;
  direction: rtl;
  justify-content: center;
}
body:not(.is-welcome) .topbar .brand {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  direction: rtl;
}
body:not(.is-welcome) .topbar .header-actions {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  margin: 0;
  direction: rtl;
  flex-wrap: nowrap;
}
/* Keep the opened panel aligned with the menu button on the right. */
.topbar .more-navigation[open] .more-panel {
  right: 0;
  left: auto;
  inset-inline-end: auto;
}
@media (max-width: 1250px) {
  body:not(.is-welcome) .topbar .topnav {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
@media (max-width: 620px) {
  body:not(.is-welcome) .topbar .topbar-inner { gap: 8px; }
  .topbar .more-navigation[open] .more-panel { right: 12px; }
}
